@regulaforensics/document-reader-webclient 6.8.3 → 11.4.17

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.
Files changed (51) hide show
  1. package/dist/cjs-es5/models/authenticity-result-type.js +64 -1
  2. package/dist/cjs-es5/models/check-diagnose.js +3 -1
  3. package/dist/cjs-es5/models/document-type.js +693 -1
  4. package/dist/cjs-es5/models/face-api-search.js +16 -0
  5. package/dist/cjs-es5/models/face-api.js +16 -0
  6. package/dist/cjs-es5/models/index.js +3 -1
  7. package/dist/cjs-es5/models/log-level.js +16 -1
  8. package/dist/cjs-es5/models/mrzformat.js +19 -1
  9. package/dist/cjs-es5/models/parsing-notification-codes.js +655 -1
  10. package/dist/cjs-es5/models/result.js +46 -34
  11. package/dist/cjs-es5/models/scenario.js +55 -2
  12. package/dist/cjs-es5/models/security-feature-type.js +137 -1
  13. package/dist/cjs-es5/models/source.js +16 -1
  14. package/dist/cjs-es5/models/text-field-type.js +508 -464
  15. package/dist/cjs-es5/models/text-post-processing.js +13 -1
  16. package/dist/cjs-es5/models/visibility.js +16 -1
  17. package/dist/esm-es5/models/authenticity-result-type.js +64 -1
  18. package/dist/esm-es5/models/check-diagnose.js +3 -1
  19. package/dist/esm-es5/models/document-type.js +693 -1
  20. package/dist/esm-es5/models/face-api-search.js +14 -0
  21. package/dist/esm-es5/models/face-api.js +14 -0
  22. package/dist/esm-es5/models/index.js +3 -1
  23. package/dist/esm-es5/models/log-level.js +16 -1
  24. package/dist/esm-es5/models/mrzformat.js +19 -1
  25. package/dist/esm-es5/models/parsing-notification-codes.js +655 -1
  26. package/dist/esm-es5/models/result.js +46 -34
  27. package/dist/esm-es5/models/scenario.js +55 -2
  28. package/dist/esm-es5/models/security-feature-type.js +137 -1
  29. package/dist/esm-es5/models/source.js +16 -1
  30. package/dist/esm-es5/models/text-field-type.js +508 -464
  31. package/dist/esm-es5/models/text-post-processing.js +13 -1
  32. package/dist/esm-es5/models/visibility.js +16 -1
  33. package/package.json +1 -1
  34. package/src/models/authenticity-result-type.ts +63 -0
  35. package/src/models/check-diagnose.ts +2 -0
  36. package/src/models/document-type.ts +693 -1
  37. package/src/models/face-api-search.ts +43 -0
  38. package/src/models/face-api.ts +74 -0
  39. package/src/models/index.ts +2 -0
  40. package/src/models/log-level.ts +15 -0
  41. package/src/models/mrzformat.ts +18 -0
  42. package/src/models/parsing-notification-codes.ts +654 -0
  43. package/src/models/process-params.ts +25 -0
  44. package/src/models/process-request.ts +12 -0
  45. package/src/models/result.ts +45 -33
  46. package/src/models/scenario.ts +54 -1
  47. package/src/models/security-feature-type.ts +137 -1
  48. package/src/models/source.ts +15 -0
  49. package/src/models/text-field-type.ts +508 -464
  50. package/src/models/text-post-processing.ts +12 -0
  51. package/src/models/visibility.ts +15 -0
@@ -16,6 +16,7 @@
16
16
  import { AuthenticityResultType } from './authenticity-result-type';
17
17
  import { DocumentFormat } from './document-format';
18
18
  import { DocumentType } from './document-type';
19
+ import { FaceApi } from './face-api';
19
20
  import { ImageQA } from './image-qa';
20
21
  import { LogLevel } from './log-level';
21
22
  import { MRZFormat } from './mrzformat';
@@ -33,6 +34,30 @@ import { TextPostProcessing } from './text-post-processing';
33
34
  * @interface ProcessParams
34
35
  */
35
36
  export interface ProcessParams {
37
+ /**
38
+ * This parameter allows processing an image that contains a person and a document and compare the portrait photo from the document with the person\'s face
39
+ * @type {boolean}
40
+ * @memberof ProcessParams
41
+ */
42
+ oneShotIdentification?: boolean;
43
+ /**
44
+ * This parameter allows comparing faces on Regula Face Web Service
45
+ * @type {boolean}
46
+ * @memberof ProcessParams
47
+ */
48
+ useFaceApi?: boolean;
49
+ /**
50
+ *
51
+ * @type {FaceApi}
52
+ * @memberof ProcessParams
53
+ */
54
+ faceApi?: FaceApi;
55
+ /**
56
+ * This parameter allows enabling the CAN (Card Access Number) detection and recognition when using scenarios with document location and MRZ reading, such as the MrzAndLocate scenario.
57
+ * @type {boolean}
58
+ * @memberof ProcessParams
59
+ */
60
+ doDetectCan?: boolean;
36
61
  /**
37
62
  * This parameter allows setting maximum height in pixels of output images and thus reducing image size to desired. Does not change the aspect ratio. Changes disabled if equals to 0. Default 0.
38
63
  * @type {number}
@@ -42,6 +42,18 @@ export interface ProcessRequest {
42
42
  * @memberof ProcessRequest
43
43
  */
44
44
  List?: Array<ProcessRequestImage>;
45
+ /**
46
+ * Live portrait photo
47
+ * @type {string}
48
+ * @memberof ProcessRequest
49
+ */
50
+ livePortrait?: string;
51
+ /**
52
+ * Portrait photo from an external source
53
+ * @type {string}
54
+ * @memberof ProcessRequest
55
+ */
56
+ extPortrait?: string;
45
57
  /**
46
58
  *
47
59
  * @type {ContainerList}
@@ -15,7 +15,7 @@
15
15
 
16
16
 
17
17
  /**
18
- * Describes possible extracted result types from documents
18
+ *
19
19
  * @export
20
20
  * @enum {string}
21
21
  */
@@ -25,25 +25,29 @@ export enum Result {
25
25
  */
26
26
  DOCUMENT_IMAGE = 1,
27
27
  /**
28
- * Contains image quality check results
28
+ * Contains MRZ OCR results
29
29
  */
30
- IMAGE_QUALITY = 30,
30
+ MRZ_TEXT = 3,
31
31
  /**
32
- * Contains check statuses with details, grouped by source
32
+ * Contains raw information about barcodes on the input image
33
33
  */
34
- STATUS = 33,
34
+ BARCODES = 5,
35
35
  /**
36
- * Contains document textual fields from all sources (mrz, rfid, visual, barcode) with validity and cross-source compare checks
36
+ * Contains cropped graphic fields from Visual zone
37
37
  */
38
- TEXT = 36,
38
+ VISUAL_GRAPHICS = 6,
39
39
  /**
40
- * Contains images from all document sources (mrz, rfid, visual, barcode)
40
+ * Contains list of document type candidates with their probabilities and descriptions
41
41
  */
42
- IMAGES = 37,
42
+ DOCUMENT_TYPE_CANDIDATES = 8,
43
43
  /**
44
- * Contains MRZ OCR results
44
+ * Contains description of determined document type, if any
45
45
  */
46
- MRZ_TEXT = 3,
46
+ DOCUMENT_TYPE = 9,
47
+ /**
48
+ * Contains lexical data analysis results that allow you to compare MRZ OCR results, Visual zone OCR results, barcodes and RFID chip data for an additional assessment of the authenticity of the document (this is an old format, better use TEXT type)
49
+ */
50
+ LEXICAL_ANALYSIS = 15,
47
51
  /**
48
52
  * Contains Visual zone OCR results
49
53
  */
@@ -53,53 +57,61 @@ export enum Result {
53
57
  */
54
58
  BARCODE_TEXT = 18,
55
59
  /**
56
- * Contains RFID parsing result with text fields
60
+ * Contains barcode parsing result with graphic fields
57
61
  */
58
- RFID_TEXT = 102,
62
+ BARCODE_GRAPHICS = 19,
59
63
  /**
60
- * Contains lexical data analysis results that allow you to compare MRZ OCR results, Visual zone OCR results, barcodes and RFID chip data for an additional assessment of the authenticity of the document (this is an old format, better use TEXT type)
64
+ * Contains result of document authenticity checks
61
65
  */
62
- LEXICAL_ANALYSIS = 15,
66
+ AUTHENTICITY = 20,
63
67
  /**
64
- * Contains cropped graphic fields from Visual zone
68
+ * Contains image quality check results
65
69
  */
66
- VISUAL_GRAPHICS = 6,
70
+ IMAGE_QUALITY = 30,
67
71
  /**
68
- * Contains barcode parsing result with graphic fields
72
+ * Contains check statuses with details, grouped by source
69
73
  */
70
- BARCODE_GRAPHICS = 19,
74
+ STATUS = 33,
71
75
  /**
72
- * Contains RFID parsing result with graphic fields
76
+ * Contains document textual fields from all sources (mrz, rfid, visual, barcode) with validity and cross-source compare checks
73
77
  */
74
- RFID_GRAPHICS = 103,
78
+ TEXT = 36,
75
79
  /**
76
- * Contains list of document type candidates with their probabilities and descriptions
80
+ * Contains images from all document sources (mrz, rfid, visual, barcode)
77
81
  */
78
- DOCUMENT_TYPE_CANDIDATES = 8,
82
+ IMAGES = 37,
79
83
  /**
80
- * Contains description of determined document type, if any
84
+ * Contains encrypted ResultContainerList
81
85
  */
82
- DOCUMENT_TYPE = 9,
86
+ ENCRYPTED_RCL = 49,
83
87
  /**
84
- * Contains result of document authenticity checks
88
+ * Contains license
85
89
  */
86
- AUTHENTICITY = 20,
90
+ LICENSE = 50,
87
91
  /**
88
92
  * Contains information about document position on the input image, its center, angle, etc
89
93
  */
90
94
  DOCUMENT_POSITION = 85,
91
95
  /**
92
- * Contains raw information about barcodes on the input image
96
+ * Contains RFID raw data
93
97
  */
94
- BARCODES = 5,
98
+ RFID_RAW_DATA = 101,
95
99
  /**
96
- * Contains license
100
+ * Contains RFID text results
97
101
  */
98
- LICENSE = 50,
102
+ RFID_TEXT = 102,
99
103
  /**
100
- * Contains encrypted ResultContainerList
104
+ * Contains RFID graphic results
105
+ */
106
+ RFID_GRAPHICS = 103,
107
+ /**
108
+ * Contains RFID binary data
109
+ */
110
+ RFID_BINARY_DATA = 104,
111
+ /**
112
+ * Contains RFID original graphics data
101
113
  */
102
- ENCRYPTED_RCL = 49
114
+ RFID_ORIGINAL_GRAPHICS = 105
103
115
  }
104
116
 
105
117
 
@@ -20,24 +20,77 @@
20
20
  * @enum {string}
21
21
  */
22
22
  export enum Scenario {
23
+ /**
24
+ * Processing scenario for obtaining MRZ data
25
+ */
23
26
  MRZ = 'Mrz',
27
+ /**
28
+ * Processing scenario for obtaining barcode data
29
+ */
24
30
  BARCODE = 'Barcode',
31
+ /**
32
+ * Processing scenario for detecting document boundaries
33
+ */
25
34
  LOCATE = 'Locate',
35
+ /**
36
+ * Processing scenario for obtaining visual zone OCR results
37
+ */
26
38
  OCR = 'Ocr',
39
+ /**
40
+ * Processing scenario for document type recognition
41
+ */
27
42
  DOCTYPE = 'DocType',
43
+ /**
44
+ * Processing scenario for obtaining MRZ and/or barcode data
45
+ */
28
46
  MRZ_OR_BARCODE = 'MrzOrBarcode',
47
+ /**
48
+ * Processing scenario for detecting document boundaries and/or obtaining MRZ data
49
+ */
29
50
  MRZ_OR_LOCATE = 'MrzOrLocate',
51
+ /**
52
+ * Processing scenario for detecting document boundaries and obtaining MRZ data
53
+ */
30
54
  MRZ_AND_LOCATE = 'MrzAndLocate',
55
+ /**
56
+ * Processing scenario for detecting the document boundaries and obtaining barcode data
57
+ */
31
58
  BARCODE_AND_LOCATE = 'BarcodeAndLocate',
59
+ /**
60
+ * Processing scenario for obtaining MRZ data or visual zone OCR results
61
+ */
32
62
  MRZ_OR_OCR = 'MrzOrOcr',
63
+ /**
64
+ * Processing scenario for obtaining MRZ or barcode or visual zone OCR results
65
+ */
33
66
  MRZ_OR_BARCODE_OR_OCR = 'MrzOrBarcodeOrOcr',
67
+ /**
68
+ * Processing scenario for detecting document boundaries and obtaining MRZ data or visual zone OCR results
69
+ */
34
70
  LOCATE_VISUAL_AND_MRZ_OR_OCR = 'LocateVisual_And_MrzOrOcr',
71
+ /**
72
+ * Processing scenario for obtaining all document data
73
+ */
35
74
  FULL_PROCESS = 'FullProcess',
75
+ /**
76
+ * Processing scenario for obtaining all document data and document authentication
77
+ */
36
78
  FULL_AUTH = 'FullAuth',
37
- ID3RUS = 'Id3Rus',
79
+ /**
80
+ * Processing scenario for obtaining data from registration stamps
81
+ */
38
82
  RUS_STAMP = 'RusStamp',
83
+ /**
84
+ * Processing scenario for obtaining OCR results of any image
85
+ */
39
86
  OCR_FREE = 'OcrFree',
87
+ /**
88
+ * Processing scenario for obtaining bank card data
89
+ */
40
90
  CREDIT_CARD = 'CreditCard',
91
+ /**
92
+ * Scenario for obtaining an original image without any processing
93
+ */
41
94
  CAPTURE = 'Capture'
42
95
  }
43
96
 
@@ -20,50 +20,186 @@
20
20
  * @enum {string}
21
21
  */
22
22
  export enum SecurityFeatureType {
23
+ /**
24
+ * Blank element
25
+ */
23
26
  BLANK = 0,
27
+ /**
28
+ * Personalization element
29
+ */
24
30
  FILL = 1,
31
+ /**
32
+ * Photo
33
+ */
25
34
  PHOTO = 2,
35
+ /**
36
+ * MRZ
37
+ */
26
38
  MRZ = 3,
39
+ /**
40
+ * False luminescence
41
+ */
27
42
  FALSE_LUMINESCENCE = 4,
43
+ /**
44
+ * Hologram (static)
45
+ */
28
46
  HOLO_SIMPLE = 5,
47
+ /**
48
+ * Hologram (static verify)
49
+ */
29
50
  HOLO_VERIFY_STATIC = 6,
51
+ /**
52
+ * Hologram (static verify multiple)
53
+ */
30
54
  HOLO_VERIFY_MULTI_STATIC = 7,
55
+ /**
56
+ * Hologram (dynamic verify)
57
+ */
31
58
  HOLO_VERIFY_DYNAMIC = 8,
59
+ /**
60
+ * Pattern (non-interrupted)
61
+ */
32
62
  PATTERN_NOT_INTERRUPTED = 9,
63
+ /**
64
+ * Pattern (non-shifted)
65
+ */
33
66
  PATTERN_NOT_SHIFTED = 10,
67
+ /**
68
+ * Pattern (same colors)
69
+ */
34
70
  PATTERN_SAME_COLORS = 11,
71
+ /**
72
+ * Pattern (IR invisible)
73
+ */
35
74
  PATTERN_IR_INVISIBLE = 12,
75
+ /**
76
+ * Photo size
77
+ */
36
78
  PHOTO_SIZE_CHECK = 13,
79
+ /**
80
+ * Main vs ghost portrait comparison
81
+ */
37
82
  PORTRAIT_COMPARISON_VS_GHOST = 14,
83
+ /**
84
+ * Main vs RFID portrait comparison
85
+ */
38
86
  PORTRAIT_COMPARISON_VS_RFID = 15,
87
+ /**
88
+ * Main vs other page portrait comparison
89
+ */
39
90
  PORTRAIT_COMPARISON_VS_VISUAL = 16,
91
+ /**
92
+ * Barcode
93
+ */
40
94
  BARCODE = 17,
95
+ /**
96
+ * Pattern (different line thickness)
97
+ */
41
98
  PATTERN_DIFFERENT_LINES_THICKNESS = 18,
99
+ /**
100
+ * Main vs live camera portrait comparison
101
+ */
42
102
  PORTRAIT_COMPARISON_VS_CAMERA = 19,
103
+ /**
104
+ * RFID vs live camera portrait comparison
105
+ */
43
106
  PORTRAIT_COMPARISON_RFID_VS_CAMERA = 20,
107
+ /**
108
+ * Ghost photo
109
+ */
44
110
  GHOST_PHOTO = 21,
111
+ /**
112
+ * Clear ghost photo
113
+ */
45
114
  CLEAR_GHOST_PHOTO = 22,
115
+ /**
116
+ * Invisible object
117
+ */
46
118
  INVISIBLE_OBJECT = 23,
119
+ /**
120
+ * Low contrast object
121
+ */
47
122
  LOW_CONTRAST_OBJECT = 24,
123
+ /**
124
+ * Photo color check
125
+ */
48
126
  PHOTO_COLOR = 25,
127
+ /**
128
+ * Photo squareness
129
+ */
49
130
  PHOTO_SHAPE = 26,
131
+ /**
132
+ * Photo corners shape
133
+ */
50
134
  PHOTO_CORNERS = 27,
135
+ /**
136
+ * OCR
137
+ */
51
138
  OCR = 28,
139
+ /**
140
+ * External vs main portrait comparison
141
+ */
52
142
  PORTRAIT_COMPARISON_EXT_VS_VISUAL = 29,
143
+ /**
144
+ * External vs RFID portrait comparison
145
+ */
53
146
  PORTRAIT_COMPARISON_EXT_VS_RFID = 30,
147
+ /**
148
+ * External vs live camera portrait comparison
149
+ */
54
150
  PORTRAIT_COMPARISON_EXT_VS_CAMERA = 31,
151
+ /**
152
+ * Portrait Depth
153
+ */
55
154
  LIVENESS_DEPTH = 32,
155
+ /**
156
+ * Micro text
157
+ */
56
158
  MICRO_TEXT = 33,
159
+ /**
160
+ * Fluorescent Object
161
+ */
57
162
  FLUORESCENT_OBJECT = 34,
163
+ /**
164
+ * Facial landmarks check
165
+ */
58
166
  LANDMARK_CHECK = 35,
167
+ /**
168
+ * Facial image presence
169
+ */
59
170
  FACE_PRESENCE = 36,
171
+ /**
172
+ * Facial image absence
173
+ */
60
174
  FACE_ABSENCE = 38,
175
+ /**
176
+ * Liveness screen capture
177
+ */
61
178
  LIVENESS_SCREEN_CAPTURE = 39,
179
+ /**
180
+ * Liveness electronic device
181
+ */
62
182
  LIVENESS_ELECTRONIC_DEVICE = 40,
183
+ /**
184
+ * Liveness OVI
185
+ */
63
186
  LIVENESS_OVI = 41,
187
+ /**
188
+ * Barcode size check
189
+ */
64
190
  BARCODE_SIZE_CHECK = 42,
191
+ /**
192
+ * LASINK
193
+ */
65
194
  LASINK = 43,
66
- LIVENESS_MLI = 44
195
+ /**
196
+ * Liveness MLI
197
+ */
198
+ LIVENESS_MLI = 44,
199
+ /**
200
+ * Liveness barcode background
201
+ */
202
+ LIVENESS_BARCODE_BACKGROUND = 45
67
203
  }
68
204
 
69
205
 
@@ -20,10 +20,25 @@
20
20
  * @enum {string}
21
21
  */
22
22
  export enum Source {
23
+ /**
24
+ * Machine readable zone (MRZ)
25
+ */
23
26
  MRZ = 'MRZ',
27
+ /**
28
+ * Visual zone
29
+ */
24
30
  VISUAL = 'VISUAL',
31
+ /**
32
+ * Barcode
33
+ */
25
34
  BARCODE = 'BARCODE',
35
+ /**
36
+ * RFID
37
+ */
26
38
  RFID = 'RFID',
39
+ /**
40
+ * Magnetic
41
+ */
27
42
  MAGNETIC = 'MAGNETIC'
28
43
  }
29
44