scanbot-web-sdk 6.0.0-dev.2 → 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/consume-type.d.ts +2 -1
- package/@types/core/bridge/common.d.ts +1 -1
- package/@types/core/bridge/compiled/BarcodeScannerTypes.d.ts +5 -3
- package/@types/core/bridge/compiled/GDRTypes.d.ts +38 -0
- package/@types/core/bridge/compiled/GenericDocument.d.ts +38 -0
- package/@types/core/bridge/compiled/GenericDocumentRecognizerConfigs.d.ts +183 -0
- package/@types/core/bridge/compiled/GenericDocumentRecognizerTypes.d.ts +7 -6
- package/@types/core/bridge/compiled/GenericDocumentTypes.d.ts +38 -0
- package/@types/core/bridge/compiled/ParametricFilters.d.ts +4 -2
- package/@types/core/bridge/worker-bridge.d.ts +584 -26
- package/@types/core/worker/ScanbotSDK.Core.d.ts +18 -7
- package/@types/core-types.d.ts +3 -1
- package/@types/document-scanner-view.d.ts +3 -1
- package/@types/index.d.ts +39 -4
- package/@types/model/barcode/barcode-result.d.ts +12 -2
- package/@types/model/barcode/barcode.d.ts +2 -1
- package/@types/model/camera-info.d.ts +3 -2
- package/@types/model/configuration/barcode-scanner-configuration.d.ts +6 -3
- package/@types/model/configuration/cropping-view-configuration.d.ts +5 -0
- package/@types/model/configuration/document-scanner-configuration.d.ts +2 -8
- package/@types/model/configuration/generic-document-recognizer-configuration.d.ts +1 -1
- package/@types/model/configuration/initialization-options.d.ts +8 -0
- package/@types/model/configuration/mrz-scanner-configuration.d.ts +1 -1
- package/@types/model/configuration/scanner-configuration.d.ts +7 -0
- package/@types/model/configuration/selection-overlay-configuration.d.ts +2 -2
- package/@types/model/configuration/view-finder-scanner-configuration.d.ts +1 -1
- package/@types/model/error/media-error.d.ts +1 -0
- package/@types/scanbot-sdk.d.ts +355 -52
- package/@types/service/generic-document-recognizer.d.ts +3 -1
- package/@types/service/simple-mrz-recognizer.d.ts +3 -1
- package/@types/service/text-data-recognizer.d.ts +3 -1
- 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 +51 -51
- package/@types/ui2/configuration/BarcodeItemMapper.d.ts +2 -2
- package/@types/ui2/configuration/BarcodeRecognizerConfiguration.d.ts +32 -32
- package/@types/ui2/configuration/BarcodeScannerConfiguration.d.ts +168 -168
- package/@types/ui2/configuration/BarcodeScannerTypes.d.ts +1 -6
- package/@types/ui2/configuration/BarcodeScannerUIResult.d.ts +29 -0
- package/@types/ui2/configuration/BarcodeTextLocalization.d.ts +124 -69
- package/@types/ui2/configuration/BarcodeTypes.d.ts +1 -1
- package/@types/ui2/configuration/BarcodeUseCase.d.ts +4 -3
- package/@types/ui2/configuration/CameraConfiguration.d.ts +32 -32
- package/@types/ui2/configuration/CameraPermission.d.ts +33 -33
- package/@types/ui2/configuration/Common.d.ts +190 -190
- package/@types/ui2/configuration/CommonFieldType.d.ts +1 -0
- package/@types/ui2/configuration/FindAndPickScanningModeUseCase.d.ts +364 -12
- package/@types/ui2/configuration/GenericDocument.d.ts +1 -0
- package/@types/ui2/configuration/MultipleScanningModeUseCase.d.ts +488 -488
- package/@types/ui2/configuration/ScanbotAlertDialog.d.ts +27 -27
- package/@types/ui2/configuration/SingleScanningModeUseCase.d.ts +169 -169
- package/@types/ui2/configuration/TopBarConfiguration.d.ts +36 -36
- package/@types/ui2/configuration/UserGuidanceConfiguration.d.ts +16 -16
- package/@types/ui2/configuration/ViewFinderConfiguration.d.ts +45 -45
- package/@types/ui2/configuration.d.ts +2 -1
- package/@types/ui2/controllers/barcode-scanner-controller.d.ts +2 -2
- package/@types/ui2/controllers/multiple-scanning-mode-controller.d.ts +4 -2
- package/@types/ui2/controllers/single-scanning-mode-controller.d.ts +4 -2
- package/@types/ui2/model/counted-barcodes.d.ts +12 -19
- 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} +4 -16
- 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/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 +5 -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/utils/barcode-utils.d.ts +10 -0
- package/@types/utils/browser-cameras.d.ts +92 -0
- package/@types/utils/dto/Polygon.d.ts +2 -1
- package/@types/utils/stats.d.ts +4 -0
- package/@types/utils/video-stream.d.ts +3 -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/barcode-polygon/animated-barcode-selection-overlay.d.ts +1 -0
- package/@types/view/scanbot-camera-view.d.ts +9 -3
- package/@types/worker/worker-bridge.d.ts +587 -30
- package/bundle/ScanbotSDK.min.js +4 -4
- package/bundle/ScanbotSDK.ui2.min.js +16 -16
- 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 +2 -2
- package/@types/core/bridge/compiled_schemas_v3/BarcodeConfigs.d.ts +0 -973
- package/@types/core/bridge/compiled_schemas_v3/BarcodeScannerTypes.d.ts +0 -183
- package/@types/core/bridge/compiled_schemas_v3/BarcodeTypes.d.ts +0 -183
- package/@types/core/bridge/compiled_schemas_v3/CheckRecognizerTypes.d.ts +0 -29
- package/@types/core/bridge/compiled_schemas_v3/CommonFieldType.d.ts +0 -59
- package/@types/core/bridge/compiled_schemas_v3/DocumentDetectorTypes.d.ts +0 -196
- package/@types/core/bridge/compiled_schemas_v3/DocumentQualityAnalyzerTypes.d.ts +0 -105
- package/@types/core/bridge/compiled_schemas_v3/EhicTypes.d.ts +0 -218
- package/@types/core/bridge/compiled_schemas_v3/FrameUtilities.d.ts +0 -18
- package/@types/core/bridge/compiled_schemas_v3/GenericDocument.d.ts +0 -198
- package/@types/core/bridge/compiled_schemas_v3/GenericDocumentRecognizerTypes.d.ts +0 -104
- package/@types/core/bridge/compiled_schemas_v3/GenericTextLineScannerTypes.d.ts +0 -165
- package/@types/core/bridge/compiled_schemas_v3/Geometry.d.ts +0 -49
- package/@types/core/bridge/compiled_schemas_v3/ImageProcessorTypes.d.ts +0 -13
- package/@types/core/bridge/compiled_schemas_v3/LicensePlateScannerTypes.d.ts +0 -67
- package/@types/core/bridge/compiled_schemas_v3/MRZTypes.d.ts +0 -52
- package/@types/core/bridge/compiled_schemas_v3/MedicalCertificateTypes.d.ts +0 -306
- package/@types/core/bridge/compiled_schemas_v3/OcrElements.d.ts +0 -129
- package/@types/core/bridge/compiled_schemas_v3/ParametricFilters.d.ts +0 -186
- package/@types/core/bridge/compiled_schemas_v3/PdfConfig.d.ts +0 -197
- package/@types/core/bridge/compiled_schemas_v3/TiffTypes.d.ts +0 -183
- package/@types/ui2/configuration/BarcodeItem.d.ts +0 -6
- package/@types/ui2/configuration/utils.d.ts +0 -6
- /package/@types/ui2/views/dialog/{styled-dialog.d.ts → base/styled-dialog.d.ts} +0 -0
package/@types/scanbot-sdk.d.ts
CHANGED
|
@@ -11,7 +11,6 @@ import { PdfGenerator } from './service/pdf-generator';
|
|
|
11
11
|
import { TiffGenerator } from './service/tiff-generator';
|
|
12
12
|
import { PublicUtils } from "./service/public-utils";
|
|
13
13
|
import { Polygon } from "./utils/dto/Polygon";
|
|
14
|
-
import { BarcodeScannerResultWithSize } from "./model/barcode/barcode-result";
|
|
15
14
|
import { MrzScannerConfiguration } from "./model/configuration/mrz-scanner-configuration";
|
|
16
15
|
import { IMrzScannerHandle } from "./interfaces/i-mrz-scanner-handle";
|
|
17
16
|
import SimpleMrzRecognizer from "./service/simple-mrz-recognizer";
|
|
@@ -21,11 +20,13 @@ import { VINScannerConfiguration } from "./model/configuration/vin-scanner-confi
|
|
|
21
20
|
import { ITextDataScannerHandle } from "./interfaces/i-text-data-scanner-handle";
|
|
22
21
|
import DocumentQualityAnalyzer from "./service/document-quality-analyzer";
|
|
23
22
|
import ScanbotSDKUI from "./ui2/scanbot-sdk-ui";
|
|
24
|
-
import { Image, DeepPartial, RawImage, ObjectId } from "./core-types";
|
|
23
|
+
import { Image, DeepPartial, RawImage, ObjectId, Point, GenericTextLineScannerTypes, GenericDocumentRecognizerTypes, TiffTypes, PdfConfig, ParametricFilters, ImageProcessorTypes, DocumentQualityAnalyzerTypes, MRZTypes, BarcodeScannerTypes, CroppedDetectionResult, DocumentDetectorTypes } from "./core-types";
|
|
25
24
|
import * as Config from "./core-types";
|
|
26
25
|
import GenericDocumentRecognizer from "./service/generic-document-recognizer";
|
|
27
26
|
import { GenericDocumentRecognizerConfiguration } from "./model/configuration/generic-document-recognizer-configuration";
|
|
28
27
|
import { ConsumeType } from "./consume-type";
|
|
28
|
+
import { Stats } from "./utils/stats";
|
|
29
|
+
import { BrowserCameras } from "./utils/browser-cameras";
|
|
29
30
|
export default class ScanbotSDK {
|
|
30
31
|
/** @internal */
|
|
31
32
|
bridge: WorkerBridge;
|
|
@@ -50,18 +51,23 @@ export default class ScanbotSDK {
|
|
|
50
51
|
* Image Operations
|
|
51
52
|
*/
|
|
52
53
|
toDataUrl(imageBuffer: ArrayBuffer): Promise<string>;
|
|
53
|
-
/** @param detectionParameters {@displayType `DeepPartial<
|
|
54
|
-
detectDocument(imageBuffer: Image, detectionParameters?: DeepPartial<
|
|
55
|
-
detectAndCropDocument(imageBuffer: Image, consumeImage?: ConsumeType): Promise<
|
|
56
|
-
/**
|
|
57
|
-
|
|
58
|
-
|
|
54
|
+
/** @param detectionParameters {@displayType `DeepPartial<DocumentDetectorTypes.DetectionParameters>`} {@link DocumentDetectorTypes.DetectionParameters}*/
|
|
55
|
+
detectDocument(imageBuffer: Image, detectionParameters?: DeepPartial<DocumentDetectorTypes.DetectionParameters>, consumeImage?: ConsumeType): Promise<DocumentDetectorTypes.DetectionResult>;
|
|
56
|
+
detectAndCropDocument(imageBuffer: Image, consumeImage?: ConsumeType): Promise<CroppedDetectionResult>;
|
|
57
|
+
/**
|
|
58
|
+
* @param image An image URL (e.g. Data URL or HTTP URL) or an Image object
|
|
59
|
+
* @param detectionParameters {@displayType `Omit<DeepPartial<BarcodeScannerTypes.BarcodeRecognizerParameters>, "live">`} {@link BarcodeScannerTypes.BarcodeRecognizerParameters}
|
|
60
|
+
* */
|
|
61
|
+
detectBarcodes(image: string | Image, partialDetectionParameters?: DeepPartial<Omit<BarcodeScannerTypes.BarcodeRecognizerParameters, "live">>, consumeImage?: ConsumeType): Promise<BarcodeScannerTypes.BarcodeScannerResult & {
|
|
62
|
+
originalImage: Image;
|
|
63
|
+
}>;
|
|
64
|
+
parseBarcodeDocument(acceptedDocumentFormats: BarcodeScannerTypes.BarcodeDocumentFormat[], rawBarcodeData: string): Promise<Config.GenericDocument.GenericDocument>;
|
|
59
65
|
createSimpleMRZRecognizer(): Promise<SimpleMrzRecognizer>;
|
|
60
66
|
createOcrEngine(): Promise<OcrEngine>;
|
|
61
|
-
/** @param config {@displayType `DeepPartial<
|
|
62
|
-
createDocumentQualityAnalyzer(config?: DeepPartial<
|
|
63
|
-
imageRotate(image: Image, rotation:
|
|
64
|
-
imageFilter(image: Image, filter:
|
|
67
|
+
/** @param config {@displayType `DeepPartial<DocumentQualityAnalyzerTypes.Config>`} {@link DocumentQualityAnalyzerTypes.Config}*/
|
|
68
|
+
createDocumentQualityAnalyzer(config?: DeepPartial<DocumentQualityAnalyzerTypes.Config>): Promise<DocumentQualityAnalyzer>;
|
|
69
|
+
imageRotate(image: Image, rotation: ImageProcessorTypes.ImageRotation, consumeImage?: ConsumeType): Promise<RawImage>;
|
|
70
|
+
imageFilter(image: Image, filter: ParametricFilters.ParametricFilter, consumeImage?: ConsumeType): Promise<RawImage>;
|
|
65
71
|
/** Crops and stretches the image to the convex hull of the supplied points. All points should have relative coordinates between 0 and 1. */
|
|
66
72
|
imageCrop(image: Image, polygon: Polygon, consumeImage?: ConsumeType): Promise<RawImage>;
|
|
67
73
|
imageResize(image: Image, destinationSize: number, consumeImage?: ConsumeType): Promise<RawImage>;
|
|
@@ -69,12 +75,12 @@ export default class ScanbotSDK {
|
|
|
69
75
|
* Misc. Features
|
|
70
76
|
*/
|
|
71
77
|
getLicenseInfo(): Promise<LicenseInfo>;
|
|
72
|
-
/** @param options {@displayType `DeepPartial<
|
|
73
|
-
beginPdf(options: DeepPartial<
|
|
74
|
-
/** @param options {@displayType `DeepPartial<
|
|
75
|
-
beginTiff(options?: DeepPartial<
|
|
76
|
-
/** @param options {@displayType `DeepPartial<
|
|
77
|
-
createGenericDocumentRecognizer(options: DeepPartial<
|
|
78
|
+
/** @param options {@displayType `DeepPartial<PdfConfig.PdfConfig>`} {@link PdfConfig.PdfConfig}*/
|
|
79
|
+
beginPdf(options: DeepPartial<PdfConfig.PdfConfig>): Promise<PdfGenerator>;
|
|
80
|
+
/** @param options {@displayType `DeepPartial<TiffTypes.TIFFWriterParameters>`} {@link TiffTypes.TIFFWriterParameters} */
|
|
81
|
+
beginTiff(options?: DeepPartial<TiffTypes.TIFFWriterParameters>): Promise<TiffGenerator>;
|
|
82
|
+
/** @param options {@displayType `DeepPartial<GenericDocumentRecognizerTypes.GenericDocumentRecognizerParameters>`} {@link GenericDocumentRecognizerTypes.GenericDocumentRecognizerParameters}*/
|
|
83
|
+
createGenericDocumentRecognizer(options: DeepPartial<GenericDocumentRecognizerTypes.GenericDocumentRecognizerParameters>): Promise<GenericDocumentRecognizer>;
|
|
78
84
|
imageToJpeg(image: Image, consumeImage?: ConsumeType): Promise<Uint8Array>;
|
|
79
85
|
get version(): string;
|
|
80
86
|
private _utils;
|
|
@@ -94,30 +100,255 @@ export default class ScanbotSDK {
|
|
|
94
100
|
acceptedAngleScore?: number;
|
|
95
101
|
acceptedSizeScore?: number;
|
|
96
102
|
acceptedBrightnessThreshold?: number;
|
|
97
|
-
requiredAspectRatios?:
|
|
103
|
+
requiredAspectRatios?: {
|
|
104
|
+
readonly width?: number;
|
|
105
|
+
readonly height?: number;
|
|
106
|
+
_marker?: () => void;
|
|
107
|
+
}[];
|
|
98
108
|
rectangleOfInterest?: Config.Rectangle;
|
|
99
109
|
_marker?: () => void;
|
|
100
|
-
}) => Promise<
|
|
101
|
-
detectAndCropDocument: (image: Image) => Promise<
|
|
110
|
+
}) => Promise<DocumentDetectorTypes.DetectionResult>;
|
|
111
|
+
detectAndCropDocument: (image: Image) => Promise<CroppedDetectionResult>;
|
|
102
112
|
createDocumentDetector: (options: {
|
|
103
113
|
acceptedAngleScore?: number;
|
|
104
114
|
acceptedSizeScore?: number;
|
|
105
115
|
acceptedBrightnessThreshold?: number;
|
|
106
|
-
requiredAspectRatios?:
|
|
116
|
+
requiredAspectRatios?: {
|
|
117
|
+
readonly width?: number;
|
|
118
|
+
readonly height?: number;
|
|
119
|
+
_marker?: () => void;
|
|
120
|
+
}[];
|
|
107
121
|
rectangleOfInterest?: Config.Rectangle;
|
|
108
122
|
_marker?: () => void;
|
|
109
123
|
}) => Promise<ObjectId<"DocumentDetector">>;
|
|
110
|
-
documentDetectorDetect: (documentDetectorToken: ObjectId<"DocumentDetector">, image:
|
|
111
|
-
|
|
124
|
+
documentDetectorDetect: <ImageType extends Image>(documentDetectorToken: ObjectId<"DocumentDetector">, image: ImageType) => Promise<DocumentDetectorTypes.DetectionResult & {
|
|
125
|
+
originalImage: ImageType;
|
|
126
|
+
}>;
|
|
127
|
+
parseBarcodeDocument: (options: BarcodeScannerTypes.BarcodeDocumentFormat[], data: string) => Promise<Config.GenericDocument.GenericDocument>;
|
|
112
128
|
createBarcodeRecognizer: (options: {
|
|
113
|
-
configurators?:
|
|
114
|
-
|
|
129
|
+
configurators?: ({
|
|
130
|
+
readonly _type?: "CodabarConfig";
|
|
131
|
+
readonly minimum1DQuietZoneSize?: number;
|
|
132
|
+
readonly regexFilter?: string;
|
|
133
|
+
readonly minimumTextLength?: number;
|
|
134
|
+
readonly maximumTextLength?: number;
|
|
135
|
+
readonly returnStartEnd?: boolean;
|
|
136
|
+
_marker?: () => void;
|
|
137
|
+
} | {
|
|
138
|
+
readonly _type?: "Code11Config";
|
|
139
|
+
readonly minimum1DQuietZoneSize?: number;
|
|
140
|
+
readonly regexFilter?: string;
|
|
141
|
+
readonly stripCheckDigits?: boolean;
|
|
142
|
+
readonly minimumTextLength?: number;
|
|
143
|
+
readonly maximumTextLength?: number;
|
|
144
|
+
readonly checksum?: boolean;
|
|
145
|
+
_marker?: () => void;
|
|
146
|
+
} | {
|
|
147
|
+
readonly _type?: "Code39Config";
|
|
148
|
+
readonly minimum1DQuietZoneSize?: number;
|
|
149
|
+
readonly regexFilter?: string;
|
|
150
|
+
readonly stripCheckDigits?: boolean;
|
|
151
|
+
readonly minimumTextLength?: number;
|
|
152
|
+
readonly maximumTextLength?: number;
|
|
153
|
+
readonly code32?: boolean;
|
|
154
|
+
readonly code39?: boolean;
|
|
155
|
+
readonly pzn?: boolean;
|
|
156
|
+
readonly tryCode39ExtendedMode?: boolean;
|
|
157
|
+
readonly useCode39CheckDigit?: boolean;
|
|
158
|
+
_marker?: () => void;
|
|
159
|
+
} | {
|
|
160
|
+
readonly _type?: "Code93Config";
|
|
161
|
+
readonly minimum1DQuietZoneSize?: number;
|
|
162
|
+
readonly regexFilter?: string;
|
|
163
|
+
readonly minimumTextLength?: number;
|
|
164
|
+
readonly maximumTextLength?: number;
|
|
165
|
+
_marker?: () => void;
|
|
166
|
+
} | {
|
|
167
|
+
readonly _type?: "Code128Config";
|
|
168
|
+
readonly minimum1DQuietZoneSize?: number;
|
|
169
|
+
readonly regexFilter?: string;
|
|
170
|
+
readonly gs1Handling?: Config.BarcodeTypes.GS1Handling;
|
|
171
|
+
readonly minimumTextLength?: number;
|
|
172
|
+
readonly maximumTextLength?: number;
|
|
173
|
+
_marker?: () => void;
|
|
174
|
+
} | {
|
|
175
|
+
readonly _type?: "Code2Of5Config";
|
|
176
|
+
readonly minimum1DQuietZoneSize?: number;
|
|
177
|
+
readonly regexFilter?: string;
|
|
178
|
+
readonly stripCheckDigits?: boolean;
|
|
179
|
+
readonly minimumTextLength?: number;
|
|
180
|
+
readonly maximumTextLength?: number;
|
|
181
|
+
readonly iata2of5?: boolean;
|
|
182
|
+
readonly code25?: boolean;
|
|
183
|
+
readonly industrial2of5?: boolean;
|
|
184
|
+
readonly useIATA2OF5Checksum?: boolean;
|
|
185
|
+
_marker?: () => void;
|
|
186
|
+
} | {
|
|
187
|
+
readonly _type?: "DataBarConfig";
|
|
188
|
+
readonly minimum1DQuietZoneSize?: number;
|
|
189
|
+
readonly regexFilter?: string;
|
|
190
|
+
readonly gs1Handling?: Config.BarcodeTypes.GS1Handling;
|
|
191
|
+
_marker?: () => void;
|
|
192
|
+
} | {
|
|
193
|
+
readonly _type?: "DataBarExpandedConfig";
|
|
194
|
+
readonly minimum1DQuietZoneSize?: number;
|
|
195
|
+
readonly regexFilter?: string;
|
|
196
|
+
readonly gs1Handling?: Config.BarcodeTypes.GS1Handling;
|
|
197
|
+
_marker?: () => void;
|
|
198
|
+
} | {
|
|
199
|
+
readonly _type?: "DataBarLimitedConfig";
|
|
200
|
+
readonly minimum1DQuietZoneSize?: number;
|
|
201
|
+
readonly regexFilter?: string;
|
|
202
|
+
readonly gs1Handling?: Config.BarcodeTypes.GS1Handling;
|
|
203
|
+
_marker?: () => void;
|
|
204
|
+
} | {
|
|
205
|
+
readonly _type?: "ITFConfig";
|
|
206
|
+
readonly minimum1DQuietZoneSize?: number;
|
|
207
|
+
readonly regexFilter?: string;
|
|
208
|
+
readonly minimumTextLength?: number;
|
|
209
|
+
readonly maximumTextLength?: number;
|
|
210
|
+
_marker?: () => void;
|
|
211
|
+
} | {
|
|
212
|
+
readonly _type?: "MSIPlesseyConfig";
|
|
213
|
+
readonly minimum1DQuietZoneSize?: number;
|
|
214
|
+
readonly regexFilter?: string;
|
|
215
|
+
readonly stripCheckDigits?: boolean;
|
|
216
|
+
readonly minimumTextLength?: number;
|
|
217
|
+
readonly maximumTextLength?: number;
|
|
218
|
+
readonly checksumAlgorithms?: Config.BarcodeConfigs.MSIPlesseyChecksumAlgorithm[];
|
|
219
|
+
_marker?: () => void;
|
|
220
|
+
} | {
|
|
221
|
+
readonly _type?: "UpcEanConfig";
|
|
222
|
+
readonly minimum1DQuietZoneSize?: number;
|
|
223
|
+
readonly regexFilter?: string;
|
|
224
|
+
readonly stripCheckDigits?: boolean;
|
|
225
|
+
readonly ean8?: boolean;
|
|
226
|
+
readonly ean13?: boolean;
|
|
227
|
+
readonly upca?: boolean;
|
|
228
|
+
readonly upce?: boolean;
|
|
229
|
+
readonly extensions?: Config.BarcodeTypes.UpcEanExtensionBehavior;
|
|
230
|
+
_marker?: () => void;
|
|
231
|
+
} | {
|
|
232
|
+
readonly _type?: "PharmaCodeConfig";
|
|
233
|
+
readonly minimum1DQuietZoneSize?: number;
|
|
234
|
+
readonly regexFilter?: string;
|
|
235
|
+
readonly minimumValue?: number;
|
|
236
|
+
readonly allowNarrowBarsOnly?: boolean;
|
|
237
|
+
readonly allowWideBarsOnly?: boolean;
|
|
238
|
+
_marker?: () => void;
|
|
239
|
+
} | {
|
|
240
|
+
readonly _type?: "AztecConfig";
|
|
241
|
+
readonly regexFilter?: string;
|
|
242
|
+
readonly gs1Handling?: Config.BarcodeTypes.GS1Handling;
|
|
243
|
+
_marker?: () => void;
|
|
244
|
+
} | {
|
|
245
|
+
readonly _type?: "QRCodeConfig";
|
|
246
|
+
readonly regexFilter?: string;
|
|
247
|
+
readonly gs1Handling?: Config.BarcodeTypes.GS1Handling;
|
|
248
|
+
readonly strictMode?: boolean;
|
|
249
|
+
readonly qr?: boolean;
|
|
250
|
+
readonly microQr?: boolean;
|
|
251
|
+
readonly rmqr?: boolean;
|
|
252
|
+
_marker?: () => void;
|
|
253
|
+
} | {
|
|
254
|
+
readonly _type?: "PDF417Config";
|
|
255
|
+
readonly regexFilter?: string;
|
|
256
|
+
readonly gs1Handling?: Config.BarcodeTypes.GS1Handling;
|
|
257
|
+
readonly strictMode?: boolean;
|
|
258
|
+
_marker?: () => void;
|
|
259
|
+
} | {
|
|
260
|
+
readonly _type?: "MicroPDF417Config";
|
|
261
|
+
readonly regexFilter?: string;
|
|
262
|
+
readonly gs1Handling?: Config.BarcodeTypes.GS1Handling;
|
|
263
|
+
readonly strictMode?: boolean;
|
|
264
|
+
_marker?: () => void;
|
|
265
|
+
} | {
|
|
266
|
+
readonly _type?: "DataMatrixConfig";
|
|
267
|
+
readonly regexFilter?: string;
|
|
268
|
+
readonly gs1Handling?: Config.BarcodeTypes.GS1Handling;
|
|
269
|
+
_marker?: () => void;
|
|
270
|
+
} | {
|
|
271
|
+
readonly _type?: "MaxiCodeConfig";
|
|
272
|
+
readonly regexFilter?: string;
|
|
273
|
+
_marker?: () => void;
|
|
274
|
+
} | {
|
|
275
|
+
readonly _type?: "AustraliaPostConfig";
|
|
276
|
+
readonly regexFilter?: string;
|
|
277
|
+
readonly australiaPostCustomerFormat?: Config.BarcodeConfigs.AustraliaPostCustomerFormat;
|
|
278
|
+
_marker?: () => void;
|
|
279
|
+
} | {
|
|
280
|
+
readonly _type?: "JapanPostConfig";
|
|
281
|
+
readonly regexFilter?: string;
|
|
282
|
+
_marker?: () => void;
|
|
283
|
+
} | {
|
|
284
|
+
readonly _type?: "RoyalMailConfig";
|
|
285
|
+
readonly regexFilter?: string;
|
|
286
|
+
readonly stripCheckDigits?: boolean;
|
|
287
|
+
_marker?: () => void;
|
|
288
|
+
} | {
|
|
289
|
+
readonly _type?: "RoyalTNTPostConfig";
|
|
290
|
+
readonly regexFilter?: string;
|
|
291
|
+
_marker?: () => void;
|
|
292
|
+
} | {
|
|
293
|
+
readonly _type?: "USPSIntelligentMailConfig";
|
|
294
|
+
readonly regexFilter?: string;
|
|
295
|
+
_marker?: () => void;
|
|
296
|
+
} | {
|
|
297
|
+
readonly _type?: "PharmaCodeTwoTrackConfig";
|
|
298
|
+
readonly regexFilter?: string;
|
|
299
|
+
readonly minimumValue?: number;
|
|
300
|
+
_marker?: () => void;
|
|
301
|
+
} | {
|
|
302
|
+
readonly _type?: "GS1CompositeConfig";
|
|
303
|
+
readonly regexFilter?: string;
|
|
304
|
+
readonly minimum1DQuietZoneSize?: number;
|
|
305
|
+
readonly gs1Handling?: Config.BarcodeTypes.GS1Handling;
|
|
306
|
+
readonly strictMode?: boolean;
|
|
307
|
+
_marker?: () => void;
|
|
308
|
+
} | {
|
|
309
|
+
readonly _type?: "GroupOneDConfig";
|
|
310
|
+
readonly regexFilter?: string;
|
|
311
|
+
readonly minimum1DQuietZoneSize?: number;
|
|
312
|
+
readonly stripCheckDigits?: boolean;
|
|
313
|
+
readonly minimumTextLength?: number;
|
|
314
|
+
readonly maximumTextLength?: number;
|
|
315
|
+
readonly gs1Handling?: Config.BarcodeTypes.GS1Handling;
|
|
316
|
+
readonly strictMode?: boolean;
|
|
317
|
+
readonly formats?: Config.BarcodeTypes.BarcodeFormat[];
|
|
318
|
+
_marker?: () => void;
|
|
319
|
+
} | {
|
|
320
|
+
readonly _type?: "GroupTwoDConfig";
|
|
321
|
+
readonly regexFilter?: string;
|
|
322
|
+
readonly gs1Handling?: Config.BarcodeTypes.GS1Handling;
|
|
323
|
+
readonly strictMode?: boolean;
|
|
324
|
+
readonly formats?: Config.BarcodeTypes.BarcodeFormat[];
|
|
325
|
+
_marker?: () => void;
|
|
326
|
+
} | {
|
|
327
|
+
readonly _type?: "GroupFourStateConfig";
|
|
328
|
+
readonly regexFilter?: string;
|
|
329
|
+
readonly formats?: Config.BarcodeTypes.BarcodeFormat[];
|
|
330
|
+
_marker?: () => void;
|
|
331
|
+
} | {
|
|
332
|
+
readonly _type?: "GroupCommonConfig";
|
|
333
|
+
readonly regexFilter?: string;
|
|
334
|
+
readonly minimum1DQuietZoneSize?: number;
|
|
335
|
+
readonly stripCheckDigits?: boolean;
|
|
336
|
+
readonly minimumTextLength?: number;
|
|
337
|
+
readonly maximumTextLength?: number;
|
|
338
|
+
readonly gs1Handling?: Config.BarcodeTypes.GS1Handling;
|
|
339
|
+
readonly strictMode?: boolean;
|
|
340
|
+
readonly formats?: Config.BarcodeTypes.BarcodeFormat[];
|
|
341
|
+
_marker?: () => void;
|
|
342
|
+
})[];
|
|
343
|
+
engineMode?: BarcodeScannerTypes.EngineMode;
|
|
115
344
|
live?: boolean;
|
|
116
|
-
acceptedDocumentFormats?:
|
|
345
|
+
acceptedDocumentFormats?: BarcodeScannerTypes.BarcodeDocumentFormat[];
|
|
117
346
|
returnBarcodeImage?: boolean;
|
|
118
347
|
_marker?: () => void;
|
|
119
348
|
}) => Promise<ObjectId<"BarcodeRecognizer">>;
|
|
120
|
-
recognizeBarcodes: (barcodeRecognizerToken: ObjectId<"BarcodeRecognizer">, image:
|
|
349
|
+
recognizeBarcodes: <ImageType_1 extends Image>(barcodeRecognizerToken: ObjectId<"BarcodeRecognizer">, image: ImageType_1) => Promise<BarcodeScannerTypes.BarcodeScannerResult & {
|
|
350
|
+
originalImage: ImageType_1;
|
|
351
|
+
}>;
|
|
121
352
|
beginPdf: (options: {
|
|
122
353
|
readonly attributes?: {
|
|
123
354
|
readonly author?: string;
|
|
@@ -127,32 +358,49 @@ export default class ScanbotSDK {
|
|
|
127
358
|
readonly keywords?: string;
|
|
128
359
|
_marker?: () => void;
|
|
129
360
|
};
|
|
130
|
-
readonly pageSize?:
|
|
131
|
-
readonly pageDirection?:
|
|
132
|
-
readonly pageFit?:
|
|
361
|
+
readonly pageSize?: PdfConfig.PageSize;
|
|
362
|
+
readonly pageDirection?: PdfConfig.PageDirection;
|
|
363
|
+
readonly pageFit?: PdfConfig.PageFit;
|
|
133
364
|
readonly dpi?: number;
|
|
134
365
|
readonly jpegQuality?: number;
|
|
135
|
-
readonly resamplingMethod?:
|
|
366
|
+
readonly resamplingMethod?: PdfConfig.ResamplingMethod;
|
|
136
367
|
_marker?: () => void;
|
|
137
368
|
}) => Promise<ObjectId<"PdfGenerationContext">>;
|
|
138
369
|
addPageToPdf: (pdfOperation: ObjectId<"PdfGenerationContext">, image: Image) => Promise<void>;
|
|
139
370
|
completePdf: (pdfOperation: ObjectId<"PdfGenerationContext">) => Promise<Uint8Array>;
|
|
140
371
|
beginTiff: (options: {
|
|
141
|
-
compression?:
|
|
372
|
+
compression?: TiffTypes.CompressionMode;
|
|
142
373
|
jpegQuality?: number;
|
|
143
374
|
zipCompressionLevel?: number;
|
|
144
375
|
dpi?: number;
|
|
145
|
-
userFields?:
|
|
376
|
+
userFields?: {
|
|
377
|
+
readonly tag?: number;
|
|
378
|
+
readonly name?: string;
|
|
379
|
+
readonly value?: {
|
|
380
|
+
readonly _type?: "UserFieldDoubleValue";
|
|
381
|
+
readonly value?: number;
|
|
382
|
+
_marker?: () => void;
|
|
383
|
+
} | {
|
|
384
|
+
readonly _type?: "UserFieldStringValue";
|
|
385
|
+
readonly value?: string;
|
|
386
|
+
_marker?: () => void;
|
|
387
|
+
} | {
|
|
388
|
+
readonly _type?: "UserFieldIntValue";
|
|
389
|
+
readonly value?: number;
|
|
390
|
+
_marker?: () => void;
|
|
391
|
+
};
|
|
392
|
+
_marker?: () => void;
|
|
393
|
+
}[];
|
|
146
394
|
binarizationFilter?: {
|
|
147
395
|
readonly _type?: "ScanbotBinarizationFilter";
|
|
148
|
-
outputMode?:
|
|
396
|
+
outputMode?: ParametricFilters.OutputMode;
|
|
149
397
|
_marker?: () => void;
|
|
150
398
|
} | {
|
|
151
399
|
readonly _type?: "CustomBinarizationFilter";
|
|
152
|
-
outputMode?:
|
|
400
|
+
outputMode?: ParametricFilters.OutputMode;
|
|
153
401
|
denoise?: number;
|
|
154
402
|
radius?: number;
|
|
155
|
-
preset?:
|
|
403
|
+
preset?: ParametricFilters.BinarizationFilterPreset;
|
|
156
404
|
_marker?: () => void;
|
|
157
405
|
} | {
|
|
158
406
|
readonly _type?: "ColorDocumentFilter";
|
|
@@ -183,7 +431,7 @@ export default class ScanbotSDK {
|
|
|
183
431
|
};
|
|
184
432
|
_marker?: () => void;
|
|
185
433
|
}) => Promise<ObjectId<"TiffGenerationContext">>;
|
|
186
|
-
addPageToTiff: (tiffOperation: ObjectId<"TiffGenerationContext">, image: Image, binarize:
|
|
434
|
+
addPageToTiff: (tiffOperation: ObjectId<"TiffGenerationContext">, image: Image, binarize: TiffTypes.Binarize) => Promise<unknown>;
|
|
187
435
|
completeTiff: (tiffOperation: ObjectId<"TiffGenerationContext">) => Promise<Uint8Array>;
|
|
188
436
|
createMRZRecognizer: (configuration: {
|
|
189
437
|
accumulatedResultsVerifierConfig?: {
|
|
@@ -193,7 +441,9 @@ export default class ScanbotSDK {
|
|
|
193
441
|
};
|
|
194
442
|
_marker?: () => void;
|
|
195
443
|
}) => Promise<ObjectId<"MrzRecognizerContext">>;
|
|
196
|
-
recognizeMRZ: (mrzRecognizerToken: ObjectId<"MrzRecognizerContext">, image:
|
|
444
|
+
recognizeMRZ: <ImageType_2 extends Image>(mrzRecognizerToken: ObjectId<"MrzRecognizerContext">, image: ImageType_2) => Promise<MRZTypes.RecognitionResult & {
|
|
445
|
+
originalImage: ImageType_2;
|
|
446
|
+
}>;
|
|
197
447
|
releaseObject: <T>(objectToken: ObjectId<T>) => Promise<void>;
|
|
198
448
|
createOcrEngine: () => Promise<ObjectId<"TLDROcrContext">>;
|
|
199
449
|
performOcr: (tldrOcrToken: ObjectId<"TLDROcrContext">, image: Image) => Promise<Config.OcrElements.Page>;
|
|
@@ -218,11 +468,17 @@ export default class ScanbotSDK {
|
|
|
218
468
|
};
|
|
219
469
|
_marker?: () => void;
|
|
220
470
|
}) => Promise<ObjectId<"GenericTextLineScanner">>;
|
|
221
|
-
recognizeTextLine: (scannerToken: ObjectId<"GenericTextLineScanner">, image:
|
|
471
|
+
recognizeTextLine: <ImageType_3 extends Image>(scannerToken: ObjectId<"GenericTextLineScanner">, image: ImageType_3) => Promise<GenericTextLineScannerTypes.ScannerResult & {
|
|
472
|
+
originalImage: ImageType_3;
|
|
473
|
+
}>;
|
|
222
474
|
cleanTextLineRecognitionQueue: (scannerToken: ObjectId<"GenericTextLineScanner">) => Promise<void>;
|
|
223
475
|
createDocumentQualityAnalyzer: (options: {
|
|
224
|
-
readonly qualityThresholds?:
|
|
225
|
-
|
|
476
|
+
readonly qualityThresholds?: {
|
|
477
|
+
readonly symbolQuality?: number;
|
|
478
|
+
readonly symbolRatio?: number;
|
|
479
|
+
_marker?: () => void;
|
|
480
|
+
}[];
|
|
481
|
+
readonly qualityIndices?: DocumentQualityAnalyzerTypes.Quality[];
|
|
226
482
|
readonly maxImageSize?: number;
|
|
227
483
|
minEstimatedNumberOfSymbolsForDocument?: number;
|
|
228
484
|
readonly minProcessedFraction?: number;
|
|
@@ -231,12 +487,12 @@ export default class ScanbotSDK {
|
|
|
231
487
|
readonly tileSize?: number;
|
|
232
488
|
_marker?: () => void;
|
|
233
489
|
}) => Promise<ObjectId<"DocumentQualityAnalyzer">>;
|
|
234
|
-
documentQualityAnalyzerAnalyze: (dqaToken: ObjectId<"DocumentQualityAnalyzer">, image: Image) => Promise<
|
|
235
|
-
imageApplyFilter: (image: Image, filter: DeepPartial<
|
|
236
|
-
imageCrop: (image: Image, polygon: [
|
|
490
|
+
documentQualityAnalyzerAnalyze: (dqaToken: ObjectId<"DocumentQualityAnalyzer">, image: Image) => Promise<DocumentQualityAnalyzerTypes.AnalysisResult>;
|
|
491
|
+
imageApplyFilter: (image: Image, filter: DeepPartial<ParametricFilters.ParametricFilter>) => Promise<RawImage>;
|
|
492
|
+
imageCrop: (image: Image, polygon: [Point, Point, Point, Point]) => Promise<RawImage>;
|
|
237
493
|
imageResize: (image: Image, destinationSize: number) => Promise<RawImage>;
|
|
238
|
-
imageRotate: (image: Image, rotations:
|
|
239
|
-
genericDocumentRecognizerCreate: (
|
|
494
|
+
imageRotate: (image: Image, rotations: ImageProcessorTypes.ImageRotation) => Promise<RawImage>;
|
|
495
|
+
genericDocumentRecognizerCreate: (parameters: {
|
|
240
496
|
resultAccumulationConfig?: {
|
|
241
497
|
minConfirmations?: number;
|
|
242
498
|
minConfidenceForStableField?: number;
|
|
@@ -244,18 +500,65 @@ export default class ScanbotSDK {
|
|
|
244
500
|
_marker?: () => void;
|
|
245
501
|
};
|
|
246
502
|
fieldExcludeList?: string[];
|
|
247
|
-
|
|
503
|
+
configurations?: ({
|
|
504
|
+
readonly _type?: "DateValidationConfig";
|
|
505
|
+
readonly minBirthYear?: number;
|
|
506
|
+
readonly maxBirthYear?: number;
|
|
507
|
+
readonly minExpirationYear?: number;
|
|
508
|
+
readonly maxExpirationYear?: number;
|
|
509
|
+
readonly documentTypes?: Config.GenericDocumentTypes.DocumentType[];
|
|
510
|
+
_marker?: () => void;
|
|
511
|
+
} | {
|
|
512
|
+
readonly _type?: "EuropeanHealthInsuranceCardConfig";
|
|
513
|
+
readonly minBirthYear?: number;
|
|
514
|
+
readonly maxBirthYear?: number;
|
|
515
|
+
readonly minExpirationYear?: number;
|
|
516
|
+
readonly maxExpirationYear?: number;
|
|
517
|
+
readonly expectedCountry?: Config.GenericDocumentRecognizerConfigs.EHICIssuingCountry;
|
|
518
|
+
_marker?: () => void;
|
|
519
|
+
} | {
|
|
520
|
+
readonly _type?: "MRZFallbackConfig";
|
|
521
|
+
readonly acceptedCountries?: string[];
|
|
522
|
+
readonly acceptedMRZTypes?: MRZTypes.DocumentType[];
|
|
523
|
+
_marker?: () => void;
|
|
524
|
+
} | {
|
|
525
|
+
readonly _type?: "GDRGroupConfig";
|
|
526
|
+
readonly acceptedDocumentTypes?: Config.GenericDocumentTypes.DocumentType[];
|
|
527
|
+
_marker?: () => void;
|
|
528
|
+
})[];
|
|
248
529
|
_marker?: () => void;
|
|
249
530
|
}) => Promise<ObjectId<"GenericDocumentRecognizer">>;
|
|
250
|
-
genericDocumentRecognizerRecognize: (gdrToken: ObjectId<"GenericDocumentRecognizer">, image:
|
|
251
|
-
mode?:
|
|
531
|
+
genericDocumentRecognizerRecognize: <ImageType_4 extends Image>(gdrToken: ObjectId<"GenericDocumentRecognizer">, image: ImageType_4, parameters: {
|
|
532
|
+
mode?: GenericDocumentRecognizerTypes.RecognitionMode;
|
|
252
533
|
_marker?: () => void;
|
|
253
|
-
}) => Promise<
|
|
534
|
+
}) => Promise<GenericDocumentRecognizerTypes.RecognitionResult & {
|
|
535
|
+
originalImage: ImageType_4;
|
|
536
|
+
}>;
|
|
537
|
+
version: () => Promise<string>;
|
|
254
538
|
__hasModuleFunction: (functionName: string) => Promise<any>;
|
|
255
539
|
__callModuleFunction: (functionName: string, args?: any[]) => Promise<any>;
|
|
256
540
|
};
|
|
257
541
|
private licenseCheck;
|
|
258
|
-
/** @param partialConfig {@displayType `DeepPartial<
|
|
542
|
+
/** @param partialConfig {@displayType `DeepPartial<GenericTextLineScannerTypes.ScannerConfiguration>`} {@link GenericTextLineScannerTypes.ScannerConfiguration}*/
|
|
259
543
|
private createGenericTextLineScanner;
|
|
544
|
+
/**
|
|
545
|
+
* This method will destroy all web workers and free the memory held by the
|
|
546
|
+
* SDK (after the next run of the garbage collector).
|
|
547
|
+
*
|
|
548
|
+
* This function should not be called while a scanner is open or an API call is pending.
|
|
549
|
+
* If you do call this function while a scanner is open, the scanner will stop detecting anything,
|
|
550
|
+
* but the video will keep running. If you call this function while an API call is pending, that
|
|
551
|
+
* pending API call might never finish.
|
|
552
|
+
*
|
|
553
|
+
* After calling this function, no further calls to this object are allowed. To further use the SDK,
|
|
554
|
+
* it needs to be initialized again.
|
|
555
|
+
*/
|
|
556
|
+
destroy(): void;
|
|
557
|
+
static cameras: BrowserCameras;
|
|
260
558
|
static Config: typeof Config;
|
|
559
|
+
/**
|
|
560
|
+
* Used for testing purposes only.
|
|
561
|
+
* @internal
|
|
562
|
+
*/
|
|
563
|
+
static _stats: Stats;
|
|
261
564
|
}
|
|
@@ -6,6 +6,8 @@ export default class GenericDocumentRecognizer {
|
|
|
6
6
|
private _recognizer;
|
|
7
7
|
/** @internal */
|
|
8
8
|
constructor(_sdk: ScanbotSDK, _recognizer: ObjectId<"GenericDocumentRecognizer">);
|
|
9
|
-
recognize(image:
|
|
9
|
+
recognize<ImageType extends Image>(image: ImageType, parameters: DeepPartial<GenericDocumentRecognizerTypes.RecognitionParameters>, consumeImage?: ConsumeType): Promise<GenericDocumentRecognizerTypes.RecognitionResult & {
|
|
10
|
+
originalImage: ImageType;
|
|
11
|
+
}>;
|
|
10
12
|
release(): Promise<void>;
|
|
11
13
|
}
|
|
@@ -5,7 +5,9 @@ export default class SimpleMrzRecognizer {
|
|
|
5
5
|
private _sdk;
|
|
6
6
|
private _mrzRecognizerToken;
|
|
7
7
|
constructor(_sdk: ScanbotSDK, _mrzRecognizerToken: Promise<ObjectId<"MrzRecognizerContext">>);
|
|
8
|
-
recognize(image:
|
|
8
|
+
recognize<ImageType extends Image>(image: ImageType, consumeImage?: ConsumeType): Promise<MRZTypes.RecognitionResult & {
|
|
9
|
+
originalImage: ImageType;
|
|
10
|
+
}>;
|
|
9
11
|
recognizeURL(imageURL: string): Promise<MRZTypes.RecognitionResult | undefined>;
|
|
10
12
|
release(): Promise<void>;
|
|
11
13
|
}
|
|
@@ -5,7 +5,9 @@ export default class TextDataScanner {
|
|
|
5
5
|
private _sdk;
|
|
6
6
|
private _textDataScannerToken;
|
|
7
7
|
constructor(_sdk: ScanbotSDK, _textDataScannerToken: Promise<ObjectId<"GenericTextLineScanner">>);
|
|
8
|
-
recognize(image:
|
|
8
|
+
recognize<ImageType extends Image>(image: ImageType, consumeImage?: ConsumeType): Promise<GenericTextLineScannerTypes.ScannerResult & {
|
|
9
|
+
originalImage: ImageType;
|
|
10
|
+
}>;
|
|
9
11
|
cleanRecognitionQueue(): Promise<void>;
|
|
10
12
|
recognizeURL(imageURL: string): Promise<GenericTextLineScannerTypes.ScannerResult>;
|
|
11
13
|
release(): Promise<void>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type { Point, RawImage } from '../core-types';
|
|
2
|
+
import { Point, Rectangle, Image } from '../core-types';
|
|
3
|
+
type TypesThatAreOpaqueToDeepPartial = Function | Image | Point | Rectangle;
|
|
4
|
+
export type DeepPartial<T> = T extends TypesThatAreOpaqueToDeepPartial ? T : T extends Array<infer I> ? DeepPartial<I>[] : T extends object ? {
|
|
5
|
+
[P in keyof T]?: DeepPartial<T[P]>;
|
|
6
|
+
} : T;
|
|
7
|
+
export declare abstract class PartiallyConstructible {
|
|
8
|
+
}
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { DeepPartial, PartiallyConstructible } from "
|
|
1
|
+
import { DeepPartial, PartiallyConstructible } from "../common";
|
|
2
2
|
import { RoundButton } from "./Common";
|
|
3
3
|
/**
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
Configuration of the buttons available in the action bar.
|
|
5
|
+
*/
|
|
6
6
|
export declare class ActionBarConfiguration extends PartiallyConstructible {
|
|
7
7
|
/**
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
Appearance of the flash button.
|
|
9
|
+
@defaultValue new RoundButton({
|
|
10
|
+
"visible": true,
|
|
11
|
+
"backgroundColor": "?sbColorSurfaceHigh",
|
|
12
|
+
"foregroundColor": "?sbColorOnPrimary",
|
|
13
|
+
"activeBackgroundColor": "?sbColorWarning",
|
|
14
|
+
"activeForegroundColor": "#1C1B1F"
|
|
15
|
+
});
|
|
16
|
+
*/
|
|
17
17
|
flashButton: RoundButton;
|
|
18
18
|
/**
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
19
|
+
Appearance of the zoom button.
|
|
20
|
+
@defaultValue new RoundButton({
|
|
21
|
+
"visible": true,
|
|
22
|
+
"backgroundColor": "?sbColorSurfaceHigh",
|
|
23
|
+
"foregroundColor": "?sbColorOnPrimary",
|
|
24
|
+
"activeBackgroundColor": "?sbColorSurfaceHigh",
|
|
25
|
+
"activeForegroundColor": "?sbColorOnPrimary"
|
|
26
|
+
});
|
|
27
|
+
*/
|
|
28
28
|
zoomButton: RoundButton;
|
|
29
29
|
/**
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
30
|
+
Appearance of the flip camera button.
|
|
31
|
+
@defaultValue new RoundButton({
|
|
32
|
+
"visible": true,
|
|
33
|
+
"backgroundColor": "?sbColorSurfaceHigh",
|
|
34
|
+
"foregroundColor": "?sbColorOnPrimary",
|
|
35
|
+
"activeBackgroundColor": "?sbColorSurfaceHigh",
|
|
36
|
+
"activeForegroundColor": "?sbColorOnPrimary"
|
|
37
|
+
});
|
|
38
|
+
*/
|
|
39
39
|
flipCameraButton: RoundButton;
|
|
40
40
|
/** @param source {@displayType `DeepPartial<ActionBarConfiguration>`} */
|
|
41
41
|
constructor(source?: DeepPartial<ActionBarConfiguration>);
|