-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathprocess-params.ts
More file actions
475 lines (469 loc) · 18.7 KB
/
process-params.ts
File metadata and controls
475 lines (469 loc) · 18.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
/* tslint:disable */
/* eslint-disable */
/**
* NOTE: This file is auto generated by OpenAPI Generator.
* Do not edit the file manually.
*/
// May contain unused imports in some cases
// @ts-ignore
import type { AuthParams } from './auth-params';
// May contain unused imports in some cases
// @ts-ignore
import type { DocumentFormat } from './document-format';
// May contain unused imports in some cases
// @ts-ignore
import type { DocumentType } from './document-type';
// May contain unused imports in some cases
// @ts-ignore
import type { FaceApi } from './face-api';
// May contain unused imports in some cases
// @ts-ignore
import type { ImageQA } from './image-qa';
// May contain unused imports in some cases
// @ts-ignore
import type { InputBarcodeType } from './input-barcode-type';
// May contain unused imports in some cases
// @ts-ignore
import type { LCID } from './lcid';
// May contain unused imports in some cases
// @ts-ignore
import type { LogLevel } from './log-level';
// May contain unused imports in some cases
// @ts-ignore
import type { MRZFormat } from './mrzformat';
// May contain unused imports in some cases
// @ts-ignore
import type { MeasureSystem } from './measure-system';
// May contain unused imports in some cases
// @ts-ignore
import type { MrzDetectModeEnum } from './mrz-detect-mode-enum';
// May contain unused imports in some cases
// @ts-ignore
import type { PerDocumentConfig } from './per-document-config';
// May contain unused imports in some cases
// @ts-ignore
import type { ProcessParamsRfid } from './process-params-rfid';
// May contain unused imports in some cases
// @ts-ignore
import type { Result } from './result';
// May contain unused imports in some cases
// @ts-ignore
import type { Scenario } from './scenario';
// May contain unused imports in some cases
// @ts-ignore
import type { TextFieldType } from './text-field-type';
// May contain unused imports in some cases
// @ts-ignore
import type { TextPostProcessing } from './text-post-processing';
/**
*
* @export
* @interface ProcessParams
*/
export interface ProcessParams {
/**
* This parameter is used to generate separate DTC-VC data container from RFID session data.
* @type {boolean}
* @memberof ProcessParams
*/
'generateDTCVC'?: boolean;
/**
* The list of LCID types to recognize. If empty, values with all LCID types will be extracted. Empty by default.
* @type {Array<LCID>}
* @memberof ProcessParams
*/
'lcidFilter'?: Array<LCID>;
/**
* This parameter is used to enable document liveness check.
* @type {boolean}
* @memberof ProcessParams
*/
'checkLiveness'?: boolean;
/**
* The list of LCID types to ignore during the recognition. If empty, values with all LCID types will be extracted. Narrowing down the list can reduce processing time. Empty by default.
* @type {Array<LCID>}
* @memberof ProcessParams
*/
'lcidIgnoreFilter'?: Array<LCID>;
/**
* 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
* @type {boolean}
* @memberof ProcessParams
*/
'oneShotIdentification'?: boolean;
/**
* This parameter allows comparing faces on Regula Face Web Service
* @type {boolean}
* @memberof ProcessParams
*/
'useFaceApi'?: boolean;
/**
*
* @type {FaceApi}
* @memberof ProcessParams
*/
'faceApi'?: FaceApi;
/**
* 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.
* @type {boolean}
* @memberof ProcessParams
*/
'doDetectCan'?: boolean;
/**
* 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.
* @type {number}
* @memberof ProcessParams
*/
'imageOutputMaxHeight'?: number;
/**
* This parameter allows setting maximum width 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.
* @type {number}
* @memberof ProcessParams
*/
'imageOutputMaxWidth'?: number;
/**
*
* @type {Scenario}
* @memberof ProcessParams
*/
'scenario': Scenario;
/**
* Types of results to return in response. See \'Result\' enum for available options
* @type {Array<Result>}
* @memberof ProcessParams
*/
'resultTypeOutput'?: Array<Result>;
/**
* Enable this option if the image you provide contains double page spread of the passport and you want to process both pages in one go. It makes sense to use it for documents that have meaningful information on both pages, like Russian domestic passport, or some others. Disabled by default.
* @type {boolean}
* @memberof ProcessParams
* @deprecated
*/
'doublePageSpread'?: boolean;
/**
* When enabled together with \"doublePageSpread\" and there is a passport with two pages spread in the image, pages will be cropped, straightened and aligned together, as if the document was captured on a flatbed scanner. Disabled by default.
* @type {boolean}
* @memberof ProcessParams
*/
'generateDoublePageSpreadImage'?: boolean;
/**
* If a document contains Visual zone, you can set the list of field types to extract. In this case, other fields are skipped during the processing, i.e. document recognition becomes faster. This filter is not applicable to the MRZ, barcode or RFID. If the fieldTypesFilter is empty, all fields are extracted. Empty by default. If fieldTypesFilter and fieldTypesIgnoreFilter are used simultaneously, fieldTypesFilter takes priority.
* @type {Array<TextFieldType>}
* @memberof ProcessParams
*/
'fieldTypesFilter'?: Array<TextFieldType>;
/**
* If a document contains a Visual zone, you can specify a list of field types that should be excluded from extraction. All field types listed in this array are skipped during processing, while the remaining fields are recognized. This filter is not applicable to the MRZ, barcode or RFID. If the fieldTypesIgnoreFilter is empty, all fields are extracted. Empty by default. If fieldTypesFilter and fieldTypesIgnoreFilter are used simultaneously, fieldTypesFilter takes priority.
* @type {Array<TextFieldType>}
* @memberof ProcessParams
*/
'fieldTypesIgnoreFilter'?: Array<TextFieldType>;
/**
* This option allows you to set dates format so that solution will return dates in this format. For example, if you supply \'MM/dd/yyyy\', and document have printed date \'09 JUL 2020\' for the date os issue, you will get \'07/09/2020\' as a result. By default it is set to system locale default (where the service is running).
* @type {string}
* @memberof ProcessParams
*/
'dateFormat'?: string;
/**
*
* @type {MeasureSystem}
* @memberof ProcessParams
*/
'measureSystem'?: MeasureSystem;
/**
* This parameter controls maximum resolution in dpi of output images. Resolution will remain original in case 0 is supplied. By default is set to return images in response with resolution not greater than 300 dpi for all scenarios except FullAuth. In FullAuth scenario this limit is 1000 dpi by default.
* @type {number}
* @memberof ProcessParams
*/
'imageDpiOutMax'?: number;
/**
* This option can be enabled if you know for sure that the image you provide contains already cropped document by its edges. This was designed to process on the server side images captured and cropped on mobile. Disabled by default.
* @type {boolean}
* @memberof ProcessParams
*/
'alreadyCropped'?: boolean;
/**
* This option allows passing custom processing parameters that can be implemented in future without changing API.
* @type {{ [key: string]: any; }}
* @memberof ProcessParams
*/
'customParams'?: { [key: string]: any; };
/**
* This option allows setting additional custom configuration per document type. If recognized document has ID specified in config, processing adjusts according to designated configuration.
* @type {Array<PerDocumentConfig>}
* @memberof ProcessParams
*/
'config'?: Array<PerDocumentConfig>;
/**
* When enabled, results will contain transaction processing log. Disabled by default
* @type {boolean}
* @memberof ProcessParams
*/
'log'?: boolean;
/**
*
* @type {LogLevel}
* @memberof ProcessParams
*/
'logLevel'?: LogLevel;
/**
* Force use of specific template ID and skip document type identification step.
* @type {number}
* @memberof ProcessParams
*/
'forceDocID'?: number;
/**
* When disabled, text field OCR will be done as is and then the recognized value will be matched to the field mask for validity. If enabled, we are trying to read a field value with maximum efforts to match the mask and provide a correctly formatted value, making assumptions based on the provided field mask in the template. Enabled by default.
* @type {boolean}
* @memberof ProcessParams
*/
'matchTextFieldMask'?: boolean;
/**
* When enabled, shorten the list of candidates to process during document detection in a single image process mode. Reduces processing time for specific backgrounds. Enabled by default.
* @type {boolean}
* @memberof ProcessParams
* @deprecated
*/
'fastDocDetect'?: boolean;
/**
* When enabled, fail OCR field validity, if there is a glare over the text field on the image. Disabled by default.
* @type {boolean}
* @memberof ProcessParams
*/
'updateOCRValidityByGlare'?: boolean;
/**
* When enabled, each field in template will be checked for value presence and if the field is marked as required, but has no value, it will have \'error\' in validity status. Disabled by default.
* @type {boolean}
* @memberof ProcessParams
*/
'checkRequiredTextFields'?: boolean;
/**
* When enabled, returns cropped barcode images for unknown documents. Disabled by default.
* @type {boolean}
* @memberof ProcessParams
*/
'returnCroppedBarcode'?: boolean;
/**
*
* @type {ImageQA}
* @memberof ProcessParams
*/
'imageQa'?: ImageQA;
/**
* When enabled, the image quality check status affects the document optical and overall status. Disabled by default.
* @type {boolean}
* @memberof ProcessParams
*/
'strictImageQuality'?: boolean;
/**
* Deprecated. Please use strictImageQuality instead. When enabled, image quality checks status affects document optical and overall status. Disabled by default.
* @type {boolean}
* @memberof ProcessParams
* @deprecated
*/
'respectImageQuality'?: boolean;
/**
*
* @type {DocumentFormat}
* @memberof ProcessParams
*/
'forceDocFormat'?: DocumentFormat;
/**
* When enabled, no graphic fields will be cropped from document image. Disabled by default.
* @type {boolean}
* @memberof ProcessParams
*/
'noGraphics'?: boolean;
/**
* When enabled, all personal data will be forcibly removed from the logs. Disabled by default.
* @type {boolean}
* @memberof ProcessParams
*/
'depersonalizeLog'?: boolean;
/**
* This option allows locating and cropping multiple documents from one image if enabled. Disabled by default.
* @type {boolean}
* @memberof ProcessParams
*/
'multiDocOnImage'?: boolean;
/**
* This option allows shifting the date of expiry into the future or past for number of months specified. This is useful, for example, in some cases when document might be still valid for some period after original expiration date to prevent negative validity status for such documents. Or by shifting the date to the past will set negative validity for the documents that is about to expire in a specified number of months. 0 by default
* @type {number}
* @memberof ProcessParams
*/
'shiftExpiryDate'?: number;
/**
* This options allows specifying the minimal age in years of the document holder for the document to be considered valid.
* @type {number}
* @memberof ProcessParams
*/
'minimalHolderAge'?: number;
/**
* When enabled, returns input images in output. Disabled by default.
* @type {boolean}
* @memberof ProcessParams
*/
'returnUncroppedImage'?: boolean;
/**
* This option allows limiting MRZ formats to be recognized by specifying them in array.
* @type {Array<MRZFormat>}
* @memberof ProcessParams
*/
'mrzFormatsFilter'?: Array<MRZFormat>;
/**
* When enabled, make sure that in series processing MRZ is located fully inside the result document image, if present on the document. Enabling this option may add extra processing time, by disabling optimizations, but allows more stability in output image quality. Disabled by default.
* @type {boolean}
* @memberof ProcessParams
*/
'forceReadMrzBeforeLocate'?: boolean;
/**
* This option can be disabled to stop parsing after barcode is read. Enabled by default.
* @type {boolean}
* @memberof ProcessParams
*/
'parseBarcodes'?: boolean;
/**
*
* @type {TextPostProcessing}
* @memberof ProcessParams
*/
'convertCase'?: TextPostProcessing;
/**
* When enabled, the Surname and GivenNames fields from MRZ will be divided into ft_First_Name, ft_Second_Name, ft_Third_Name, ft_Fourth_Name, ft_Last_Name fields. Disabled by default.
* @type {boolean}
* @memberof ProcessParams
*/
'splitNames'?: boolean;
/**
* When enabled, OCR of perforated fields in the document template will not be performed. Disabled by default.
* @type {boolean}
* @memberof ProcessParams
*/
'disablePerforationOCR'?: boolean;
/**
* List of specific eligible document types from DocumentType enum to recognize from. You may, for example, specify only passports to be recognized by setting this property. Empty by default.
* @type {Array<DocumentType>}
* @memberof ProcessParams
*/
'documentGroupFilter'?: Array<DocumentType>;
/**
* Authenticity checks that should be performed regardless of the document type. The available checks are listed in the eRPRM_Authenticity enum. Note that only supported by your license checks can be added.
* @type {number}
* @memberof ProcessParams
*/
'processAuth'?: number;
/**
* This parameter is used to specify the document reader device type from which input images were captured. Default 0.
* @type {number}
* @memberof ProcessParams
*/
'deviceId'?: number;
/**
* This parameter is used to specify the document reader device type from which input images were captured. Default 0.
* @type {number}
* @memberof ProcessParams
*/
'deviceType'?: number;
/**
* This parameter is used to specify the document reader device type from which input images were captured
* @type {string}
* @memberof ProcessParams
*/
'deviceTypeHex'?: string;
/**
* This parameter is used to tell the processing engine to ignore any parameters saved in the image when scanned from the document reader device. Default false
* @type {boolean}
* @memberof ProcessParams
*/
'ignoreDeviceIdFromImage'?: boolean;
/**
* List of the document ID\'s to process. All documents will be processed, if empty.
* @type {Array<number>}
* @memberof ProcessParams
*/
'documentIdList'?: Array<number>;
/**
*
* @type {ProcessParamsRfid}
* @memberof ProcessParams
*/
'rfid'?: ProcessParamsRfid;
/**
* This parameter is used to enable authenticity checks
* @type {boolean}
* @memberof ProcessParams
*/
'checkAuth'?: boolean;
/**
*
* @type {AuthParams}
* @memberof ProcessParams
*/
'authParams'?: AuthParams;
/**
*
* @type {MrzDetectModeEnum}
* @memberof ProcessParams
*/
'mrzDetectMode'?: MrzDetectModeEnum;
/**
* This parameter is used to generate numeric representation for issuing state and nationality codes
* @type {boolean}
* @memberof ProcessParams
*/
'generateNumericCodes'?: boolean;
/**
* This parameter if enabled will require all necessary certificates to verify digital signature in barcode data to be present in order for the Barcode format check to succeed.
* @type {boolean}
* @memberof ProcessParams
*/
'strictBarcodeDigitalSignatureCheck'?: boolean;
/**
* Select the longest value from the different value sources and write it to the value field if comparison is done successfully. The parameter applies this logic to the personal names, such as given name, surname, surname and given name, middle name and etc.
* @type {boolean}
* @memberof ProcessParams
*/
'selectLongestNames'?: boolean;
/**
* Set the types of barcodes to process.
* @type {Array<InputBarcodeType>}
* @memberof ProcessParams
*/
'doBarcodes'?: Array<InputBarcodeType>;
/**
* Set to force DL categories expiry date to affect the overall status or not. As documents usually have their own date of expiry, which might be less or greater than category expiry date, this might be handy for specific cases.
* @type {boolean}
* @memberof ProcessParams
*/
'strictDLCategoryExpiry'?: boolean;
/**
* Set to generate Alpha-2 codes for nationality and issuing state fields.
* @type {boolean}
* @memberof ProcessParams
*/
'generateAlpha2Codes'?: boolean;
/**
* Limits the number of pages to be processed from a PDF file.
* @type {number}
* @memberof ProcessParams
*/
'pdfPagesLimit'?: number;
/**
* This parameter if enabled will ignore the minimum barcode resolution needed to start processing.
* @type {boolean}
* @memberof ProcessParams
*/
'disableAuthResolutionFilter'?: boolean;
/**
* When enabled, this parameter marks security checks that don’t meet minimum requirements as \'Failed\' (instead of \'WasNotDone\'), which causes the overall security status to be \'Failed\'.
* @type {boolean}
* @memberof ProcessParams
*/
'strictSecurityChecks'?: boolean;
/**
* Allows transliteration to be turned on or off; by default, it is enabled.
* @type {boolean}
* @memberof ProcessParams
*/
'returnTransliteratedFields'?: boolean;
}