anyline-ocr-react-native-module 55.9.0 → 56.0.2
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/AnylineInfinityPlugin.ts +129 -0
- package/AnylineReact.podspec +1 -1
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/anyline/reactnative/AnylineInfinityPlugin.java +195 -0
- package/android/src/main/java/com/anyline/reactnative/AnylinePackage.java +1 -0
- package/android/src/main/java/com/anyline/reactnative/AnylineSDKPlugin.java +5 -1
- package/android/src/main/java/com/anyline/reactnative/ResultReporter.java +1 -0
- package/index.js +3 -0
- package/ios/AnylineInfinityPlugin.h +9 -0
- package/ios/AnylineInfinityPlugin.m +197 -0
- package/ios/AnylineSDKPlugin.h +1 -0
- package/ios/AnylineSDKPlugin.m +1 -2
- package/package.json +1 -1
- package/types/sdk_config.ts +1750 -0
- package/types/wrapper_session_parameters.ts +1757 -0
|
@@ -0,0 +1,1750 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Schema for SDK JSON configurations
|
|
3
|
+
*/
|
|
4
|
+
export interface ScanViewConfiguration {
|
|
5
|
+
cameraConfig?: CameraConfig;
|
|
6
|
+
flashConfig?: FlashConfig;
|
|
7
|
+
options?: { [key: string]: any };
|
|
8
|
+
/**
|
|
9
|
+
* An optional description for the entire ScanView configuration.
|
|
10
|
+
*/
|
|
11
|
+
scanViewConfigDescription?: string;
|
|
12
|
+
viewPluginCompositeConfig?: ViewPluginCompositeConfig;
|
|
13
|
+
viewPluginConfig?: ViewPluginConfig;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Schema for SDK Camera Configuration
|
|
18
|
+
*/
|
|
19
|
+
export interface CameraConfig {
|
|
20
|
+
/**
|
|
21
|
+
* The preferred resolution for video capture (720p, 1080p, 4K). This resolution is used to
|
|
22
|
+
* process images for scanning. 4K resolution is only supported for barcode scanning.
|
|
23
|
+
*/
|
|
24
|
+
captureResolution?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Preferred camera to open: FRONT (front-facing), BACK (rear-facing), EXTERNAL (external
|
|
27
|
+
* rear), EXTERNAL_FRONT (external front), TELE (iOS-only; requests the telephoto lens and
|
|
28
|
+
* is honored only on devices that have one; on Android or on iOS devices without a tele
|
|
29
|
+
* lens BACK will be used), ULTRAWIDE (requests the ultra-wide lens and is honored only on
|
|
30
|
+
* devices that have one; on devices without an ultra-wide lens BACK will be used).
|
|
31
|
+
*/
|
|
32
|
+
defaultCamera?: string;
|
|
33
|
+
/**
|
|
34
|
+
* (EXPERIMENTAL; Android-only) Mirrors the frame sideways (left-right) before it is
|
|
35
|
+
* processed, equivalent to a horizontal flip along the vertical axis. The camera preview on
|
|
36
|
+
* the screen is not affected. Disabled by default. NOTE: This has no effect when
|
|
37
|
+
* pluginConfig.barcodeConfig.fastProcessMode is true.
|
|
38
|
+
*/
|
|
39
|
+
enableFlipFramesLeftRight?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* (EXPERIMENTAL; Android-only) Turns the frame upside down (top-bottom) before it is
|
|
42
|
+
* processed, equivalent to a vertical flip along the horizontal axis. The camera preview on
|
|
43
|
+
* the screen is not affected. Disabled by default. NOTE: This has no effect when
|
|
44
|
+
* pluginConfig.barcodeConfig.fastProcessMode is true.
|
|
45
|
+
*/
|
|
46
|
+
enableFlipFramesTopBottom?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Allow user to tap on the preview to focus the camera on a specific area of the screen
|
|
49
|
+
* (also known as tap-to-focus). Enabled by default.
|
|
50
|
+
*/
|
|
51
|
+
enableTapToFocus?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Optional cameras to fall back if the defaultCamera is not found.
|
|
54
|
+
*/
|
|
55
|
+
fallbackCameras?: string[];
|
|
56
|
+
/**
|
|
57
|
+
* The focal length.
|
|
58
|
+
*/
|
|
59
|
+
focalLength?: number;
|
|
60
|
+
/**
|
|
61
|
+
* The maximum focal length.
|
|
62
|
+
*/
|
|
63
|
+
maxFocalLength?: number;
|
|
64
|
+
/**
|
|
65
|
+
* The maximum zoom ratio.
|
|
66
|
+
*/
|
|
67
|
+
maxZoomRatio?: number;
|
|
68
|
+
/**
|
|
69
|
+
* Deprecated - do not use! The preferred resolution for taking images (720, 720p, 1080,
|
|
70
|
+
* 1080p).
|
|
71
|
+
*/
|
|
72
|
+
pictureResolution?: string;
|
|
73
|
+
/**
|
|
74
|
+
* (Note: this functionality is experimental - use at your own risk.) Duration in
|
|
75
|
+
* milliseconds after which tap-to-focus automatically returns to continuous autofocus mode.
|
|
76
|
+
* Range: 1000-60000ms.
|
|
77
|
+
*/
|
|
78
|
+
tapToFocusTimeoutMs?: number;
|
|
79
|
+
/**
|
|
80
|
+
* This flag enables or disables the zoom gesture if supported.
|
|
81
|
+
*/
|
|
82
|
+
zoomGesture?: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* The zoom ratio to apply to the camera. When set to a value greater than 0, this property
|
|
85
|
+
* takes precedence over defaultCamera for determining which physical lens to use. For
|
|
86
|
+
* example, setting zoomRatio to 0.5 on a device with an ultra-wide lens will select that
|
|
87
|
+
* lens, regardless of the defaultCamera setting. A value of 0 means no zoom ratio is
|
|
88
|
+
* applied and the camera selection falls back to defaultCamera.
|
|
89
|
+
*/
|
|
90
|
+
zoomRatio?: number;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Schema for SDK Flash Configuration
|
|
95
|
+
*/
|
|
96
|
+
export interface FlashConfig {
|
|
97
|
+
/**
|
|
98
|
+
* The alignment of the flash button.
|
|
99
|
+
*/
|
|
100
|
+
alignment?: FlashConfigAlignment;
|
|
101
|
+
/**
|
|
102
|
+
* The asset name of the icon to be displayed when the flash is set to auto.
|
|
103
|
+
*/
|
|
104
|
+
imageAuto?: string;
|
|
105
|
+
/**
|
|
106
|
+
* The asset name of the icon to be displayed when the flash is off.
|
|
107
|
+
*/
|
|
108
|
+
imageOff?: string;
|
|
109
|
+
/**
|
|
110
|
+
* The asset name of the icon to be displayed when the flash is on.
|
|
111
|
+
*/
|
|
112
|
+
imageOn?: string;
|
|
113
|
+
/**
|
|
114
|
+
* The flash mode.
|
|
115
|
+
*/
|
|
116
|
+
mode?: Mode;
|
|
117
|
+
/**
|
|
118
|
+
* An optional position offset for the flash button in density-independent pixels (dp).
|
|
119
|
+
*/
|
|
120
|
+
offset?: Offset;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* The alignment of the flash button.
|
|
125
|
+
*/
|
|
126
|
+
export enum FlashConfigAlignment {
|
|
127
|
+
Bottom = "bottom",
|
|
128
|
+
BottomLeft = "bottom_left",
|
|
129
|
+
BottomRight = "bottom_right",
|
|
130
|
+
Top = "top",
|
|
131
|
+
TopLeft = "top_left",
|
|
132
|
+
TopRight = "top_right",
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* The flash mode.
|
|
137
|
+
*/
|
|
138
|
+
export enum Mode {
|
|
139
|
+
Auto = "auto",
|
|
140
|
+
Manual = "manual",
|
|
141
|
+
ManualOff = "manual_off",
|
|
142
|
+
ManualOn = "manual_on",
|
|
143
|
+
None = "none",
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* An optional position offset for the flash button in density-independent pixels (dp).
|
|
148
|
+
*
|
|
149
|
+
* An x/y integer value pair. The unit (dp or camera pixels) depends on the property that
|
|
150
|
+
* references this definition.
|
|
151
|
+
*
|
|
152
|
+
* Adjusts the captured region position in camera pixels (px) after cropPadding is applied.
|
|
153
|
+
* Positive x shifts right, positive y shifts down.
|
|
154
|
+
*
|
|
155
|
+
* Position offset of the cutout in camera pixels (px), used in conjunction with alignment.
|
|
156
|
+
*/
|
|
157
|
+
export interface Offset {
|
|
158
|
+
x?: number;
|
|
159
|
+
y?: number;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Schema for SDK ViewPlugin Configuration
|
|
164
|
+
*/
|
|
165
|
+
export interface ViewPluginCompositeConfig {
|
|
166
|
+
/**
|
|
167
|
+
* The ID (name) of the workflow.
|
|
168
|
+
*/
|
|
169
|
+
id?: string;
|
|
170
|
+
/**
|
|
171
|
+
* The processing mode of the workflow (parallel, sequential, parallelFirstScan).
|
|
172
|
+
*/
|
|
173
|
+
processingMode?: ProcessingMode;
|
|
174
|
+
/**
|
|
175
|
+
* The ordered list of viewPlugins, each as JSON object with a given viewPluginConfig.
|
|
176
|
+
*/
|
|
177
|
+
viewPlugins?: ViewPlugin[];
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* The processing mode of the workflow (parallel, sequential, parallelFirstScan).
|
|
182
|
+
*/
|
|
183
|
+
export enum ProcessingMode {
|
|
184
|
+
Parallel = "parallel",
|
|
185
|
+
ParallelFirstScan = "parallelFirstScan",
|
|
186
|
+
Sequential = "sequential",
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export interface ViewPlugin {
|
|
190
|
+
viewPluginConfig?: ViewPluginConfig;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Schema for SDK ViewPlugin Configuration
|
|
195
|
+
*/
|
|
196
|
+
export interface ViewPluginConfig {
|
|
197
|
+
cutoutConfig?: CutoutConfig;
|
|
198
|
+
pluginConfig?: PluginConfig;
|
|
199
|
+
scanFeedbackConfig?: ScanFeedbackConfig;
|
|
200
|
+
uiFeedbackConfig?: UiFeedbackConfig;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Schema for SDK Cutout Configuration
|
|
205
|
+
*/
|
|
206
|
+
export interface CutoutConfig {
|
|
207
|
+
/**
|
|
208
|
+
* The alignment of the cutout area.
|
|
209
|
+
*/
|
|
210
|
+
alignment?: CutoutConfigAlignment;
|
|
211
|
+
/**
|
|
212
|
+
* Animation type for the cutout when initially displayed. Values: none, fade, zoom
|
|
213
|
+
*/
|
|
214
|
+
animation?: CutoutConfigAnimation;
|
|
215
|
+
/**
|
|
216
|
+
* The corner radius of the cutout in density-independent pixels (dp).
|
|
217
|
+
*/
|
|
218
|
+
cornerRadius?: number;
|
|
219
|
+
/**
|
|
220
|
+
* Adjusts the captured region position in camera pixels (px) after cropPadding is applied.
|
|
221
|
+
* Positive x shifts right, positive y shifts down.
|
|
222
|
+
*/
|
|
223
|
+
cropOffset?: Offset;
|
|
224
|
+
/**
|
|
225
|
+
* Expands the captured image region beyond the cutout in camera pixels (px). Non-negative
|
|
226
|
+
* values only — negative values will cause a runtime exception. Example: cutout width=700px
|
|
227
|
+
* with padding={x:10} → 720px captured.
|
|
228
|
+
*/
|
|
229
|
+
cropPadding?: NonNegativeOffset;
|
|
230
|
+
/**
|
|
231
|
+
* The hex string (RRGGBB) of the stroke color for visual feedback. (e.g. 00CCFF).
|
|
232
|
+
*/
|
|
233
|
+
feedbackStrokeColor?: string;
|
|
234
|
+
/**
|
|
235
|
+
* The maximum height in percent (0-100), relating to the size of the view.
|
|
236
|
+
*/
|
|
237
|
+
maxHeightPercent?: string;
|
|
238
|
+
/**
|
|
239
|
+
* The maximum width in percent (0-100), relating to the size of the view.
|
|
240
|
+
*/
|
|
241
|
+
maxWidthPercent?: string;
|
|
242
|
+
/**
|
|
243
|
+
* Position offset of the cutout in camera pixels (px), used in conjunction with alignment.
|
|
244
|
+
*/
|
|
245
|
+
offset?: Offset;
|
|
246
|
+
/**
|
|
247
|
+
* Optional transparency factor for the outer color (0.0 - 1.0).
|
|
248
|
+
*/
|
|
249
|
+
outerAlpha?: number;
|
|
250
|
+
/**
|
|
251
|
+
* Background color as a 6-digit (RRGGBB) or 8-digit (AARRGGBB) hex string.
|
|
252
|
+
*/
|
|
253
|
+
outerColor?: string;
|
|
254
|
+
/**
|
|
255
|
+
* A size constraining the ratio of width / height. If set to 0, the ratio will be equal to
|
|
256
|
+
* the full frame. For the optimal ratio for each technical capability have a look at the
|
|
257
|
+
* Technical Capabilities section at documentation.anyline.com.
|
|
258
|
+
*/
|
|
259
|
+
ratioFromSize?: RatioFromSize;
|
|
260
|
+
/**
|
|
261
|
+
* The hex string (RRGGBB) of the stroke color. (e.g. 00CCFF).
|
|
262
|
+
*/
|
|
263
|
+
strokeColor?: string;
|
|
264
|
+
/**
|
|
265
|
+
* The stroke width of the cutout border in density-independent pixels (dp). If set to 0,
|
|
266
|
+
* the line will be invisible.
|
|
267
|
+
*/
|
|
268
|
+
strokeWidth?: number;
|
|
269
|
+
/**
|
|
270
|
+
* The preferred width in pixels, relating to the camera resolution. If not specified or 0,
|
|
271
|
+
* the maximum possible width will be chosen.
|
|
272
|
+
*/
|
|
273
|
+
width?: number;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* The alignment of the cutout area.
|
|
278
|
+
*/
|
|
279
|
+
export enum CutoutConfigAlignment {
|
|
280
|
+
Bottom = "bottom",
|
|
281
|
+
BottomHalf = "bottom_half",
|
|
282
|
+
Center = "center",
|
|
283
|
+
Top = "top",
|
|
284
|
+
TopHalf = "top_half",
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Animation type for the cutout when initially displayed. Values: none, fade, zoom
|
|
289
|
+
*/
|
|
290
|
+
export enum CutoutConfigAnimation {
|
|
291
|
+
Fade = "fade",
|
|
292
|
+
None = "none",
|
|
293
|
+
Zoom = "zoom",
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* Expands the captured image region beyond the cutout in camera pixels (px). Non-negative
|
|
298
|
+
* values only — negative values will cause a runtime exception. Example: cutout width=700px
|
|
299
|
+
* with padding={x:10} → 720px captured.
|
|
300
|
+
*
|
|
301
|
+
* An x/y integer value pair where both values must be >= 0. The unit depends on the
|
|
302
|
+
* property that references this definition.
|
|
303
|
+
*/
|
|
304
|
+
export interface NonNegativeOffset {
|
|
305
|
+
x?: number;
|
|
306
|
+
y?: number;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* A size constraining the ratio of width / height. If set to 0, the ratio will be equal to
|
|
311
|
+
* the full frame. For the optimal ratio for each technical capability have a look at the
|
|
312
|
+
* Technical Capabilities section at documentation.anyline.com.
|
|
313
|
+
*/
|
|
314
|
+
export interface RatioFromSize {
|
|
315
|
+
height?: number;
|
|
316
|
+
width?: number;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* General configuration for scan plugins
|
|
321
|
+
*/
|
|
322
|
+
export interface PluginConfig {
|
|
323
|
+
barcodeConfig?: BarcodeConfig;
|
|
324
|
+
/**
|
|
325
|
+
* Sets whether or not to continue scanning once a result is found.
|
|
326
|
+
*/
|
|
327
|
+
cancelOnResult?: boolean;
|
|
328
|
+
commercialTireIdConfig?: CommercialTireIdConfig;
|
|
329
|
+
/**
|
|
330
|
+
* This option allows to finetune the handling results of the same content when scanning
|
|
331
|
+
* continuously. If the option is set to -1, equal results will not be reported again until
|
|
332
|
+
* the scanning process is stopped. Setting this option to 0 will report equal results every
|
|
333
|
+
* time it is found. Setting this option to greater than 0 indicates how much time
|
|
334
|
+
* (milliseconds) must pass by not detecting the result before it will be detected again.
|
|
335
|
+
* (This feature is currently only supported in Barcode scanning)
|
|
336
|
+
*/
|
|
337
|
+
consecutiveEqualResultFilter?: number;
|
|
338
|
+
containerConfig?: ContainerConfig;
|
|
339
|
+
/**
|
|
340
|
+
* Sets a name for the scan plugin.
|
|
341
|
+
*/
|
|
342
|
+
id?: string;
|
|
343
|
+
japaneseLandingPermissionConfig?: JapaneseLandingPermissionConfig;
|
|
344
|
+
licensePlateConfig?: LicensePlateConfig;
|
|
345
|
+
meterConfig?: MeterConfig;
|
|
346
|
+
mrzConfig?: MrzConfig;
|
|
347
|
+
ocrConfig?: OcrConfig;
|
|
348
|
+
odometerConfig?: OdometerConfig;
|
|
349
|
+
/**
|
|
350
|
+
* Sets an initial time period (in milliseconds) where scanned frames are not processed as
|
|
351
|
+
* results.
|
|
352
|
+
*/
|
|
353
|
+
startScanDelay?: number;
|
|
354
|
+
/**
|
|
355
|
+
* Allows to fine-tune a list of options for plugins.
|
|
356
|
+
*/
|
|
357
|
+
startVariables?: StartVariable[];
|
|
358
|
+
tinConfig?: TinConfig;
|
|
359
|
+
tireMakeConfig?: TireMakeConfig;
|
|
360
|
+
tireSizeConfig?: TireSizeConfig;
|
|
361
|
+
universalIdConfig?: UniversalIdConfig;
|
|
362
|
+
vehicleRegistrationCertificateConfig?: VehicleRegistrationCertificateConfig;
|
|
363
|
+
vinConfig?: VinConfig;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* Configuration for scanning barcodes
|
|
368
|
+
*/
|
|
369
|
+
export interface BarcodeConfig {
|
|
370
|
+
/**
|
|
371
|
+
* Set this to filter which barcode formats should be scanned. Setting 'ALL' will enable
|
|
372
|
+
* scanning all supported formats.
|
|
373
|
+
*/
|
|
374
|
+
barcodeFormats?: BarcodeFormat[];
|
|
375
|
+
/**
|
|
376
|
+
* [DEPRECATED] If this option is set, allows consecutive barcode results of the same
|
|
377
|
+
* barcode when scanning continuously.
|
|
378
|
+
*/
|
|
379
|
+
consecutiveEqualResults?: boolean;
|
|
380
|
+
/**
|
|
381
|
+
* Sets whether or not to disable advanced barcode scanning even if the license supports it.
|
|
382
|
+
*/
|
|
383
|
+
disableAdvancedBarcode?: boolean;
|
|
384
|
+
/**
|
|
385
|
+
* If this option is set, uses faster image processing for barcode scanning. Note:
|
|
386
|
+
* fastProcessMode is not available during composite scanning.
|
|
387
|
+
*/
|
|
388
|
+
fastProcessMode?: boolean;
|
|
389
|
+
/**
|
|
390
|
+
* Setting this to 'true' will enable reading multiple barcodes per frame.
|
|
391
|
+
*/
|
|
392
|
+
multiBarcode?: boolean;
|
|
393
|
+
/**
|
|
394
|
+
* If this option is set, barcodes parsed according to the AAMVA standard. This only works
|
|
395
|
+
* for PDF417 codes on driving licenses.
|
|
396
|
+
*/
|
|
397
|
+
parseAAMVA?: boolean;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
export enum BarcodeFormat {
|
|
401
|
+
All = "ALL",
|
|
402
|
+
Aztec = "AZTEC",
|
|
403
|
+
AztecInverse = "AZTEC_INVERSE",
|
|
404
|
+
Bookland = "BOOKLAND",
|
|
405
|
+
Codabar = "CODABAR",
|
|
406
|
+
Code11 = "CODE_11",
|
|
407
|
+
Code128 = "CODE_128",
|
|
408
|
+
Code32 = "CODE_32",
|
|
409
|
+
Code39 = "CODE_39",
|
|
410
|
+
Code93 = "CODE_93",
|
|
411
|
+
Coupon = "COUPON",
|
|
412
|
+
DataMatrix = "DATA_MATRIX",
|
|
413
|
+
Databar = "DATABAR",
|
|
414
|
+
Discrete2_5 = "DISCRETE_2_5",
|
|
415
|
+
DotCode = "DOT_CODE",
|
|
416
|
+
Ean13 = "EAN_13",
|
|
417
|
+
Ean8 = "EAN_8",
|
|
418
|
+
Gs1128 = "GS1_128",
|
|
419
|
+
Gs1QrCode = "GS1_QR_CODE",
|
|
420
|
+
Isbt128 = "ISBT_128",
|
|
421
|
+
IssnEan = "ISSN_EAN",
|
|
422
|
+
Itf = "ITF",
|
|
423
|
+
Kix = "KIX",
|
|
424
|
+
Matrix2_5 = "MATRIX_2_5",
|
|
425
|
+
Maxicode = "MAXICODE",
|
|
426
|
+
MicroPdf = "MICRO_PDF",
|
|
427
|
+
MicroQr = "MICRO_QR",
|
|
428
|
+
Msi = "MSI",
|
|
429
|
+
OneDInverse = "ONE_D_INVERSE",
|
|
430
|
+
Pdf417 = "PDF_417",
|
|
431
|
+
PostUk = "POST_UK",
|
|
432
|
+
QrCode = "QR_CODE",
|
|
433
|
+
QrInverse = "QR_INVERSE",
|
|
434
|
+
Rss14 = "RSS_14",
|
|
435
|
+
RssExpanded = "RSS_EXPANDED",
|
|
436
|
+
Trioptic = "TRIOPTIC",
|
|
437
|
+
UpcA = "UPC_A",
|
|
438
|
+
UpcE = "UPC_E",
|
|
439
|
+
UpcEanExtension = "UPC_EAN_EXTENSION",
|
|
440
|
+
UpuFics = "UPU_FICS",
|
|
441
|
+
UsPlanet = "US_PLANET",
|
|
442
|
+
UsPostnet = "US_POSTNET",
|
|
443
|
+
Usps4Cb = "USPS_4CB",
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
/**
|
|
447
|
+
* Configuration for scanning commercial Tire IDs
|
|
448
|
+
*/
|
|
449
|
+
export interface CommercialTireIdConfig {
|
|
450
|
+
/**
|
|
451
|
+
* Sets a minimum confidence which has to be reached in order to trigger a scan result.
|
|
452
|
+
*/
|
|
453
|
+
minConfidence?: number;
|
|
454
|
+
/**
|
|
455
|
+
* Sets whether the text shall also be scanned upside-down.
|
|
456
|
+
*/
|
|
457
|
+
upsideDownMode?: UpsideDownMode;
|
|
458
|
+
/**
|
|
459
|
+
* Sets a regular expression which the commercial tire id text needs to match in order to
|
|
460
|
+
* trigger a scan result.
|
|
461
|
+
*/
|
|
462
|
+
validationRegex?: string;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
/**
|
|
466
|
+
* Sets whether the text shall also be scanned upside-down.
|
|
467
|
+
*/
|
|
468
|
+
export enum UpsideDownMode {
|
|
469
|
+
Auto = "AUTO",
|
|
470
|
+
Disabled = "DISABLED",
|
|
471
|
+
Enabled = "ENABLED",
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
/**
|
|
475
|
+
* Configuration for scanning shipping container numbers
|
|
476
|
+
*/
|
|
477
|
+
export interface ContainerConfig {
|
|
478
|
+
/**
|
|
479
|
+
* Sets a minimum confidence which has to be reached in order to trigger a scan result.
|
|
480
|
+
*/
|
|
481
|
+
minConfidence?: number;
|
|
482
|
+
/**
|
|
483
|
+
* Determines if container numbers shall be scanned horizontally or vertically.
|
|
484
|
+
*/
|
|
485
|
+
scanMode?: ContainerConfigScanMode;
|
|
486
|
+
/**
|
|
487
|
+
* Sets a regular expression which the scanned text needs to match in order to trigger a
|
|
488
|
+
* scan result.
|
|
489
|
+
*/
|
|
490
|
+
validationRegex?: string;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
/**
|
|
494
|
+
* Determines if container numbers shall be scanned horizontally or vertically.
|
|
495
|
+
*/
|
|
496
|
+
export enum ContainerConfigScanMode {
|
|
497
|
+
Horizontal = "HORIZONTAL",
|
|
498
|
+
Vertical = "VERTICAL",
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* Configuration for scanning japanese landing permission tickets
|
|
503
|
+
*/
|
|
504
|
+
export interface JapaneseLandingPermissionConfig {
|
|
505
|
+
airport?: JapaneseLandingPermissionConfigFieldOption;
|
|
506
|
+
dateOfExpiry?: JapaneseLandingPermissionConfigFieldOption;
|
|
507
|
+
dateOfIssue?: JapaneseLandingPermissionConfigFieldOption;
|
|
508
|
+
duration?: JapaneseLandingPermissionConfigFieldOption;
|
|
509
|
+
status?: JapaneseLandingPermissionConfigFieldOption;
|
|
510
|
+
[property: string]: any;
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
/**
|
|
514
|
+
* Field option for JLP fields
|
|
515
|
+
*/
|
|
516
|
+
export interface JapaneseLandingPermissionConfigFieldOption {
|
|
517
|
+
/**
|
|
518
|
+
* Set the minConfidence between 0 and 100. Otherwise, it's defaulted.
|
|
519
|
+
*/
|
|
520
|
+
minConfidence?: number;
|
|
521
|
+
/**
|
|
522
|
+
* The scanOption determines whether a field is considered optional, mandatory, disabled or
|
|
523
|
+
* follows a default behavior. Default behavior is one of the other three that yields the
|
|
524
|
+
* best recall results with all layouts enabled.
|
|
525
|
+
*/
|
|
526
|
+
scanOption?: MrzScanOption;
|
|
527
|
+
[property: string]: any;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
/**
|
|
531
|
+
* The scanOption determines whether a field is considered optional, mandatory, disabled or
|
|
532
|
+
* follows a default behavior. Default behavior is one of the other three that yields the
|
|
533
|
+
* best recall results with all layouts enabled.
|
|
534
|
+
*
|
|
535
|
+
* The mrzScanOption determines whether a field is considered optional, mandatory, disabled
|
|
536
|
+
* or follows a default behavior.
|
|
537
|
+
*/
|
|
538
|
+
export enum MrzScanOption {
|
|
539
|
+
Default = "default",
|
|
540
|
+
Disabled = "disabled",
|
|
541
|
+
Mandatory = "mandatory",
|
|
542
|
+
Optional = "optional",
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
/**
|
|
546
|
+
* Configuration for scanning license plates
|
|
547
|
+
*/
|
|
548
|
+
export interface LicensePlateConfig {
|
|
549
|
+
/**
|
|
550
|
+
* Sets a minimum confidence which has to be reached in order to trigger a scan result.
|
|
551
|
+
*/
|
|
552
|
+
minConfidence?: number;
|
|
553
|
+
/**
|
|
554
|
+
* Specifies a country or location of which license plates shall be scanned.
|
|
555
|
+
*/
|
|
556
|
+
scanMode?: LicensePlateConfigScanMode;
|
|
557
|
+
/**
|
|
558
|
+
* Sets a regular expression per country. Expected format: "'country_code':^regex$,
|
|
559
|
+
* 'other_country_code':^other_regex$". The country code needs to be provided in the
|
|
560
|
+
* international vehicle registration code format that is visible on the license plate (for
|
|
561
|
+
* example 'A' for Austria). Note: not available for the scanModes unitedstates and africa.
|
|
562
|
+
*/
|
|
563
|
+
validationRegex?: string;
|
|
564
|
+
/**
|
|
565
|
+
* Select if the visual inspection sticker should be scanned. If OPTIONAL, the visual
|
|
566
|
+
* inspection sticker will only be returned if found successfully. If MANDATORY the scan
|
|
567
|
+
* will only return if found successfully. Not available on africa and unitedstates.
|
|
568
|
+
*/
|
|
569
|
+
vehicleInspectionSticker?: VehicleInspectionSticker;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
/**
|
|
573
|
+
* Specifies a country or location of which license plates shall be scanned.
|
|
574
|
+
*/
|
|
575
|
+
export enum LicensePlateConfigScanMode {
|
|
576
|
+
Africa = "africa",
|
|
577
|
+
Albania = "albania",
|
|
578
|
+
Andorra = "andorra",
|
|
579
|
+
Armenia = "armenia",
|
|
580
|
+
Austria = "austria",
|
|
581
|
+
Auto = "auto",
|
|
582
|
+
Azerbaijan = "azerbaijan",
|
|
583
|
+
Belarus = "belarus",
|
|
584
|
+
Belgium = "belgium",
|
|
585
|
+
Bosniaandherzegovina = "bosniaandherzegovina",
|
|
586
|
+
Bulgaria = "bulgaria",
|
|
587
|
+
Canada = "canada",
|
|
588
|
+
Croatia = "croatia",
|
|
589
|
+
Cyprus = "cyprus",
|
|
590
|
+
Czech = "czech",
|
|
591
|
+
Denmark = "denmark",
|
|
592
|
+
Estonia = "estonia",
|
|
593
|
+
Finland = "finland",
|
|
594
|
+
France = "france",
|
|
595
|
+
Georgia = "georgia",
|
|
596
|
+
Germany = "germany",
|
|
597
|
+
Greece = "greece",
|
|
598
|
+
Hungary = "hungary",
|
|
599
|
+
Iceland = "iceland",
|
|
600
|
+
Ireland = "ireland",
|
|
601
|
+
Italy = "italy",
|
|
602
|
+
Latvia = "latvia",
|
|
603
|
+
Liechtenstein = "liechtenstein",
|
|
604
|
+
Lithuania = "lithuania",
|
|
605
|
+
Luxembourg = "luxembourg",
|
|
606
|
+
Malta = "malta",
|
|
607
|
+
Moldova = "moldova",
|
|
608
|
+
Monaco = "monaco",
|
|
609
|
+
Montenegro = "montenegro",
|
|
610
|
+
Netherlands = "netherlands",
|
|
611
|
+
Northmacedonia = "northmacedonia",
|
|
612
|
+
Norway = "norway",
|
|
613
|
+
Norwayspecial = "norwayspecial",
|
|
614
|
+
Poland = "poland",
|
|
615
|
+
Portugal = "portugal",
|
|
616
|
+
Romania = "romania",
|
|
617
|
+
Russia = "russia",
|
|
618
|
+
Serbia = "serbia",
|
|
619
|
+
Slovakia = "slovakia",
|
|
620
|
+
Slovenia = "slovenia",
|
|
621
|
+
Spain = "spain",
|
|
622
|
+
Sweden = "sweden",
|
|
623
|
+
Switzerland = "switzerland",
|
|
624
|
+
Turkey = "turkey",
|
|
625
|
+
Ukraine = "ukraine",
|
|
626
|
+
Unitedkingdom = "unitedkingdom",
|
|
627
|
+
Unitedstates = "unitedstates",
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
/**
|
|
631
|
+
* Select if the visual inspection sticker should be scanned. If OPTIONAL, the visual
|
|
632
|
+
* inspection sticker will only be returned if found successfully. If MANDATORY the scan
|
|
633
|
+
* will only return if found successfully. Not available on africa and unitedstates.
|
|
634
|
+
*/
|
|
635
|
+
export enum VehicleInspectionSticker {
|
|
636
|
+
Disabled = "DISABLED",
|
|
637
|
+
Mandatory = "MANDATORY",
|
|
638
|
+
Optional = "OPTIONAL",
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
/**
|
|
642
|
+
* Configuration for scanning meters
|
|
643
|
+
*/
|
|
644
|
+
export interface MeterConfig {
|
|
645
|
+
/**
|
|
646
|
+
* Defines the maximum number of read decimal digits for values >=0. Negative values mean
|
|
647
|
+
* all decimal digits are read. Currently implemented only for the
|
|
648
|
+
* "auto_analog_digital_meter" scan mode.
|
|
649
|
+
*/
|
|
650
|
+
maxNumDecimalDigits?: number;
|
|
651
|
+
/**
|
|
652
|
+
* Sets a minimum confidence which has to be reached in order to trigger a scan result.
|
|
653
|
+
*/
|
|
654
|
+
minConfidence?: number;
|
|
655
|
+
/**
|
|
656
|
+
* Determines which types of meters to scan.
|
|
657
|
+
*/
|
|
658
|
+
scanMode?: MeterConfigScanMode;
|
|
659
|
+
/**
|
|
660
|
+
* Sets a regular expression which the scanned text needs to match in order to trigger a
|
|
661
|
+
* scan result.
|
|
662
|
+
*/
|
|
663
|
+
validationRegex?: string;
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
/**
|
|
667
|
+
* Determines which types of meters to scan.
|
|
668
|
+
*/
|
|
669
|
+
export enum MeterConfigScanMode {
|
|
670
|
+
AutoAnalogDigitalMeter = "auto_analog_digital_meter",
|
|
671
|
+
DialMeter = "dial_meter",
|
|
672
|
+
DigitalMeter2_Experimental = "digital_meter_2_experimental",
|
|
673
|
+
MultiFieldDigitalMeter = "multi_field_digital_meter",
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
/**
|
|
677
|
+
* Configuration for scanning machine-readable zones (MRZ) of passports and other IDs
|
|
678
|
+
*/
|
|
679
|
+
export interface MrzConfig {
|
|
680
|
+
/**
|
|
681
|
+
* The cropAndTransformID determines whether or not the image shall be cropped and
|
|
682
|
+
* transformed.
|
|
683
|
+
*/
|
|
684
|
+
cropAndTransformID?: boolean;
|
|
685
|
+
/**
|
|
686
|
+
* Sets whether the face detection approach is enabled.
|
|
687
|
+
*/
|
|
688
|
+
faceDetectionEnabled?: boolean;
|
|
689
|
+
/**
|
|
690
|
+
* Sets a minimum confidence which has to be reached in order to trigger a scan result.
|
|
691
|
+
*/
|
|
692
|
+
minConfidence?: number;
|
|
693
|
+
/**
|
|
694
|
+
* The fieldmrzScanOptions configure which text fields shall be captured mandatory, optional
|
|
695
|
+
* or not at all.
|
|
696
|
+
*/
|
|
697
|
+
mrzFieldScanOptions?: MrzFieldScanOptions;
|
|
698
|
+
/**
|
|
699
|
+
* The minFieldConfidences configure which fields must reach which confidence thresholds in
|
|
700
|
+
* order to be part of the scan result.
|
|
701
|
+
*/
|
|
702
|
+
mrzMinFieldConfidences?: MrzMinFieldConfidences;
|
|
703
|
+
/**
|
|
704
|
+
* When enabling the strictMode, a result is only returned if all the check digits on the
|
|
705
|
+
* scanned document are valid.
|
|
706
|
+
*/
|
|
707
|
+
strictMode?: boolean;
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
/**
|
|
711
|
+
* The fieldmrzScanOptions configure which text fields shall be captured mandatory, optional
|
|
712
|
+
* or not at all.
|
|
713
|
+
*/
|
|
714
|
+
export interface MrzFieldScanOptions {
|
|
715
|
+
checkDigitDateOfBirth?: MrzScanOption;
|
|
716
|
+
checkDigitDateOfExpiry?: MrzScanOption;
|
|
717
|
+
checkDigitDocumentNumber?: MrzScanOption;
|
|
718
|
+
checkDigitFinal?: MrzScanOption;
|
|
719
|
+
checkDigitPersonalNumber?: MrzScanOption;
|
|
720
|
+
dateOfBirth?: MrzScanOption;
|
|
721
|
+
dateOfExpiry?: MrzScanOption;
|
|
722
|
+
documentNumber?: MrzScanOption;
|
|
723
|
+
documentType?: MrzScanOption;
|
|
724
|
+
givenNames?: MrzScanOption;
|
|
725
|
+
issuingCountryCode?: MrzScanOption;
|
|
726
|
+
mrzString?: MrzScanOption;
|
|
727
|
+
nationalityCountryCode?: MrzScanOption;
|
|
728
|
+
optionalData?: MrzScanOption;
|
|
729
|
+
personalNumber?: MrzScanOption;
|
|
730
|
+
sex?: MrzScanOption;
|
|
731
|
+
surname?: MrzScanOption;
|
|
732
|
+
vizAddress?: MrzScanOption;
|
|
733
|
+
vizDateOfBirth?: MrzScanOption;
|
|
734
|
+
vizDateOfExpiry?: MrzScanOption;
|
|
735
|
+
vizDateOfIssue?: MrzScanOption;
|
|
736
|
+
vizGivenNames?: MrzScanOption;
|
|
737
|
+
vizSurname?: MrzScanOption;
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
/**
|
|
741
|
+
* The minFieldConfidences configure which fields must reach which confidence thresholds in
|
|
742
|
+
* order to be part of the scan result.
|
|
743
|
+
*/
|
|
744
|
+
export interface MrzMinFieldConfidences {
|
|
745
|
+
checkDigitDateOfBirth?: number;
|
|
746
|
+
checkDigitDateOfExpiry?: number;
|
|
747
|
+
checkDigitDocumentNumber?: number;
|
|
748
|
+
checkDigitFinal?: number;
|
|
749
|
+
checkDigitPersonalNumber?: number;
|
|
750
|
+
dateOfBirth?: number;
|
|
751
|
+
dateOfExpiry?: number;
|
|
752
|
+
documentNumber?: number;
|
|
753
|
+
documentType?: number;
|
|
754
|
+
givenNames?: number;
|
|
755
|
+
issuingCountryCode?: number;
|
|
756
|
+
mrzString?: number;
|
|
757
|
+
nationalityCountryCode?: number;
|
|
758
|
+
optionalData?: number;
|
|
759
|
+
personalNumber?: number;
|
|
760
|
+
sex?: number;
|
|
761
|
+
surname?: number;
|
|
762
|
+
vizAddress?: number;
|
|
763
|
+
vizDateOfBirth?: number;
|
|
764
|
+
vizDateOfExpiry?: number;
|
|
765
|
+
vizDateOfIssue?: number;
|
|
766
|
+
vizGivenNames?: number;
|
|
767
|
+
vizSurname?: number;
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
/**
|
|
771
|
+
* Configuration for general OCR scanning use-cases
|
|
772
|
+
*/
|
|
773
|
+
export interface OcrConfig {
|
|
774
|
+
/**
|
|
775
|
+
* Sets the number of characters in each text line for 'grid' mode.
|
|
776
|
+
*/
|
|
777
|
+
charCountX?: number;
|
|
778
|
+
/**
|
|
779
|
+
* Sets the number of text lines for 'grid' mode.
|
|
780
|
+
*/
|
|
781
|
+
charCountY?: number;
|
|
782
|
+
/**
|
|
783
|
+
* Defines the average horizontal distance between two characters in 'grid' mode, measured
|
|
784
|
+
* in percentage of the characters width.
|
|
785
|
+
*/
|
|
786
|
+
charPaddingXFactor?: number;
|
|
787
|
+
/**
|
|
788
|
+
* Defines the average vertical distance between two characters in 'grid' mode, measured in
|
|
789
|
+
* percentage of the characters height.
|
|
790
|
+
*/
|
|
791
|
+
charPaddingYFactor?: number;
|
|
792
|
+
/**
|
|
793
|
+
* Restricts the scanner to a set of characters to be detected.
|
|
794
|
+
*/
|
|
795
|
+
charWhitelist?: string;
|
|
796
|
+
/**
|
|
797
|
+
* Sets a custom Anyline script. The file has to be located in the project and point to a
|
|
798
|
+
* path relative from the project root. Please check the official documentation for more
|
|
799
|
+
* details.
|
|
800
|
+
*/
|
|
801
|
+
customCmdFile?: string;
|
|
802
|
+
/**
|
|
803
|
+
* Sets a maximum character height (in pixels) to be considered in the scanning process.
|
|
804
|
+
*/
|
|
805
|
+
maxCharHeight?: number;
|
|
806
|
+
/**
|
|
807
|
+
* Sets a minimum character height (in pixels) to be considered in the scanning process.
|
|
808
|
+
*/
|
|
809
|
+
minCharHeight?: number;
|
|
810
|
+
/**
|
|
811
|
+
* Sets a minimum confidence which has to be reached in order to trigger a scan result.
|
|
812
|
+
*/
|
|
813
|
+
minConfidence?: number;
|
|
814
|
+
/**
|
|
815
|
+
* Sets a sharpnes factor (0-100) to rule out blurry images.
|
|
816
|
+
*/
|
|
817
|
+
minSharpness?: number;
|
|
818
|
+
/**
|
|
819
|
+
* Sets one or more custom Anyline models. The files have to be located in the project and
|
|
820
|
+
* point to a path relative from the project root. If no customCmdFile is set, only a
|
|
821
|
+
* maximum of one model is valid. If a customCmdFile is set, it depends whether or not the
|
|
822
|
+
* customCmdFile requires multiple models or not. Please check the official documentation
|
|
823
|
+
* for more details.
|
|
824
|
+
*/
|
|
825
|
+
models?: string[];
|
|
826
|
+
/**
|
|
827
|
+
* Sets whether to scan single-line texts, multi-line texts in a grid-formation or finds
|
|
828
|
+
* text automatically.
|
|
829
|
+
*/
|
|
830
|
+
scanMode?: OcrConfigScanMode;
|
|
831
|
+
/**
|
|
832
|
+
* Sets a regular expression which the scanned text needs to match in order to trigger a
|
|
833
|
+
* scan result.
|
|
834
|
+
*/
|
|
835
|
+
validationRegex?: string;
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
/**
|
|
839
|
+
* Sets whether to scan single-line texts, multi-line texts in a grid-formation or finds
|
|
840
|
+
* text automatically.
|
|
841
|
+
*/
|
|
842
|
+
export enum OcrConfigScanMode {
|
|
843
|
+
Auto = "auto",
|
|
844
|
+
Grid = "grid",
|
|
845
|
+
Line = "line",
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
/**
|
|
849
|
+
* Configuration for scanning odometers
|
|
850
|
+
*/
|
|
851
|
+
export interface OdometerConfig {
|
|
852
|
+
/**
|
|
853
|
+
* Sets a minimum confidence which has to be reached in order to trigger a scan result.The
|
|
854
|
+
* value has to be between 0 and 100. Defaults to 60.
|
|
855
|
+
*/
|
|
856
|
+
minConfidence?: number;
|
|
857
|
+
/**
|
|
858
|
+
* Sets a regular expression which the scanned text needs to match in order to trigger a
|
|
859
|
+
* scan result.
|
|
860
|
+
*/
|
|
861
|
+
validationRegex?: string;
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
/**
|
|
865
|
+
* Describes a start variable for fine-tuning plugins.
|
|
866
|
+
*/
|
|
867
|
+
export interface StartVariable {
|
|
868
|
+
/**
|
|
869
|
+
* The key of the variable.
|
|
870
|
+
*/
|
|
871
|
+
key?: string;
|
|
872
|
+
/**
|
|
873
|
+
* The value of the variable.
|
|
874
|
+
*/
|
|
875
|
+
value?: boolean | number | number | string;
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
/**
|
|
879
|
+
* Configuration for scanning TIN numbers
|
|
880
|
+
*/
|
|
881
|
+
export interface TinConfig {
|
|
882
|
+
/**
|
|
883
|
+
* Defines the minimum height ratio relative to image height for the detected text region.
|
|
884
|
+
* Ensures the device is close enough to the tire by requiring detected text to meet a
|
|
885
|
+
* minimum height requirement. Higher values are more restrictive (text must be taller,
|
|
886
|
+
* meaning device must be closer). This parameter helps prevent premature scans when the
|
|
887
|
+
* user is too far away and ensures better image quality.
|
|
888
|
+
*/
|
|
889
|
+
detectionMinHeightRatio?: number;
|
|
890
|
+
/**
|
|
891
|
+
* Defines the horizontal ratio for text alignment checks relative to image width. Ensures
|
|
892
|
+
* the detected TIN text starts near the left edge of the cutout (or right edge when
|
|
893
|
+
* upside-down) to prevent partial captures. Lower values are more restrictive (text must be
|
|
894
|
+
* closer to the edge). This parameter helps reduce premature results and ensures proper
|
|
895
|
+
* text alignment.
|
|
896
|
+
*/
|
|
897
|
+
horizontalAlignmentRatio?: number;
|
|
898
|
+
/**
|
|
899
|
+
* Sets a minimum confidence which has to be reached in order to trigger a scan result.
|
|
900
|
+
*/
|
|
901
|
+
minConfidence?: number;
|
|
902
|
+
/**
|
|
903
|
+
* Sets the mode to scan universal TIN numbers ('UNIVERSAL') or TIN numbers of any length
|
|
904
|
+
* starting with DOT ('DOT').
|
|
905
|
+
*/
|
|
906
|
+
scanMode?: TinConfigScanMode;
|
|
907
|
+
/**
|
|
908
|
+
* Sets whether the text shall also be scanned upside-down.
|
|
909
|
+
*/
|
|
910
|
+
upsideDownMode?: UpsideDownMode;
|
|
911
|
+
/**
|
|
912
|
+
* Sets whether the production date validation is enabled. If it is set to false the scan
|
|
913
|
+
* result is also returned for invalid and missing dates.
|
|
914
|
+
*/
|
|
915
|
+
validateProductionDate?: boolean;
|
|
916
|
+
/**
|
|
917
|
+
* Sets a regular expression which the TIN text needs to match in order to trigger a scan
|
|
918
|
+
* result.
|
|
919
|
+
*/
|
|
920
|
+
validationRegex?: string;
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
/**
|
|
924
|
+
* Sets the mode to scan universal TIN numbers ('UNIVERSAL') or TIN numbers of any length
|
|
925
|
+
* starting with DOT ('DOT').
|
|
926
|
+
*/
|
|
927
|
+
export enum TinConfigScanMode {
|
|
928
|
+
Dot = "DOT",
|
|
929
|
+
Universal = "UNIVERSAL",
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
/**
|
|
933
|
+
* Configuration for scanning Tire Makes
|
|
934
|
+
*/
|
|
935
|
+
export interface TireMakeConfig {
|
|
936
|
+
/**
|
|
937
|
+
* Sets a minimum confidence which has to be reached in order to trigger a scan result.
|
|
938
|
+
*/
|
|
939
|
+
minConfidence?: number;
|
|
940
|
+
/**
|
|
941
|
+
* Sets whether the text shall also be scanned upside-down.
|
|
942
|
+
*/
|
|
943
|
+
upsideDownMode?: UpsideDownMode;
|
|
944
|
+
/**
|
|
945
|
+
* Sets a regular expression which the tire make text needs to match in order to trigger a
|
|
946
|
+
* scan result. E.g. "(Continental|Dunlop)" will only trigger on Continental or Dunlop tires.
|
|
947
|
+
*/
|
|
948
|
+
validationRegex?: string;
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
/**
|
|
952
|
+
* Configuration for scanning Tire Size Specifications
|
|
953
|
+
*/
|
|
954
|
+
export interface TireSizeConfig {
|
|
955
|
+
/**
|
|
956
|
+
* Sets a minimum confidence which has to be reached in order to trigger a scan result.
|
|
957
|
+
*/
|
|
958
|
+
minConfidence?: number;
|
|
959
|
+
/**
|
|
960
|
+
* Sets whether the text shall also be scanned upside-down.
|
|
961
|
+
*/
|
|
962
|
+
upsideDownMode?: UpsideDownMode;
|
|
963
|
+
/**
|
|
964
|
+
* Sets a regular expression which the tire size text needs to match in order to trigger a
|
|
965
|
+
* scan result.
|
|
966
|
+
*/
|
|
967
|
+
validationRegex?: string;
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
/**
|
|
971
|
+
* Configuration for scanning all kinds of identification documents
|
|
972
|
+
*/
|
|
973
|
+
export interface UniversalIdConfig {
|
|
974
|
+
/**
|
|
975
|
+
* Specifies the document types to be scanned and optionally further specifies which types
|
|
976
|
+
* of layout are scanned per type.
|
|
977
|
+
*/
|
|
978
|
+
allowedLayouts?: AllowedLayouts;
|
|
979
|
+
/**
|
|
980
|
+
* Sets a specific character set.
|
|
981
|
+
*/
|
|
982
|
+
alphabet?: Alphabet;
|
|
983
|
+
drivingLicense?: LayoutDrivingLicense;
|
|
984
|
+
/**
|
|
985
|
+
* Sets whether the face detection approach is enabled.
|
|
986
|
+
*/
|
|
987
|
+
faceDetectionEnabled?: boolean;
|
|
988
|
+
idFront?: LayoutIdFront;
|
|
989
|
+
insuranceCard?: LayoutInsuranceCard;
|
|
990
|
+
mrz?: LayoutMrz;
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
/**
|
|
994
|
+
* Specifies the document types to be scanned and optionally further specifies which types
|
|
995
|
+
* of layout are scanned per type.
|
|
996
|
+
*/
|
|
997
|
+
export interface AllowedLayouts {
|
|
998
|
+
drivingLicense?: string[];
|
|
999
|
+
idFront?: string[];
|
|
1000
|
+
insuranceCard?: string[];
|
|
1001
|
+
mrz?: string[];
|
|
1002
|
+
}
|
|
1003
|
+
|
|
1004
|
+
/**
|
|
1005
|
+
* Sets a specific character set.
|
|
1006
|
+
*/
|
|
1007
|
+
export enum Alphabet {
|
|
1008
|
+
Arabic = "arabic",
|
|
1009
|
+
Cyrillic = "cyrillic",
|
|
1010
|
+
Latin = "latin",
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
/**
|
|
1014
|
+
* Contains all the supported field scan options for driving licenses.
|
|
1015
|
+
*/
|
|
1016
|
+
export interface LayoutDrivingLicense {
|
|
1017
|
+
additionalInformation?: UniversalIdField;
|
|
1018
|
+
additionalInformation1?: UniversalIdField;
|
|
1019
|
+
address?: UniversalIdField;
|
|
1020
|
+
audit?: UniversalIdField;
|
|
1021
|
+
authority?: UniversalIdField;
|
|
1022
|
+
cardNumber?: UniversalIdField;
|
|
1023
|
+
categories?: UniversalIdField;
|
|
1024
|
+
conditions?: UniversalIdField;
|
|
1025
|
+
dateOfBirth?: UniversalIdField;
|
|
1026
|
+
dateOfExpiry?: UniversalIdField;
|
|
1027
|
+
dateOfIssue?: UniversalIdField;
|
|
1028
|
+
documentDiscriminator?: UniversalIdField;
|
|
1029
|
+
documentNumber?: UniversalIdField;
|
|
1030
|
+
duplicate?: UniversalIdField;
|
|
1031
|
+
duration?: UniversalIdField;
|
|
1032
|
+
endorsements?: UniversalIdField;
|
|
1033
|
+
eyes?: UniversalIdField;
|
|
1034
|
+
firstIssued?: UniversalIdField;
|
|
1035
|
+
firstName?: UniversalIdField;
|
|
1036
|
+
fullName?: UniversalIdField;
|
|
1037
|
+
givenNames?: UniversalIdField;
|
|
1038
|
+
hair?: UniversalIdField;
|
|
1039
|
+
height?: UniversalIdField;
|
|
1040
|
+
lastName?: UniversalIdField;
|
|
1041
|
+
licenceNumber?: UniversalIdField;
|
|
1042
|
+
licenseClass?: UniversalIdField;
|
|
1043
|
+
licenseNumber?: UniversalIdField;
|
|
1044
|
+
name?: UniversalIdField;
|
|
1045
|
+
office?: UniversalIdField;
|
|
1046
|
+
parish?: UniversalIdField;
|
|
1047
|
+
personalNumber?: UniversalIdField;
|
|
1048
|
+
placeOfBirth?: UniversalIdField;
|
|
1049
|
+
previousType?: UniversalIdField;
|
|
1050
|
+
restrictions?: UniversalIdField;
|
|
1051
|
+
revoked?: UniversalIdField;
|
|
1052
|
+
sex?: UniversalIdField;
|
|
1053
|
+
surname?: UniversalIdField;
|
|
1054
|
+
type?: UniversalIdField;
|
|
1055
|
+
version?: UniversalIdField;
|
|
1056
|
+
verticalNumber?: UniversalIdField;
|
|
1057
|
+
weight?: UniversalIdField;
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
/**
|
|
1061
|
+
* Configures scanning options for ID fields in order to fine-tune the ID scanner.
|
|
1062
|
+
*/
|
|
1063
|
+
export interface UniversalIdField {
|
|
1064
|
+
/**
|
|
1065
|
+
* Set the minConfidence which has to be reached in order to trigger a scan result. The
|
|
1066
|
+
* value has to be between 0 and 100. Defaults to 60.
|
|
1067
|
+
*/
|
|
1068
|
+
minConfidence?: number;
|
|
1069
|
+
/**
|
|
1070
|
+
* The scanOption determines whether a field is considered optional, mandatory, disabled or
|
|
1071
|
+
* follows a default behavior. Default behavior is one of the other three that yields the
|
|
1072
|
+
* best recall results with all layouts enabled.
|
|
1073
|
+
*/
|
|
1074
|
+
scanOption?: MrzScanOption;
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
/**
|
|
1078
|
+
* Contains all the supported field scan options for ID front cards.
|
|
1079
|
+
*/
|
|
1080
|
+
export interface LayoutIdFront {
|
|
1081
|
+
additionalInformation?: UniversalIdField;
|
|
1082
|
+
additionalInformation1?: UniversalIdField;
|
|
1083
|
+
address?: UniversalIdField;
|
|
1084
|
+
age?: UniversalIdField;
|
|
1085
|
+
authority?: UniversalIdField;
|
|
1086
|
+
cardAccessNumber?: UniversalIdField;
|
|
1087
|
+
citizenship?: UniversalIdField;
|
|
1088
|
+
cityNumber?: UniversalIdField;
|
|
1089
|
+
dateOfBirth?: UniversalIdField;
|
|
1090
|
+
dateOfExpiry?: UniversalIdField;
|
|
1091
|
+
dateOfIssue?: UniversalIdField;
|
|
1092
|
+
dateOfRegistration?: UniversalIdField;
|
|
1093
|
+
divisionNumber?: UniversalIdField;
|
|
1094
|
+
documentNumber?: UniversalIdField;
|
|
1095
|
+
familyName?: UniversalIdField;
|
|
1096
|
+
fathersName?: UniversalIdField;
|
|
1097
|
+
firstName?: UniversalIdField;
|
|
1098
|
+
folio?: UniversalIdField;
|
|
1099
|
+
fullName?: UniversalIdField;
|
|
1100
|
+
givenNames?: UniversalIdField;
|
|
1101
|
+
height?: UniversalIdField;
|
|
1102
|
+
lastName?: UniversalIdField;
|
|
1103
|
+
licenseClass?: UniversalIdField;
|
|
1104
|
+
licenseType?: UniversalIdField;
|
|
1105
|
+
municipalityNumber?: UniversalIdField;
|
|
1106
|
+
nationalId?: UniversalIdField;
|
|
1107
|
+
nationality?: UniversalIdField;
|
|
1108
|
+
parentsGivenName?: UniversalIdField;
|
|
1109
|
+
personalNumber?: UniversalIdField;
|
|
1110
|
+
placeAndDateOfBirth?: UniversalIdField;
|
|
1111
|
+
placeOfBirth?: UniversalIdField;
|
|
1112
|
+
sex?: UniversalIdField;
|
|
1113
|
+
stateNumber?: UniversalIdField;
|
|
1114
|
+
supportNumber?: UniversalIdField;
|
|
1115
|
+
surname?: UniversalIdField;
|
|
1116
|
+
voterId?: UniversalIdField;
|
|
1117
|
+
}
|
|
1118
|
+
|
|
1119
|
+
/**
|
|
1120
|
+
* Contains all the supported field scan options for insurance cards.
|
|
1121
|
+
*/
|
|
1122
|
+
export interface LayoutInsuranceCard {
|
|
1123
|
+
authority?: UniversalIdField;
|
|
1124
|
+
dateOfBirth?: UniversalIdField;
|
|
1125
|
+
dateOfExpiry?: UniversalIdField;
|
|
1126
|
+
documentNumber?: UniversalIdField;
|
|
1127
|
+
firstName?: UniversalIdField;
|
|
1128
|
+
lastName?: UniversalIdField;
|
|
1129
|
+
nationality?: UniversalIdField;
|
|
1130
|
+
personalNumber?: UniversalIdField;
|
|
1131
|
+
}
|
|
1132
|
+
|
|
1133
|
+
/**
|
|
1134
|
+
* Contains all the supported field scan options for MRZ.
|
|
1135
|
+
*/
|
|
1136
|
+
export interface LayoutMrz {
|
|
1137
|
+
dateOfBirth?: UniversalIdField;
|
|
1138
|
+
dateOfExpiry?: UniversalIdField;
|
|
1139
|
+
vizAddress?: UniversalIdField;
|
|
1140
|
+
vizDateOfBirth?: UniversalIdField;
|
|
1141
|
+
vizDateOfExpiry?: UniversalIdField;
|
|
1142
|
+
vizDateOfIssue?: UniversalIdField;
|
|
1143
|
+
vizGivenNames?: UniversalIdField;
|
|
1144
|
+
vizSurname?: UniversalIdField;
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1147
|
+
/**
|
|
1148
|
+
* Configuration for scanning Vehicle Registration Certificates
|
|
1149
|
+
*/
|
|
1150
|
+
export interface VehicleRegistrationCertificateConfig {
|
|
1151
|
+
vehicleRegistrationCertificate?: LayoutVehicleRegistrationCertificate;
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1154
|
+
/**
|
|
1155
|
+
* Contains all the supported field scan options for vehicle registration certificates.
|
|
1156
|
+
*/
|
|
1157
|
+
export interface LayoutVehicleRegistrationCertificate {
|
|
1158
|
+
/**
|
|
1159
|
+
* The Address Field
|
|
1160
|
+
*/
|
|
1161
|
+
address?: VehicleRegistrationCertificateField;
|
|
1162
|
+
/**
|
|
1163
|
+
* The Brand Field
|
|
1164
|
+
*/
|
|
1165
|
+
brand?: VehicleRegistrationCertificateField;
|
|
1166
|
+
/**
|
|
1167
|
+
* The Displacement Field
|
|
1168
|
+
*/
|
|
1169
|
+
displacement?: VehicleRegistrationCertificateField;
|
|
1170
|
+
/**
|
|
1171
|
+
* The DocumentNumber Field
|
|
1172
|
+
*/
|
|
1173
|
+
documentNumber?: VehicleRegistrationCertificateField;
|
|
1174
|
+
/**
|
|
1175
|
+
* The FirstIssued Field
|
|
1176
|
+
*/
|
|
1177
|
+
firstIssued?: VehicleRegistrationCertificateField;
|
|
1178
|
+
/**
|
|
1179
|
+
* The FirstName Field
|
|
1180
|
+
*/
|
|
1181
|
+
firstName?: VehicleRegistrationCertificateField;
|
|
1182
|
+
/**
|
|
1183
|
+
* The LastName Field
|
|
1184
|
+
*/
|
|
1185
|
+
lastName?: VehicleRegistrationCertificateField;
|
|
1186
|
+
/**
|
|
1187
|
+
* The LicensePlate Field
|
|
1188
|
+
*/
|
|
1189
|
+
licensePlate?: VehicleRegistrationCertificateField;
|
|
1190
|
+
/**
|
|
1191
|
+
* The ManufacturerCode Field
|
|
1192
|
+
*/
|
|
1193
|
+
manufacturerCode?: VehicleRegistrationCertificateField;
|
|
1194
|
+
/**
|
|
1195
|
+
* The Tire Field
|
|
1196
|
+
*/
|
|
1197
|
+
tire?: VehicleRegistrationCertificateField;
|
|
1198
|
+
/**
|
|
1199
|
+
* The VehicleIdentificationNumber Field
|
|
1200
|
+
*/
|
|
1201
|
+
vehicleIdentificationNumber?: VehicleRegistrationCertificateField;
|
|
1202
|
+
/**
|
|
1203
|
+
* The VehicleType Field
|
|
1204
|
+
*/
|
|
1205
|
+
vehicleType?: VehicleRegistrationCertificateField;
|
|
1206
|
+
/**
|
|
1207
|
+
* The VehicleTypeCode Field
|
|
1208
|
+
*/
|
|
1209
|
+
vehicleTypeCode?: VehicleRegistrationCertificateField;
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
/**
|
|
1213
|
+
* The Address Field
|
|
1214
|
+
*
|
|
1215
|
+
* Configures scanning options per field
|
|
1216
|
+
*
|
|
1217
|
+
* The Brand Field
|
|
1218
|
+
*
|
|
1219
|
+
* The Displacement Field
|
|
1220
|
+
*
|
|
1221
|
+
* The DocumentNumber Field
|
|
1222
|
+
*
|
|
1223
|
+
* The FirstIssued Field
|
|
1224
|
+
*
|
|
1225
|
+
* The FirstName Field
|
|
1226
|
+
*
|
|
1227
|
+
* The LastName Field
|
|
1228
|
+
*
|
|
1229
|
+
* The LicensePlate Field
|
|
1230
|
+
*
|
|
1231
|
+
* The ManufacturerCode Field
|
|
1232
|
+
*
|
|
1233
|
+
* The Tire Field
|
|
1234
|
+
*
|
|
1235
|
+
* The VehicleIdentificationNumber Field
|
|
1236
|
+
*
|
|
1237
|
+
* The VehicleType Field
|
|
1238
|
+
*
|
|
1239
|
+
* The VehicleTypeCode Field
|
|
1240
|
+
*/
|
|
1241
|
+
export interface VehicleRegistrationCertificateField {
|
|
1242
|
+
/**
|
|
1243
|
+
* Set the minConfidence between 0 and 100. Otherwise, it's defaulted.
|
|
1244
|
+
*/
|
|
1245
|
+
minConfidence?: number;
|
|
1246
|
+
/**
|
|
1247
|
+
* The scanOption determines whether a field is considered optional, mandatory, disabled or
|
|
1248
|
+
* follows a default behavior. Default behavior is one of the other three that yields the
|
|
1249
|
+
* best recall results with all layouts enabled.
|
|
1250
|
+
*/
|
|
1251
|
+
scanOption?: MrzScanOption;
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
/**
|
|
1255
|
+
* Configuration for scanning vehicle identification numbers (VIN)
|
|
1256
|
+
*/
|
|
1257
|
+
export interface VinConfig {
|
|
1258
|
+
/**
|
|
1259
|
+
* Restricts the scanner to a set of characters to be detected.
|
|
1260
|
+
*/
|
|
1261
|
+
charWhitelist?: string;
|
|
1262
|
+
/**
|
|
1263
|
+
* Setting this to 'true' will enforce checking the check digit and only return results if
|
|
1264
|
+
* it is correct.
|
|
1265
|
+
*/
|
|
1266
|
+
validateCheckDigit?: boolean;
|
|
1267
|
+
/**
|
|
1268
|
+
* Sets a regular expression which the scanned text needs to match in order to trigger a
|
|
1269
|
+
* scan result.
|
|
1270
|
+
*/
|
|
1271
|
+
validationRegex?: string;
|
|
1272
|
+
}
|
|
1273
|
+
|
|
1274
|
+
/**
|
|
1275
|
+
* Schema for SDK ScanFeedback Configuration
|
|
1276
|
+
*/
|
|
1277
|
+
export interface ScanFeedbackConfig {
|
|
1278
|
+
/**
|
|
1279
|
+
* The animation style of the feedback.
|
|
1280
|
+
*/
|
|
1281
|
+
animation?: ScanFeedbackConfigAnimation;
|
|
1282
|
+
/**
|
|
1283
|
+
* The duration of the animation in milliseconds.
|
|
1284
|
+
*/
|
|
1285
|
+
animationDuration?: number;
|
|
1286
|
+
/**
|
|
1287
|
+
* If true, make a beep sound when a result is found.
|
|
1288
|
+
*/
|
|
1289
|
+
beepOnResult?: boolean;
|
|
1290
|
+
/**
|
|
1291
|
+
* If true, flash the view when a result is found.
|
|
1292
|
+
*/
|
|
1293
|
+
blinkAnimationOnResult?: boolean;
|
|
1294
|
+
/**
|
|
1295
|
+
* The corner radius in density-independent pixels (dp).
|
|
1296
|
+
*/
|
|
1297
|
+
cornerRadius?: number;
|
|
1298
|
+
/**
|
|
1299
|
+
* The fill color.
|
|
1300
|
+
*/
|
|
1301
|
+
fillColor?: string;
|
|
1302
|
+
/**
|
|
1303
|
+
* The timeout to redraw the visual feedback in milliseconds.
|
|
1304
|
+
*/
|
|
1305
|
+
redrawTimeout?: number;
|
|
1306
|
+
/**
|
|
1307
|
+
* The stroke color.
|
|
1308
|
+
*/
|
|
1309
|
+
strokeColor?: string;
|
|
1310
|
+
/**
|
|
1311
|
+
* The stroke width in density-independent pixels (dp).
|
|
1312
|
+
*/
|
|
1313
|
+
strokeWidth?: number;
|
|
1314
|
+
/**
|
|
1315
|
+
* The style of the feedback.
|
|
1316
|
+
*/
|
|
1317
|
+
style?: Style;
|
|
1318
|
+
/**
|
|
1319
|
+
* If true, vibrate the device when a result is found.
|
|
1320
|
+
*/
|
|
1321
|
+
vibrateOnResult?: boolean;
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
/**
|
|
1325
|
+
* The animation style of the feedback.
|
|
1326
|
+
*/
|
|
1327
|
+
export enum ScanFeedbackConfigAnimation {
|
|
1328
|
+
Blink = "blink",
|
|
1329
|
+
Kitt = "kitt",
|
|
1330
|
+
None = "none",
|
|
1331
|
+
Pulse = "pulse",
|
|
1332
|
+
PulseRandom = "pulse_random",
|
|
1333
|
+
Resize = "resize",
|
|
1334
|
+
TraverseMulti = "traverse_multi",
|
|
1335
|
+
TraverseSingle = "traverse_single",
|
|
1336
|
+
}
|
|
1337
|
+
|
|
1338
|
+
/**
|
|
1339
|
+
* The style of the feedback.
|
|
1340
|
+
*/
|
|
1341
|
+
export enum Style {
|
|
1342
|
+
AnimatedRect = "animated_rect",
|
|
1343
|
+
ContourPoint = "contour_point",
|
|
1344
|
+
ContourRect = "contour_rect",
|
|
1345
|
+
ContourUnderline = "contour_underline",
|
|
1346
|
+
None = "none",
|
|
1347
|
+
Rect = "rect",
|
|
1348
|
+
}
|
|
1349
|
+
|
|
1350
|
+
/**
|
|
1351
|
+
* General configuration for UI Feedback elements
|
|
1352
|
+
*/
|
|
1353
|
+
export interface UiFeedbackConfig {
|
|
1354
|
+
/**
|
|
1355
|
+
* Elements inside UIFeedbackConfig.
|
|
1356
|
+
*/
|
|
1357
|
+
elements?: UiFeedbackElementConfig[];
|
|
1358
|
+
/**
|
|
1359
|
+
* Preset definitions inside UIFeedbackConfig.
|
|
1360
|
+
*/
|
|
1361
|
+
presetDefinitions?: UiFeedbackPresetDefinitionConfig[];
|
|
1362
|
+
/**
|
|
1363
|
+
* Allows to use presets.
|
|
1364
|
+
*/
|
|
1365
|
+
presets?: UiFeedbackPresetConfig[];
|
|
1366
|
+
[property: string]: any;
|
|
1367
|
+
}
|
|
1368
|
+
|
|
1369
|
+
/**
|
|
1370
|
+
* Configuration for uiFeedback element
|
|
1371
|
+
*/
|
|
1372
|
+
export interface UiFeedbackElementConfig {
|
|
1373
|
+
/**
|
|
1374
|
+
* Sets whether the view is clickable.
|
|
1375
|
+
*/
|
|
1376
|
+
clickable?: boolean;
|
|
1377
|
+
contentType?: ContentTypeEnum;
|
|
1378
|
+
defaultAttributes?: UiFeedbackElementAttributesConfig;
|
|
1379
|
+
defaultContent?: UiFeedbackElementContentConfig;
|
|
1380
|
+
/**
|
|
1381
|
+
* Sets the id of the element.
|
|
1382
|
+
*/
|
|
1383
|
+
id?: string;
|
|
1384
|
+
overlay?: OverlayConfig;
|
|
1385
|
+
/**
|
|
1386
|
+
* Allows to use element presets.
|
|
1387
|
+
*/
|
|
1388
|
+
presets?: UiFeedbackPresetConfig[];
|
|
1389
|
+
/**
|
|
1390
|
+
* Sets a tag for the element.
|
|
1391
|
+
*/
|
|
1392
|
+
tag?: string;
|
|
1393
|
+
trigger?: UiFeedbackElementTriggerConfig;
|
|
1394
|
+
[property: string]: any;
|
|
1395
|
+
}
|
|
1396
|
+
|
|
1397
|
+
/**
|
|
1398
|
+
* Sets the view type of the element.
|
|
1399
|
+
*/
|
|
1400
|
+
export enum ContentTypeEnum {
|
|
1401
|
+
Image = "image",
|
|
1402
|
+
Sound = "sound",
|
|
1403
|
+
Text = "text",
|
|
1404
|
+
}
|
|
1405
|
+
|
|
1406
|
+
/**
|
|
1407
|
+
* Configuration attributes for UI Feedback view elements
|
|
1408
|
+
*/
|
|
1409
|
+
export interface UiFeedbackElementAttributesConfig {
|
|
1410
|
+
/**
|
|
1411
|
+
* Sets the background color.
|
|
1412
|
+
*/
|
|
1413
|
+
backgroundColor?: string;
|
|
1414
|
+
/**
|
|
1415
|
+
* Sets the image scale type.
|
|
1416
|
+
*/
|
|
1417
|
+
imageScaleType?: ImageScaleType;
|
|
1418
|
+
/**
|
|
1419
|
+
* Sets the text alignment.
|
|
1420
|
+
*/
|
|
1421
|
+
textAlignment?: TextAlignment;
|
|
1422
|
+
/**
|
|
1423
|
+
* Sets the text color.
|
|
1424
|
+
*/
|
|
1425
|
+
textColor?: string;
|
|
1426
|
+
[property: string]: any;
|
|
1427
|
+
}
|
|
1428
|
+
|
|
1429
|
+
/**
|
|
1430
|
+
* Sets the image scale type.
|
|
1431
|
+
*/
|
|
1432
|
+
export enum ImageScaleType {
|
|
1433
|
+
Center = "center",
|
|
1434
|
+
CenterCrop = "center_crop",
|
|
1435
|
+
FitCenter = "fit_center",
|
|
1436
|
+
FitXy = "fit_xy",
|
|
1437
|
+
}
|
|
1438
|
+
|
|
1439
|
+
/**
|
|
1440
|
+
* Sets the text alignment.
|
|
1441
|
+
*/
|
|
1442
|
+
export enum TextAlignment {
|
|
1443
|
+
Center = "center",
|
|
1444
|
+
Left = "left",
|
|
1445
|
+
Right = "right",
|
|
1446
|
+
}
|
|
1447
|
+
|
|
1448
|
+
/**
|
|
1449
|
+
* Configuration for UI Feedback content
|
|
1450
|
+
*/
|
|
1451
|
+
export interface UiFeedbackElementContentConfig {
|
|
1452
|
+
/**
|
|
1453
|
+
* Sets the content of the element.
|
|
1454
|
+
*/
|
|
1455
|
+
contentValue?: string;
|
|
1456
|
+
/**
|
|
1457
|
+
* Sets the duration of the element.
|
|
1458
|
+
*/
|
|
1459
|
+
durationMills?: number;
|
|
1460
|
+
/**
|
|
1461
|
+
* Sets the priority of the element.
|
|
1462
|
+
*/
|
|
1463
|
+
priorityLevel?: number;
|
|
1464
|
+
[property: string]: any;
|
|
1465
|
+
}
|
|
1466
|
+
|
|
1467
|
+
/**
|
|
1468
|
+
* Configuration for UI Feedback overlays
|
|
1469
|
+
*/
|
|
1470
|
+
export interface OverlayConfig {
|
|
1471
|
+
/**
|
|
1472
|
+
* Sets the anchor of the overlay.
|
|
1473
|
+
*/
|
|
1474
|
+
anchor?: OverlayAnchorConfig;
|
|
1475
|
+
/**
|
|
1476
|
+
* Sets the offset dimension of the overlay.
|
|
1477
|
+
*/
|
|
1478
|
+
offsetDimension?: OverlayDimensionConfig;
|
|
1479
|
+
/**
|
|
1480
|
+
* Allows to use overlay presets.
|
|
1481
|
+
*/
|
|
1482
|
+
presets?: UiFeedbackPresetConfig[];
|
|
1483
|
+
/**
|
|
1484
|
+
* Sets the size dimension of the overlay.
|
|
1485
|
+
*/
|
|
1486
|
+
sizeDimension?: OverlayDimensionConfig;
|
|
1487
|
+
/**
|
|
1488
|
+
* Sets the source of the overlay.
|
|
1489
|
+
*/
|
|
1490
|
+
source?: OverlaySource;
|
|
1491
|
+
[property: string]: any;
|
|
1492
|
+
}
|
|
1493
|
+
|
|
1494
|
+
/**
|
|
1495
|
+
* Sets the anchor of the overlay.
|
|
1496
|
+
*
|
|
1497
|
+
* Sets the anchor of the overlay relative to the source defined in the overlaySource.
|
|
1498
|
+
*/
|
|
1499
|
+
export enum OverlayAnchorConfig {
|
|
1500
|
+
BottomCenter = "bottom_center",
|
|
1501
|
+
BottomLeft = "bottom_left",
|
|
1502
|
+
BottomRight = "bottom_right",
|
|
1503
|
+
Center = "center",
|
|
1504
|
+
CenterLeft = "center_left",
|
|
1505
|
+
CenterRight = "center_right",
|
|
1506
|
+
TopCenter = "top_center",
|
|
1507
|
+
TopLeft = "top_left",
|
|
1508
|
+
TopRight = "top_right",
|
|
1509
|
+
}
|
|
1510
|
+
|
|
1511
|
+
/**
|
|
1512
|
+
* Sets the offset dimension of the overlay.
|
|
1513
|
+
*
|
|
1514
|
+
* Sets the dimension of the overlay.
|
|
1515
|
+
*
|
|
1516
|
+
* Sets the size dimension of the overlay.
|
|
1517
|
+
*/
|
|
1518
|
+
export interface OverlayDimensionConfig {
|
|
1519
|
+
/**
|
|
1520
|
+
* Sets the scale for x axis of the overlay.
|
|
1521
|
+
*/
|
|
1522
|
+
scaleX?: OverlayScaleConfig;
|
|
1523
|
+
/**
|
|
1524
|
+
* Sets the scale for y axis of the overlay.
|
|
1525
|
+
*/
|
|
1526
|
+
scaleY?: OverlayScaleConfig;
|
|
1527
|
+
[property: string]: any;
|
|
1528
|
+
}
|
|
1529
|
+
|
|
1530
|
+
/**
|
|
1531
|
+
* Sets the scale for x axis of the overlay.
|
|
1532
|
+
*
|
|
1533
|
+
* Configuration for UI Feedback overlays
|
|
1534
|
+
*
|
|
1535
|
+
* Sets the scale for y axis of the overlay.
|
|
1536
|
+
*/
|
|
1537
|
+
export interface OverlayScaleConfig {
|
|
1538
|
+
/**
|
|
1539
|
+
* Sets the scale type of the overlay.
|
|
1540
|
+
*/
|
|
1541
|
+
scaleType?: OverlayScaleTypeConfig;
|
|
1542
|
+
/**
|
|
1543
|
+
* Sets the scale value of the overlay.
|
|
1544
|
+
*/
|
|
1545
|
+
scaleValue?: number;
|
|
1546
|
+
[property: string]: any;
|
|
1547
|
+
}
|
|
1548
|
+
|
|
1549
|
+
/**
|
|
1550
|
+
* Sets the scale type of the overlay.
|
|
1551
|
+
*/
|
|
1552
|
+
export enum OverlayScaleTypeConfig {
|
|
1553
|
+
FixedPx = "fixed_px",
|
|
1554
|
+
KeepRatio = "keep_ratio",
|
|
1555
|
+
None = "none",
|
|
1556
|
+
Overlay = "overlay",
|
|
1557
|
+
}
|
|
1558
|
+
|
|
1559
|
+
/**
|
|
1560
|
+
* Configuration for uiFeedback preset.
|
|
1561
|
+
*/
|
|
1562
|
+
export interface UiFeedbackPresetConfig {
|
|
1563
|
+
/**
|
|
1564
|
+
* Attributes inside preset.
|
|
1565
|
+
*/
|
|
1566
|
+
presetAttributes?: UiFeedbackPresetAttributeConfig[];
|
|
1567
|
+
/**
|
|
1568
|
+
* Name of the preset.
|
|
1569
|
+
*/
|
|
1570
|
+
presetName?: string;
|
|
1571
|
+
[property: string]: any;
|
|
1572
|
+
}
|
|
1573
|
+
|
|
1574
|
+
/**
|
|
1575
|
+
* Configuration for uiFeedback preset attribute.
|
|
1576
|
+
*/
|
|
1577
|
+
export interface UiFeedbackPresetAttributeConfig {
|
|
1578
|
+
/**
|
|
1579
|
+
* Name of the attribute declared in the preset definition.
|
|
1580
|
+
*/
|
|
1581
|
+
attributeName?: string;
|
|
1582
|
+
/**
|
|
1583
|
+
* Sets the value of the attribute.
|
|
1584
|
+
*/
|
|
1585
|
+
attributeValue?: string;
|
|
1586
|
+
[property: string]: any;
|
|
1587
|
+
}
|
|
1588
|
+
|
|
1589
|
+
/**
|
|
1590
|
+
* Sets the source of the overlay.
|
|
1591
|
+
*
|
|
1592
|
+
* Sets the source of the overlay. Currently cutout is the only available overlay source.
|
|
1593
|
+
*/
|
|
1594
|
+
export enum OverlaySource {
|
|
1595
|
+
Cutout = "cutout",
|
|
1596
|
+
}
|
|
1597
|
+
|
|
1598
|
+
/**
|
|
1599
|
+
* Trigger configuration for UI Feedback
|
|
1600
|
+
*/
|
|
1601
|
+
export interface UiFeedbackElementTriggerConfig {
|
|
1602
|
+
presets?: UiFeedbackPresetConfig[];
|
|
1603
|
+
/**
|
|
1604
|
+
* Allows to watch runSkipped events.
|
|
1605
|
+
*/
|
|
1606
|
+
runSkipped?: UiFeedbackElementTriggerWhenRunSkippedConfig[];
|
|
1607
|
+
/**
|
|
1608
|
+
* Allows to watch scanInfo events.
|
|
1609
|
+
*/
|
|
1610
|
+
scanInfo?: UiFeedbackElementTriggerWhenScanInfoConfig[];
|
|
1611
|
+
[property: string]: any;
|
|
1612
|
+
}
|
|
1613
|
+
|
|
1614
|
+
/**
|
|
1615
|
+
* Configuration for triggering UI Feedback on RunSkipped events
|
|
1616
|
+
*/
|
|
1617
|
+
export interface UiFeedbackElementTriggerWhenRunSkippedConfig {
|
|
1618
|
+
when?: RunSkippedWhen;
|
|
1619
|
+
[property: string]: any;
|
|
1620
|
+
}
|
|
1621
|
+
|
|
1622
|
+
/**
|
|
1623
|
+
* Configuration for triggering UI Feedback on RunSkipped events
|
|
1624
|
+
*/
|
|
1625
|
+
export interface RunSkippedWhen {
|
|
1626
|
+
applyAttributesInstead?: UiFeedbackElementAttributesConfig;
|
|
1627
|
+
applyContentInstead?: UiFeedbackElementContentConfig;
|
|
1628
|
+
/**
|
|
1629
|
+
* Sets whether the trigger must apply defaultAttributes.
|
|
1630
|
+
*/
|
|
1631
|
+
applyDefaultAttributes?: boolean;
|
|
1632
|
+
/**
|
|
1633
|
+
* Sets whether the trigger must apply defaultContent.
|
|
1634
|
+
*/
|
|
1635
|
+
applyDefaultContent?: boolean;
|
|
1636
|
+
/**
|
|
1637
|
+
* Sets the runSkipped code to be watched.
|
|
1638
|
+
*/
|
|
1639
|
+
codeEquals?: number;
|
|
1640
|
+
[property: string]: any;
|
|
1641
|
+
}
|
|
1642
|
+
|
|
1643
|
+
/**
|
|
1644
|
+
* Configuration for triggering UI Feedback on ScanInfo events
|
|
1645
|
+
*/
|
|
1646
|
+
export interface UiFeedbackElementTriggerWhenScanInfoConfig {
|
|
1647
|
+
when?: ScanInfoWhen;
|
|
1648
|
+
[property: string]: any;
|
|
1649
|
+
}
|
|
1650
|
+
|
|
1651
|
+
/**
|
|
1652
|
+
* Configuration for triggering UI Feedback on ScanInfo events
|
|
1653
|
+
*/
|
|
1654
|
+
export interface ScanInfoWhen {
|
|
1655
|
+
applyAttributesInstead?: UiFeedbackElementAttributesConfig;
|
|
1656
|
+
applyContentInstead?: UiFeedbackElementContentConfig;
|
|
1657
|
+
/**
|
|
1658
|
+
* Sets whether the trigger must apply defaultAttributes.
|
|
1659
|
+
*/
|
|
1660
|
+
applyDefaultAttributes?: boolean;
|
|
1661
|
+
/**
|
|
1662
|
+
* Sets whether the trigger must apply defaultContent.
|
|
1663
|
+
*/
|
|
1664
|
+
applyDefaultContent?: boolean;
|
|
1665
|
+
/**
|
|
1666
|
+
* Sets the ScanInfo variable name to be watched.
|
|
1667
|
+
*/
|
|
1668
|
+
varNameEquals?: string;
|
|
1669
|
+
/**
|
|
1670
|
+
* Sets the ScanInfo variable value to be watched.
|
|
1671
|
+
*/
|
|
1672
|
+
varValueEquals?: string;
|
|
1673
|
+
[property: string]: any;
|
|
1674
|
+
}
|
|
1675
|
+
|
|
1676
|
+
/**
|
|
1677
|
+
* Configuration for uiFeedback preset definition.
|
|
1678
|
+
*/
|
|
1679
|
+
export interface UiFeedbackPresetDefinitionConfig {
|
|
1680
|
+
/**
|
|
1681
|
+
* Attributes inside preset definition.
|
|
1682
|
+
*/
|
|
1683
|
+
attributes?: UiFeedbackPresetDefinitionAttributeConfig[];
|
|
1684
|
+
/**
|
|
1685
|
+
* Sets the name of the preset definition.
|
|
1686
|
+
*/
|
|
1687
|
+
name?: string;
|
|
1688
|
+
/**
|
|
1689
|
+
* Configuration for uiFeedback preset content definition.
|
|
1690
|
+
*/
|
|
1691
|
+
presetContent?: UiFeedbackPresetContentConfig;
|
|
1692
|
+
/**
|
|
1693
|
+
* Sets the preset definition type.
|
|
1694
|
+
*/
|
|
1695
|
+
type?: Type;
|
|
1696
|
+
[property: string]: any;
|
|
1697
|
+
}
|
|
1698
|
+
|
|
1699
|
+
/**
|
|
1700
|
+
* Configuration for uiFeedback preset definition attribute.
|
|
1701
|
+
*/
|
|
1702
|
+
export interface UiFeedbackPresetDefinitionAttributeConfig {
|
|
1703
|
+
/**
|
|
1704
|
+
* Sets the name of the element of the attribute.
|
|
1705
|
+
*/
|
|
1706
|
+
elementName?: string;
|
|
1707
|
+
/**
|
|
1708
|
+
* Sets the preset definition attribute element type.
|
|
1709
|
+
*/
|
|
1710
|
+
elementType?: ElementTypeEnum;
|
|
1711
|
+
/**
|
|
1712
|
+
* Sets the name of the attribute.
|
|
1713
|
+
*/
|
|
1714
|
+
name?: string;
|
|
1715
|
+
[property: string]: any;
|
|
1716
|
+
}
|
|
1717
|
+
|
|
1718
|
+
/**
|
|
1719
|
+
* Sets the preset definition attribute element type.
|
|
1720
|
+
*/
|
|
1721
|
+
export enum ElementTypeEnum {
|
|
1722
|
+
Any = "any",
|
|
1723
|
+
Boolean = "boolean",
|
|
1724
|
+
Double = "double",
|
|
1725
|
+
Int = "int",
|
|
1726
|
+
Long = "long",
|
|
1727
|
+
String = "string",
|
|
1728
|
+
}
|
|
1729
|
+
|
|
1730
|
+
/**
|
|
1731
|
+
* Configuration for uiFeedback preset content definition.
|
|
1732
|
+
*/
|
|
1733
|
+
export interface UiFeedbackPresetContentConfig {
|
|
1734
|
+
element?: UiFeedbackElementConfig;
|
|
1735
|
+
elements?: UiFeedbackElementConfig[];
|
|
1736
|
+
overlay?: OverlayConfig;
|
|
1737
|
+
presets?: UiFeedbackPresetConfig[];
|
|
1738
|
+
trigger?: UiFeedbackElementTriggerConfig;
|
|
1739
|
+
[property: string]: any;
|
|
1740
|
+
}
|
|
1741
|
+
|
|
1742
|
+
/**
|
|
1743
|
+
* Sets the preset definition type.
|
|
1744
|
+
*/
|
|
1745
|
+
export enum Type {
|
|
1746
|
+
Preset = "preset",
|
|
1747
|
+
PresetElement = "presetElement",
|
|
1748
|
+
PresetElementOverlay = "presetElementOverlay",
|
|
1749
|
+
PresetElementTrigger = "presetElementTrigger",
|
|
1750
|
+
}
|