scanbot-web-sdk 7.0.0-dev.1 → 7.0.0-dev.4
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 +6 -6
- package/@types/core/bridge/compiled/BarcodeDocumentModel.d.ts +1421 -0
- package/@types/core/bridge/compiled/CheckDocumentModel.d.ts +130 -0
- package/@types/core/bridge/compiled/CreditCardDocumentModel.d.ts +16 -0
- package/@types/core/bridge/compiled/DocumentsModel.d.ts +489 -0
- package/@types/core/bridge/compiled/TextPatternScannerTypes.d.ts +1 -21
- package/@types/core/bridge/compiled/VinScannerTypes.d.ts +79 -0
- package/@types/core/bridge/worker-bridge.d.ts +26 -12
- package/@types/core/worker/ScanbotSDK.Core.d.ts +8 -2
- package/@types/core-types.d.ts +28 -23
- package/@types/cropping-view.d.ts +2 -2
- package/@types/document-data-extractor-view.d.ts +3 -3
- package/@types/document-scanner-view.d.ts +6 -6
- package/@types/index.d.ts +7 -33
- package/@types/model/barcode/barcode-result.d.ts +3 -7
- package/@types/model/barcode/barcode.d.ts +4 -4
- package/@types/model/configuration/{barcode-scanner-configuration.d.ts → barcode-scanner-view-configuration.d.ts} +5 -5
- package/@types/model/configuration/document-data-extractor-view-configuration.d.ts +9 -0
- package/@types/model/configuration/{document-scanner-configuration.d.ts → document-scanner-view-configuration.d.ts} +7 -7
- package/@types/model/configuration/{mrz-scanner-configuration.d.ts → mrz-scanner-view-configuration.d.ts} +6 -6
- package/@types/model/configuration/selection-overlay-configuration.d.ts +2 -2
- package/@types/model/configuration/text-pattern-scanner-view-configuration.d.ts +9 -0
- package/@types/model/configuration/vin-scanner-view-configuration.d.ts +9 -0
- package/@types/mrz-scanner-view.d.ts +3 -3
- package/@types/scanbot-sdk.d.ts +89 -87
- package/@types/service/document-data-extractor.d.ts +2 -2
- package/@types/service/document-quality-analyzer.d.ts +2 -2
- package/@types/service/ocr-engine.d.ts +3 -3
- package/@types/service/simple-mrz-recognizer.d.ts +3 -3
- package/@types/service/text-pattern-scanner.d.ts +3 -3
- package/@types/service/tiff-generator.d.ts +2 -2
- package/@types/service/vin-scanner.d.ts +16 -0
- package/@types/text-pattern-scanner-view.d.ts +7 -7
- package/@types/ui2/barcode/controllers/barcode-scanner-controller.d.ts +2 -2
- package/@types/ui2/barcode/controllers/multiple-scanning-mode-controller.d.ts +2 -2
- package/@types/ui2/barcode/controllers/single-scanning-mode-controller.d.ts +2 -2
- package/@types/ui2/barcode/utils/camera-config.d.ts +1 -1
- package/@types/ui2/barcode/utils/styled-button.d.ts +1 -1
- package/@types/ui2/barcode/views/action-button/action-button-container.d.ts +2 -2
- package/@types/ui2/barcode/views/action-button/action-button.d.ts +1 -1
- package/@types/ui2/barcode/views/barcode-scanner.d.ts +3 -3
- package/@types/ui2/barcode/views/camera-permission-denied.d.ts +1 -1
- package/@types/ui2/barcode/views/drawer/subviews/drawer-header-content.d.ts +1 -1
- package/@types/ui2/barcode/views/form/dialog-button.d.ts +0 -1
- package/@types/ui2/barcode/views/navigation-bar.d.ts +1 -1
- package/@types/ui2/configuration/BarcodeItemMapper.d.ts +6 -0
- package/@types/ui2/configuration/BarcodeScannerTypes.d.ts +2 -0
- package/@types/ui2/configuration/BarcodeTypes.d.ts +1 -0
- package/@types/ui2/configuration/CommonFieldType.d.ts +1 -0
- package/@types/ui2/configuration/GenericDocument.d.ts +1 -0
- package/@types/ui2/configuration/Geometry.d.ts +1 -1
- package/@types/ui2/configuration/barcode/ArTrackingOverlayConfiguration.d.ts +3 -24
- package/@types/ui2/configuration/barcode/BarcodeInfoMapping.d.ts +3 -3
- package/@types/ui2/configuration/barcode/BarcodeRecognizerConfiguration.d.ts +6 -13
- package/@types/ui2/configuration/barcode/BarcodeScannerConfiguration.d.ts +13 -13
- package/@types/ui2/configuration/barcode/BarcodeScannerUIResult.d.ts +8 -8
- package/@types/ui2/configuration/barcode/BarcodeUseCase.d.ts +3 -3
- package/@types/ui2/configuration/barcode/FindAndPickScanningModeUseCase.d.ts +8 -6
- package/@types/ui2/configuration/barcode/MultipleScanningModeUseCase.d.ts +11 -6
- package/@types/ui2/configuration/barcode/SingleScanningModeUseCase.d.ts +4 -4
- package/@types/ui2/configuration.d.ts +12 -20
- package/@types/ui2/document/model/sb-document.d.ts +3 -3
- package/@types/ui2/document/views/acknowledgement-screen/acknowledgement-image.d.ts +0 -1
- package/@types/ui2/document/views/camera-screen/use-document-scanner-view.d.ts +1 -1
- package/@types/ui2/document/views/camera-screen/user-guidance-text.d.ts +1 -1
- package/@types/ui2/scanbot-sdk-ui.d.ts +3 -3
- package/@types/utils/barcode-utils.d.ts +2 -2
- package/@types/utils/image-utils.d.ts +1 -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-polygon/animated-barcode-selection-overlay.d.ts +5 -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/document-outline.d.ts +1 -1
- package/@types/view/polygon/animated-document-polygon.d.ts +1 -1
- package/@types/view/polygon/animated-path.d.ts +1 -1
- package/@types/worker/worker-bridge.d.ts +122 -108
- package/bundle/ScanbotSDK.min.js +5 -5
- package/bundle/ScanbotSDK.ui2.min.js +17 -17
- 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 +1 -1
- package/@types/model/configuration/document-data-extractor-configuration.d.ts +0 -9
- package/@types/model/configuration/text-pattern-scanner-configuration.d.ts +0 -9
- package/@types/model/configuration/vin-scanner-configuration.d.ts +0 -9
- package/@types/ui2/configuration/barcode/ActionBarConfiguration.d.ts +0 -42
- package/@types/ui2/configuration/barcode/BarcodeItemMapper.d.ts +0 -6
- package/@types/ui2/configuration/barcode/BarcodeScannerTypes.d.ts +0 -2
- package/@types/ui2/configuration/barcode/BarcodeTypes.d.ts +0 -1
- package/@types/ui2/configuration/barcode/CameraConfiguration.d.ts +0 -60
- package/@types/ui2/configuration/barcode/CameraPermission.d.ts +0 -54
- package/@types/ui2/configuration/barcode/Common.d.ts +0 -359
- package/@types/ui2/configuration/barcode/CommonFieldType.d.ts +0 -1
- package/@types/ui2/configuration/barcode/GenericDocument.d.ts +0 -1
- package/@types/ui2/configuration/barcode/Geometry.d.ts +0 -1
- package/@types/ui2/configuration/barcode/ScanbotAlertDialog.d.ts +0 -49
- package/@types/ui2/configuration/barcode/TopBarConfiguration.d.ts +0 -55
- package/@types/ui2/configuration/barcode/UserGuidanceConfiguration.d.ts +0 -30
- package/@types/ui2/configuration/barcode/ViewFinderConfiguration.d.ts +0 -93
package/@types/scanbot-sdk.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { WorkerBridge } from "./worker/worker-bridge";
|
|
2
2
|
import { InitializationOptions } from "./model/configuration/initialization-options";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { DocumentScannerViewConfiguration } from "./model/configuration/document-scanner-view-configuration";
|
|
4
|
+
import { BarcodeScannerViewConfiguration } from "./model/configuration/barcode-scanner-view-configuration";
|
|
5
5
|
import { CroppingViewConfiguration } from "./model/configuration/cropping-view-configuration";
|
|
6
6
|
import { LicenseInfo } from "./model/response/license-info";
|
|
7
7
|
import { IDocumentScannerHandle } from "./interfaces/i-document-scanner-handle";
|
|
@@ -11,19 +11,19 @@ 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 {
|
|
14
|
+
import { MrzScannerViewConfiguration } from "./model/configuration/mrz-scanner-view-configuration";
|
|
15
15
|
import { IMrzScannerHandle } from "./interfaces/i-mrz-scanner-handle";
|
|
16
16
|
import SimpleMrzRecognizer from "./service/simple-mrz-recognizer";
|
|
17
17
|
import OcrEngine from "./service/ocr-engine";
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
18
|
+
import { TextPatternScannerViewConfiguration } from "./model/configuration/text-pattern-scanner-view-configuration";
|
|
19
|
+
import { VinScannerViewConfiguration } from "./model/configuration/vin-scanner-view-configuration";
|
|
20
20
|
import { ITextPatternScannerHandle } from "./interfaces/i-text-pattern-scanner-handle";
|
|
21
21
|
import DocumentQualityAnalyzer from "./service/document-quality-analyzer";
|
|
22
22
|
import ScanbotSDKUI from "./ui2/scanbot-sdk-ui";
|
|
23
|
-
import { Image, DeepPartial, RawImage, ObjectId, Point,
|
|
23
|
+
import { Image, DeepPartial, RawImage, ObjectId, Point, DocumentScannerParameters, DocumentDetectionResult, CroppedDetectionResult, BarcodeScannerConfiguration, BarcodeDocumentFormat, DocumentQualityAnalyzerConfiguration, ImageRotation, ParametricFilter, PdfConfiguration, TiffWriterParameters, DocumentDataExtractorConfiguration } from "./core-types";
|
|
24
24
|
import * as Config from "./core-types";
|
|
25
25
|
import { DocumentDataExtractor } from "./service/document-data-extractor";
|
|
26
|
-
import {
|
|
26
|
+
import { DocumentDataExtractorViewConfiguration } from "./model/configuration/document-data-extractor-view-configuration";
|
|
27
27
|
import { ConsumeType } from "./consume-type";
|
|
28
28
|
import { Stats } from "./utils/stats";
|
|
29
29
|
import { BrowserCameras } from "./utils/browser-cameras";
|
|
@@ -42,34 +42,34 @@ export default class ScanbotSDK {
|
|
|
42
42
|
/**
|
|
43
43
|
* View Components
|
|
44
44
|
*/
|
|
45
|
-
createDocumentScanner(configuration:
|
|
46
|
-
createMrzScanner(configuration:
|
|
47
|
-
createBarcodeScanner(configuration:
|
|
45
|
+
createDocumentScanner(configuration: DocumentScannerViewConfiguration): Promise<IDocumentScannerHandle>;
|
|
46
|
+
createMrzScanner(configuration: MrzScannerViewConfiguration): Promise<IMrzScannerHandle>;
|
|
47
|
+
createBarcodeScanner(configuration: BarcodeScannerViewConfiguration): Promise<IBarcodeScannerHandle>;
|
|
48
48
|
openCroppingView(configuration: CroppingViewConfiguration): Promise<ICroppingViewHandle>;
|
|
49
|
-
createTextPatternScanner(configuration:
|
|
50
|
-
|
|
51
|
-
createDocumentDataExtractorScanner(config:
|
|
49
|
+
createTextPatternScanner(configuration: TextPatternScannerViewConfiguration): Promise<ITextPatternScannerHandle>;
|
|
50
|
+
createVinScanner(configuration: VinScannerViewConfiguration): Promise<ITextPatternScannerHandle>;
|
|
51
|
+
createDocumentDataExtractorScanner(config: DocumentDataExtractorViewConfiguration): Promise<any>;
|
|
52
52
|
/**
|
|
53
53
|
* Image Operations
|
|
54
54
|
*/
|
|
55
55
|
toDataUrl(imageBuffer: ArrayBuffer): Promise<string>;
|
|
56
|
-
/** @param detectionParameters {@displayType `DeepPartial<
|
|
57
|
-
detectDocument(image: Image, detectionParameters?: DeepPartial<
|
|
56
|
+
/** @param detectionParameters {@displayType `DeepPartial<DocumentScannerParameters>`} {@link DocumentScannerParameters}*/
|
|
57
|
+
detectDocument(image: Image, detectionParameters?: DeepPartial<DocumentScannerParameters>, consumeImage?: ConsumeType): Promise<DocumentDetectionResult>;
|
|
58
58
|
detectAndCropDocument(imageBuffer: Image, consumeImage?: ConsumeType): Promise<CroppedDetectionResult>;
|
|
59
59
|
/**
|
|
60
60
|
* @param image An image URL (e.g. Data URL or HTTP URL) or an Image object
|
|
61
|
-
* @param detectionParameters {@displayType `Omit<DeepPartial<
|
|
61
|
+
* @param detectionParameters {@displayType `Omit<DeepPartial<BarcodeScannerConfiguration>, "live">`} {@link BarcodeScannerConfiguration}
|
|
62
62
|
* */
|
|
63
|
-
detectBarcodes(image: string | Image, partialDetectionParameters?: DeepPartial<Omit<
|
|
63
|
+
detectBarcodes(image: string | Image, partialDetectionParameters?: DeepPartial<Omit<BarcodeScannerConfiguration, "live">>, consumeImage?: ConsumeType): Promise<Config.BarcodeScannerResult & {
|
|
64
64
|
originalImage: Image;
|
|
65
65
|
}>;
|
|
66
|
-
parseBarcodeDocument(acceptedDocumentFormats:
|
|
66
|
+
parseBarcodeDocument(acceptedDocumentFormats: BarcodeDocumentFormat[], rawBarcodeData: string): Promise<Config.GenericDocument>;
|
|
67
67
|
createSimpleMRZRecognizer(): Promise<SimpleMrzRecognizer>;
|
|
68
68
|
createOcrEngine(): Promise<OcrEngine>;
|
|
69
|
-
/** @param config {@displayType `DeepPartial<
|
|
70
|
-
createDocumentQualityAnalyzer(config?: DeepPartial<
|
|
71
|
-
imageRotate(image: Image, rotation:
|
|
72
|
-
imageFilter(image: Image, filter:
|
|
69
|
+
/** @param config {@displayType `DeepPartial<DocumentQualityAnalyzerConfiguration>`} {@link DocumentQualityAnalyzerConfiguration}*/
|
|
70
|
+
createDocumentQualityAnalyzer(config?: DeepPartial<DocumentQualityAnalyzerConfiguration>): Promise<DocumentQualityAnalyzer>;
|
|
71
|
+
imageRotate(image: Image, rotation: ImageRotation, consumeImage?: ConsumeType): Promise<RawImage>;
|
|
72
|
+
imageFilter(image: Image, filter: ParametricFilter, consumeImage?: ConsumeType): Promise<RawImage>;
|
|
73
73
|
/** Crops and stretches the image to the convex hull of the supplied points. All points should have relative coordinates between 0 and 1. */
|
|
74
74
|
imageCrop(image: Image, polygon: Polygon, consumeImage?: ConsumeType): Promise<RawImage>;
|
|
75
75
|
imageResize(image: Image, destinationSize: number, consumeImage?: ConsumeType): Promise<RawImage>;
|
|
@@ -77,12 +77,12 @@ export default class ScanbotSDK {
|
|
|
77
77
|
* Misc. Features
|
|
78
78
|
*/
|
|
79
79
|
getLicenseInfo(): Promise<LicenseInfo>;
|
|
80
|
-
/** @param options {@displayType `DeepPartial<
|
|
81
|
-
beginPdf(options: DeepPartial<
|
|
82
|
-
/** @param options {@displayType `DeepPartial<
|
|
83
|
-
beginTiff(options?: DeepPartial<
|
|
84
|
-
/** @param options {@displayType `DeepPartial<
|
|
85
|
-
createDocumentDataExtractor(options: DeepPartial<
|
|
80
|
+
/** @param options {@displayType `DeepPartial<PdfConfiguration>`} {@link PdfConfiguration}*/
|
|
81
|
+
beginPdf(options: DeepPartial<PdfConfiguration>): Promise<PdfGenerator>;
|
|
82
|
+
/** @param options {@displayType `DeepPartial<TiffWriterParameters>`} {@link TiffWriterParameters} */
|
|
83
|
+
beginTiff(options?: DeepPartial<TiffWriterParameters>): Promise<TiffGenerator>;
|
|
84
|
+
/** @param options {@displayType `DeepPartial<DocumentDataExtractorConfiguration>`} {@link DocumentDataExtractorConfiguration}*/
|
|
85
|
+
createDocumentDataExtractor(options: DeepPartial<DocumentDataExtractorConfiguration>): Promise<DocumentDataExtractor>;
|
|
86
86
|
imageToJpeg(image: Image, consumeImage?: ConsumeType): Promise<Uint8Array>;
|
|
87
87
|
get version(): string;
|
|
88
88
|
private _utils;
|
|
@@ -111,7 +111,7 @@ export default class ScanbotSDK {
|
|
|
111
111
|
}[];
|
|
112
112
|
ignoreOrientationMismatch?: boolean;
|
|
113
113
|
_marker?: () => void;
|
|
114
|
-
}) => Promise<
|
|
114
|
+
}) => Promise<DocumentDetectionResult>;
|
|
115
115
|
detectAndCropDocument: (image: Image) => Promise<CroppedDetectionResult>;
|
|
116
116
|
createDocumentScanner: (options: {
|
|
117
117
|
isLive?: boolean;
|
|
@@ -127,10 +127,10 @@ export default class ScanbotSDK {
|
|
|
127
127
|
ignoreOrientationMismatch?: boolean;
|
|
128
128
|
_marker?: () => void;
|
|
129
129
|
}) => Promise<ObjectId<"DocumentScanner">>;
|
|
130
|
-
documentScannerDetect: <ImageType extends Image>(documentScannerToken: ObjectId<"DocumentScanner">, image: ImageType) => Promise<
|
|
130
|
+
documentScannerDetect: <ImageType extends Image>(documentScannerToken: ObjectId<"DocumentScanner">, image: ImageType) => Promise<DocumentDetectionResult & {
|
|
131
131
|
originalImage: ImageType;
|
|
132
132
|
}>;
|
|
133
|
-
parseBarcodeDocument: (options:
|
|
133
|
+
parseBarcodeDocument: (options: BarcodeDocumentFormat[], data: string) => Promise<Config.GenericDocument>;
|
|
134
134
|
createBarcodeScanner: (options: {
|
|
135
135
|
barcodeFormatConfigurations?: ({
|
|
136
136
|
readonly _type?: "BarcodeFormatCodabarConfiguration";
|
|
@@ -183,7 +183,7 @@ export default class ScanbotSDK {
|
|
|
183
183
|
minimumSizeScore?: number;
|
|
184
184
|
addAdditionalQuietZone?: boolean;
|
|
185
185
|
minimum1DQuietZoneSize?: number;
|
|
186
|
-
gs1Handling?: Config.
|
|
186
|
+
gs1Handling?: Config.Gs1Handling;
|
|
187
187
|
minimumTextLength?: number;
|
|
188
188
|
maximumTextLength?: number;
|
|
189
189
|
_marker?: () => void;
|
|
@@ -207,7 +207,7 @@ export default class ScanbotSDK {
|
|
|
207
207
|
minimumSizeScore?: number;
|
|
208
208
|
addAdditionalQuietZone?: boolean;
|
|
209
209
|
minimum1DQuietZoneSize?: number;
|
|
210
|
-
gs1Handling?: Config.
|
|
210
|
+
gs1Handling?: Config.Gs1Handling;
|
|
211
211
|
_marker?: () => void;
|
|
212
212
|
} | {
|
|
213
213
|
readonly _type?: "BarcodeFormatDataBarExpandedConfiguration";
|
|
@@ -215,7 +215,7 @@ export default class ScanbotSDK {
|
|
|
215
215
|
minimumSizeScore?: number;
|
|
216
216
|
addAdditionalQuietZone?: boolean;
|
|
217
217
|
minimum1DQuietZoneSize?: number;
|
|
218
|
-
gs1Handling?: Config.
|
|
218
|
+
gs1Handling?: Config.Gs1Handling;
|
|
219
219
|
_marker?: () => void;
|
|
220
220
|
} | {
|
|
221
221
|
readonly _type?: "BarcodeFormatDataBarLimitedConfiguration";
|
|
@@ -223,7 +223,7 @@ export default class ScanbotSDK {
|
|
|
223
223
|
minimumSizeScore?: number;
|
|
224
224
|
addAdditionalQuietZone?: boolean;
|
|
225
225
|
minimum1DQuietZoneSize?: number;
|
|
226
|
-
gs1Handling?: Config.
|
|
226
|
+
gs1Handling?: Config.Gs1Handling;
|
|
227
227
|
_marker?: () => void;
|
|
228
228
|
} | {
|
|
229
229
|
readonly _type?: "BarcodeFormatITFConfiguration";
|
|
@@ -243,7 +243,7 @@ export default class ScanbotSDK {
|
|
|
243
243
|
stripCheckDigits?: boolean;
|
|
244
244
|
minimumTextLength?: number;
|
|
245
245
|
maximumTextLength?: number;
|
|
246
|
-
checksumAlgorithms?: Config.
|
|
246
|
+
checksumAlgorithms?: Config.MsiPlesseyChecksumAlgorithm[];
|
|
247
247
|
_marker?: () => void;
|
|
248
248
|
} | {
|
|
249
249
|
readonly _type?: "BarcodeFormatUpcEanConfiguration";
|
|
@@ -256,7 +256,7 @@ export default class ScanbotSDK {
|
|
|
256
256
|
ean13?: boolean;
|
|
257
257
|
upca?: boolean;
|
|
258
258
|
upce?: boolean;
|
|
259
|
-
extensions?: Config.
|
|
259
|
+
extensions?: Config.UpcEanExtensionBehavior;
|
|
260
260
|
_marker?: () => void;
|
|
261
261
|
} | {
|
|
262
262
|
readonly _type?: "BarcodeFormatPharmaCodeConfiguration";
|
|
@@ -273,14 +273,14 @@ export default class ScanbotSDK {
|
|
|
273
273
|
regexFilter?: string;
|
|
274
274
|
minimumSizeScore?: number;
|
|
275
275
|
addAdditionalQuietZone?: boolean;
|
|
276
|
-
gs1Handling?: Config.
|
|
276
|
+
gs1Handling?: Config.Gs1Handling;
|
|
277
277
|
_marker?: () => void;
|
|
278
278
|
} | {
|
|
279
279
|
readonly _type?: "BarcodeFormatQRCodeConfiguration";
|
|
280
280
|
regexFilter?: string;
|
|
281
281
|
minimumSizeScore?: number;
|
|
282
282
|
addAdditionalQuietZone?: boolean;
|
|
283
|
-
gs1Handling?: Config.
|
|
283
|
+
gs1Handling?: Config.Gs1Handling;
|
|
284
284
|
strictMode?: boolean;
|
|
285
285
|
qr?: boolean;
|
|
286
286
|
microQr?: boolean;
|
|
@@ -291,7 +291,7 @@ export default class ScanbotSDK {
|
|
|
291
291
|
regexFilter?: string;
|
|
292
292
|
minimumSizeScore?: number;
|
|
293
293
|
addAdditionalQuietZone?: boolean;
|
|
294
|
-
gs1Handling?: Config.
|
|
294
|
+
gs1Handling?: Config.Gs1Handling;
|
|
295
295
|
strictMode?: boolean;
|
|
296
296
|
_marker?: () => void;
|
|
297
297
|
} | {
|
|
@@ -299,7 +299,7 @@ export default class ScanbotSDK {
|
|
|
299
299
|
regexFilter?: string;
|
|
300
300
|
minimumSizeScore?: number;
|
|
301
301
|
addAdditionalQuietZone?: boolean;
|
|
302
|
-
gs1Handling?: Config.
|
|
302
|
+
gs1Handling?: Config.Gs1Handling;
|
|
303
303
|
strictMode?: boolean;
|
|
304
304
|
_marker?: () => void;
|
|
305
305
|
} | {
|
|
@@ -307,7 +307,7 @@ export default class ScanbotSDK {
|
|
|
307
307
|
regexFilter?: string;
|
|
308
308
|
minimumSizeScore?: number;
|
|
309
309
|
addAdditionalQuietZone?: boolean;
|
|
310
|
-
gs1Handling?: Config.
|
|
310
|
+
gs1Handling?: Config.Gs1Handling;
|
|
311
311
|
_marker?: () => void;
|
|
312
312
|
} | {
|
|
313
313
|
readonly _type?: "BarcodeFormatMaxiCodeConfiguration";
|
|
@@ -320,7 +320,7 @@ export default class ScanbotSDK {
|
|
|
320
320
|
regexFilter?: string;
|
|
321
321
|
minimumSizeScore?: number;
|
|
322
322
|
addAdditionalQuietZone?: boolean;
|
|
323
|
-
australiaPostCustomerFormat?: Config.
|
|
323
|
+
australiaPostCustomerFormat?: Config.AustraliaPostCustomerFormat;
|
|
324
324
|
_marker?: () => void;
|
|
325
325
|
} | {
|
|
326
326
|
readonly _type?: "BarcodeFormatJapanPostConfiguration";
|
|
@@ -360,7 +360,7 @@ export default class ScanbotSDK {
|
|
|
360
360
|
minimumSizeScore?: number;
|
|
361
361
|
addAdditionalQuietZone?: boolean;
|
|
362
362
|
minimum1DQuietZoneSize?: number;
|
|
363
|
-
gs1Handling?: Config.
|
|
363
|
+
gs1Handling?: Config.Gs1Handling;
|
|
364
364
|
strictMode?: boolean;
|
|
365
365
|
_marker?: () => void;
|
|
366
366
|
} | {
|
|
@@ -372,25 +372,25 @@ export default class ScanbotSDK {
|
|
|
372
372
|
stripCheckDigits?: boolean;
|
|
373
373
|
minimumTextLength?: number;
|
|
374
374
|
maximumTextLength?: number;
|
|
375
|
-
gs1Handling?: Config.
|
|
375
|
+
gs1Handling?: Config.Gs1Handling;
|
|
376
376
|
strictMode?: boolean;
|
|
377
|
-
formats?: Config.
|
|
377
|
+
formats?: Config.BarcodeFormat[];
|
|
378
378
|
_marker?: () => void;
|
|
379
379
|
} | {
|
|
380
380
|
readonly _type?: "BarcodeFormatCommonTwoDConfiguration";
|
|
381
381
|
regexFilter?: string;
|
|
382
382
|
minimumSizeScore?: number;
|
|
383
383
|
addAdditionalQuietZone?: boolean;
|
|
384
|
-
gs1Handling?: Config.
|
|
384
|
+
gs1Handling?: Config.Gs1Handling;
|
|
385
385
|
strictMode?: boolean;
|
|
386
|
-
formats?: Config.
|
|
386
|
+
formats?: Config.BarcodeFormat[];
|
|
387
387
|
_marker?: () => void;
|
|
388
388
|
} | {
|
|
389
389
|
readonly _type?: "BarcodeFormatCommonFourStateConfiguration";
|
|
390
390
|
regexFilter?: string;
|
|
391
391
|
minimumSizeScore?: number;
|
|
392
392
|
addAdditionalQuietZone?: boolean;
|
|
393
|
-
formats?: Config.
|
|
393
|
+
formats?: Config.BarcodeFormat[];
|
|
394
394
|
_marker?: () => void;
|
|
395
395
|
} | {
|
|
396
396
|
readonly _type?: "BarcodeFormatCommonConfiguration";
|
|
@@ -401,19 +401,19 @@ export default class ScanbotSDK {
|
|
|
401
401
|
stripCheckDigits?: boolean;
|
|
402
402
|
minimumTextLength?: number;
|
|
403
403
|
maximumTextLength?: number;
|
|
404
|
-
gs1Handling?: Config.
|
|
404
|
+
gs1Handling?: Config.Gs1Handling;
|
|
405
405
|
strictMode?: boolean;
|
|
406
|
-
formats?: Config.
|
|
406
|
+
formats?: Config.BarcodeFormat[];
|
|
407
407
|
_marker?: () => void;
|
|
408
408
|
})[];
|
|
409
|
-
extractedDocumentFormats?:
|
|
409
|
+
extractedDocumentFormats?: BarcodeDocumentFormat[];
|
|
410
410
|
onlyAcceptDocuments?: boolean;
|
|
411
411
|
returnBarcodeImage?: boolean;
|
|
412
|
-
engineMode?:
|
|
412
|
+
engineMode?: Config.BarcodeScannerEngineMode;
|
|
413
413
|
live?: boolean;
|
|
414
414
|
_marker?: () => void;
|
|
415
415
|
}) => Promise<ObjectId<"BarcodeScanner">>;
|
|
416
|
-
scanBarcodes: <ImageType_1 extends Image>(barcodeScannerToken: ObjectId<"BarcodeScanner">, image: ImageType_1) => Promise<
|
|
416
|
+
scanBarcodes: <ImageType_1 extends Image>(barcodeScannerToken: ObjectId<"BarcodeScanner">, image: ImageType_1) => Promise<Config.BarcodeScannerResult & {
|
|
417
417
|
originalImage: ImageType_1;
|
|
418
418
|
}>;
|
|
419
419
|
beginPdf: (options: {
|
|
@@ -425,18 +425,18 @@ export default class ScanbotSDK {
|
|
|
425
425
|
keywords?: string;
|
|
426
426
|
_marker?: () => void;
|
|
427
427
|
};
|
|
428
|
-
pageSize?:
|
|
429
|
-
pageDirection?:
|
|
430
|
-
pageFit?:
|
|
428
|
+
pageSize?: Config.PageSize;
|
|
429
|
+
pageDirection?: Config.PageDirection;
|
|
430
|
+
pageFit?: Config.PageFit;
|
|
431
431
|
dpi?: number;
|
|
432
432
|
jpegQuality?: number;
|
|
433
|
-
resamplingMethod?:
|
|
433
|
+
resamplingMethod?: Config.ResamplingMethod;
|
|
434
434
|
_marker?: () => void;
|
|
435
435
|
}) => Promise<ObjectId<"PdfGenerationContext">>;
|
|
436
436
|
addPageToPdf: (pdfOperation: ObjectId<"PdfGenerationContext">, image: Image) => Promise<void>;
|
|
437
437
|
completePdf: (pdfOperation: ObjectId<"PdfGenerationContext">) => Promise<Uint8Array>;
|
|
438
438
|
beginTiff: (options: {
|
|
439
|
-
compression?:
|
|
439
|
+
compression?: Config.CompressionMode;
|
|
440
440
|
jpegQuality?: number;
|
|
441
441
|
zipCompressionLevel?: number;
|
|
442
442
|
dpi?: number;
|
|
@@ -460,14 +460,14 @@ export default class ScanbotSDK {
|
|
|
460
460
|
}[];
|
|
461
461
|
binarizationFilter?: {
|
|
462
462
|
readonly _type?: "ScanbotBinarizationFilter";
|
|
463
|
-
outputMode?:
|
|
463
|
+
outputMode?: Config.OutputMode;
|
|
464
464
|
_marker?: () => void;
|
|
465
465
|
} | {
|
|
466
466
|
readonly _type?: "CustomBinarizationFilter";
|
|
467
|
-
outputMode?:
|
|
467
|
+
outputMode?: Config.OutputMode;
|
|
468
468
|
denoise?: number;
|
|
469
469
|
radius?: number;
|
|
470
|
-
preset?:
|
|
470
|
+
preset?: Config.BinarizationFilterPreset;
|
|
471
471
|
_marker?: () => void;
|
|
472
472
|
} | {
|
|
473
473
|
readonly _type?: "ColorDocumentFilter";
|
|
@@ -498,7 +498,7 @@ export default class ScanbotSDK {
|
|
|
498
498
|
};
|
|
499
499
|
_marker?: () => void;
|
|
500
500
|
}) => Promise<ObjectId<"TiffGenerationContext">>;
|
|
501
|
-
addPageToTiff: (tiffOperation: ObjectId<"TiffGenerationContext">, image: Image, binarization:
|
|
501
|
+
addPageToTiff: (tiffOperation: ObjectId<"TiffGenerationContext">, image: Image, binarization: Config.Binarization) => Promise<unknown>;
|
|
502
502
|
completeTiff: (tiffOperation: ObjectId<"TiffGenerationContext">) => Promise<Uint8Array>;
|
|
503
503
|
createMRZScanner: (configuration: {
|
|
504
504
|
frameAccumulationConfiguration?: {
|
|
@@ -507,15 +507,15 @@ export default class ScanbotSDK {
|
|
|
507
507
|
_marker?: () => void;
|
|
508
508
|
};
|
|
509
509
|
enableDetection?: boolean;
|
|
510
|
-
incompleteResultHandling?:
|
|
510
|
+
incompleteResultHandling?: Config.MrzIncompleteResultHandling;
|
|
511
511
|
_marker?: () => void;
|
|
512
512
|
}) => Promise<ObjectId<"MRZScannerContext">>;
|
|
513
|
-
scanMRZ: <ImageType_2 extends Image>(mrzScannerToken: ObjectId<"MRZScannerContext">, image: ImageType_2) => Promise<
|
|
513
|
+
scanMRZ: <ImageType_2 extends Image>(mrzScannerToken: ObjectId<"MRZScannerContext">, image: ImageType_2) => Promise<Config.MrzScannerResult & {
|
|
514
514
|
originalImage: ImageType_2;
|
|
515
515
|
}>;
|
|
516
516
|
releaseObject: <T>(objectToken: ObjectId<T>) => Promise<void>;
|
|
517
517
|
createOcrEngine: () => Promise<ObjectId<"TLDROcrContext">>;
|
|
518
|
-
performOcr: (tldrOcrToken: ObjectId<"TLDROcrContext">, image: Image) => Promise<Config.
|
|
518
|
+
performOcr: (tldrOcrToken: ObjectId<"TLDROcrContext">, image: Image) => Promise<Config.Page>;
|
|
519
519
|
createTextPatternScanner: (configuration: {
|
|
520
520
|
ocrResolutionLimit?: number;
|
|
521
521
|
maximumNumberOfAccumulatedFrames?: number;
|
|
@@ -524,10 +524,6 @@ export default class ScanbotSDK {
|
|
|
524
524
|
readonly _type?: "DefaultContentValidator";
|
|
525
525
|
allowedCharacters?: string;
|
|
526
526
|
_marker?: () => void;
|
|
527
|
-
} | {
|
|
528
|
-
readonly _type?: "PresetContentValidator";
|
|
529
|
-
preset?: "VEHICLE_IDENTIFICATION_NUMBER";
|
|
530
|
-
_marker?: () => void;
|
|
531
527
|
} | {
|
|
532
528
|
readonly _type?: "PatternContentValidator";
|
|
533
529
|
allowedCharacters?: string;
|
|
@@ -537,17 +533,28 @@ export default class ScanbotSDK {
|
|
|
537
533
|
};
|
|
538
534
|
_marker?: () => void;
|
|
539
535
|
}) => Promise<ObjectId<"TextPatternScanner">>;
|
|
540
|
-
scanTextLine: <ImageType_3 extends Image>(scannerToken: ObjectId<"TextPatternScanner">, image: ImageType_3) => Promise<
|
|
536
|
+
scanTextLine: <ImageType_3 extends Image>(scannerToken: ObjectId<"TextPatternScanner">, image: ImageType_3) => Promise<Config.TextPatternScannerResult & {
|
|
541
537
|
originalImage: ImageType_3;
|
|
542
538
|
}>;
|
|
543
539
|
cleanTextLineScanningQueue: (scannerToken: ObjectId<"TextPatternScanner">) => Promise<void>;
|
|
540
|
+
createVinScanner: (configuration: {
|
|
541
|
+
extractVINFromBarcode?: boolean;
|
|
542
|
+
ocrResolutionLimit?: number;
|
|
543
|
+
maximumNumberOfAccumulatedFrames?: number;
|
|
544
|
+
minimumNumberOfRequiredFramesWithEqualRecognitionResult?: number;
|
|
545
|
+
_marker?: () => void;
|
|
546
|
+
}) => Promise<ObjectId<"VinScanner">>;
|
|
547
|
+
scanVin: <ImageType_4 extends Image>(scannerToken: ObjectId<"VinScanner">, image: ImageType_4) => Promise<Config.VinScannerResult & {
|
|
548
|
+
originalImage: ImageType_4;
|
|
549
|
+
}>;
|
|
550
|
+
cleanVinScanningQueue: (scannerToken: ObjectId<"VinScanner">) => Promise<void>;
|
|
544
551
|
createDocumentQualityAnalyzer: (options: {
|
|
545
552
|
qualityThresholds?: {
|
|
546
553
|
readonly symbolQuality?: number;
|
|
547
554
|
readonly symbolRatio?: number;
|
|
548
555
|
_marker?: () => void;
|
|
549
556
|
}[];
|
|
550
|
-
qualityIndices?:
|
|
557
|
+
qualityIndices?: Config.DocumentQuality[];
|
|
551
558
|
detectOrientation?: boolean;
|
|
552
559
|
maxImageSize?: number;
|
|
553
560
|
minEstimatedNumberOfSymbolsForDocument?: number;
|
|
@@ -557,17 +564,14 @@ export default class ScanbotSDK {
|
|
|
557
564
|
tileSize?: number;
|
|
558
565
|
_marker?: () => void;
|
|
559
566
|
}) => Promise<ObjectId<"DocumentQualityAnalyzer">>;
|
|
560
|
-
documentQualityAnalyzerAnalyze: (dqaToken: ObjectId<"DocumentQualityAnalyzer">, image: Image) => Promise<
|
|
561
|
-
imageApplyFilter: (image: Image, filter: DeepPartial<
|
|
567
|
+
documentQualityAnalyzerAnalyze: (dqaToken: ObjectId<"DocumentQualityAnalyzer">, image: Image) => Promise<Config.DocumentQualityAnalyzerResult>;
|
|
568
|
+
imageApplyFilter: (image: Image, filter: DeepPartial<ParametricFilter>) => Promise<RawImage>;
|
|
562
569
|
imageCrop: (image: Image, polygon: [Point, Point, Point, Point]) => Promise<RawImage>;
|
|
563
|
-
/**
|
|
564
|
-
* Misc. Features
|
|
565
|
-
*/
|
|
566
570
|
imageResize: (image: Image, destinationSize: number) => Promise<RawImage>;
|
|
567
|
-
imageRotate: (image: Image, rotations:
|
|
571
|
+
imageRotate: (image: Image, rotations: ImageRotation) => Promise<RawImage>;
|
|
568
572
|
documentDataExtractorCreate: (parameters: {
|
|
569
573
|
resultAccumulationConfig?: {
|
|
570
|
-
confirmationMethod?: Config.
|
|
574
|
+
confirmationMethod?: Config.ConfirmationMethod;
|
|
571
575
|
minConfirmations?: number;
|
|
572
576
|
minConfidenceForStableField?: number;
|
|
573
577
|
autoClearThreshold?: number;
|
|
@@ -582,12 +586,12 @@ export default class ScanbotSDK {
|
|
|
582
586
|
_marker?: () => void;
|
|
583
587
|
} | {
|
|
584
588
|
readonly _type?: "EuropeanHealthInsuranceCardConfiguration";
|
|
585
|
-
expectedCountry?: Config.
|
|
589
|
+
expectedCountry?: Config.EuropeanHealthInsuranceCardIssuingCountry;
|
|
586
590
|
_marker?: () => void;
|
|
587
591
|
} | {
|
|
588
592
|
readonly _type?: "MRZFallbackConfiguration";
|
|
589
593
|
acceptedCountries?: string[];
|
|
590
|
-
acceptedMRZTypes?:
|
|
594
|
+
acceptedMRZTypes?: Config.MrzDocumentType[];
|
|
591
595
|
_marker?: () => void;
|
|
592
596
|
} | {
|
|
593
597
|
readonly _type?: "DocumentDataExtractorCommonConfiguration";
|
|
@@ -596,19 +600,17 @@ export default class ScanbotSDK {
|
|
|
596
600
|
})[];
|
|
597
601
|
_marker?: () => void;
|
|
598
602
|
}) => Promise<ObjectId<"DocumentDataExtractor">>;
|
|
599
|
-
documentDataExtractorExtract: <
|
|
600
|
-
mode?:
|
|
603
|
+
documentDataExtractorExtract: <ImageType_5 extends Image>(gdrToken: ObjectId<"DocumentDataExtractor">, image: ImageType_5, parameters: {
|
|
604
|
+
mode?: Config.DocumentDataExtractionMode;
|
|
601
605
|
_marker?: () => void;
|
|
602
|
-
}) => Promise<
|
|
603
|
-
originalImage:
|
|
606
|
+
}) => Promise<Config.DocumentDataExtractionResult & {
|
|
607
|
+
originalImage: ImageType_5;
|
|
604
608
|
}>;
|
|
605
609
|
version: () => Promise<string>;
|
|
606
610
|
__hasModuleFunction: (functionName: string) => Promise<any>;
|
|
607
611
|
__callModuleFunction: (functionName: string, args?: any[]) => Promise<any>;
|
|
608
612
|
};
|
|
609
613
|
private licenseCheck;
|
|
610
|
-
/** @param partialConfig {@displayType `DeepPartial<TextPatternScannerTypes.TextPatternScannerConfiguration>`} {@link TextPatternScannerTypes.TextPatternScannerConfiguration}*/
|
|
611
|
-
private createTextPatternScannerView;
|
|
612
614
|
/**
|
|
613
615
|
* This method will destroy all web workers and free the memory held by the
|
|
614
616
|
* SDK (after the next run of the garbage collector).
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import ScanbotSDK from '../scanbot-sdk';
|
|
2
|
-
import { ObjectId, Image,
|
|
2
|
+
import { ObjectId, Image, DeepPartial, DocumentDataFrameExtractionParameters } from "../core-types";
|
|
3
3
|
import { ConsumeType } from "../consume-type";
|
|
4
4
|
export declare class DocumentDataExtractor {
|
|
5
5
|
private _sdk;
|
|
6
6
|
private _recognizer;
|
|
7
7
|
/** @internal */
|
|
8
8
|
constructor(_sdk: ScanbotSDK, _recognizer: ObjectId<"DocumentDataExtractor">);
|
|
9
|
-
recognize<ImageType extends Image>(image: ImageType, parameters: DeepPartial<
|
|
9
|
+
recognize<ImageType extends Image>(image: ImageType, parameters: DeepPartial<DocumentDataFrameExtractionParameters>, consumeImage?: ConsumeType): Promise<import("../core-types").DocumentDataExtractionResult & {
|
|
10
10
|
originalImage: ImageType;
|
|
11
11
|
}>;
|
|
12
12
|
release(): Promise<void>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import ScanbotSDK from '../scanbot-sdk';
|
|
2
|
-
import
|
|
2
|
+
import { DocumentQualityAnalyzerResult, Image, ObjectId } from '../core-types';
|
|
3
3
|
import { ConsumeType } from "../consume-type";
|
|
4
4
|
export default class DocumentQualityAnalyzer {
|
|
5
5
|
private _sdk;
|
|
6
6
|
private _token;
|
|
7
7
|
/** @internal */
|
|
8
8
|
constructor(_sdk: ScanbotSDK, _token: ObjectId<"DocumentQualityAnalyzer">);
|
|
9
|
-
analyze(image: Image, consumeImage?: ConsumeType): Promise<
|
|
9
|
+
analyze(image: Image, consumeImage?: ConsumeType): Promise<DocumentQualityAnalyzerResult>;
|
|
10
10
|
release(): Promise<void>;
|
|
11
11
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import ScanbotSDK from '../scanbot-sdk';
|
|
2
|
-
import
|
|
2
|
+
import { Image, ObjectId, Page } from "../core-types";
|
|
3
3
|
import { ConsumeType } from "../consume-type";
|
|
4
4
|
export interface Rect {
|
|
5
5
|
x: number;
|
|
@@ -17,7 +17,7 @@ export default class OcrEngine {
|
|
|
17
17
|
private _OcrEngineToken;
|
|
18
18
|
/** @internal */
|
|
19
19
|
constructor(_sdk: ScanbotSDK, _OcrEngineToken: ObjectId<"TLDROcrContext">);
|
|
20
|
-
performOcr(image: Image, consumeImage?: ConsumeType): Promise<
|
|
21
|
-
recognizeURL(imageURL: string): Promise<
|
|
20
|
+
performOcr(image: Image, consumeImage?: ConsumeType): Promise<Page>;
|
|
21
|
+
recognizeURL(imageURL: string): Promise<Page>;
|
|
22
22
|
release(): Promise<void>;
|
|
23
23
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import ScanbotSDK from '../scanbot-sdk';
|
|
2
|
-
import type { ObjectId,
|
|
2
|
+
import type { ObjectId, Image, MrzScannerResult } from "../core-types";
|
|
3
3
|
import { ConsumeType } from "../consume-type";
|
|
4
4
|
export default class SimpleMrzRecognizer {
|
|
5
5
|
private _sdk;
|
|
6
6
|
private _mrzRecognizerToken;
|
|
7
7
|
constructor(_sdk: ScanbotSDK, _mrzRecognizerToken: Promise<ObjectId<"MRZScannerContext">>);
|
|
8
|
-
recognize<ImageType extends Image>(image: ImageType, consumeImage?: ConsumeType): Promise<
|
|
8
|
+
recognize<ImageType extends Image>(image: ImageType, consumeImage?: ConsumeType): Promise<MrzScannerResult & {
|
|
9
9
|
originalImage: ImageType;
|
|
10
10
|
}>;
|
|
11
|
-
recognizeURL(imageURL: string): Promise<
|
|
11
|
+
recognizeURL(imageURL: string): Promise<MrzScannerResult | undefined>;
|
|
12
12
|
release(): Promise<void>;
|
|
13
13
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import ScanbotSDK from '../scanbot-sdk';
|
|
2
|
-
import { ObjectId, Image,
|
|
2
|
+
import { ObjectId, Image, TextPatternScannerResult } from '../core-types';
|
|
3
3
|
import { ConsumeType } from "../consume-type";
|
|
4
4
|
export default class TextPatternScanner {
|
|
5
5
|
private _sdk;
|
|
6
6
|
private _textPatternScannerToken;
|
|
7
7
|
constructor(_sdk: ScanbotSDK, _textPatternScannerToken: Promise<ObjectId<"TextPatternScanner">>);
|
|
8
|
-
recognize<ImageType extends Image>(image: ImageType, consumeImage?: ConsumeType): Promise<
|
|
8
|
+
recognize<ImageType extends Image>(image: ImageType, consumeImage?: ConsumeType): Promise<TextPatternScannerResult & {
|
|
9
9
|
originalImage: ImageType;
|
|
10
10
|
}>;
|
|
11
11
|
cleanRecognitionQueue(): Promise<void>;
|
|
12
|
-
recognizeURL(imageURL: string): Promise<
|
|
12
|
+
recognizeURL(imageURL: string): Promise<TextPatternScannerResult>;
|
|
13
13
|
release(): Promise<void>;
|
|
14
14
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import ScanbotSDK from '../scanbot-sdk';
|
|
2
|
-
import type { ObjectId, Image,
|
|
2
|
+
import type { ObjectId, Image, Binarization } from "../core-types";
|
|
3
3
|
import { ConsumeType } from "../consume-type";
|
|
4
4
|
import { SBDocument } from "../ui2/document/model/sb-document";
|
|
5
5
|
export interface TiffPageOptions {
|
|
6
|
-
binarize?:
|
|
6
|
+
binarize?: Binarization;
|
|
7
7
|
consumeImage?: ConsumeType;
|
|
8
8
|
}
|
|
9
9
|
export declare class TiffGenerator {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import ScanbotSDK from '../scanbot-sdk';
|
|
2
|
+
import { ObjectId, Image } from '../core-types';
|
|
3
|
+
import { ConsumeType } from "../consume-type";
|
|
4
|
+
export default class VinScanner {
|
|
5
|
+
private _sdk;
|
|
6
|
+
private _token;
|
|
7
|
+
constructor(_sdk: ScanbotSDK, _token: Promise<ObjectId<"VinScanner">>);
|
|
8
|
+
recognize<ImageType extends Image>(image: ImageType, consumeImage?: ConsumeType): Promise<import("../core-types").VinScannerResult & {
|
|
9
|
+
originalImage: ImageType;
|
|
10
|
+
}>;
|
|
11
|
+
cleanRecognitionQueue(): Promise<void>;
|
|
12
|
+
recognizeURL(imageURL: string): Promise<import("../core-types").VinScannerResult & {
|
|
13
|
+
originalImage: ImageData;
|
|
14
|
+
}>;
|
|
15
|
+
release(): Promise<void>;
|
|
16
|
+
}
|
|
@@ -3,27 +3,27 @@ import { ScanbotCameraProps, ScanbotCameraState, ScannerView } from "./scanner-v
|
|
|
3
3
|
import { ITextPatternScannerHandle } from "./interfaces/i-text-pattern-scanner-handle";
|
|
4
4
|
import ViewFinder from "./view/view-finder";
|
|
5
5
|
import TextPatternScanner from "./service/text-pattern-scanner";
|
|
6
|
-
import { TextDetectionCallback } from "./model/configuration/text-pattern-scanner-configuration";
|
|
7
6
|
import { ViewFinderScannerConfiguration } from "./model/configuration/view-finder-scanner-configuration";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
import VinScanner from "./service/vin-scanner";
|
|
8
|
+
export declare class TextPatternScannerProps<Scanner extends TextPatternScanner | VinScanner> {
|
|
9
|
+
scanner: Scanner;
|
|
10
|
+
onDetected: (result: Awaited<ReturnType<Scanner['recognize']>>) => void;
|
|
11
11
|
}
|
|
12
12
|
export declare class TextPatternScannerState extends ScanbotCameraState {
|
|
13
13
|
isFinderVisible?: boolean;
|
|
14
14
|
}
|
|
15
|
-
export default class TextPatternScannerView extends ScannerView<TextPatternScannerProps, TextPatternScannerState> implements ITextPatternScannerHandle {
|
|
15
|
+
export default class TextPatternScannerView<Scanner extends TextPatternScanner | VinScanner> extends ScannerView<TextPatternScannerProps<Scanner> & ScanbotCameraProps, TextPatternScannerState> implements ITextPatternScannerHandle {
|
|
16
16
|
static FRAME_RESOLUTION: number;
|
|
17
17
|
finder?: ViewFinder;
|
|
18
18
|
shouldComputeSize: boolean;
|
|
19
19
|
private paused;
|
|
20
|
-
constructor(props: TextPatternScannerProps);
|
|
20
|
+
constructor(props: TextPatternScannerProps<Scanner> & ScanbotCameraProps);
|
|
21
21
|
get configuration(): ViewFinderScannerConfiguration;
|
|
22
22
|
get enabled(): boolean;
|
|
23
23
|
/**
|
|
24
24
|
* Public API functions
|
|
25
25
|
*/
|
|
26
|
-
static create(configuration: ViewFinderScannerConfiguration,
|
|
26
|
+
static create<Scanner extends TextPatternScanner | VinScanner>(configuration: ViewFinderScannerConfiguration, props: TextPatternScannerProps<Scanner>): Promise<TextPatternScannerView<Scanner>>;
|
|
27
27
|
isDetectionPaused(): boolean;
|
|
28
28
|
resumeDetection(): Promise<void>;
|
|
29
29
|
pauseDetection(): void;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { BarcodeScannerConfiguration,
|
|
2
|
+
import { BarcodeScannerConfiguration, BarcodeScannerUiResult } from '../../configuration';
|
|
3
3
|
export declare class Props {
|
|
4
4
|
configuration: BarcodeScannerConfiguration;
|
|
5
5
|
onClose: () => void;
|
|
6
|
-
onSubmit: (barcodeScannerResult:
|
|
6
|
+
onSubmit: (barcodeScannerResult: BarcodeScannerUiResult) => void;
|
|
7
7
|
onError: (error: Error) => void;
|
|
8
8
|
}
|
|
9
9
|
export declare function BarcodeScannerController(props: Props): React.JSX.Element;
|