scanbot-web-sdk 6.0.0-dev.1 → 6.0.0-dev.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.
Files changed (177) hide show
  1. package/@types/barcode-scanner-view.d.ts +10 -10
  2. package/@types/consume-type.d.ts +7 -0
  3. package/@types/core/bridge/common.d.ts +24 -0
  4. package/@types/core/bridge/compiled/BarcodeConfigs.d.ts +973 -0
  5. package/@types/core/bridge/compiled/BarcodeScannerTypes.d.ts +183 -0
  6. package/@types/core/bridge/compiled/BarcodeTypes.d.ts +183 -0
  7. package/@types/core/bridge/compiled/CheckRecognizerTypes.d.ts +29 -0
  8. package/@types/core/bridge/compiled/CommonFieldType.d.ts +59 -0
  9. package/@types/core/bridge/compiled/DocumentDetectorTypes.d.ts +196 -0
  10. package/@types/core/bridge/compiled/DocumentQualityAnalyzerTypes.d.ts +105 -0
  11. package/@types/core/bridge/compiled/EhicTypes.d.ts +218 -0
  12. package/@types/core/bridge/compiled/FrameUtilities.d.ts +18 -0
  13. package/@types/core/bridge/compiled/GenericDocument.d.ts +198 -0
  14. package/@types/core/bridge/compiled/GenericDocumentRecognizerTypes.d.ts +104 -0
  15. package/@types/core/bridge/compiled/GenericTextLineScannerTypes.d.ts +165 -0
  16. package/@types/core/bridge/compiled/Geometry.d.ts +49 -0
  17. package/@types/core/bridge/compiled/ImageProcessorTypes.d.ts +13 -0
  18. package/@types/core/bridge/compiled/LicensePlateScannerTypes.d.ts +67 -0
  19. package/@types/core/bridge/compiled/MRZTypes.d.ts +52 -0
  20. package/@types/core/bridge/compiled/MedicalCertificateTypes.d.ts +306 -0
  21. package/@types/core/bridge/compiled/OcrElements.d.ts +129 -0
  22. package/@types/core/bridge/compiled/ParametricFilters.d.ts +186 -0
  23. package/@types/core/bridge/compiled/PdfConfig.d.ts +197 -0
  24. package/@types/core/bridge/compiled/TiffTypes.d.ts +183 -0
  25. package/@types/core/bridge/compiled_schemas_v3/BarcodeConfigs.d.ts +973 -0
  26. package/@types/core/bridge/compiled_schemas_v3/BarcodeScannerTypes.d.ts +183 -0
  27. package/@types/core/bridge/compiled_schemas_v3/BarcodeTypes.d.ts +183 -0
  28. package/@types/core/bridge/compiled_schemas_v3/CheckRecognizerTypes.d.ts +29 -0
  29. package/@types/core/bridge/compiled_schemas_v3/CommonFieldType.d.ts +59 -0
  30. package/@types/core/bridge/compiled_schemas_v3/DocumentDetectorTypes.d.ts +196 -0
  31. package/@types/core/bridge/compiled_schemas_v3/DocumentQualityAnalyzerTypes.d.ts +105 -0
  32. package/@types/core/bridge/compiled_schemas_v3/EhicTypes.d.ts +218 -0
  33. package/@types/core/bridge/compiled_schemas_v3/FrameUtilities.d.ts +18 -0
  34. package/@types/core/bridge/compiled_schemas_v3/GenericDocument.d.ts +198 -0
  35. package/@types/core/bridge/compiled_schemas_v3/GenericDocumentRecognizerTypes.d.ts +104 -0
  36. package/@types/core/bridge/compiled_schemas_v3/GenericTextLineScannerTypes.d.ts +165 -0
  37. package/@types/core/bridge/compiled_schemas_v3/Geometry.d.ts +49 -0
  38. package/@types/core/bridge/compiled_schemas_v3/ImageProcessorTypes.d.ts +13 -0
  39. package/@types/core/bridge/compiled_schemas_v3/LicensePlateScannerTypes.d.ts +67 -0
  40. package/@types/core/bridge/compiled_schemas_v3/MRZTypes.d.ts +52 -0
  41. package/@types/core/bridge/compiled_schemas_v3/MedicalCertificateTypes.d.ts +306 -0
  42. package/@types/core/bridge/compiled_schemas_v3/OcrElements.d.ts +129 -0
  43. package/@types/core/bridge/compiled_schemas_v3/ParametricFilters.d.ts +186 -0
  44. package/@types/core/bridge/compiled_schemas_v3/PdfConfig.d.ts +197 -0
  45. package/@types/core/bridge/compiled_schemas_v3/TiffTypes.d.ts +183 -0
  46. package/@types/core/bridge/utils.d.ts +7 -0
  47. package/@types/core/bridge/worker-bridge.d.ts +362 -0
  48. package/@types/core/worker/ScanbotSDK.Core-simd-threads.d.ts +0 -0
  49. package/@types/core/worker/ScanbotSDK.Core-simd.d.ts +0 -0
  50. package/@types/core/worker/ScanbotSDK.Core.d.ts +75 -0
  51. package/@types/core-types.d.ts +23 -0
  52. package/@types/cropping-view.d.ts +4 -2
  53. package/@types/document-scanner-view.d.ts +5 -5
  54. package/@types/generic-document-recognizer-view.d.ts +22 -0
  55. package/@types/index.d.ts +12 -19
  56. package/@types/interfaces/i-document-scanner-handle.d.ts +2 -2
  57. package/@types/interfaces/i-generic-document-recognizer-scanner-handle.d.ts +3 -0
  58. package/@types/model/barcode/barcode-result.d.ts +6 -8
  59. package/@types/model/barcode/barcode.d.ts +3 -14
  60. package/@types/model/configuration/barcode-scanner-configuration.d.ts +12 -8
  61. package/@types/model/configuration/cropping-view-configuration.d.ts +2 -1
  62. package/@types/model/configuration/document-scanner-configuration.d.ts +5 -20
  63. package/@types/model/configuration/generic-document-recognizer-configuration.d.ts +9 -0
  64. package/@types/model/configuration/initialization-options.d.ts +2 -1
  65. package/@types/model/configuration/mrz-scanner-configuration.d.ts +4 -3
  66. package/@types/model/configuration/scanner-configuration.d.ts +1 -0
  67. package/@types/model/configuration/selection-overlay-configuration.d.ts +2 -2
  68. package/@types/model/configuration/text-data-scanner-configuration.d.ts +3 -6
  69. package/@types/model/configuration/view-finder-scanner-configuration.d.ts +3 -2
  70. package/@types/model/configuration/vin-scanner-configuration.d.ts +2 -1
  71. package/@types/model/response/cropping-result.d.ts +2 -1
  72. package/@types/scanbot-sdk.d.ts +208 -29
  73. package/@types/service/document-quality-analyzer.d.ts +7 -5
  74. package/@types/service/generic-document-recognizer.d.ts +11 -0
  75. package/@types/service/ocr-engine.d.ts +8 -5
  76. package/@types/service/pdf-generator.d.ts +7 -95
  77. package/@types/service/public-utils.d.ts +1 -1
  78. package/@types/service/simple-mrz-recognizer.d.ts +5 -5
  79. package/@types/service/text-data-recognizer.d.ts +5 -4
  80. package/@types/service/tiff-generator.d.ts +12 -10
  81. package/@types/ui2/configuration/BarcodeInfoMapping.d.ts +1 -1
  82. package/@types/ui2/configuration/BarcodeItem.d.ts +4 -28
  83. package/@types/ui2/configuration/BarcodeRecognizerConfiguration.d.ts +12 -155
  84. package/@types/ui2/configuration/BarcodeScannerConfiguration.d.ts +2 -18
  85. package/@types/ui2/configuration/BarcodeScannerTypes.d.ts +6 -0
  86. package/@types/ui2/configuration/BarcodeTextLocalization.d.ts +0 -60
  87. package/@types/ui2/configuration/BarcodeTypes.d.ts +1 -0
  88. package/@types/ui2/configuration/BarcodeUseCase.d.ts +3 -0
  89. package/@types/ui2/configuration/CameraConfiguration.d.ts +22 -23
  90. package/@types/ui2/configuration/CameraPermission.d.ts +0 -15
  91. package/@types/ui2/configuration/Common.d.ts +0 -37
  92. package/@types/ui2/configuration/FindAndPickScanningModeUseCase.d.ts +2 -2
  93. package/@types/ui2/configuration/Geometry.d.ts +1 -0
  94. package/@types/ui2/configuration/MultipleScanningModeUseCase.d.ts +1 -1
  95. package/@types/ui2/configuration/SingleScanningModeUseCase.d.ts +1 -1
  96. package/@types/ui2/configuration/TopBarConfiguration.d.ts +0 -16
  97. package/@types/ui2/configuration/ViewFinderConfiguration.d.ts +6 -3
  98. package/@types/ui2/configuration.d.ts +1 -1
  99. package/@types/ui2/controllers/multiple-scanning-mode-controller.d.ts +2 -1
  100. package/@types/ui2/controllers/single-scanning-mode-controller.d.ts +2 -1
  101. package/@types/ui2/model/counted-barcodes.d.ts +13 -12
  102. package/@types/ui2/scanbot-sdk-ui.d.ts +2 -2
  103. package/@types/ui2/utils/barcode-mapper.d.ts +15 -3
  104. package/@types/ui2/utils/camera-config.d.ts +2 -2
  105. package/@types/ui2/utils/styled-input.d.ts +1 -1
  106. package/@types/ui2/views/action-button/action-button-container.d.ts +2 -0
  107. package/@types/ui2/views/barcode-scanner.d.ts +4 -3
  108. package/@types/ui2/views/drawer/subviews/barcode-list-item.d.ts +3 -3
  109. package/@types/ui2/views/form/dialog-button.d.ts +2 -2
  110. package/@types/utils/dto/MagneticLine.d.ts +4 -4
  111. package/@types/utils/dto/Point.d.ts +2 -2
  112. package/@types/utils/image-utils.d.ts +1 -0
  113. package/@types/utils/react/usePromise.d.ts +3 -1
  114. package/@types/utils/utils.d.ts +1 -1
  115. package/@types/utils/video-stream.d.ts +1 -0
  116. package/@types/view/action-bar/bottom-action-bar.d.ts +2 -2
  117. package/@types/view/barcode-calculation/barcode-calculation-popup-list.d.ts +2 -2
  118. package/@types/view/barcode-calculation/barcode-calculation-popup.d.ts +4 -4
  119. package/@types/view/barcode-calculation/scanned-image-with-overlay.d.ts +2 -2
  120. package/@types/view/barcode-polygon/animated-barcode-selection-overlay.d.ts +6 -5
  121. package/@types/view/barcode-polygon/barcode-overlay.d.ts +3 -3
  122. package/@types/view/barcode-polygon/barcode-polygon-label.d.ts +2 -2
  123. package/@types/view/cropping/draggable-base-container.d.ts +8 -2
  124. package/@types/view/cropping/draggable-handles-component.d.ts +9 -2
  125. package/@types/view/view-finder.d.ts +1 -0
  126. package/@types/worker/worker-bridge.d.ts +349 -5
  127. package/Libraries.txt +307 -174
  128. package/README.md +3 -3
  129. package/bundle/ScanbotSDK.min.js +5 -5
  130. package/bundle/ScanbotSDK.ui2.min.js +108 -161
  131. package/bundle/ScanbotSDK.ui2.min.js.LICENSE.txt +0 -18
  132. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd-threads.js +1 -1
  133. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd-threads.wasm +0 -0
  134. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd.wasm +0 -0
  135. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm.wasm +0 -0
  136. package/bundle/bin/barcode-scanner/ScanbotSDK.Core-simd-threads.js +1 -1
  137. package/bundle/bin/barcode-scanner/ScanbotSDK.Core-simd.js +1 -1
  138. package/bundle/bin/barcode-scanner/ScanbotSDK.Core.js +1 -1
  139. package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.js +1 -1
  140. package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.wasm +0 -0
  141. package/bundle/bin/complete/ScanbotSDK.Asm-simd.wasm +0 -0
  142. package/bundle/bin/complete/ScanbotSDK.Asm.wasm +0 -0
  143. package/bundle/bin/complete/ScanbotSDK.Core-simd-threads.js +1 -1
  144. package/bundle/bin/complete/ScanbotSDK.Core-simd.js +1 -1
  145. package/bundle/bin/complete/ScanbotSDK.Core.js +1 -1
  146. package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd-threads.js +1 -1
  147. package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd-threads.wasm +0 -0
  148. package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd.wasm +0 -0
  149. package/bundle/bin/document-scanner/ScanbotSDK.Asm.wasm +0 -0
  150. package/bundle/bin/document-scanner/ScanbotSDK.Core-simd-threads.js +1 -1
  151. package/bundle/bin/document-scanner/ScanbotSDK.Core-simd.js +1 -1
  152. package/bundle/bin/document-scanner/ScanbotSDK.Core.js +1 -1
  153. package/package.json +4 -3
  154. package/ui.d.ts +3 -0
  155. package/ui.js +2 -0
  156. package/webpack/fileLoader.js +3 -5
  157. package/@types/core/compiled/ParametricFilters.d.ts +0 -181
  158. package/@types/core/utils.d.ts +0 -1
  159. package/@types/core/worker-bridge.d.ts +0 -20
  160. package/@types/model/barcode/barcode-format.d.ts +0 -1
  161. package/@types/model/barcode/engine-mode.d.ts +0 -1
  162. package/@types/model/configuration/document-quality-analyzer-configuration.d.ts +0 -13
  163. package/@types/model/document/contour-detection-result.d.ts +0 -11
  164. package/@types/model/document/detection-status.d.ts +0 -11
  165. package/@types/model/document/document-detection-result.d.ts +0 -8
  166. package/@types/model/filter-types.d.ts +0 -6
  167. package/@types/model/generic-text-line-recognizer/text-data-scanner-result.d.ts +0 -6
  168. package/@types/model/mrz/mrz-result.d.ts +0 -41
  169. package/@types/model/response/document-quality-analyzer-result.d.ts +0 -8
  170. package/@types/service/image-processor.d.ts +0 -35
  171. package/@types/ui2/configuration/BarcodeResult.d.ts +0 -14
  172. package/@types/utils/networking.d.ts +0 -7
  173. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm.wasm-webpack-file-loader +0 -0
  174. package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.wasm-webpack-file-loader +0 -0
  175. package/bundle/bin/complete/ScanbotSDK.Asm-simd.wasm-webpack-file-loader +0 -0
  176. package/bundle/bin/complete/ScanbotSDK.Asm.wasm-webpack-file-loader +0 -0
  177. package/bundle/bin/document-scanner/ScanbotSDK.Asm.wasm-webpack-file-loader +0 -0
@@ -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
+ }
@@ -0,0 +1,306 @@
1
+ import { DeepPartial, PartiallyConstructible } from "../common";
2
+ import { DetectionResult } from "./DocumentDetectorTypes";
3
+ import { Point } from "../common";
4
+ import { RawImage } from "../common";
5
+ /**
6
+ Parameters for the medical certificate recognition. The recognizer supports
7
+ Form 1 (Arbeitsunfähigkeitsbescheinigung) and
8
+ Form 21a (Ärztliche Bescheinigung für den Bezug von Krankengeld bei Erkrankung eines Kindes)
9
+ from the KBV (Kassenärztliche Bundesvereinigung) list of forms.
10
+
11
+ */
12
+ export declare class RecognitionParameters extends PartiallyConstructible {
13
+ /**
14
+ Document will be detected and cropped before recognition.
15
+ If false, a cropped image of a document is assumed.
16
+ @defaultValue true;
17
+ */
18
+ shouldCropDocument: boolean;
19
+ /**
20
+ All data in the patient info box will be extracted.
21
+ If false, the patient info box is ignored.
22
+ @defaultValue true;
23
+ */
24
+ recognizePatientInfoBox: boolean;
25
+ /**
26
+ Some forms are printed with an extra barcode that encodes the same information as the document.
27
+ Reading the barcode is more reliable than OCR and is recommended when possible.
28
+ If false, the barcode will not be scanned.
29
+ @defaultValue true;
30
+ */
31
+ recognizeBarcode: boolean;
32
+ /**
33
+ If true, cropped document image will be extracted and returned.
34
+ @defaultValue false;
35
+ */
36
+ extractCroppedImage: boolean;
37
+ /**
38
+ If true, the image is sharpened before processing
39
+ @defaultValue false;
40
+ */
41
+ preprocessInput: boolean;
42
+ /** @param source {@displayType `DeepPartial<RecognitionParameters>`} */
43
+ constructor(source?: DeepPartial<RecognitionParameters>);
44
+ }
45
+ /**
46
+ Type of the checkbox
47
+
48
+ - `UNKNOWN`:
49
+ Unknown checkbox type
50
+ - `WORK_ACCIDENT`:
51
+ (Form 1) Work accident (Arbeitsunfall, Arbeitsunfall-folgen, Berufskrankheit) checkbox
52
+ - `ASSIGNED_TO_ACCIDENT_INSURANCE_DOCTOR`:
53
+ (Form 1) Assigned to accident insurance doctor (dem Durchgangsarzt zugewiesen) checkbox
54
+ - `INITIAL_CERTIFICATE`:
55
+ (Form 1) Initial certificate (Erstbescheinigung) checkbox
56
+ - `RENEWED_CERTIFICATE`:
57
+ (Form 1) Renewed certificate (Folgebescheinigung) checkbox
58
+ - `INSURED_PAY_CASE`:
59
+ (Form 1) Insured pay case (ab 7. AU-Woche oder sonstiger Krankengeldfall) checkbox
60
+ - `FINAL_CERTIFICATE`:
61
+ (Form 1) Final certificate (Endbescheinigung) checkbox
62
+ - `REQUIRES_CARE_YES`:
63
+ (Form 21a) Requires care yes (Die Art der Erkrankung macht die Betreuung und Beaufsichtigung notwendig... ja) checkbox
64
+ - `REQUIRES_CARE_NO`:
65
+ (Form 21a) Requires care no (Die Art der Erkrankung macht die Betreuung und Beaufsichtigung notwendig... nein) checkbox
66
+ - `ACCIDENT_YES`:
67
+ (Form 21a) Accident yes (Unfall... ja) checkbox
68
+ - `ACCIDENT_NO`:
69
+ (Form 21a) Accident no (Unfall... nein) checkbox
70
+ - `OTHER_ACCIDENT`:
71
+ (Form 1) Other accident (Sonstiger Unfall, Unfallfolgen) checkbox
72
+ - `ENTITLEMENT_TO_CONTINUED_PAYMENT_YES`:
73
+ (Form 21a) Entitlement to continued payment yes (Anspruch auf Entgeltfortzahlung) checkbox
74
+ - `ENTITLEMENT_TO_CONTINUED_PAYMENT_NO`:
75
+ (Form 21a) Entitlement to continued payment no (keinen Anspruch auf Entgeltfortzahlung) checkbox
76
+ - `SICK_PAY_WAS_CLAIMED_NO`:
77
+ (Form 21a) Sick pay was claimed no (Krankengeld aus Anlass einer früheren Erkrankung des umseitig genannten Kindes wurde in diesem Kalenderjahr NICHT bezogen) checkbox
78
+ - `SICK_PAY_WAS_CLAIMED_YES`:
79
+ (Form 21a) Sick pay was claimed yes (Krankengeld aus Anlass einer früheren Erkrankung des umseitig genannten Kindes wurde in diesem Kalenderjahr bezogen) checkbox
80
+ - `SINGLE_PARENT_NO`:
81
+ (Form 21a) Single parent no (Ich bin Alleinerziehende(r)... nein) checkbox
82
+ - `SINGLE_PARENT_YES`:
83
+ (Form 21a) Single parent yes (Ich bin Alleinerziehende(r)... ja) checkbox
84
+ */
85
+ export type CheckBoxType = "UNKNOWN" | "WORK_ACCIDENT" | "ASSIGNED_TO_ACCIDENT_INSURANCE_DOCTOR" | "INITIAL_CERTIFICATE" | "RENEWED_CERTIFICATE" | "INSURED_PAY_CASE" | "FINAL_CERTIFICATE" | "REQUIRES_CARE_YES" | "REQUIRES_CARE_NO" | "ACCIDENT_YES" | "ACCIDENT_NO" | "OTHER_ACCIDENT" | "ENTITLEMENT_TO_CONTINUED_PAYMENT_YES" | "ENTITLEMENT_TO_CONTINUED_PAYMENT_NO" | "SICK_PAY_WAS_CLAIMED_NO" | "SICK_PAY_WAS_CLAIMED_YES" | "SINGLE_PARENT_NO" | "SINGLE_PARENT_YES";
86
+ /**
87
+ Structure to contain full information about found box
88
+ */
89
+ export declare class CheckBox extends PartiallyConstructible {
90
+ /**
91
+ Box type
92
+ @defaultValue "UNKNOWN";
93
+ */
94
+ readonly type: CheckBoxType;
95
+ /**
96
+ True if the box is checked
97
+ @defaultValue false;
98
+ */
99
+ readonly checked: boolean;
100
+ /**
101
+ Confidence of the checked/unchecked prediction
102
+ @defaultValue 0.0;
103
+ */
104
+ readonly checkedConfidence: number;
105
+ /**
106
+ Points of the box
107
+ */
108
+ readonly quad: Point[];
109
+ /** @param source {@displayType `DeepPartial<CheckBox>`} */
110
+ constructor(source?: DeepPartial<CheckBox>);
111
+ }
112
+ /**
113
+ Type of a date record
114
+
115
+ - `INCAPABLE_OF_WORK_SINCE`:
116
+ (Form 1) Incapable of work since (arbeitsunfähig seit) date
117
+ - `INCAPABLE_OF_WORK_UNTIL`:
118
+ (Form 1) Incapable of work until (voraussichtlich arbeitsunfähig bis einschließlich oder letzter Tag der Arbeitsunfähigkeit) date
119
+ - `DIAGNOSED_ON`:
120
+ (Form 1) Diagnosed on (festgestellt am) date
121
+ - `DOCUMENT_DATE`:
122
+ Document date
123
+ - `BIRTH_DATE`:
124
+ Birthdate (geb. am)
125
+ - `CHILD_NEEDS_CARE_FROM`:
126
+ (Form 21a) Child needs care from (Das genannte Kind bedarf/bedurfte vom) date
127
+ - `CHILD_NEEDS_CARE_UNTIL`:
128
+ (Form 21a) Child needs care until (Das genannte Kind bedarf/bedurfte bis einschließlich) date
129
+ - `UNDEFINED`:
130
+ Undefined date type
131
+ */
132
+ export type DateRecordType = "INCAPABLE_OF_WORK_SINCE" | "INCAPABLE_OF_WORK_UNTIL" | "DIAGNOSED_ON" | "DOCUMENT_DATE" | "BIRTH_DATE" | "CHILD_NEEDS_CARE_FROM" | "CHILD_NEEDS_CARE_UNTIL" | "UNDEFINED";
133
+ /**
134
+ Structure to contain date record information
135
+ */
136
+ export declare class DateRecord extends PartiallyConstructible {
137
+ /**
138
+ Date box
139
+ */
140
+ readonly quad: Point[];
141
+ /**
142
+ Validated date string
143
+ @defaultValue "";
144
+ */
145
+ readonly value: string;
146
+ /**
147
+ Raw date string
148
+ @defaultValue "";
149
+ */
150
+ readonly rawString: string;
151
+ /**
152
+ Date type
153
+ @defaultValue "UNDEFINED";
154
+ */
155
+ readonly type: DateRecordType;
156
+ /**
157
+ Confidence in the recognized value
158
+ @defaultValue 0.0;
159
+ */
160
+ readonly recognitionConfidence: number;
161
+ /** @param source {@displayType `DeepPartial<DateRecord>`} */
162
+ constructor(source?: DeepPartial<DateRecord>);
163
+ }
164
+ /**
165
+ Type of a field in the patient info box
166
+
167
+ - `INSURANCE_PROVIDER`:
168
+ Insurance provider (Krankenkasse bzw. Kostenträger)
169
+ - `FIRST_NAME`:
170
+ First name (Vorname des Versicherten)
171
+ - `LAST_NAME`:
172
+ Last name (Name des Versicherten)
173
+ - `ADDRESS_STRING1`:
174
+ First line of address
175
+ - `ADDRESS_STRING2`:
176
+ Second line of address
177
+ - `DIAGNOSE`:
178
+ Diagnose
179
+ - `HEALTH_INSURANCE_NUMBER`:
180
+ Number of the health insurance provider (Kostenträgerkennung)
181
+ - `INSURED_PERSON_NUMBER`:
182
+ Personal number of the insured person (Versicherten-Nr.)
183
+ - `STATUS`:
184
+ Status
185
+ - `PLACE_OF_OPERATION_NUMBER`:
186
+ Number of the place of operation (Betriebsstätten-Nr.)
187
+ - `DOCTOR_NUMBER`:
188
+ Number of the doctor (Arzt-Nr.)
189
+ - `UNDEFINED`:
190
+ Undefined
191
+ */
192
+ export type PatientInfoFieldType = "INSURANCE_PROVIDER" | "FIRST_NAME" | "LAST_NAME" | "ADDRESS_STRING1" | "ADDRESS_STRING2" | "DIAGNOSE" | "HEALTH_INSURANCE_NUMBER" | "INSURED_PERSON_NUMBER" | "STATUS" | "PLACE_OF_OPERATION_NUMBER" | "DOCTOR_NUMBER" | "UNDEFINED";
193
+ /**
194
+ Patient information field
195
+ */
196
+ export declare class PatientInfoField extends PartiallyConstructible {
197
+ /**
198
+ Field type
199
+ */
200
+ readonly type: PatientInfoFieldType;
201
+ /**
202
+ Field value
203
+ */
204
+ readonly value: string;
205
+ /**
206
+ Confidence in the recognized value
207
+ */
208
+ readonly recognitionConfidence: number;
209
+ /** @param source {@displayType `DeepPartial<PatientInfoField>`} */
210
+ constructor(source?: DeepPartial<PatientInfoField>);
211
+ }
212
+ /**
213
+ Patient information box
214
+ */
215
+ export declare class PatientInfoBox extends PartiallyConstructible {
216
+ /**
217
+ Four corners of the patient info box
218
+ */
219
+ readonly quad: Point[];
220
+ /**
221
+ Vector of found fields
222
+ */
223
+ readonly fields: PatientInfoField[];
224
+ /**
225
+ Whether the patient info box has contents
226
+ @defaultValue false;
227
+ */
228
+ readonly hasContents: boolean;
229
+ /** @param source {@displayType `DeepPartial<PatientInfoBox>`} */
230
+ constructor(source?: DeepPartial<PatientInfoBox>);
231
+ }
232
+ /**
233
+ Type of the medical certificate form
234
+
235
+ - `UNKNOWN`:
236
+ Unknown form type
237
+ - `FORM_1A`:
238
+ Form 1A
239
+ - `FORM_1B`:
240
+ Form 1B
241
+ - `FORM_1C`:
242
+ Form 1C
243
+ - `FORM_1D`:
244
+ Form 1D
245
+ - `FORM_21A`:
246
+ Form 21A
247
+ - `FORM_21A_BACK`:
248
+ Form 21A back
249
+ - `FORM_1B_CUSTOM`:
250
+ Form 1B custom
251
+ */
252
+ export type FormType = "UNKNOWN" | "FORM_1A" | "FORM_1B" | "FORM_1C" | "FORM_1D" | "FORM_21A" | "FORM_21A_BACK" | "FORM_1B_CUSTOM";
253
+ /**
254
+ The result of the medical certificate recognition
255
+ */
256
+ export declare class RecognitionResult extends PartiallyConstructible {
257
+ /**
258
+ True if recognition was successful
259
+ @defaultValue false;
260
+ */
261
+ readonly recognitionSuccessful: boolean;
262
+ /**
263
+ Patient info box
264
+ */
265
+ readonly patientInfoBox: PatientInfoBox;
266
+ /**
267
+ Found checkboxes
268
+ */
269
+ readonly checkBoxes: CheckBox[];
270
+ /**
271
+ Found dates
272
+ */
273
+ readonly dates: DateRecord[];
274
+ /**
275
+ Form type
276
+ @defaultValue "UNKNOWN";
277
+ */
278
+ readonly formType: FormType;
279
+ /**
280
+ The number of 90-degree clockwise rotations that were applied to the original image.
281
+ The same number of counter-clockwise rotations are necessary to make the image upright again.
282
+ @defaultValue 0;
283
+ */
284
+ readonly clockwiseRotations: number;
285
+ /**
286
+ The cropped image used for recognition
287
+ @defaultValue null;
288
+ */
289
+ readonly croppedImage: RawImage | null;
290
+ /**
291
+ The scale factor used to scale the image to the recognition size
292
+ @defaultValue 1.0;
293
+ */
294
+ readonly scaleX: number;
295
+ /**
296
+ The scale factor used to scale the image to the recognition size
297
+ @defaultValue 1.0;
298
+ */
299
+ readonly scaleY: number;
300
+ /**
301
+ The region of interest of the document in the original image
302
+ */
303
+ readonly documentRoi: DetectionResult;
304
+ /** @param source {@displayType `DeepPartial<RecognitionResult>`} */
305
+ constructor(source?: DeepPartial<RecognitionResult>);
306
+ }