scanbot-web-sdk 6.0.0-dev.1 → 6.0.0-dev.3
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/@types/barcode-scanner-view.d.ts +10 -10
- package/@types/consume-type.d.ts +8 -0
- package/@types/core/bridge/common.d.ts +24 -0
- package/@types/core/bridge/compiled/BarcodeConfigs.d.ts +973 -0
- package/@types/core/bridge/compiled/BarcodeScannerTypes.d.ts +185 -0
- package/@types/core/bridge/compiled/BarcodeTypes.d.ts +183 -0
- package/@types/core/bridge/compiled/CheckRecognizerTypes.d.ts +29 -0
- package/@types/core/bridge/compiled/CommonFieldType.d.ts +59 -0
- package/@types/core/bridge/compiled/DocumentDetectorTypes.d.ts +196 -0
- package/@types/core/bridge/compiled/DocumentQualityAnalyzerTypes.d.ts +105 -0
- package/@types/core/bridge/compiled/EhicTypes.d.ts +218 -0
- package/@types/core/bridge/compiled/FrameUtilities.d.ts +18 -0
- package/@types/core/bridge/compiled/GDRTypes.d.ts +38 -0
- package/@types/core/bridge/compiled/GenericDocument.d.ts +236 -0
- package/@types/core/bridge/compiled/GenericDocumentRecognizerConfigs.d.ts +183 -0
- package/@types/core/bridge/compiled/GenericDocumentRecognizerTypes.d.ts +105 -0
- package/@types/core/bridge/compiled/GenericDocumentTypes.d.ts +38 -0
- package/@types/core/bridge/compiled/GenericTextLineScannerTypes.d.ts +165 -0
- package/@types/core/bridge/compiled/Geometry.d.ts +49 -0
- package/@types/core/bridge/compiled/ImageProcessorTypes.d.ts +13 -0
- package/@types/core/bridge/compiled/LicensePlateScannerTypes.d.ts +67 -0
- package/@types/core/bridge/compiled/MRZTypes.d.ts +52 -0
- package/@types/core/bridge/compiled/MedicalCertificateTypes.d.ts +306 -0
- package/@types/core/bridge/compiled/OcrElements.d.ts +129 -0
- package/@types/core/bridge/compiled/ParametricFilters.d.ts +188 -0
- package/@types/core/bridge/compiled/PdfConfig.d.ts +197 -0
- package/@types/core/bridge/compiled/TiffTypes.d.ts +183 -0
- package/@types/core/bridge/utils.d.ts +7 -0
- package/@types/core/bridge/worker-bridge.d.ts +920 -0
- package/@types/core/worker/ScanbotSDK.Core-simd-threads.d.ts +0 -0
- package/@types/core/worker/ScanbotSDK.Core-simd.d.ts +0 -0
- package/@types/core/worker/ScanbotSDK.Core.d.ts +86 -0
- package/@types/core-types.d.ts +25 -0
- package/@types/cropping-view.d.ts +4 -2
- package/@types/document-scanner-view.d.ts +7 -5
- package/@types/generic-document-recognizer-view.d.ts +22 -0
- package/@types/index.d.ts +49 -21
- package/@types/interfaces/i-document-scanner-handle.d.ts +2 -2
- package/@types/interfaces/i-generic-document-recognizer-scanner-handle.d.ts +3 -0
- package/@types/model/barcode/barcode-result.d.ts +16 -8
- package/@types/model/barcode/barcode.d.ts +4 -14
- package/@types/model/camera-info.d.ts +3 -2
- package/@types/model/configuration/barcode-scanner-configuration.d.ts +15 -8
- package/@types/model/configuration/cropping-view-configuration.d.ts +7 -1
- package/@types/model/configuration/document-scanner-configuration.d.ts +6 -27
- package/@types/model/configuration/generic-document-recognizer-configuration.d.ts +9 -0
- package/@types/model/configuration/initialization-options.d.ts +10 -1
- package/@types/model/configuration/mrz-scanner-configuration.d.ts +4 -3
- package/@types/model/configuration/scanner-configuration.d.ts +8 -0
- package/@types/model/configuration/selection-overlay-configuration.d.ts +4 -4
- package/@types/model/configuration/text-data-scanner-configuration.d.ts +3 -6
- package/@types/model/configuration/view-finder-scanner-configuration.d.ts +3 -2
- package/@types/model/configuration/vin-scanner-configuration.d.ts +2 -1
- package/@types/model/error/media-error.d.ts +1 -0
- package/@types/model/response/cropping-result.d.ts +2 -1
- package/@types/scanbot-sdk.d.ts +510 -28
- package/@types/service/document-quality-analyzer.d.ts +7 -5
- package/@types/service/generic-document-recognizer.d.ts +13 -0
- package/@types/service/ocr-engine.d.ts +8 -5
- package/@types/service/pdf-generator.d.ts +7 -95
- package/@types/service/public-utils.d.ts +1 -1
- package/@types/service/simple-mrz-recognizer.d.ts +7 -5
- package/@types/service/text-data-recognizer.d.ts +7 -4
- package/@types/service/tiff-generator.d.ts +12 -10
- package/@types/ui2/common.d.ts +8 -0
- package/@types/ui2/configuration/ActionBarConfiguration.d.ts +30 -30
- package/@types/ui2/configuration/ArTrackingOverlayConfiguration.d.ts +220 -220
- package/@types/ui2/configuration/BarcodeInfoMapping.d.ts +52 -52
- package/@types/ui2/configuration/BarcodeItemMapper.d.ts +2 -2
- package/@types/ui2/configuration/BarcodeRecognizerConfiguration.d.ts +38 -181
- package/@types/ui2/configuration/BarcodeScannerConfiguration.d.ts +172 -188
- package/@types/ui2/configuration/BarcodeScannerTypes.d.ts +1 -0
- package/@types/ui2/configuration/BarcodeScannerUIResult.d.ts +29 -0
- package/@types/ui2/configuration/BarcodeTextLocalization.d.ts +102 -107
- package/@types/ui2/configuration/BarcodeTypes.d.ts +1 -0
- package/@types/ui2/configuration/BarcodeUseCase.d.ts +5 -1
- package/@types/ui2/configuration/CameraConfiguration.d.ts +44 -45
- package/@types/ui2/configuration/CameraPermission.d.ts +33 -48
- package/@types/ui2/configuration/Common.d.ts +190 -227
- package/@types/ui2/configuration/CommonFieldType.d.ts +1 -0
- package/@types/ui2/configuration/FindAndPickScanningModeUseCase.d.ts +366 -14
- package/@types/ui2/configuration/GenericDocument.d.ts +1 -0
- package/@types/ui2/configuration/Geometry.d.ts +1 -0
- package/@types/ui2/configuration/MultipleScanningModeUseCase.d.ts +489 -489
- package/@types/ui2/configuration/ScanbotAlertDialog.d.ts +27 -27
- package/@types/ui2/configuration/SingleScanningModeUseCase.d.ts +170 -170
- package/@types/ui2/configuration/TopBarConfiguration.d.ts +36 -52
- package/@types/ui2/configuration/UserGuidanceConfiguration.d.ts +16 -16
- package/@types/ui2/configuration/ViewFinderConfiguration.d.ts +49 -46
- package/@types/ui2/configuration.d.ts +3 -2
- package/@types/ui2/controllers/barcode-scanner-controller.d.ts +2 -2
- package/@types/ui2/controllers/multiple-scanning-mode-controller.d.ts +6 -3
- package/@types/ui2/controllers/single-scanning-mode-controller.d.ts +6 -3
- package/@types/ui2/model/counted-barcodes.d.ts +17 -23
- package/@types/ui2/scanbot-sdk-ui.d.ts +2 -2
- package/@types/ui2/scanbot-ui-library.d.ts +3 -2
- package/@types/ui2/utils/barcode-mapper/expected-barcode-mapper.d.ts +13 -0
- package/@types/ui2/utils/barcode-mapper/i-barcode-mapper.d.ts +18 -0
- package/@types/ui2/utils/{barcode-mapper.d.ts → barcode-mapper/user-barcode-mapper.d.ts} +11 -11
- package/@types/ui2/utils/camera-config.d.ts +2 -2
- package/@types/ui2/utils/find-and-pick.ts/expected-barcode-counter.d.ts +7 -0
- package/@types/ui2/utils/styled-badge.d.ts +1 -1
- package/@types/ui2/utils/styled-input.d.ts +1 -1
- package/@types/ui2/views/action-button/action-button-container.d.ts +2 -0
- package/@types/ui2/views/ar/ar-badge.d.ts +18 -0
- package/@types/ui2/views/ar/ar-overlay-barcode-info.d.ts +5 -1
- package/@types/ui2/views/ar/vertical-positions.d.ts +12 -0
- package/@types/ui2/views/barcode-info/barcode-info.d.ts +3 -1
- package/@types/ui2/views/barcode-scanner.d.ts +6 -5
- package/@types/ui2/views/dialog/base/confirmation-dialog.d.ts +20 -0
- package/@types/ui2/views/dialog/find-and-pick-submit-dialog.d.ts +10 -0
- package/@types/ui2/views/drawer/barcode-result-drawer.d.ts +1 -1
- package/@types/ui2/views/drawer/counting-button.d.ts +1 -1
- package/@types/ui2/views/drawer/subviews/barcode-drawer-empty-state.d.ts +1 -1
- package/@types/ui2/views/drawer/subviews/barcode-list-item.d.ts +5 -4
- package/@types/ui2/views/drawer/subviews/barcode-list.d.ts +8 -1
- package/@types/ui2/views/drawer/subviews/drawer-header-content.d.ts +1 -1
- package/@types/ui2/views/form/dialog-button.d.ts +2 -2
- package/@types/utils/barcode-utils.d.ts +10 -0
- package/@types/utils/browser-cameras.d.ts +92 -0
- package/@types/utils/dto/MagneticLine.d.ts +4 -4
- package/@types/utils/dto/Point.d.ts +2 -2
- package/@types/utils/dto/Polygon.d.ts +2 -1
- package/@types/utils/image-utils.d.ts +1 -0
- package/@types/utils/react/usePromise.d.ts +3 -1
- package/@types/utils/stats.d.ts +4 -0
- package/@types/utils/utils.d.ts +1 -1
- package/@types/utils/video-stream.d.ts +4 -3
- package/@types/utils/video-to-image-data/two-d-video-to-image-data.d.ts +8 -0
- package/@types/utils/video-to-image-data/video-to-image-data.d.ts +5 -0
- package/@types/utils/video-to-image-data/webgl-video-to-image-data.d.ts +21 -0
- package/@types/view/action-bar/bottom-action-bar.d.ts +2 -2
- package/@types/view/barcode-calculation/barcode-calculation-popup-list.d.ts +2 -2
- package/@types/view/barcode-calculation/barcode-calculation-popup.d.ts +4 -4
- package/@types/view/barcode-calculation/scanned-image-with-overlay.d.ts +2 -2
- package/@types/view/barcode-polygon/animated-barcode-selection-overlay.d.ts +7 -5
- package/@types/view/barcode-polygon/barcode-overlay.d.ts +3 -3
- package/@types/view/barcode-polygon/barcode-polygon-label.d.ts +2 -2
- package/@types/view/cropping/draggable-base-container.d.ts +8 -2
- package/@types/view/cropping/draggable-handles-component.d.ts +9 -2
- package/@types/view/scanbot-camera-view.d.ts +9 -3
- package/@types/view/view-finder.d.ts +1 -0
- package/@types/worker/worker-bridge.d.ts +906 -5
- package/Libraries.txt +307 -174
- package/README.md +3 -3
- package/bundle/ScanbotSDK.min.js +5 -5
- package/bundle/ScanbotSDK.ui2.min.js +108 -161
- package/bundle/ScanbotSDK.ui2.min.js.LICENSE.txt +0 -18
- package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd-threads.js +1 -1
- package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd-threads.wasm +0 -0
- package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd.wasm +0 -0
- package/bundle/bin/barcode-scanner/ScanbotSDK.Asm.wasm +0 -0
- package/bundle/bin/barcode-scanner/ScanbotSDK.Core-simd-threads.js +1 -1
- package/bundle/bin/barcode-scanner/ScanbotSDK.Core-simd.js +1 -1
- package/bundle/bin/barcode-scanner/ScanbotSDK.Core.js +1 -1
- package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.js +1 -1
- package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.wasm +0 -0
- package/bundle/bin/complete/ScanbotSDK.Asm-simd.wasm +0 -0
- package/bundle/bin/complete/ScanbotSDK.Asm.wasm +0 -0
- package/bundle/bin/complete/ScanbotSDK.Core-simd-threads.js +1 -1
- package/bundle/bin/complete/ScanbotSDK.Core-simd.js +1 -1
- package/bundle/bin/complete/ScanbotSDK.Core.js +1 -1
- package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd-threads.js +1 -1
- package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd-threads.wasm +0 -0
- package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd.wasm +0 -0
- package/bundle/bin/document-scanner/ScanbotSDK.Asm.wasm +0 -0
- package/bundle/bin/document-scanner/ScanbotSDK.Core-simd-threads.js +1 -1
- package/bundle/bin/document-scanner/ScanbotSDK.Core-simd.js +1 -1
- package/bundle/bin/document-scanner/ScanbotSDK.Core.js +1 -1
- package/package.json +4 -3
- package/ui.d.ts +3 -0
- package/ui.js +2 -0
- package/webpack/fileLoader.js +3 -5
- package/@types/core/compiled/ParametricFilters.d.ts +0 -181
- package/@types/core/utils.d.ts +0 -1
- package/@types/core/worker-bridge.d.ts +0 -20
- package/@types/model/barcode/barcode-format.d.ts +0 -1
- package/@types/model/barcode/engine-mode.d.ts +0 -1
- package/@types/model/configuration/document-quality-analyzer-configuration.d.ts +0 -13
- package/@types/model/document/contour-detection-result.d.ts +0 -11
- package/@types/model/document/detection-status.d.ts +0 -11
- package/@types/model/document/document-detection-result.d.ts +0 -8
- package/@types/model/filter-types.d.ts +0 -6
- package/@types/model/generic-text-line-recognizer/text-data-scanner-result.d.ts +0 -6
- package/@types/model/mrz/mrz-result.d.ts +0 -41
- package/@types/model/response/document-quality-analyzer-result.d.ts +0 -8
- package/@types/service/image-processor.d.ts +0 -35
- package/@types/ui2/configuration/BarcodeItem.d.ts +0 -30
- package/@types/ui2/configuration/BarcodeResult.d.ts +0 -14
- package/@types/ui2/configuration/utils.d.ts +0 -6
- package/@types/utils/networking.d.ts +0 -7
- package/bundle/bin/barcode-scanner/ScanbotSDK.Asm.wasm-webpack-file-loader +0 -0
- package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.wasm-webpack-file-loader +0 -0
- package/bundle/bin/complete/ScanbotSDK.Asm-simd.wasm-webpack-file-loader +0 -0
- package/bundle/bin/complete/ScanbotSDK.Asm.wasm-webpack-file-loader +0 -0
- package/bundle/bin/document-scanner/ScanbotSDK.Asm.wasm-webpack-file-loader +0 -0
- /package/@types/ui2/views/dialog/{styled-dialog.d.ts → base/styled-dialog.d.ts} +0 -0
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import { DeepPartial, PartiallyConstructible } from "../common";
|
|
2
|
+
import { DocumentType as GenericDocumentTypesDocumentType } from "./GenericDocumentTypes";
|
|
3
|
+
import { DocumentType as MRZTypesDocumentType } from "./MRZTypes";
|
|
4
|
+
/**
|
|
5
|
+
Base class for all generic document configurations.
|
|
6
|
+
*/
|
|
7
|
+
export type GDRConfig = DateValidationConfig | EuropeanHealthInsuranceCardConfig | MRZFallbackConfig | GDRGroupConfig;
|
|
8
|
+
/** @internal */
|
|
9
|
+
export declare namespace GDRConfig {
|
|
10
|
+
/** @internal */
|
|
11
|
+
function From(source: {
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
}): GDRConfig;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
Date validation configuration.
|
|
17
|
+
This configuration does not enable the scanning of any document types by itself.
|
|
18
|
+
Add to recognizer configuration to require date validation checks for specific document types.
|
|
19
|
+
|
|
20
|
+
*/
|
|
21
|
+
export declare class DateValidationConfig extends PartiallyConstructible {
|
|
22
|
+
readonly _type: "DateValidationConfig";
|
|
23
|
+
/**
|
|
24
|
+
Minimum year of birth
|
|
25
|
+
@defaultValue 0;
|
|
26
|
+
*/
|
|
27
|
+
readonly minBirthYear: number;
|
|
28
|
+
/**
|
|
29
|
+
Maximum year of birth
|
|
30
|
+
@defaultValue 2999;
|
|
31
|
+
*/
|
|
32
|
+
readonly maxBirthYear: number;
|
|
33
|
+
/**
|
|
34
|
+
Minimum card expiration year
|
|
35
|
+
@defaultValue 0;
|
|
36
|
+
*/
|
|
37
|
+
readonly minExpirationYear: number;
|
|
38
|
+
/**
|
|
39
|
+
Maximum card expiration year
|
|
40
|
+
@defaultValue 2999;
|
|
41
|
+
*/
|
|
42
|
+
readonly maxExpirationYear: number;
|
|
43
|
+
/**
|
|
44
|
+
List of generic document formats for which date validation has to be applied.
|
|
45
|
+
@defaultValue [];
|
|
46
|
+
*/
|
|
47
|
+
readonly documentTypes: GenericDocumentTypesDocumentType[];
|
|
48
|
+
/** @param source {@displayType `DeepPartial<DateValidationConfig>`} */
|
|
49
|
+
constructor(source?: DeepPartial<DateValidationConfig>);
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
Health insurance card issuing country
|
|
53
|
+
|
|
54
|
+
- `AUSTRIA`:
|
|
55
|
+
Austria (Validation on the personal identification number is performed as described in "site:www.sozialversicherung.at Was ist die Versicherungsnummer?")
|
|
56
|
+
- `BELGIUM`:
|
|
57
|
+
Belgium
|
|
58
|
+
- `BULGARIA`:
|
|
59
|
+
Bulgaria
|
|
60
|
+
- `CROATIA`:
|
|
61
|
+
Croatia
|
|
62
|
+
- `CYPRUS`:
|
|
63
|
+
Cyprus
|
|
64
|
+
- `CZECH_REPUBLIC`:
|
|
65
|
+
Czech Republic
|
|
66
|
+
- `DENMARK`:
|
|
67
|
+
Denmark
|
|
68
|
+
- `ESTONIA`:
|
|
69
|
+
Estonia
|
|
70
|
+
- `FINLAND`:
|
|
71
|
+
Finland
|
|
72
|
+
- `FRANCE`:
|
|
73
|
+
France
|
|
74
|
+
- `GERMANY`:
|
|
75
|
+
Germany (Validation performed according to "Spezifikation für Musterkarten und Testkarten (eGK, HBA, SMC), Anhang A" and "GS1 Struktur der Kenn-Nummer (ICCSN) der elektronischen Gesundheitskarte")
|
|
76
|
+
- `GREECE`:
|
|
77
|
+
Greece
|
|
78
|
+
- `HUNGARY`:
|
|
79
|
+
Hungary
|
|
80
|
+
- `IRELAND`:
|
|
81
|
+
Ireland
|
|
82
|
+
- `ITALY`:
|
|
83
|
+
Italy
|
|
84
|
+
- `LATVIA`:
|
|
85
|
+
Latvia
|
|
86
|
+
- `LITHUANIA`:
|
|
87
|
+
Lithuania
|
|
88
|
+
- `LUXEMBOURG`:
|
|
89
|
+
Luxembourg
|
|
90
|
+
- `MALTA`:
|
|
91
|
+
Malta
|
|
92
|
+
- `NETHERLANDS`:
|
|
93
|
+
Netherlands
|
|
94
|
+
- `POLAND`:
|
|
95
|
+
Poland
|
|
96
|
+
- `PORTUGAL`:
|
|
97
|
+
Portugal
|
|
98
|
+
- `ROMANIA`:
|
|
99
|
+
Romania
|
|
100
|
+
- `SLOVAKIA`:
|
|
101
|
+
Slovakia
|
|
102
|
+
- `SLOVENIA`:
|
|
103
|
+
Slovenia
|
|
104
|
+
- `SPAIN`:
|
|
105
|
+
Spain
|
|
106
|
+
- `SWEDEN`:
|
|
107
|
+
Sweden
|
|
108
|
+
- `SWITZERLAND`:
|
|
109
|
+
Switzerland
|
|
110
|
+
*/
|
|
111
|
+
export type EHICIssuingCountry = "AUSTRIA" | "BELGIUM" | "BULGARIA" | "CROATIA" | "CYPRUS" | "CZECH_REPUBLIC" | "DENMARK" | "ESTONIA" | "FINLAND" | "FRANCE" | "GERMANY" | "GREECE" | "HUNGARY" | "IRELAND" | "ITALY" | "LATVIA" | "LITHUANIA" | "LUXEMBOURG" | "MALTA" | "NETHERLANDS" | "POLAND" | "PORTUGAL" | "ROMANIA" | "SLOVAKIA" | "SLOVENIA" | "SPAIN" | "SWEDEN" | "SWITZERLAND";
|
|
112
|
+
/**
|
|
113
|
+
EHIC configuration. Add to recognizer configuration to scan EHIC.
|
|
114
|
+
*/
|
|
115
|
+
export declare class EuropeanHealthInsuranceCardConfig extends PartiallyConstructible {
|
|
116
|
+
readonly _type: "EuropeanHealthInsuranceCardConfig";
|
|
117
|
+
/**
|
|
118
|
+
Minimum year of birth
|
|
119
|
+
@defaultValue 0;
|
|
120
|
+
*/
|
|
121
|
+
readonly minBirthYear: number;
|
|
122
|
+
/**
|
|
123
|
+
Maximum year of birth
|
|
124
|
+
@defaultValue 2999;
|
|
125
|
+
*/
|
|
126
|
+
readonly maxBirthYear: number;
|
|
127
|
+
/**
|
|
128
|
+
Minimum card expiration year
|
|
129
|
+
@defaultValue 0;
|
|
130
|
+
*/
|
|
131
|
+
readonly minExpirationYear: number;
|
|
132
|
+
/**
|
|
133
|
+
Maximum card expiration year
|
|
134
|
+
@defaultValue 2999;
|
|
135
|
+
*/
|
|
136
|
+
readonly maxExpirationYear: number;
|
|
137
|
+
/**
|
|
138
|
+
If an expected country is selected, validation rules for the given country are used, a
|
|
139
|
+
and if the expected country cannot be inferred or the inferred country doesn't match the given country,
|
|
140
|
+
the result of recognize() will be IncompleteValidation.
|
|
141
|
+
@defaultValue null;
|
|
142
|
+
*/
|
|
143
|
+
readonly expectedCountry: EHICIssuingCountry | null;
|
|
144
|
+
/** @param source {@displayType `DeepPartial<EuropeanHealthInsuranceCardConfig>`} */
|
|
145
|
+
constructor(source?: DeepPartial<EuropeanHealthInsuranceCardConfig>);
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
MRZ fallback configuration.
|
|
149
|
+
This configuration does not enable the scanning of any document types by itself.
|
|
150
|
+
Add to recognizer configuration to enable recognizing the MRZ only, specifically for documents that are otherwise not supported.
|
|
151
|
+
Note that this may enable scanning of documents that were not enabled through the accepted document types.
|
|
152
|
+
|
|
153
|
+
*/
|
|
154
|
+
export declare class MRZFallbackConfig extends PartiallyConstructible {
|
|
155
|
+
readonly _type: "MRZFallbackConfig";
|
|
156
|
+
/**
|
|
157
|
+
List of ISO 3166-1 alpha-3 country codes for which MRZ fallback is enabled. (e.g. "DEU" for Germany)
|
|
158
|
+
@defaultValue [];
|
|
159
|
+
*/
|
|
160
|
+
readonly acceptedCountries: string[];
|
|
161
|
+
/**
|
|
162
|
+
List of MRZ document formats for which MRZ fallback is enabled.
|
|
163
|
+
@defaultValue [];
|
|
164
|
+
*/
|
|
165
|
+
readonly acceptedMRZTypes: MRZTypesDocumentType[];
|
|
166
|
+
/** @param source {@displayType `DeepPartial<MRZFallbackConfig>`} */
|
|
167
|
+
constructor(source?: DeepPartial<MRZFallbackConfig>);
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
Convenience configuration for enabling the scanning of multiple generic document types with a common configuration.
|
|
171
|
+
Add to recognizer configuration to enable the scanning of multiple generic documents.
|
|
172
|
+
|
|
173
|
+
*/
|
|
174
|
+
export declare class GDRGroupConfig extends PartiallyConstructible {
|
|
175
|
+
readonly _type: "GDRGroupConfig";
|
|
176
|
+
/**
|
|
177
|
+
List of generic document formats to scan. By default, the list is empty.
|
|
178
|
+
@defaultValue [];
|
|
179
|
+
*/
|
|
180
|
+
readonly acceptedDocumentTypes: GenericDocumentTypesDocumentType[];
|
|
181
|
+
/** @param source {@displayType `DeepPartial<GDRGroupConfig>`} */
|
|
182
|
+
constructor(source?: DeepPartial<GDRGroupConfig>);
|
|
183
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { DeepPartial, PartiallyConstructible } from "../common";
|
|
2
|
+
import { GDRConfig } from "./GenericDocumentRecognizerConfigs";
|
|
3
|
+
import { GenericDocument } from "./GenericDocument";
|
|
4
|
+
import { Point } from "../common";
|
|
5
|
+
/**
|
|
6
|
+
The status of the recognition process
|
|
7
|
+
|
|
8
|
+
- `SUCCESS`:
|
|
9
|
+
The document was recognized successfully
|
|
10
|
+
- `ERROR_NOTHING_FOUND`:
|
|
11
|
+
No document was detected
|
|
12
|
+
- `ERROR_BAD_CROP`:
|
|
13
|
+
A document was detected, but it was at an angle/distance that was too large
|
|
14
|
+
- `ERROR_UNKNOWN_DOCUMENT`:
|
|
15
|
+
A document was detected, but it was not recognized as a supported document
|
|
16
|
+
- `ERROR_UNACCEPTABLE_DOCUMENT`:
|
|
17
|
+
A document was detected as a supported document, but it was not part of the accepted documents
|
|
18
|
+
- `INCOMPLETE_VALIDATION`:
|
|
19
|
+
All fields were recognized, but some of them failed validation
|
|
20
|
+
*/
|
|
21
|
+
export type RecognitionStatus = "SUCCESS" | "ERROR_NOTHING_FOUND" | "ERROR_BAD_CROP" | "ERROR_UNKNOWN_DOCUMENT" | "ERROR_UNACCEPTABLE_DOCUMENT" | "INCOMPLETE_VALIDATION";
|
|
22
|
+
/**
|
|
23
|
+
Contains the result of running the generic document recognizer
|
|
24
|
+
*/
|
|
25
|
+
export declare class RecognitionResult extends PartiallyConstructible {
|
|
26
|
+
/**
|
|
27
|
+
The status of the recognition process
|
|
28
|
+
*/
|
|
29
|
+
readonly status: RecognitionStatus;
|
|
30
|
+
/**
|
|
31
|
+
The recognized document
|
|
32
|
+
*/
|
|
33
|
+
readonly document: GenericDocument | null;
|
|
34
|
+
/**
|
|
35
|
+
Coordinates of the detected document in the input image (clockwise from top-left)
|
|
36
|
+
*/
|
|
37
|
+
readonly quad: Point[] | null;
|
|
38
|
+
/** @param source {@displayType `DeepPartial<RecognitionResult>`} */
|
|
39
|
+
constructor(source?: DeepPartial<RecognitionResult>);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
The recognition mode
|
|
43
|
+
|
|
44
|
+
- `LIVE`:
|
|
45
|
+
The recognizer will attempt to accumulate results over multiple frames.
|
|
46
|
+
- `SINGLE_SHOT`:
|
|
47
|
+
The recognizer will only use the current frame and will spend additional time to ensure the best possible result.
|
|
48
|
+
*/
|
|
49
|
+
export type RecognitionMode = "LIVE" | "SINGLE_SHOT";
|
|
50
|
+
/**
|
|
51
|
+
Parameters for the recognition process
|
|
52
|
+
*/
|
|
53
|
+
export declare class RecognitionParameters extends PartiallyConstructible {
|
|
54
|
+
/**
|
|
55
|
+
The recognition mode
|
|
56
|
+
@defaultValue "LIVE";
|
|
57
|
+
*/
|
|
58
|
+
mode: RecognitionMode;
|
|
59
|
+
/** @param source {@displayType `DeepPartial<RecognitionParameters>`} */
|
|
60
|
+
constructor(source?: DeepPartial<RecognitionParameters>);
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
Configuration for how to accumulate results
|
|
64
|
+
*/
|
|
65
|
+
export declare class ResultAccumulationConfig extends PartiallyConstructible {
|
|
66
|
+
/**
|
|
67
|
+
Number of identical results required to consider a field confirmed
|
|
68
|
+
@defaultValue 3;
|
|
69
|
+
*/
|
|
70
|
+
minConfirmations: number;
|
|
71
|
+
/**
|
|
72
|
+
Minimum confidence required to consider a field confirmed
|
|
73
|
+
@defaultValue 0.8;
|
|
74
|
+
*/
|
|
75
|
+
minConfidenceForStableField: number;
|
|
76
|
+
/**
|
|
77
|
+
Will auto-clear the cache if this number of frames have been a different document type or empty
|
|
78
|
+
@defaultValue 4;
|
|
79
|
+
*/
|
|
80
|
+
autoClearThreshold: number;
|
|
81
|
+
/** @param source {@displayType `DeepPartial<ResultAccumulationConfig>`} */
|
|
82
|
+
constructor(source?: DeepPartial<ResultAccumulationConfig>);
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
Configuration for the generic document recognizer
|
|
86
|
+
*/
|
|
87
|
+
export declare class GenericDocumentRecognizerParameters extends PartiallyConstructible {
|
|
88
|
+
/**
|
|
89
|
+
Configuration for how to accumulate results
|
|
90
|
+
@defaultValue new ResultAccumulationConfig({});
|
|
91
|
+
*/
|
|
92
|
+
resultAccumulationConfig: ResultAccumulationConfig;
|
|
93
|
+
/**
|
|
94
|
+
Normalized names of the fields to exclude from the result
|
|
95
|
+
@defaultValue [];
|
|
96
|
+
*/
|
|
97
|
+
fieldExcludeList: string[];
|
|
98
|
+
/**
|
|
99
|
+
Options for generic document decoding
|
|
100
|
+
@defaultValue [new GDRGroupConfig({})];
|
|
101
|
+
*/
|
|
102
|
+
configurations: GDRConfig[];
|
|
103
|
+
/** @param source {@displayType `DeepPartial<GenericDocumentRecognizerParameters>`} */
|
|
104
|
+
constructor(source?: DeepPartial<GenericDocumentRecognizerParameters>);
|
|
105
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { DeepPartial, PartiallyConstructible } from "../common";
|
|
2
|
+
/**
|
|
3
|
+
Enumerates generic document formats.
|
|
4
|
+
|
|
5
|
+
- `DeIdCardFront`:
|
|
6
|
+
DeIdCardFront
|
|
7
|
+
- `DeIdCardBack`:
|
|
8
|
+
DeIdCardBack
|
|
9
|
+
- `DePassport`:
|
|
10
|
+
DePassport
|
|
11
|
+
- `DeDriverLicenseFront`:
|
|
12
|
+
DeDriverLicenseFront
|
|
13
|
+
- `DeDriverLicenseBack`:
|
|
14
|
+
DeDriverLicenseBack
|
|
15
|
+
- `DeResidencePermitFront`:
|
|
16
|
+
DeResidencePermitFront
|
|
17
|
+
- `DeResidencePermitBack`:
|
|
18
|
+
DeResidencePermitBack
|
|
19
|
+
- `EuropeanHealthInsuranceCard`:
|
|
20
|
+
EuropeanHealthInsuranceCard
|
|
21
|
+
- `DeHealthInsuranceCardFront`:
|
|
22
|
+
DeHealthInsuranceCardFront
|
|
23
|
+
*/
|
|
24
|
+
export type DocumentType = "DeIdCardFront" | "DeIdCardBack" | "DePassport" | "DeDriverLicenseFront" | "DeDriverLicenseBack" | "DeResidencePermitFront" | "DeResidencePermitBack" | "EuropeanHealthInsuranceCard" | "DeHealthInsuranceCardFront";
|
|
25
|
+
/**
|
|
26
|
+
Lists of generic document types to decode
|
|
27
|
+
*/
|
|
28
|
+
export declare class DocumentTypes extends PartiallyConstructible {
|
|
29
|
+
/** @param source {@displayType `DeepPartial<DocumentTypes>`} */
|
|
30
|
+
constructor(source?: DeepPartial<DocumentTypes>);
|
|
31
|
+
}
|
|
32
|
+
export declare namespace DocumentTypes {
|
|
33
|
+
/**
|
|
34
|
+
List of all generic document types
|
|
35
|
+
@defaultValue ["DeIdCardFront", "DeIdCardBack", "DePassport", "DeDriverLicenseFront", "DeDriverLicenseBack", "DeResidencePermitFront", "DeResidencePermitBack", "EuropeanHealthInsuranceCard", "DeHealthInsuranceCardFront"];
|
|
36
|
+
*/
|
|
37
|
+
const all: DocumentType[];
|
|
38
|
+
}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { DeepPartial, PartiallyConstructible } from "../common";
|
|
2
|
+
import { Rectangle } from "../common";
|
|
3
|
+
/**
|
|
4
|
+
Structure containing recognized word text and bounds
|
|
5
|
+
*/
|
|
6
|
+
export declare class WordBox extends PartiallyConstructible {
|
|
7
|
+
/**
|
|
8
|
+
Recognized word text
|
|
9
|
+
*/
|
|
10
|
+
readonly text: string;
|
|
11
|
+
/**
|
|
12
|
+
Bounding rectangle of the recognized word
|
|
13
|
+
*/
|
|
14
|
+
readonly boundingRect: Rectangle;
|
|
15
|
+
/**
|
|
16
|
+
Confidence of the recognition
|
|
17
|
+
@defaultValue 0.0;
|
|
18
|
+
*/
|
|
19
|
+
readonly recognitionConfidence: number;
|
|
20
|
+
/** @param source {@displayType `DeepPartial<WordBox>`} */
|
|
21
|
+
constructor(source?: DeepPartial<WordBox>);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
Structure containing recognized symbol text and bounds
|
|
25
|
+
*/
|
|
26
|
+
export declare class SymbolBox extends PartiallyConstructible {
|
|
27
|
+
/**
|
|
28
|
+
Recognized symbol text
|
|
29
|
+
*/
|
|
30
|
+
readonly symbol: string;
|
|
31
|
+
/**
|
|
32
|
+
Bounding rectangle of the recognized symbol
|
|
33
|
+
*/
|
|
34
|
+
readonly boundingRect: Rectangle;
|
|
35
|
+
/**
|
|
36
|
+
Confidence of the recognition
|
|
37
|
+
*/
|
|
38
|
+
readonly recognitionConfidence: number;
|
|
39
|
+
/** @param source {@displayType `DeepPartial<SymbolBox>`} */
|
|
40
|
+
constructor(source?: DeepPartial<SymbolBox>);
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
The result of the text line recognition
|
|
44
|
+
*/
|
|
45
|
+
export declare class ScannerResult extends PartiallyConstructible {
|
|
46
|
+
/**
|
|
47
|
+
Raw recognized string
|
|
48
|
+
*/
|
|
49
|
+
readonly rawText: string;
|
|
50
|
+
/**
|
|
51
|
+
Boxes for each recognized word
|
|
52
|
+
*/
|
|
53
|
+
readonly wordBoxes: WordBox[];
|
|
54
|
+
/**
|
|
55
|
+
Boxes for each recognized symbol
|
|
56
|
+
*/
|
|
57
|
+
readonly symbolBoxes: SymbolBox[];
|
|
58
|
+
/**
|
|
59
|
+
Confidence of the recognition
|
|
60
|
+
@defaultValue 0.0;
|
|
61
|
+
*/
|
|
62
|
+
readonly confidence: number;
|
|
63
|
+
/**
|
|
64
|
+
Whether the validation was successful
|
|
65
|
+
@defaultValue false;
|
|
66
|
+
*/
|
|
67
|
+
readonly validationSuccessful: boolean;
|
|
68
|
+
/** @param source {@displayType `DeepPartial<ScannerResult>`} */
|
|
69
|
+
constructor(source?: DeepPartial<ScannerResult>);
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
Preset for the validation
|
|
73
|
+
|
|
74
|
+
- `VEHICLE_IDENTIFICATION_NUMBER`:
|
|
75
|
+
Validation rules for vehicle identification numbers
|
|
76
|
+
*/
|
|
77
|
+
export type ValidatorPreset = "VEHICLE_IDENTIFICATION_NUMBER";
|
|
78
|
+
/**
|
|
79
|
+
Base class for content validators
|
|
80
|
+
*/
|
|
81
|
+
export type ContentValidator = DefaultContentValidator | PresetContentValidator | PatternContentValidator;
|
|
82
|
+
/** @internal */
|
|
83
|
+
export declare namespace ContentValidator {
|
|
84
|
+
/** @internal */
|
|
85
|
+
function From(source: {
|
|
86
|
+
[key: string]: any;
|
|
87
|
+
}): ContentValidator;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
Default content validator. Accepts only non-empty strings.
|
|
91
|
+
*/
|
|
92
|
+
export declare class DefaultContentValidator extends PartiallyConstructible {
|
|
93
|
+
readonly _type: "DefaultContentValidator";
|
|
94
|
+
/**
|
|
95
|
+
OCR whitelist. Empty string means no restriction.
|
|
96
|
+
@defaultValue "";
|
|
97
|
+
*/
|
|
98
|
+
allowedCharacters: string;
|
|
99
|
+
/** @param source {@displayType `DeepPartial<DefaultContentValidator>`} */
|
|
100
|
+
constructor(source?: DeepPartial<DefaultContentValidator>);
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
Preset content validator
|
|
104
|
+
*/
|
|
105
|
+
export declare class PresetContentValidator extends PartiallyConstructible {
|
|
106
|
+
readonly _type: "PresetContentValidator";
|
|
107
|
+
/**
|
|
108
|
+
Validator preset
|
|
109
|
+
*/
|
|
110
|
+
preset: ValidatorPreset;
|
|
111
|
+
/** @param source {@displayType `DeepPartial<PresetContentValidator>`} */
|
|
112
|
+
constructor(source?: DeepPartial<PresetContentValidator>);
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
Pattern content validator
|
|
116
|
+
*/
|
|
117
|
+
export declare class PatternContentValidator extends PartiallyConstructible {
|
|
118
|
+
readonly _type: "PatternContentValidator";
|
|
119
|
+
/**
|
|
120
|
+
OCR whitelist. Empty string means no restriction.
|
|
121
|
+
@defaultValue "";
|
|
122
|
+
*/
|
|
123
|
+
allowedCharacters: string;
|
|
124
|
+
/**
|
|
125
|
+
Wildcard validation pattern.
|
|
126
|
+
? - any character
|
|
127
|
+
# - any digit
|
|
128
|
+
all other characters represent themselves
|
|
129
|
+
*/
|
|
130
|
+
pattern: string;
|
|
131
|
+
/**
|
|
132
|
+
Whether the pattern should match the whole string or just a substring
|
|
133
|
+
@defaultValue false;
|
|
134
|
+
*/
|
|
135
|
+
matchSubstring: boolean;
|
|
136
|
+
/** @param source {@displayType `DeepPartial<PatternContentValidator>`} */
|
|
137
|
+
constructor(source?: DeepPartial<PatternContentValidator>);
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
Configuration for the generic text line scanner
|
|
141
|
+
*/
|
|
142
|
+
export declare class ScannerConfiguration extends PartiallyConstructible {
|
|
143
|
+
/**
|
|
144
|
+
Maximum image side (height or width) for OCR process. 0 - do not rescale.
|
|
145
|
+
@defaultValue 0;
|
|
146
|
+
*/
|
|
147
|
+
ocrResolutionLimit: number;
|
|
148
|
+
/**
|
|
149
|
+
Maximum number of accumulated frames to inspect before actual result is returned
|
|
150
|
+
@defaultValue 3;
|
|
151
|
+
*/
|
|
152
|
+
maximumNumberOfAccumulatedFrames: number;
|
|
153
|
+
/**
|
|
154
|
+
Minimum number of accumulated frames that have equal result
|
|
155
|
+
@defaultValue 2;
|
|
156
|
+
*/
|
|
157
|
+
minimumNumberOfRequiredFramesWithEqualRecognitionResult: number;
|
|
158
|
+
/**
|
|
159
|
+
Content validator
|
|
160
|
+
@defaultValue new DefaultContentValidator({});
|
|
161
|
+
*/
|
|
162
|
+
validator: ContentValidator;
|
|
163
|
+
/** @param source {@displayType `DeepPartial<ScannerConfiguration>`} */
|
|
164
|
+
constructor(source?: DeepPartial<ScannerConfiguration>);
|
|
165
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { DeepPartial, PartiallyConstructible } from "../common";
|
|
2
|
+
import { Point } from "../common";
|
|
3
|
+
/**
|
|
4
|
+
Represents a line segment in 2D space
|
|
5
|
+
*/
|
|
6
|
+
export declare class LineSegmentInt extends PartiallyConstructible {
|
|
7
|
+
/**
|
|
8
|
+
Start point of the segment
|
|
9
|
+
*/
|
|
10
|
+
readonly start: Point;
|
|
11
|
+
/**
|
|
12
|
+
End point of the segment
|
|
13
|
+
*/
|
|
14
|
+
readonly end: Point;
|
|
15
|
+
/** @param source {@displayType `DeepPartial<LineSegmentInt>`} */
|
|
16
|
+
constructor(source?: DeepPartial<LineSegmentInt>);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
Represents a line segment in 2D space
|
|
20
|
+
*/
|
|
21
|
+
export declare class LineSegmentFloat extends PartiallyConstructible {
|
|
22
|
+
/**
|
|
23
|
+
Start point of the segment
|
|
24
|
+
*/
|
|
25
|
+
readonly start: Point;
|
|
26
|
+
/**
|
|
27
|
+
End point of the segment
|
|
28
|
+
*/
|
|
29
|
+
readonly end: Point;
|
|
30
|
+
/** @param source {@displayType `DeepPartial<LineSegmentFloat>`} */
|
|
31
|
+
constructor(source?: DeepPartial<LineSegmentFloat>);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
Aspect ratio is the ratio of the width to the height of an image or screen.
|
|
35
|
+
*/
|
|
36
|
+
export declare class AspectRatio extends PartiallyConstructible {
|
|
37
|
+
/**
|
|
38
|
+
Width component of the aspect ratio.
|
|
39
|
+
@defaultValue 1.0;
|
|
40
|
+
*/
|
|
41
|
+
readonly width: number;
|
|
42
|
+
/**
|
|
43
|
+
Height component of the aspect ratio.
|
|
44
|
+
@defaultValue 1.0;
|
|
45
|
+
*/
|
|
46
|
+
readonly height: number;
|
|
47
|
+
/** @param source {@displayType `DeepPartial<AspectRatio>`} */
|
|
48
|
+
constructor(source?: DeepPartial<AspectRatio>);
|
|
49
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Image rotation.
|
|
3
|
+
|
|
4
|
+
- `ROTATION_NONE`:
|
|
5
|
+
No rotation.
|
|
6
|
+
- `ROTATION_90_CLOCKWISE`:
|
|
7
|
+
90 degrees clockwise rotation.
|
|
8
|
+
- `ROTATION_180`:
|
|
9
|
+
180 degrees rotation.
|
|
10
|
+
- `ROTATION_90_COUNTERCLOCKWISE`:
|
|
11
|
+
90 degrees counterclockwise rotation.
|
|
12
|
+
*/
|
|
13
|
+
export type ImageRotation = "ROTATION_NONE" | "ROTATION_90_CLOCKWISE" | "ROTATION_180" | "ROTATION_90_COUNTERCLOCKWISE";
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { DeepPartial, PartiallyConstructible } from "../common";
|
|
2
|
+
import { RawImage } from "../common";
|
|
3
|
+
/**
|
|
4
|
+
Type of the scanner internally to scan the license plate
|
|
5
|
+
|
|
6
|
+
- `CLASSIC`:
|
|
7
|
+
Classic scanning strategy
|
|
8
|
+
- `ML`:
|
|
9
|
+
ML-based scanning strategy
|
|
10
|
+
*/
|
|
11
|
+
export type ScannerStrategy = "CLASSIC" | "ML";
|
|
12
|
+
/**
|
|
13
|
+
Configuration for the license plate scanner
|
|
14
|
+
*/
|
|
15
|
+
export declare class ScannerConfiguration extends PartiallyConstructible {
|
|
16
|
+
/**
|
|
17
|
+
Maximum number of accumulated frames to inspect before actual result is returned
|
|
18
|
+
@defaultValue 3;
|
|
19
|
+
*/
|
|
20
|
+
maximumNumberOfAccumulatedFrames: number;
|
|
21
|
+
/**
|
|
22
|
+
Minimum number of accumulated frames that have equal result
|
|
23
|
+
@defaultValue 2;
|
|
24
|
+
*/
|
|
25
|
+
minimumNumberOfRequiredFramesWithEqualScanningResult: number;
|
|
26
|
+
/**
|
|
27
|
+
Strategy to use for scanning
|
|
28
|
+
@defaultValue "ML";
|
|
29
|
+
*/
|
|
30
|
+
scannerStrategy: ScannerStrategy;
|
|
31
|
+
/** @param source {@displayType `DeepPartial<ScannerConfiguration>`} */
|
|
32
|
+
constructor(source?: DeepPartial<ScannerConfiguration>);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
The result of the license plate scanning
|
|
36
|
+
*/
|
|
37
|
+
export declare class ScannerResult extends PartiallyConstructible {
|
|
38
|
+
/**
|
|
39
|
+
Country code
|
|
40
|
+
*/
|
|
41
|
+
readonly countryCode: string;
|
|
42
|
+
/**
|
|
43
|
+
License plate
|
|
44
|
+
*/
|
|
45
|
+
readonly licensePlate: string;
|
|
46
|
+
/**
|
|
47
|
+
Raw recognized string
|
|
48
|
+
*/
|
|
49
|
+
readonly rawText: string;
|
|
50
|
+
/**
|
|
51
|
+
Recognition confidence
|
|
52
|
+
@defaultValue 0.0;
|
|
53
|
+
*/
|
|
54
|
+
readonly confidence: number;
|
|
55
|
+
/**
|
|
56
|
+
Text validation result
|
|
57
|
+
@defaultValue false;
|
|
58
|
+
*/
|
|
59
|
+
readonly validationSuccessful: boolean;
|
|
60
|
+
/**
|
|
61
|
+
The part of the image on which the plate was detected
|
|
62
|
+
@defaultValue null;
|
|
63
|
+
*/
|
|
64
|
+
readonly croppedImage: RawImage | null;
|
|
65
|
+
/** @param source {@displayType `DeepPartial<ScannerResult>`} */
|
|
66
|
+
constructor(source?: DeepPartial<ScannerResult>);
|
|
67
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { AccumulatedResultsVerifierConfig } from "./FrameUtilities";
|
|
2
|
+
import { DeepPartial, PartiallyConstructible } from "../common";
|
|
3
|
+
import { GenericDocument } from "./GenericDocument";
|
|
4
|
+
/**
|
|
5
|
+
Type of document containing the MRZ
|
|
6
|
+
|
|
7
|
+
- `UNKNOWN`:
|
|
8
|
+
Undefined
|
|
9
|
+
- `CREW_MEMBER_CERTIFICATE`:
|
|
10
|
+
Crew member certificate
|
|
11
|
+
- `ID_CARD`:
|
|
12
|
+
ID card
|
|
13
|
+
- `PASSPORT`:
|
|
14
|
+
Passport
|
|
15
|
+
- `VISA`:
|
|
16
|
+
Visa card
|
|
17
|
+
- `CH_DRIVING_LICENSE`:
|
|
18
|
+
Swiss driver license
|
|
19
|
+
*/
|
|
20
|
+
export type DocumentType = "UNKNOWN" | "CREW_MEMBER_CERTIFICATE" | "ID_CARD" | "PASSPORT" | "VISA" | "CH_DRIVING_LICENSE";
|
|
21
|
+
/**
|
|
22
|
+
Container for result of MRZ recognition attempt
|
|
23
|
+
*/
|
|
24
|
+
export declare class RecognitionResult extends PartiallyConstructible {
|
|
25
|
+
/**
|
|
26
|
+
Recognition successful
|
|
27
|
+
@defaultValue false;
|
|
28
|
+
*/
|
|
29
|
+
readonly recognitionSuccessful: boolean;
|
|
30
|
+
/**
|
|
31
|
+
Raw string value of MRZ
|
|
32
|
+
*/
|
|
33
|
+
readonly rawMRZ: string;
|
|
34
|
+
/**
|
|
35
|
+
Generic document containing MRZ data
|
|
36
|
+
*/
|
|
37
|
+
readonly document: GenericDocument | null;
|
|
38
|
+
/** @param source {@displayType `DeepPartial<RecognitionResult>`} */
|
|
39
|
+
constructor(source?: DeepPartial<RecognitionResult>);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
Configuration for MRZ recognizer
|
|
43
|
+
*/
|
|
44
|
+
export declare class RecognizerConfiguration extends PartiallyConstructible {
|
|
45
|
+
/**
|
|
46
|
+
Configure the frame accumulation process
|
|
47
|
+
@defaultValue new AccumulatedResultsVerifierConfig({});
|
|
48
|
+
*/
|
|
49
|
+
accumulatedResultsVerifierConfig: AccumulatedResultsVerifierConfig;
|
|
50
|
+
/** @param source {@displayType `DeepPartial<RecognizerConfiguration>`} */
|
|
51
|
+
constructor(source?: DeepPartial<RecognizerConfiguration>);
|
|
52
|
+
}
|