@regulaforensics/vp-frontend-document-components 1.2.0 → 2.0.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 +660 -81
- package/dist/main.js +1 -1
- package/dist/main.js.LICENSE.txt +41 -0
- package/esm/main.js +2 -0
- package/esm/main.js.LICENSE.txt +41 -0
- package/lib/common/BackCameraIcon.d.ts +6 -0
- package/lib/common/Button.d.ts +7 -0
- package/lib/common/CameraChangeIcon.d.ts +6 -0
- package/lib/common/CameraIcon.d.ts +6 -0
- package/lib/common/CheckIcon.d.ts +6 -0
- package/lib/common/CrossIcon.d.ts +6 -0
- package/lib/common/DocReaderCameraDisabled.d.ts +5 -0
- package/lib/common/DocReaderCameraPreparing.d.ts +5 -0
- package/lib/common/DocReaderFlip.d.ts +5 -0
- package/lib/common/DocReaderProcessing.d.ts +5 -0
- package/lib/common/DocReaderProcessingError.d.ts +5 -0
- package/lib/common/DocReaderProcessingFinished.d.ts +6 -0
- package/lib/common/DocReaderSearch.d.ts +5 -0
- package/lib/common/ErrorIcon.d.ts +6 -0
- package/lib/common/FromCameraIcon.d.ts +5 -0
- package/lib/common/FromGalleryIcon.d.ts +5 -0
- package/lib/common/FrontCameraIcon.d.ts +6 -0
- package/lib/common/FullscreenExitIcon.d.ts +6 -0
- package/lib/common/FullscreenIcon.d.ts +6 -0
- package/lib/common/Icon.d.ts +7 -0
- package/lib/common/InstructionIconFaceDetection.d.ts +5 -0
- package/lib/common/InstructionIconFaceLiveness.d.ts +5 -0
- package/lib/common/Message.d.ts +7 -0
- package/lib/common/NoGlareIcon.d.ts +5 -0
- package/lib/common/NoSmilingIcon.d.ts +5 -0
- package/lib/common/RegulaLogo.d.ts +6 -0
- package/lib/common/SnapshotIcon.d.ts +6 -0
- package/lib/common/Spinner.d.ts +3 -0
- package/lib/common/SquareIcon.d.ts +6 -0
- package/lib/common/StopIcon.d.ts +6 -0
- package/lib/common/VerifiedIcon.d.ts +6 -0
- package/lib/components/CameraCapture.d.ts +9 -0
- package/lib/components/CameraSnapshot.d.ts +2 -0
- package/lib/components/CameraSnapshotFileCapture.d.ts +10 -0
- package/lib/components/DocumentCapture.d.ts +10 -0
- package/lib/components/DocumentFullScreenOverlay.d.ts +11 -0
- package/lib/components/DocumentReader.d.ts +2 -0
- package/lib/components/DocumentReaderFileCapture.d.ts +12 -0
- package/lib/components/DocumentReaderLayout.d.ts +22 -0
- package/lib/components/DocumentReaderStartScreen.d.ts +10 -0
- package/lib/components/ErrorBoundary.d.ts +18 -0
- package/lib/components/FaceCapture.d.ts +15 -0
- package/lib/components/FaceDetection.d.ts +2 -0
- package/lib/components/FaceFullScreenOverlay.d.ts +11 -0
- package/lib/components/FaceLayout.d.ts +18 -0
- package/lib/components/FaceLiveness.d.ts +2 -0
- package/lib/components/InfoScreen.d.ts +10 -0
- package/lib/components/InstructionScreen.d.ts +9 -0
- package/lib/components/ProcessScreen.d.ts +6 -0
- package/lib/components/RetryScreen.d.ts +7 -0
- package/lib/components/WebCamera.d.ts +19 -0
- package/lib/constants.d.ts +568 -0
- package/lib/contexts/DocumentAttributesContext.d.ts +24 -0
- package/lib/contexts/DocumentSDKContext.d.ts +6 -0
- package/lib/contexts/FaceAttributesContext.d.ts +21 -0
- package/lib/hoc/withDocumentAttributesContext.d.ts +4 -0
- package/lib/hoc/withDocumentSDKContext.d.ts +3 -0
- package/lib/hoc/withFaceAttributesContext.d.ts +4 -0
- package/lib/hoc/withLocalize.d.ts +7 -0
- package/lib/hooks/useDocumentReaderSeries.d.ts +25 -0
- package/lib/hooks/useDocumentReaderSingle.d.ts +15 -0
- package/lib/hooks/useFaceLiveness.d.ts +30 -0
- package/lib/hooks/useImageInputParam.d.ts +9 -0
- package/lib/hooks/useOrientationChange.d.ts +10 -0
- package/lib/hooks/useStream.d.ts +10 -0
- package/lib/hooks/useUserAgent.d.ts +3 -0
- package/lib/hooks/useWindowBlur.d.ts +2 -0
- package/lib/i18n/dictionaries/_dictionaries.d.ts +2115 -0
- package/lib/index-document.d.ts +5 -0
- package/lib/models/CameraModel.d.ts +9 -0
- package/lib/models/CustomError.d.ts +7 -0
- package/lib/models/ImageModel.d.ts +7 -0
- package/lib/services/DebugService.d.ts +13 -0
- package/lib/services/DocumentReaderProcessor.d.ts +53 -0
- package/lib/services/DocumentReaderService.d.ts +44 -0
- package/lib/services/EventEmitter.d.ts +9 -0
- package/lib/services/FaceLivenessService.d.ts +43 -0
- package/lib/services/FaceService.d.ts +12 -0
- package/lib/types.d.ts +323 -0
- package/lib/utils.d.ts +27 -0
- package/lib/web-components/CameraSnapshot.d.ts +11 -0
- package/lib/web-components/DocumentReader.d.ts +11 -0
- package/lib/web-components/FaceDetection.d.ts +11 -0
- package/lib/web-components/FaceLiveness.d.ts +14 -0
- package/lib/web-components/FullScreenContainer.d.ts +4 -0
- package/package.json +63 -69
|
@@ -0,0 +1,568 @@
|
|
|
1
|
+
export declare enum FaceMessage {
|
|
2
|
+
Empty = 0,
|
|
3
|
+
FitFaceIntoOval = 1,
|
|
4
|
+
LookStraight = 2,
|
|
5
|
+
MoveCloser = 3,
|
|
6
|
+
MoveAway = 4,
|
|
7
|
+
HoldStill = 5,
|
|
8
|
+
ShowOnlyOneFace = 6
|
|
9
|
+
}
|
|
10
|
+
export declare enum FaceProcessingStage {
|
|
11
|
+
Far = 0,
|
|
12
|
+
Near = 1
|
|
13
|
+
}
|
|
14
|
+
export declare enum FaceMessageStyle {
|
|
15
|
+
Normal = 0,
|
|
16
|
+
Alarm = 1
|
|
17
|
+
}
|
|
18
|
+
export declare enum FaceStatus {
|
|
19
|
+
Finished = 0,
|
|
20
|
+
InProcess = 1,
|
|
21
|
+
Timeout = 2,
|
|
22
|
+
Failed = 3
|
|
23
|
+
}
|
|
24
|
+
export declare enum ImageOutputType {
|
|
25
|
+
UINT = "UINT",
|
|
26
|
+
BASE64 = "BASE64",
|
|
27
|
+
UINT_AND_BASE64 = "UINT_AND_BASE64"
|
|
28
|
+
}
|
|
29
|
+
export declare enum FaceEventActions {
|
|
30
|
+
ELEMENT_VISIBLE = "ELEMENT_VISIBLE",
|
|
31
|
+
PRESS_START_BUTTON = "PRESS_START_BUTTON",
|
|
32
|
+
PRESS_RETRY_BUTTON = "PRESS_RETRY_BUTTON",
|
|
33
|
+
CLOSE = "CLOSE",
|
|
34
|
+
PROCESS_FINISHED = "PROCESS_FINISHED",
|
|
35
|
+
SERVICE_INITIALIZED = "SERVICE_INITIALIZED"
|
|
36
|
+
}
|
|
37
|
+
export declare enum DocumentEventActions {
|
|
38
|
+
ELEMENT_VISIBLE = "ELEMENT_VISIBLE",
|
|
39
|
+
PRESS_CAMERA_BUTTON = "PRESS_CAMERA_BUTTON",
|
|
40
|
+
PRESS_FILE_BUTTON = "PRESS_FILE_BUTTON",
|
|
41
|
+
PRESS_RETRY_BUTTON = "PRESS_RETRY_BUTTON",
|
|
42
|
+
PRESS_SKIP_BUTTON = "PRESS_SKIP_BUTTON",
|
|
43
|
+
CLOSE = "CLOSE",
|
|
44
|
+
PROCESS_FINISHED = "PROCESS_FINISHED",
|
|
45
|
+
SERVICE_INITIALIZED = "SERVICE_INITIALIZED"
|
|
46
|
+
}
|
|
47
|
+
export declare enum DocumentCaptureStatus {
|
|
48
|
+
FINDING = "DocumentCaptureStatus.FINDING",
|
|
49
|
+
PROCESSING = "DocumentCaptureStatus.PROCESSING",
|
|
50
|
+
SUCCESS = "DocumentCaptureStatus.SUCCESS",
|
|
51
|
+
FAILED = "DocumentCaptureStatus.FAILED",
|
|
52
|
+
RESOLUTION = "DocumentCaptureStatus.RESOLUTION",
|
|
53
|
+
GLARE = "DocumentCaptureStatus.GLARE",
|
|
54
|
+
FOCUS = "DocumentCaptureStatus.FOCUS",
|
|
55
|
+
HOLD = "DocumentCaptureStatus.HOLD",
|
|
56
|
+
START_DETECTION = "DocumentCaptureStatus.START_DETECTION",
|
|
57
|
+
START_NEXT_PAGE = "DocumentCaptureStatus.START_NEXT_PAGE",
|
|
58
|
+
SNAPSHOT = "DocumentCaptureStatus.SNAPSHOT",
|
|
59
|
+
TIMEOUT = "DocumentCaptureStatus.TIMEOUT"
|
|
60
|
+
}
|
|
61
|
+
export declare enum ImageQualityCheckType {
|
|
62
|
+
IMAGE_GLARES = 0,
|
|
63
|
+
IMAGE_FOCUS = 1,
|
|
64
|
+
IMAGE_RESOLUTION = 2,
|
|
65
|
+
IMAGE_COLORNESS = 3,
|
|
66
|
+
PERSPECTIVE = 4,
|
|
67
|
+
BOUNDS = 5,
|
|
68
|
+
SCREEN_CAPTURE = 6,
|
|
69
|
+
PORTRAIT = 7,
|
|
70
|
+
HANDWRITTEN = 8
|
|
71
|
+
}
|
|
72
|
+
export declare enum ResponseCode {
|
|
73
|
+
EMPTY = -1,
|
|
74
|
+
ERROR = 0,
|
|
75
|
+
OK = 1
|
|
76
|
+
}
|
|
77
|
+
export declare enum CheckResult {
|
|
78
|
+
ERROR = 0,
|
|
79
|
+
OK = 1,
|
|
80
|
+
WAS_NOT_DONE = 2
|
|
81
|
+
}
|
|
82
|
+
export declare enum StreamStatus {
|
|
83
|
+
PREPARING = "StreamStatus.PREPARING",
|
|
84
|
+
REQUESTING = "StreamStatus.REQUESTING",
|
|
85
|
+
READY = "StreamStatus.READY",
|
|
86
|
+
PLAY = "StreamStatus.PLAY",
|
|
87
|
+
UNKNOWN_ERROR = "StreamStatus.UNKNOWN_ERROR",
|
|
88
|
+
PERMISSION_DENIED = "StreamStatus.PERMISSION_DENIED",
|
|
89
|
+
NO_CAMERA = "StreamStatus.NO_CAMERA",
|
|
90
|
+
INCORRECT_CAMERA_ID = "StreamStatus.INCORRECT_CAMERA_ID"
|
|
91
|
+
}
|
|
92
|
+
export declare enum FaceCompletionStatus {
|
|
93
|
+
INSTRUCTION = "FaceCompletionStatus.INSTRUCTION",
|
|
94
|
+
SUCCESS = "FaceCompletionStatus.SUCCESS",
|
|
95
|
+
FAILED = "FaceCompletionStatus.FAILED",
|
|
96
|
+
CAPTURING = "FaceCompletionStatus.CAPTURING",
|
|
97
|
+
PROCESSING_REQUEST = "FaceCompletionStatus.PROCESSING_REQUEST",
|
|
98
|
+
WASM_DEFAULT_ERROR = "FaceCompletionStatus.WASM_DEFAULT_ERROR",
|
|
99
|
+
NOT_SUPPORTED_ERROR = "FaceCompletionStatus.NOT_SUPPORTED_ERROR",
|
|
100
|
+
WASM_LICENSE_ERROR = "FaceCompletionStatus.WASM_LICENSE_ERROR",
|
|
101
|
+
UNKNOWN_ERROR = "FaceCompletionStatus.UNKNOWN_ERROR",
|
|
102
|
+
NO_CAMERA_ERROR = "FaceCompletionStatus.NO_CAMERA_ERROR",
|
|
103
|
+
PERMISSION_DENIED_ERROR = "FaceCompletionStatus.PERMISSION_DENIED_ERROR",
|
|
104
|
+
INCORRECT_CAMERA_ID_ERROR = "FaceCompletionStatus.INCORRECT_CAMERA_ID_ERROR"
|
|
105
|
+
}
|
|
106
|
+
export declare enum DocumentCompletionStatus {
|
|
107
|
+
CHOOSE_INPUT_SOURCE = "DocumentCompletionStatus.CHOOSE_INPUT_SOURCE",
|
|
108
|
+
CAMERA_PROCESSING = "DocumentCompletionStatus.CAMERA_PROCESSING",
|
|
109
|
+
FILE_PROCESSING = "DocumentCompletionStatus.FILE_PROCESSING",
|
|
110
|
+
API_PROCESSING = "DocumentCompletionStatus.API_PROCESSING",
|
|
111
|
+
SUCCESS = "DocumentCompletionStatus.SUCCESS",
|
|
112
|
+
FAILED = "DocumentCompletionStatus.FAILED",
|
|
113
|
+
FILE_SIZE_ERROR = "DocumentCompletionStatus.FILE_SIZE_ERROR",
|
|
114
|
+
WASM_DEFAULT_ERROR = "DocumentCompletionStatus.WASM_DEFAULT_ERROR",
|
|
115
|
+
NOT_SUPPORTED_ERROR = "DocumentCompletionStatus.NOT_SUPPORTED_ERROR",
|
|
116
|
+
WASM_LICENSE_ERROR = "DocumentCompletionStatus.WASM_LICENSE_ERROR",
|
|
117
|
+
INCORRECT_FILE_ERROR = "DocumentCompletionStatus.INCORRECT_FILE_ERROR",
|
|
118
|
+
UNKNOWN_ERROR = "DocumentCompletionStatus.UNKNOWN_ERROR",
|
|
119
|
+
TIMEOUT = "DocumentCompletionStatus.TIMEOUT"
|
|
120
|
+
}
|
|
121
|
+
export declare enum CameraFacingMode {
|
|
122
|
+
user = "user",
|
|
123
|
+
environment = "environment"
|
|
124
|
+
}
|
|
125
|
+
export declare enum ProcessingStatus {
|
|
126
|
+
NOT_FINISHED = 0,
|
|
127
|
+
FINISHED = 1,
|
|
128
|
+
TIMEOUT = 2
|
|
129
|
+
}
|
|
130
|
+
export declare enum DocumentCommandCode {
|
|
131
|
+
PROCESS = 12101,
|
|
132
|
+
PROCESS_IMAGE = 12104,
|
|
133
|
+
START_NEW_DOCUMENT = 12105,
|
|
134
|
+
START_NEW_PAGE = 12106
|
|
135
|
+
}
|
|
136
|
+
export declare enum ObjectFit {
|
|
137
|
+
contain = "contain",
|
|
138
|
+
cover = "cover"
|
|
139
|
+
}
|
|
140
|
+
export declare enum InternalScenarios {
|
|
141
|
+
MrzAndLocate = "MrzAndLocate",
|
|
142
|
+
MrzOrLocate = "MrzOrLocate",
|
|
143
|
+
Mrz = "Mrz",
|
|
144
|
+
Locate = "Locate"
|
|
145
|
+
}
|
|
146
|
+
export declare enum ErrorTypes {
|
|
147
|
+
WASM_ERROR = "WASM_ERROR",
|
|
148
|
+
WASM_LICENSE = "WASM_LICENSE",
|
|
149
|
+
FILE_SIZE = "FILE_SIZE",
|
|
150
|
+
INCORRECT_FILE = "INCORRECT_FILE",
|
|
151
|
+
UNKNOWN_ERROR = "UNKNOWN_ERROR",
|
|
152
|
+
NOT_SUPPORTED = "NOT_SUPPORTED",
|
|
153
|
+
CAMERA_UNKNOWN_ERROR = "CAMERA_UNKNOWN_ERROR",
|
|
154
|
+
CAMERA_PERMISSION_DENIED = "CAMERA_PERMISSION_DENIED",
|
|
155
|
+
NO_CAMERA = "NO_CAMERA",
|
|
156
|
+
INCORRECT_CAMERA_ID = "INCORRECT_CAMERA_ID",
|
|
157
|
+
CONNECTION_ERROR = "CONNECTION_ERROR",
|
|
158
|
+
LANDSCAPE_MODE_RESTRICTED = "LANDSCAPE_MODE_RESTRICTED",
|
|
159
|
+
NOT_PREPARED = "NOT_PREPARED",
|
|
160
|
+
NOT_INITIALIZED = "NOT_INITIALIZED",
|
|
161
|
+
IN_PROCESS = "IN_PROCESS",
|
|
162
|
+
ALREADY_PREPARED = "ALREADY_PREPARED",
|
|
163
|
+
ALREADY_INITIALIZED = "ALREADY_INITIALIZED"
|
|
164
|
+
}
|
|
165
|
+
export declare enum Method {
|
|
166
|
+
onRuntimeInitialized = "onRuntimeInitialized",
|
|
167
|
+
processImage = "processImage",
|
|
168
|
+
process = "process",
|
|
169
|
+
startNewPage = "startNewPage",
|
|
170
|
+
startNewDocument = "startNewDocument",
|
|
171
|
+
initializeService = "initializeService",
|
|
172
|
+
close = "close",
|
|
173
|
+
stderr = "strerr"
|
|
174
|
+
}
|
|
175
|
+
export declare enum MediaElementReadyState {
|
|
176
|
+
HAVE_NOTHING = 0,
|
|
177
|
+
HAVE_METADATA = 1,
|
|
178
|
+
HAVE_CURRENT_DATA = 2,
|
|
179
|
+
HAVE_FUTURE_DATA = 3,
|
|
180
|
+
HAVE_ENOUGH_DATA = 4
|
|
181
|
+
}
|
|
182
|
+
export declare enum Target {
|
|
183
|
+
stdout = "stdout",
|
|
184
|
+
stderr = "stderr",
|
|
185
|
+
custom = "custom"
|
|
186
|
+
}
|
|
187
|
+
export declare enum PromiseMethod {
|
|
188
|
+
resolve = "resolve",
|
|
189
|
+
reject = "reject"
|
|
190
|
+
}
|
|
191
|
+
export declare enum PromiseName {
|
|
192
|
+
empty = "empty",
|
|
193
|
+
prepare = "prepare",
|
|
194
|
+
initialize = "initialize",
|
|
195
|
+
process = "process",
|
|
196
|
+
processImage = "processImage",
|
|
197
|
+
startNewPage = "startNewPage",
|
|
198
|
+
startNewDocument = "startNewDocument"
|
|
199
|
+
}
|
|
200
|
+
export declare enum logLevels {
|
|
201
|
+
OFF = 0,
|
|
202
|
+
LOG = 1,
|
|
203
|
+
INFO = 2,
|
|
204
|
+
WARN = 3,
|
|
205
|
+
ERROR = 4
|
|
206
|
+
}
|
|
207
|
+
export declare enum DirectionType {
|
|
208
|
+
Rtl = "rtl",
|
|
209
|
+
Ltr = "ltr"
|
|
210
|
+
}
|
|
211
|
+
export declare const FACE_LIVENESS_EVENT = "face-liveness";
|
|
212
|
+
export declare const FACE_CAPTURE_EVENT = "face-capture";
|
|
213
|
+
export declare const DOCUMENT_READER_EVENT = "document-reader";
|
|
214
|
+
export declare const CAMERA_SNAPSHOT_EVENT = "camera-snapshot";
|
|
215
|
+
export declare const PERCENT_FRAME_OFFSET = 10;
|
|
216
|
+
export declare const FLIP_TIMEOUT = 3000;
|
|
217
|
+
export declare const FRAME_STROKE_WIDTH = 3;
|
|
218
|
+
export declare const RESULT_TIMEOUT_MS = 2000;
|
|
219
|
+
export declare const NEW_INDEX = 1;
|
|
220
|
+
export declare const MAX_FILES_SIZE = 25000000;
|
|
221
|
+
export declare const RESIZE_VALUE = 1920;
|
|
222
|
+
export declare const MAX_BROWSER_SUPPORTED_RESOLUTION = 536870912;
|
|
223
|
+
export declare const PERMISSION_DENIED_ERROR_NAME = "NotAllowedError";
|
|
224
|
+
export declare const FACE_BACKEND_URL = "https://faceapi.regulaforensics.com";
|
|
225
|
+
export declare const DEFAULT_COMPONENT_LANGUAGE = "en";
|
|
226
|
+
export declare const RTL_LANGUAGES: string[];
|
|
227
|
+
export declare const DEFAULT_CAMERA_ID = 0;
|
|
228
|
+
export declare const OVAL_TRANSITION_TIME = 200;
|
|
229
|
+
export declare const CameraResolution: {
|
|
230
|
+
VGA: {
|
|
231
|
+
width: number;
|
|
232
|
+
height: number;
|
|
233
|
+
};
|
|
234
|
+
HD: {
|
|
235
|
+
width: number;
|
|
236
|
+
height: number;
|
|
237
|
+
};
|
|
238
|
+
FULL_HD: {
|
|
239
|
+
width: number;
|
|
240
|
+
height: number;
|
|
241
|
+
};
|
|
242
|
+
SQUARE: {
|
|
243
|
+
width: number;
|
|
244
|
+
height: number;
|
|
245
|
+
};
|
|
246
|
+
};
|
|
247
|
+
export declare const BackCameraKeywords: string[];
|
|
248
|
+
export declare const FaceErrorCodes: {
|
|
249
|
+
231: {
|
|
250
|
+
name: string;
|
|
251
|
+
type: number;
|
|
252
|
+
};
|
|
253
|
+
232: {
|
|
254
|
+
name: string;
|
|
255
|
+
type: number;
|
|
256
|
+
};
|
|
257
|
+
245: {
|
|
258
|
+
name: string;
|
|
259
|
+
type: number;
|
|
260
|
+
};
|
|
261
|
+
230: {
|
|
262
|
+
name: string;
|
|
263
|
+
type: number;
|
|
264
|
+
};
|
|
265
|
+
233: {
|
|
266
|
+
name: string;
|
|
267
|
+
type: number;
|
|
268
|
+
};
|
|
269
|
+
234: {
|
|
270
|
+
name: string;
|
|
271
|
+
type: number;
|
|
272
|
+
};
|
|
273
|
+
235: {
|
|
274
|
+
name: string;
|
|
275
|
+
type: number;
|
|
276
|
+
};
|
|
277
|
+
236: {
|
|
278
|
+
name: string;
|
|
279
|
+
type: number;
|
|
280
|
+
};
|
|
281
|
+
239: {
|
|
282
|
+
name: string;
|
|
283
|
+
type: number;
|
|
284
|
+
};
|
|
285
|
+
240: {
|
|
286
|
+
name: string;
|
|
287
|
+
type: number;
|
|
288
|
+
};
|
|
289
|
+
242: {
|
|
290
|
+
name: string;
|
|
291
|
+
type: number;
|
|
292
|
+
};
|
|
293
|
+
243: {
|
|
294
|
+
name: string;
|
|
295
|
+
type: number;
|
|
296
|
+
};
|
|
297
|
+
244: {
|
|
298
|
+
name: string;
|
|
299
|
+
type: number;
|
|
300
|
+
};
|
|
301
|
+
};
|
|
302
|
+
export declare const WebComponentErrorByStreamStatus: {
|
|
303
|
+
"StreamStatus.UNKNOWN_ERROR": ErrorTypes;
|
|
304
|
+
"StreamStatus.PERMISSION_DENIED": ErrorTypes;
|
|
305
|
+
"StreamStatus.NO_CAMERA": ErrorTypes;
|
|
306
|
+
"StreamStatus.INCORRECT_CAMERA_ID": ErrorTypes;
|
|
307
|
+
};
|
|
308
|
+
export declare const DocumentReaderStatusByError: {
|
|
309
|
+
FILE_SIZE: DocumentCompletionStatus;
|
|
310
|
+
WASM_ERROR: DocumentCompletionStatus;
|
|
311
|
+
NOT_SUPPORTED: DocumentCompletionStatus;
|
|
312
|
+
WASM_LICENSE: DocumentCompletionStatus;
|
|
313
|
+
INCORRECT_FILE: DocumentCompletionStatus;
|
|
314
|
+
};
|
|
315
|
+
export declare const DocumentReaderStatusByCaptureStatus: {
|
|
316
|
+
"DocumentCaptureStatus.SUCCESS": DocumentCompletionStatus;
|
|
317
|
+
"DocumentCaptureStatus.TIMEOUT": DocumentCompletionStatus;
|
|
318
|
+
"DocumentCaptureStatus.FAILED": DocumentCompletionStatus;
|
|
319
|
+
};
|
|
320
|
+
export declare const FaceLivenessStatusByError: {
|
|
321
|
+
WASM_ERROR: FaceCompletionStatus;
|
|
322
|
+
NOT_SUPPORTED: FaceCompletionStatus;
|
|
323
|
+
WASM_LICENSE: FaceCompletionStatus;
|
|
324
|
+
};
|
|
325
|
+
export declare const DocumentSupportedBrowsers: {
|
|
326
|
+
iOS: {
|
|
327
|
+
Chrome: number;
|
|
328
|
+
Firefox: number;
|
|
329
|
+
Opera: number;
|
|
330
|
+
Safari: number;
|
|
331
|
+
Edge: number;
|
|
332
|
+
Chromium: number;
|
|
333
|
+
IE: number;
|
|
334
|
+
'Internet Explorer': number;
|
|
335
|
+
'Mobile Safari': number;
|
|
336
|
+
'Samsung Browser': number;
|
|
337
|
+
};
|
|
338
|
+
Android: {
|
|
339
|
+
Chrome: number;
|
|
340
|
+
Firefox: number;
|
|
341
|
+
Opera: number;
|
|
342
|
+
Safari: number;
|
|
343
|
+
Edge: number;
|
|
344
|
+
Chromium: number;
|
|
345
|
+
IE: number;
|
|
346
|
+
'Internet Explorer': number;
|
|
347
|
+
'Mobile Safari': number;
|
|
348
|
+
'Samsung Browser': number;
|
|
349
|
+
};
|
|
350
|
+
desktop: {
|
|
351
|
+
Chrome: number;
|
|
352
|
+
Firefox: number;
|
|
353
|
+
Opera: number;
|
|
354
|
+
Safari: number;
|
|
355
|
+
Edge: number;
|
|
356
|
+
Chromium: number;
|
|
357
|
+
IE: number;
|
|
358
|
+
'Internet Explorer': number;
|
|
359
|
+
'Mobile Safari': number;
|
|
360
|
+
'Samsung Browser': number;
|
|
361
|
+
};
|
|
362
|
+
};
|
|
363
|
+
export declare const FaceSupportedBrowsers: {
|
|
364
|
+
iOS: {
|
|
365
|
+
Chrome: number;
|
|
366
|
+
Firefox: number;
|
|
367
|
+
Opera: number;
|
|
368
|
+
Safari: number;
|
|
369
|
+
Edge: number;
|
|
370
|
+
Chromium: number;
|
|
371
|
+
IE: number;
|
|
372
|
+
'Internet Explorer': number;
|
|
373
|
+
'Mobile Safari': number;
|
|
374
|
+
'Samsung Browser': number;
|
|
375
|
+
};
|
|
376
|
+
Android: {
|
|
377
|
+
Chrome: number;
|
|
378
|
+
Firefox: number;
|
|
379
|
+
Opera: number;
|
|
380
|
+
Safari: number;
|
|
381
|
+
Edge: number;
|
|
382
|
+
Chromium: number;
|
|
383
|
+
IE: number;
|
|
384
|
+
'Internet Explorer': number;
|
|
385
|
+
'Mobile Safari': number;
|
|
386
|
+
'Samsung Browser': number;
|
|
387
|
+
};
|
|
388
|
+
desktop: {
|
|
389
|
+
Chrome: number;
|
|
390
|
+
Firefox: number;
|
|
391
|
+
Opera: number;
|
|
392
|
+
Safari: number;
|
|
393
|
+
Edge: number;
|
|
394
|
+
Chromium: number;
|
|
395
|
+
IE: number;
|
|
396
|
+
'Internet Explorer': number;
|
|
397
|
+
'Mobile Safari': number;
|
|
398
|
+
'Samsung Browser': number;
|
|
399
|
+
};
|
|
400
|
+
};
|
|
401
|
+
export declare const DocumentScenarioFrameParams: {
|
|
402
|
+
scenario: ({
|
|
403
|
+
caption: string;
|
|
404
|
+
desc: string;
|
|
405
|
+
frameKWHDoublePageSpreadLandscape: string;
|
|
406
|
+
frameKWHDoublePageSpreadPortrait: string;
|
|
407
|
+
frameKWHLandscape: string;
|
|
408
|
+
frameKWHPortrait: string;
|
|
409
|
+
frameOrientation: number;
|
|
410
|
+
multiPageOff: number;
|
|
411
|
+
name: string;
|
|
412
|
+
seriesProcessMode: number;
|
|
413
|
+
barcodeExt?: undefined;
|
|
414
|
+
faceExt?: undefined;
|
|
415
|
+
manualCrop?: undefined;
|
|
416
|
+
UVTorch?: undefined;
|
|
417
|
+
} | {
|
|
418
|
+
barcodeExt: number;
|
|
419
|
+
caption: string;
|
|
420
|
+
desc: string;
|
|
421
|
+
frameKWHDoublePageSpreadLandscape: number;
|
|
422
|
+
frameKWHDoublePageSpreadPortrait: number;
|
|
423
|
+
frameKWHLandscape: number;
|
|
424
|
+
frameKWHPortrait: number;
|
|
425
|
+
frameOrientation: number;
|
|
426
|
+
multiPageOff: number;
|
|
427
|
+
name: string;
|
|
428
|
+
seriesProcessMode: number;
|
|
429
|
+
faceExt?: undefined;
|
|
430
|
+
manualCrop?: undefined;
|
|
431
|
+
UVTorch?: undefined;
|
|
432
|
+
} | {
|
|
433
|
+
caption: string;
|
|
434
|
+
desc: string;
|
|
435
|
+
faceExt: number;
|
|
436
|
+
frameKWHDoublePageSpreadLandscape: string;
|
|
437
|
+
frameKWHDoublePageSpreadPortrait: string;
|
|
438
|
+
frameKWHLandscape: string;
|
|
439
|
+
frameKWHPortrait: string;
|
|
440
|
+
frameOrientation: number;
|
|
441
|
+
manualCrop: number;
|
|
442
|
+
name: string;
|
|
443
|
+
seriesProcessMode: number;
|
|
444
|
+
multiPageOff?: undefined;
|
|
445
|
+
barcodeExt?: undefined;
|
|
446
|
+
UVTorch?: undefined;
|
|
447
|
+
} | {
|
|
448
|
+
barcodeExt: number;
|
|
449
|
+
caption: string;
|
|
450
|
+
desc: string;
|
|
451
|
+
frameKWHDoublePageSpreadLandscape: string;
|
|
452
|
+
frameKWHDoublePageSpreadPortrait: string;
|
|
453
|
+
frameKWHLandscape: string;
|
|
454
|
+
frameKWHPortrait: string;
|
|
455
|
+
frameOrientation: number;
|
|
456
|
+
multiPageOff: number;
|
|
457
|
+
name: string;
|
|
458
|
+
seriesProcessMode: number;
|
|
459
|
+
faceExt?: undefined;
|
|
460
|
+
manualCrop?: undefined;
|
|
461
|
+
UVTorch?: undefined;
|
|
462
|
+
} | {
|
|
463
|
+
caption: string;
|
|
464
|
+
desc: string;
|
|
465
|
+
faceExt: number;
|
|
466
|
+
frameKWHDoublePageSpreadLandscape: string;
|
|
467
|
+
frameKWHDoublePageSpreadPortrait: string;
|
|
468
|
+
frameKWHLandscape: string;
|
|
469
|
+
frameKWHPortrait: string;
|
|
470
|
+
frameOrientation: number;
|
|
471
|
+
manualCrop: number;
|
|
472
|
+
multiPageOff: number;
|
|
473
|
+
name: string;
|
|
474
|
+
seriesProcessMode: number;
|
|
475
|
+
barcodeExt?: undefined;
|
|
476
|
+
UVTorch?: undefined;
|
|
477
|
+
} | {
|
|
478
|
+
barcodeExt: number;
|
|
479
|
+
caption: string;
|
|
480
|
+
desc: string;
|
|
481
|
+
faceExt: number;
|
|
482
|
+
frameKWHDoublePageSpreadLandscape: string;
|
|
483
|
+
frameKWHDoublePageSpreadPortrait: string;
|
|
484
|
+
frameKWHLandscape: string;
|
|
485
|
+
frameKWHPortrait: string;
|
|
486
|
+
frameOrientation: number;
|
|
487
|
+
manualCrop: number;
|
|
488
|
+
multiPageOff: number;
|
|
489
|
+
name: string;
|
|
490
|
+
seriesProcessMode: number;
|
|
491
|
+
UVTorch?: undefined;
|
|
492
|
+
} | {
|
|
493
|
+
caption: string;
|
|
494
|
+
desc: string;
|
|
495
|
+
frameKWHDoublePageSpreadLandscape: string;
|
|
496
|
+
frameKWHDoublePageSpreadPortrait: string;
|
|
497
|
+
frameKWHLandscape: string;
|
|
498
|
+
frameKWHPortrait: string;
|
|
499
|
+
frameOrientation: number;
|
|
500
|
+
manualCrop: number;
|
|
501
|
+
name: string;
|
|
502
|
+
seriesProcessMode: number;
|
|
503
|
+
multiPageOff?: undefined;
|
|
504
|
+
barcodeExt?: undefined;
|
|
505
|
+
faceExt?: undefined;
|
|
506
|
+
UVTorch?: undefined;
|
|
507
|
+
} | {
|
|
508
|
+
barcodeExt: number;
|
|
509
|
+
caption: string;
|
|
510
|
+
desc: string;
|
|
511
|
+
faceExt: number;
|
|
512
|
+
frameKWHDoublePageSpreadLandscape: string;
|
|
513
|
+
frameKWHDoublePageSpreadPortrait: string;
|
|
514
|
+
frameKWHLandscape: string;
|
|
515
|
+
frameKWHPortrait: string;
|
|
516
|
+
frameOrientation: number;
|
|
517
|
+
manualCrop: number;
|
|
518
|
+
name: string;
|
|
519
|
+
seriesProcessMode: number;
|
|
520
|
+
multiPageOff?: undefined;
|
|
521
|
+
UVTorch?: undefined;
|
|
522
|
+
} | {
|
|
523
|
+
caption: string;
|
|
524
|
+
desc: string;
|
|
525
|
+
frameKWHDoublePageSpreadLandscape: string;
|
|
526
|
+
frameKWHDoublePageSpreadPortrait: string;
|
|
527
|
+
frameKWHLandscape: string;
|
|
528
|
+
frameKWHPortrait: string;
|
|
529
|
+
frameOrientation: number;
|
|
530
|
+
manualCrop: number;
|
|
531
|
+
multiPageOff: number;
|
|
532
|
+
name: string;
|
|
533
|
+
seriesProcessMode: number;
|
|
534
|
+
barcodeExt?: undefined;
|
|
535
|
+
faceExt?: undefined;
|
|
536
|
+
UVTorch?: undefined;
|
|
537
|
+
} | {
|
|
538
|
+
caption: string;
|
|
539
|
+
desc: string;
|
|
540
|
+
frameKWHDoublePageSpreadLandscape: number;
|
|
541
|
+
frameKWHDoublePageSpreadPortrait: number;
|
|
542
|
+
frameKWHLandscape: number;
|
|
543
|
+
frameKWHPortrait: number;
|
|
544
|
+
frameOrientation: number;
|
|
545
|
+
multiPageOff: number;
|
|
546
|
+
name: string;
|
|
547
|
+
seriesProcessMode: number;
|
|
548
|
+
barcodeExt?: undefined;
|
|
549
|
+
faceExt?: undefined;
|
|
550
|
+
manualCrop?: undefined;
|
|
551
|
+
UVTorch?: undefined;
|
|
552
|
+
} | {
|
|
553
|
+
UVTorch: number;
|
|
554
|
+
caption: string;
|
|
555
|
+
desc: string;
|
|
556
|
+
frameKWHDoublePageSpreadLandscape: number;
|
|
557
|
+
frameKWHDoublePageSpreadPortrait: number;
|
|
558
|
+
frameKWHLandscape: number;
|
|
559
|
+
frameKWHPortrait: number;
|
|
560
|
+
frameOrientation: number;
|
|
561
|
+
name: string;
|
|
562
|
+
multiPageOff?: undefined;
|
|
563
|
+
seriesProcessMode?: undefined;
|
|
564
|
+
barcodeExt?: undefined;
|
|
565
|
+
faceExt?: undefined;
|
|
566
|
+
manualCrop?: undefined;
|
|
567
|
+
})[];
|
|
568
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CameraSnapshotResponseType, DocumentReaderResponseType } from '../types';
|
|
3
|
+
import { DocumentEventActions, InternalScenarios, ObjectFit, ErrorTypes } from '../constants';
|
|
4
|
+
declare type DocumentCallbackArgTypes = DocumentReaderResponseType | CameraSnapshotResponseType;
|
|
5
|
+
export declare type DocumentAttributesContextType = {
|
|
6
|
+
onAction: ({ manual, action }: {
|
|
7
|
+
manual: boolean;
|
|
8
|
+
action: DocumentEventActions;
|
|
9
|
+
}) => void;
|
|
10
|
+
onResponse: (response: DocumentCallbackArgTypes) => void;
|
|
11
|
+
onFail: (reason: ErrorTypes) => void;
|
|
12
|
+
locale?: string;
|
|
13
|
+
internalScenario?: InternalScenarios;
|
|
14
|
+
multipageProcessing?: boolean;
|
|
15
|
+
startScreen?: boolean;
|
|
16
|
+
multiple?: boolean;
|
|
17
|
+
license?: string;
|
|
18
|
+
copyright?: boolean;
|
|
19
|
+
cameraId?: string;
|
|
20
|
+
objectFit?: ObjectFit;
|
|
21
|
+
changeCamera?: boolean;
|
|
22
|
+
};
|
|
23
|
+
export declare const DocumentAttributesContext: React.Context<DocumentAttributesContextType>;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import DocumentReaderService from '../services/DocumentReaderService';
|
|
3
|
+
export declare type DocumentSDKContextType = {
|
|
4
|
+
service: DocumentReaderService | null;
|
|
5
|
+
};
|
|
6
|
+
export declare const DocumentSDKContext: React.Context<DocumentSDKContextType>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FaceDetectionResponseType, FaceLivenessResponseType } from '../types';
|
|
3
|
+
import { FaceEventActions, ErrorTypes } from '../constants';
|
|
4
|
+
declare type FaceCallbackArgTypes = FaceLivenessResponseType | FaceDetectionResponseType;
|
|
5
|
+
export declare type FaceAttributesContextType = {
|
|
6
|
+
onAction: ({ manual, action }: {
|
|
7
|
+
manual: boolean;
|
|
8
|
+
action: FaceEventActions;
|
|
9
|
+
}) => void;
|
|
10
|
+
onResponse: (response: FaceCallbackArgTypes) => void;
|
|
11
|
+
onFail: (reason: ErrorTypes) => void;
|
|
12
|
+
locale?: string;
|
|
13
|
+
url?: string;
|
|
14
|
+
debug?: boolean;
|
|
15
|
+
headers?: Record<string, string>;
|
|
16
|
+
copyright?: boolean;
|
|
17
|
+
cameraId?: string;
|
|
18
|
+
changeCamera?: boolean;
|
|
19
|
+
};
|
|
20
|
+
export declare const FaceAttributesContext: React.Context<FaceAttributesContextType>;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { DocumentAttributesContextType } from '../contexts/DocumentAttributesContext';
|
|
3
|
+
declare function withDocumentAttributesContext<T extends DocumentAttributesContextType>(Component: React.ComponentType<T>): React.ComponentType<T>;
|
|
4
|
+
export default withDocumentAttributesContext;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { FaceAttributesContextType } from '../contexts/FaceAttributesContext';
|
|
3
|
+
declare function withFaceAttributesContext<T extends FaceAttributesContextType>(Component: React.ComponentType<T>): React.ComponentType<T>;
|
|
4
|
+
export default withFaceAttributesContext;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { DirectionType } from '../constants';
|
|
3
|
+
interface Locale {
|
|
4
|
+
locale: string | undefined;
|
|
5
|
+
}
|
|
6
|
+
declare function withLocalize<T>(Component: React.ComponentType<T>): React.ComponentType<T & Locale & DirectionType>;
|
|
7
|
+
export default withLocalize;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Response } from '@regulaforensics/document-reader-webclient';
|
|
2
|
+
import { DocumentCaptureStatus, DocumentEventActions, InternalScenarios, ObjectFit, StreamStatus } from '../constants';
|
|
3
|
+
import { FrameParamsType, VideoParamsType } from '../types';
|
|
4
|
+
import CustomError from '../models/CustomError';
|
|
5
|
+
declare type ResponseType = {
|
|
6
|
+
status: DocumentCaptureStatus;
|
|
7
|
+
initialized: boolean;
|
|
8
|
+
error: CustomError | null;
|
|
9
|
+
response: Response | null;
|
|
10
|
+
};
|
|
11
|
+
interface useDocumentReaderSeriesInterface extends ResponseType {
|
|
12
|
+
frameParams: FrameParamsType;
|
|
13
|
+
}
|
|
14
|
+
declare function useDocumentReaderSeries(options: {
|
|
15
|
+
videoStatus: StreamStatus;
|
|
16
|
+
videoElementParams: VideoParamsType;
|
|
17
|
+
scenario?: InternalScenarios;
|
|
18
|
+
multipageProcessing?: boolean;
|
|
19
|
+
license?: string;
|
|
20
|
+
objectFit?: ObjectFit;
|
|
21
|
+
}, onAction: ({ manual, action }: {
|
|
22
|
+
manual: boolean;
|
|
23
|
+
action: DocumentEventActions;
|
|
24
|
+
}) => void): useDocumentReaderSeriesInterface;
|
|
25
|
+
export default useDocumentReaderSeries;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DocumentCaptureStatus } from '../constants';
|
|
2
|
+
import { Response } from '@regulaforensics/document-reader-webclient';
|
|
3
|
+
import CustomError from '../models/CustomError';
|
|
4
|
+
declare type ResponseType = {
|
|
5
|
+
status: DocumentCaptureStatus;
|
|
6
|
+
error: CustomError | null;
|
|
7
|
+
response: Response | null;
|
|
8
|
+
initialized: boolean;
|
|
9
|
+
prepared: boolean;
|
|
10
|
+
};
|
|
11
|
+
declare function useDocumentReaderSingle(imageDataArray: Array<ImageData>, options: {
|
|
12
|
+
scenario?: string;
|
|
13
|
+
license?: string;
|
|
14
|
+
}): ResponseType;
|
|
15
|
+
export default useDocumentReaderSingle;
|