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.
- package/@types/barcode-scanner-view.d.ts +10 -10
- package/@types/consume-type.d.ts +7 -0
- package/@types/core/bridge/common.d.ts +24 -0
- package/@types/core/bridge/compiled/BarcodeConfigs.d.ts +973 -0
- package/@types/core/bridge/compiled/BarcodeScannerTypes.d.ts +183 -0
- package/@types/core/bridge/compiled/BarcodeTypes.d.ts +183 -0
- package/@types/core/bridge/compiled/CheckRecognizerTypes.d.ts +29 -0
- package/@types/core/bridge/compiled/CommonFieldType.d.ts +59 -0
- package/@types/core/bridge/compiled/DocumentDetectorTypes.d.ts +196 -0
- package/@types/core/bridge/compiled/DocumentQualityAnalyzerTypes.d.ts +105 -0
- package/@types/core/bridge/compiled/EhicTypes.d.ts +218 -0
- package/@types/core/bridge/compiled/FrameUtilities.d.ts +18 -0
- package/@types/core/bridge/compiled/GenericDocument.d.ts +198 -0
- package/@types/core/bridge/compiled/GenericDocumentRecognizerTypes.d.ts +104 -0
- package/@types/core/bridge/compiled/GenericTextLineScannerTypes.d.ts +165 -0
- package/@types/core/bridge/compiled/Geometry.d.ts +49 -0
- package/@types/core/bridge/compiled/ImageProcessorTypes.d.ts +13 -0
- package/@types/core/bridge/compiled/LicensePlateScannerTypes.d.ts +67 -0
- package/@types/core/bridge/compiled/MRZTypes.d.ts +52 -0
- package/@types/core/bridge/compiled/MedicalCertificateTypes.d.ts +306 -0
- package/@types/core/bridge/compiled/OcrElements.d.ts +129 -0
- package/@types/core/bridge/compiled/ParametricFilters.d.ts +186 -0
- package/@types/core/bridge/compiled/PdfConfig.d.ts +197 -0
- package/@types/core/bridge/compiled/TiffTypes.d.ts +183 -0
- package/@types/core/bridge/compiled_schemas_v3/BarcodeConfigs.d.ts +973 -0
- package/@types/core/bridge/compiled_schemas_v3/BarcodeScannerTypes.d.ts +183 -0
- package/@types/core/bridge/compiled_schemas_v3/BarcodeTypes.d.ts +183 -0
- package/@types/core/bridge/compiled_schemas_v3/CheckRecognizerTypes.d.ts +29 -0
- package/@types/core/bridge/compiled_schemas_v3/CommonFieldType.d.ts +59 -0
- package/@types/core/bridge/compiled_schemas_v3/DocumentDetectorTypes.d.ts +196 -0
- package/@types/core/bridge/compiled_schemas_v3/DocumentQualityAnalyzerTypes.d.ts +105 -0
- package/@types/core/bridge/compiled_schemas_v3/EhicTypes.d.ts +218 -0
- package/@types/core/bridge/compiled_schemas_v3/FrameUtilities.d.ts +18 -0
- package/@types/core/bridge/compiled_schemas_v3/GenericDocument.d.ts +198 -0
- package/@types/core/bridge/compiled_schemas_v3/GenericDocumentRecognizerTypes.d.ts +104 -0
- package/@types/core/bridge/compiled_schemas_v3/GenericTextLineScannerTypes.d.ts +165 -0
- package/@types/core/bridge/compiled_schemas_v3/Geometry.d.ts +49 -0
- package/@types/core/bridge/compiled_schemas_v3/ImageProcessorTypes.d.ts +13 -0
- package/@types/core/bridge/compiled_schemas_v3/LicensePlateScannerTypes.d.ts +67 -0
- package/@types/core/bridge/compiled_schemas_v3/MRZTypes.d.ts +52 -0
- package/@types/core/bridge/compiled_schemas_v3/MedicalCertificateTypes.d.ts +306 -0
- package/@types/core/bridge/compiled_schemas_v3/OcrElements.d.ts +129 -0
- package/@types/core/bridge/compiled_schemas_v3/ParametricFilters.d.ts +186 -0
- package/@types/core/bridge/compiled_schemas_v3/PdfConfig.d.ts +197 -0
- package/@types/core/bridge/compiled_schemas_v3/TiffTypes.d.ts +183 -0
- package/@types/core/bridge/utils.d.ts +7 -0
- package/@types/core/bridge/worker-bridge.d.ts +362 -0
- package/@types/core/worker/ScanbotSDK.Core-simd-threads.d.ts +0 -0
- package/@types/core/worker/ScanbotSDK.Core-simd.d.ts +0 -0
- package/@types/core/worker/ScanbotSDK.Core.d.ts +75 -0
- package/@types/core-types.d.ts +23 -0
- package/@types/cropping-view.d.ts +4 -2
- package/@types/document-scanner-view.d.ts +5 -5
- package/@types/generic-document-recognizer-view.d.ts +22 -0
- package/@types/index.d.ts +12 -19
- package/@types/interfaces/i-document-scanner-handle.d.ts +2 -2
- package/@types/interfaces/i-generic-document-recognizer-scanner-handle.d.ts +3 -0
- package/@types/model/barcode/barcode-result.d.ts +6 -8
- package/@types/model/barcode/barcode.d.ts +3 -14
- package/@types/model/configuration/barcode-scanner-configuration.d.ts +12 -8
- package/@types/model/configuration/cropping-view-configuration.d.ts +2 -1
- package/@types/model/configuration/document-scanner-configuration.d.ts +5 -20
- package/@types/model/configuration/generic-document-recognizer-configuration.d.ts +9 -0
- package/@types/model/configuration/initialization-options.d.ts +2 -1
- package/@types/model/configuration/mrz-scanner-configuration.d.ts +4 -3
- package/@types/model/configuration/scanner-configuration.d.ts +1 -0
- package/@types/model/configuration/selection-overlay-configuration.d.ts +2 -2
- package/@types/model/configuration/text-data-scanner-configuration.d.ts +3 -6
- package/@types/model/configuration/view-finder-scanner-configuration.d.ts +3 -2
- package/@types/model/configuration/vin-scanner-configuration.d.ts +2 -1
- package/@types/model/response/cropping-result.d.ts +2 -1
- package/@types/scanbot-sdk.d.ts +208 -29
- package/@types/service/document-quality-analyzer.d.ts +7 -5
- package/@types/service/generic-document-recognizer.d.ts +11 -0
- package/@types/service/ocr-engine.d.ts +8 -5
- package/@types/service/pdf-generator.d.ts +7 -95
- package/@types/service/public-utils.d.ts +1 -1
- package/@types/service/simple-mrz-recognizer.d.ts +5 -5
- package/@types/service/text-data-recognizer.d.ts +5 -4
- package/@types/service/tiff-generator.d.ts +12 -10
- package/@types/ui2/configuration/BarcodeInfoMapping.d.ts +1 -1
- package/@types/ui2/configuration/BarcodeItem.d.ts +4 -28
- package/@types/ui2/configuration/BarcodeRecognizerConfiguration.d.ts +12 -155
- package/@types/ui2/configuration/BarcodeScannerConfiguration.d.ts +2 -18
- package/@types/ui2/configuration/BarcodeScannerTypes.d.ts +6 -0
- package/@types/ui2/configuration/BarcodeTextLocalization.d.ts +0 -60
- package/@types/ui2/configuration/BarcodeTypes.d.ts +1 -0
- package/@types/ui2/configuration/BarcodeUseCase.d.ts +3 -0
- package/@types/ui2/configuration/CameraConfiguration.d.ts +22 -23
- package/@types/ui2/configuration/CameraPermission.d.ts +0 -15
- package/@types/ui2/configuration/Common.d.ts +0 -37
- package/@types/ui2/configuration/FindAndPickScanningModeUseCase.d.ts +2 -2
- package/@types/ui2/configuration/Geometry.d.ts +1 -0
- package/@types/ui2/configuration/MultipleScanningModeUseCase.d.ts +1 -1
- package/@types/ui2/configuration/SingleScanningModeUseCase.d.ts +1 -1
- package/@types/ui2/configuration/TopBarConfiguration.d.ts +0 -16
- package/@types/ui2/configuration/ViewFinderConfiguration.d.ts +6 -3
- package/@types/ui2/configuration.d.ts +1 -1
- package/@types/ui2/controllers/multiple-scanning-mode-controller.d.ts +2 -1
- package/@types/ui2/controllers/single-scanning-mode-controller.d.ts +2 -1
- package/@types/ui2/model/counted-barcodes.d.ts +13 -12
- package/@types/ui2/scanbot-sdk-ui.d.ts +2 -2
- package/@types/ui2/utils/barcode-mapper.d.ts +15 -3
- package/@types/ui2/utils/camera-config.d.ts +2 -2
- package/@types/ui2/utils/styled-input.d.ts +1 -1
- package/@types/ui2/views/action-button/action-button-container.d.ts +2 -0
- package/@types/ui2/views/barcode-scanner.d.ts +4 -3
- package/@types/ui2/views/drawer/subviews/barcode-list-item.d.ts +3 -3
- package/@types/ui2/views/form/dialog-button.d.ts +2 -2
- package/@types/utils/dto/MagneticLine.d.ts +4 -4
- package/@types/utils/dto/Point.d.ts +2 -2
- package/@types/utils/image-utils.d.ts +1 -0
- package/@types/utils/react/usePromise.d.ts +3 -1
- package/@types/utils/utils.d.ts +1 -1
- package/@types/utils/video-stream.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-calculation/scanned-image-with-overlay.d.ts +2 -2
- package/@types/view/barcode-polygon/animated-barcode-selection-overlay.d.ts +6 -5
- package/@types/view/barcode-polygon/barcode-overlay.d.ts +3 -3
- package/@types/view/barcode-polygon/barcode-polygon-label.d.ts +2 -2
- package/@types/view/cropping/draggable-base-container.d.ts +8 -2
- package/@types/view/cropping/draggable-handles-component.d.ts +9 -2
- package/@types/view/view-finder.d.ts +1 -0
- package/@types/worker/worker-bridge.d.ts +349 -5
- package/Libraries.txt +307 -174
- package/README.md +3 -3
- package/bundle/ScanbotSDK.min.js +5 -5
- package/bundle/ScanbotSDK.ui2.min.js +108 -161
- package/bundle/ScanbotSDK.ui2.min.js.LICENSE.txt +0 -18
- package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd-threads.js +1 -1
- package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd-threads.wasm +0 -0
- package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd.wasm +0 -0
- package/bundle/bin/barcode-scanner/ScanbotSDK.Asm.wasm +0 -0
- package/bundle/bin/barcode-scanner/ScanbotSDK.Core-simd-threads.js +1 -1
- package/bundle/bin/barcode-scanner/ScanbotSDK.Core-simd.js +1 -1
- package/bundle/bin/barcode-scanner/ScanbotSDK.Core.js +1 -1
- package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.js +1 -1
- package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.wasm +0 -0
- package/bundle/bin/complete/ScanbotSDK.Asm-simd.wasm +0 -0
- package/bundle/bin/complete/ScanbotSDK.Asm.wasm +0 -0
- package/bundle/bin/complete/ScanbotSDK.Core-simd-threads.js +1 -1
- package/bundle/bin/complete/ScanbotSDK.Core-simd.js +1 -1
- package/bundle/bin/complete/ScanbotSDK.Core.js +1 -1
- package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd-threads.js +1 -1
- package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd-threads.wasm +0 -0
- package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd.wasm +0 -0
- package/bundle/bin/document-scanner/ScanbotSDK.Asm.wasm +0 -0
- package/bundle/bin/document-scanner/ScanbotSDK.Core-simd-threads.js +1 -1
- package/bundle/bin/document-scanner/ScanbotSDK.Core-simd.js +1 -1
- package/bundle/bin/document-scanner/ScanbotSDK.Core.js +1 -1
- package/package.json +4 -3
- package/ui.d.ts +3 -0
- package/ui.js +2 -0
- package/webpack/fileLoader.js +3 -5
- package/@types/core/compiled/ParametricFilters.d.ts +0 -181
- package/@types/core/utils.d.ts +0 -1
- package/@types/core/worker-bridge.d.ts +0 -20
- package/@types/model/barcode/barcode-format.d.ts +0 -1
- package/@types/model/barcode/engine-mode.d.ts +0 -1
- package/@types/model/configuration/document-quality-analyzer-configuration.d.ts +0 -13
- package/@types/model/document/contour-detection-result.d.ts +0 -11
- package/@types/model/document/detection-status.d.ts +0 -11
- package/@types/model/document/document-detection-result.d.ts +0 -8
- package/@types/model/filter-types.d.ts +0 -6
- package/@types/model/generic-text-line-recognizer/text-data-scanner-result.d.ts +0 -6
- package/@types/model/mrz/mrz-result.d.ts +0 -41
- package/@types/model/response/document-quality-analyzer-result.d.ts +0 -8
- package/@types/service/image-processor.d.ts +0 -35
- package/@types/ui2/configuration/BarcodeResult.d.ts +0 -14
- package/@types/utils/networking.d.ts +0 -7
- package/bundle/bin/barcode-scanner/ScanbotSDK.Asm.wasm-webpack-file-loader +0 -0
- package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.wasm-webpack-file-loader +0 -0
- package/bundle/bin/complete/ScanbotSDK.Asm-simd.wasm-webpack-file-loader +0 -0
- package/bundle/bin/complete/ScanbotSDK.Asm.wasm-webpack-file-loader +0 -0
- package/bundle/bin/document-scanner/ScanbotSDK.Asm.wasm-webpack-file-loader +0 -0
|
@@ -0,0 +1,362 @@
|
|
|
1
|
+
import type { commands } from "../worker/ScanbotSDK.Core";
|
|
2
|
+
export interface WorkerBridgeInitOptions {
|
|
3
|
+
allowSimd?: boolean;
|
|
4
|
+
allowThreads?: boolean;
|
|
5
|
+
requestSuffix?: string;
|
|
6
|
+
}
|
|
7
|
+
export type CoreCommands = typeof commands;
|
|
8
|
+
export declare class WorkerBridge {
|
|
9
|
+
private instance;
|
|
10
|
+
private continuations;
|
|
11
|
+
private nextTicketId;
|
|
12
|
+
constructor(basePath: string, options: WorkerBridgeInitOptions);
|
|
13
|
+
private post;
|
|
14
|
+
private createProxy;
|
|
15
|
+
readonly copyArgs: {
|
|
16
|
+
initialize: (licenseKey?: string, engine?: string, appId?: string, cdnPath?: string, options?: {
|
|
17
|
+
captureConsole?: boolean;
|
|
18
|
+
allowThreads?: boolean;
|
|
19
|
+
jpegQuality?: number;
|
|
20
|
+
requestSuffix?: string;
|
|
21
|
+
}) => Promise<any>;
|
|
22
|
+
getLicenseInfo: () => Promise<any>;
|
|
23
|
+
encodeJpeg: (image: import("../worker/ScanbotSDK.Core").Image) => Promise<Uint8Array>;
|
|
24
|
+
detectDocument: (image: import("../worker/ScanbotSDK.Core").Image, options: {
|
|
25
|
+
acceptedAngleScore?: number;
|
|
26
|
+
acceptedSizeScore?: number;
|
|
27
|
+
acceptedBrightnessThreshold?: number;
|
|
28
|
+
requiredAspectRatios?: import("./compiled/Geometry").AspectRatio[];
|
|
29
|
+
rectangleOfInterest?: import("./common").Rectangle;
|
|
30
|
+
_marker?: () => void;
|
|
31
|
+
}) => Promise<import("./compiled/DocumentDetectorTypes").DetectionResult>;
|
|
32
|
+
detectAndCropDocument: (image: import("../worker/ScanbotSDK.Core").Image) => Promise<import("../worker/ScanbotSDK.Core").CroppedDetectionResult>;
|
|
33
|
+
createDocumentDetector: (options: {
|
|
34
|
+
acceptedAngleScore?: number;
|
|
35
|
+
acceptedSizeScore?: number;
|
|
36
|
+
acceptedBrightnessThreshold?: number;
|
|
37
|
+
requiredAspectRatios?: import("./compiled/Geometry").AspectRatio[];
|
|
38
|
+
rectangleOfInterest?: import("./common").Rectangle;
|
|
39
|
+
_marker?: () => void;
|
|
40
|
+
}) => Promise<import("../worker/ScanbotSDK.Core").ObjectId<"DocumentDetector">>;
|
|
41
|
+
documentDetectorDetect: (documentDetectorToken: import("../worker/ScanbotSDK.Core").ObjectId<"DocumentDetector">, image: import("../worker/ScanbotSDK.Core").Image) => Promise<import("./compiled/DocumentDetectorTypes").DetectionResult>;
|
|
42
|
+
parseBarcodeDocument: (options: import("./compiled/BarcodeScannerTypes").BarcodeDocumentFormat[], data: string) => Promise<import("./compiled/GenericDocument").GenericDocument>;
|
|
43
|
+
createBarcodeRecognizer: (options: {
|
|
44
|
+
configurators?: import("./compiled/BarcodeConfigs").BarcodeConfig[];
|
|
45
|
+
engineMode?: import("./compiled/BarcodeScannerTypes").EngineMode;
|
|
46
|
+
live?: boolean;
|
|
47
|
+
acceptedDocumentFormats?: import("./compiled/BarcodeScannerTypes").BarcodeDocumentFormat[];
|
|
48
|
+
returnBarcodeImage?: boolean;
|
|
49
|
+
_marker?: () => void;
|
|
50
|
+
}) => Promise<import("../worker/ScanbotSDK.Core").ObjectId<"BarcodeRecognizer">>;
|
|
51
|
+
recognizeBarcodes: (barcodeRecognizerToken: import("../worker/ScanbotSDK.Core").ObjectId<"BarcodeRecognizer">, image: import("../worker/ScanbotSDK.Core").Image) => Promise<import("./compiled/BarcodeScannerTypes").BarcodeScannerResult>;
|
|
52
|
+
beginPdf: (options: {
|
|
53
|
+
readonly attributes?: {
|
|
54
|
+
readonly author?: string;
|
|
55
|
+
readonly creator?: string;
|
|
56
|
+
readonly title?: string;
|
|
57
|
+
readonly subject?: string;
|
|
58
|
+
readonly keywords?: string;
|
|
59
|
+
_marker?: () => void;
|
|
60
|
+
};
|
|
61
|
+
readonly pageSize?: import("./compiled/PdfConfig").PageSize;
|
|
62
|
+
readonly pageDirection?: import("./compiled/PdfConfig").PageDirection;
|
|
63
|
+
readonly pageFit?: import("./compiled/PdfConfig").PageFit;
|
|
64
|
+
readonly dpi?: number;
|
|
65
|
+
readonly jpegQuality?: number;
|
|
66
|
+
readonly resamplingMethod?: import("./compiled/PdfConfig").ResamplingMethod;
|
|
67
|
+
_marker?: () => void;
|
|
68
|
+
}) => Promise<import("../worker/ScanbotSDK.Core").ObjectId<"PdfGenerationContext">>;
|
|
69
|
+
addPageToPdf: (pdfOperation: import("../worker/ScanbotSDK.Core").ObjectId<"PdfGenerationContext">, image: import("../worker/ScanbotSDK.Core").Image) => Promise<void>;
|
|
70
|
+
completePdf: (pdfOperation: import("../worker/ScanbotSDK.Core").ObjectId<"PdfGenerationContext">) => Promise<Uint8Array>;
|
|
71
|
+
beginTiff: (options: {
|
|
72
|
+
compression?: import("./compiled/TiffTypes").CompressionMode;
|
|
73
|
+
jpegQuality?: number;
|
|
74
|
+
zipCompressionLevel?: number;
|
|
75
|
+
dpi?: number;
|
|
76
|
+
userFields?: import("./compiled/TiffTypes").UserField[];
|
|
77
|
+
binarizationFilter?: {
|
|
78
|
+
readonly _type?: "ScanbotBinarizationFilter";
|
|
79
|
+
outputMode?: import("./compiled/ParametricFilters").OutputMode;
|
|
80
|
+
_marker?: () => void;
|
|
81
|
+
} | {
|
|
82
|
+
readonly _type?: "CustomBinarizationFilter";
|
|
83
|
+
outputMode?: import("./compiled/ParametricFilters").OutputMode;
|
|
84
|
+
denoise?: number;
|
|
85
|
+
radius?: number;
|
|
86
|
+
preset?: import("./compiled/ParametricFilters").BinarizationFilterPreset;
|
|
87
|
+
_marker?: () => void;
|
|
88
|
+
} | {
|
|
89
|
+
readonly _type?: "ColorDocumentFilter";
|
|
90
|
+
_marker?: () => void;
|
|
91
|
+
} | {
|
|
92
|
+
readonly _type?: "BrightnessFilter";
|
|
93
|
+
brightness?: number;
|
|
94
|
+
_marker?: () => void;
|
|
95
|
+
} | {
|
|
96
|
+
readonly _type?: "ContrastFilter";
|
|
97
|
+
contrast?: number;
|
|
98
|
+
_marker?: () => void;
|
|
99
|
+
} | {
|
|
100
|
+
readonly _type?: "GrayscaleFilter";
|
|
101
|
+
borderWidthFraction?: number;
|
|
102
|
+
blackOutliersFraction?: number;
|
|
103
|
+
whiteOutliersFraction?: number;
|
|
104
|
+
_marker?: () => void;
|
|
105
|
+
} | {
|
|
106
|
+
readonly _type?: "LegacyFilter";
|
|
107
|
+
filterType?: number;
|
|
108
|
+
_marker?: () => void;
|
|
109
|
+
} | {
|
|
110
|
+
readonly _type?: "WhiteBlackPointFilter";
|
|
111
|
+
blackPoint?: number;
|
|
112
|
+
whitePoint?: number;
|
|
113
|
+
_marker?: () => void;
|
|
114
|
+
};
|
|
115
|
+
_marker?: () => void;
|
|
116
|
+
}) => Promise<import("../worker/ScanbotSDK.Core").ObjectId<"TiffGenerationContext">>;
|
|
117
|
+
addPageToTiff: (tiffOperation: import("../worker/ScanbotSDK.Core").ObjectId<"TiffGenerationContext">, image: import("../worker/ScanbotSDK.Core").Image, binarize: import("./compiled/TiffTypes").Binarize) => Promise<unknown>;
|
|
118
|
+
completeTiff: (tiffOperation: import("../worker/ScanbotSDK.Core").ObjectId<"TiffGenerationContext">) => Promise<Uint8Array>;
|
|
119
|
+
createMRZRecognizer: (configuration: {
|
|
120
|
+
accumulatedResultsVerifierConfig?: {
|
|
121
|
+
maximumNumberOfAccumulatedFrames?: number;
|
|
122
|
+
minimumNumberOfRequiredFramesWithEqualRecognitionResult?: number;
|
|
123
|
+
_marker?: () => void;
|
|
124
|
+
};
|
|
125
|
+
_marker?: () => void;
|
|
126
|
+
}) => Promise<import("../worker/ScanbotSDK.Core").ObjectId<"MrzRecognizerContext">>;
|
|
127
|
+
recognizeMRZ: (mrzRecognizerToken: import("../worker/ScanbotSDK.Core").ObjectId<"MrzRecognizerContext">, image: import("../worker/ScanbotSDK.Core").Image) => Promise<import("./compiled/MRZTypes").RecognitionResult>;
|
|
128
|
+
releaseObject: <T>(objectToken: import("../worker/ScanbotSDK.Core").ObjectId<T>) => Promise<void>;
|
|
129
|
+
createOcrEngine: () => Promise<import("../worker/ScanbotSDK.Core").ObjectId<"TLDROcrContext">>;
|
|
130
|
+
performOcr: (tldrOcrToken: import("../worker/ScanbotSDK.Core").ObjectId<"TLDROcrContext">, image: import("../worker/ScanbotSDK.Core").Image) => Promise<import("./compiled/OcrElements").Page>;
|
|
131
|
+
createGenericTextLineScanner: (configuration: {
|
|
132
|
+
ocrResolutionLimit?: number;
|
|
133
|
+
maximumNumberOfAccumulatedFrames?: number;
|
|
134
|
+
minimumNumberOfRequiredFramesWithEqualRecognitionResult?: number;
|
|
135
|
+
validator?: {
|
|
136
|
+
readonly _type?: "DefaultContentValidator";
|
|
137
|
+
allowedCharacters?: string;
|
|
138
|
+
_marker?: () => void;
|
|
139
|
+
} | {
|
|
140
|
+
readonly _type?: "PresetContentValidator";
|
|
141
|
+
preset?: "VEHICLE_IDENTIFICATION_NUMBER";
|
|
142
|
+
_marker?: () => void;
|
|
143
|
+
} | {
|
|
144
|
+
readonly _type?: "PatternContentValidator";
|
|
145
|
+
allowedCharacters?: string;
|
|
146
|
+
pattern?: string;
|
|
147
|
+
matchSubstring?: boolean;
|
|
148
|
+
_marker?: () => void;
|
|
149
|
+
};
|
|
150
|
+
_marker?: () => void;
|
|
151
|
+
}) => Promise<import("../worker/ScanbotSDK.Core").ObjectId<"GenericTextLineScanner">>;
|
|
152
|
+
recognizeTextLine: (scannerToken: import("../worker/ScanbotSDK.Core").ObjectId<"GenericTextLineScanner">, image: import("../worker/ScanbotSDK.Core").Image) => Promise<import("./compiled/GenericTextLineScannerTypes").ScannerResult>;
|
|
153
|
+
cleanTextLineRecognitionQueue: (scannerToken: import("../worker/ScanbotSDK.Core").ObjectId<"GenericTextLineScanner">) => Promise<void>;
|
|
154
|
+
createDocumentQualityAnalyzer: (options: {
|
|
155
|
+
readonly qualityThresholds?: import("./compiled/DocumentQualityAnalyzerTypes").QualityThreshold[];
|
|
156
|
+
readonly qualityIndices?: import("./compiled/DocumentQualityAnalyzerTypes").Quality[];
|
|
157
|
+
readonly maxImageSize?: number;
|
|
158
|
+
minEstimatedNumberOfSymbolsForDocument?: number;
|
|
159
|
+
readonly minProcessedFraction?: number;
|
|
160
|
+
readonly maxProcessedFraction?: number;
|
|
161
|
+
readonly earlyStopIfNSymbolsFound?: number;
|
|
162
|
+
readonly tileSize?: number;
|
|
163
|
+
_marker?: () => void;
|
|
164
|
+
}) => Promise<import("../worker/ScanbotSDK.Core").ObjectId<"DocumentQualityAnalyzer">>;
|
|
165
|
+
documentQualityAnalyzerAnalyze: (dqaToken: import("../worker/ScanbotSDK.Core").ObjectId<"DocumentQualityAnalyzer">, image: import("../worker/ScanbotSDK.Core").Image) => Promise<import("./compiled/DocumentQualityAnalyzerTypes").AnalysisResult>;
|
|
166
|
+
imageApplyFilter: (image: import("../worker/ScanbotSDK.Core").Image, filter: import("./common").DeepPartial<import("./compiled/ParametricFilters").ParametricFilter>) => Promise<import("./common").RawImage>;
|
|
167
|
+
imageCrop: (image: import("../worker/ScanbotSDK.Core").Image, polygon: [import("./common").Point, import("./common").Point, import("./common").Point, import("./common").Point]) => Promise<import("./common").RawImage>;
|
|
168
|
+
imageResize: (image: import("../worker/ScanbotSDK.Core").Image, destinationSize: number) => Promise<import("./common").RawImage>;
|
|
169
|
+
imageRotate: (image: import("../worker/ScanbotSDK.Core").Image, rotations: import("./compiled/ImageProcessorTypes").ImageRotation) => Promise<import("./common").RawImage>;
|
|
170
|
+
genericDocumentRecognizerCreate: (config: {
|
|
171
|
+
resultAccumulationConfig?: {
|
|
172
|
+
minConfirmations?: number;
|
|
173
|
+
minConfidenceForStableField?: number;
|
|
174
|
+
autoClearThreshold?: number;
|
|
175
|
+
_marker?: () => void;
|
|
176
|
+
};
|
|
177
|
+
fieldExcludeList?: string[];
|
|
178
|
+
acceptedDocumentTypes?: string[];
|
|
179
|
+
_marker?: () => void;
|
|
180
|
+
}) => Promise<import("../worker/ScanbotSDK.Core").ObjectId<"GenericDocumentRecognizer">>;
|
|
181
|
+
genericDocumentRecognizerRecognize: (gdrToken: import("../worker/ScanbotSDK.Core").ObjectId<"GenericDocumentRecognizer">, image: import("../worker/ScanbotSDK.Core").Image, parameters: {
|
|
182
|
+
mode?: import("./compiled/GenericDocumentRecognizerTypes").RecognitionMode;
|
|
183
|
+
_marker?: () => void;
|
|
184
|
+
}) => Promise<import("./compiled/GenericDocumentRecognizerTypes").RecognitionResult>;
|
|
185
|
+
__hasModuleFunction: (functionName: string) => Promise<any>;
|
|
186
|
+
__callModuleFunction: (functionName: string, args?: any[]) => Promise<any>;
|
|
187
|
+
};
|
|
188
|
+
readonly transferArgs: {
|
|
189
|
+
initialize: (licenseKey?: string, engine?: string, appId?: string, cdnPath?: string, options?: {
|
|
190
|
+
captureConsole?: boolean;
|
|
191
|
+
allowThreads?: boolean;
|
|
192
|
+
jpegQuality?: number;
|
|
193
|
+
requestSuffix?: string;
|
|
194
|
+
}) => Promise<any>;
|
|
195
|
+
getLicenseInfo: () => Promise<any>;
|
|
196
|
+
encodeJpeg: (image: import("../worker/ScanbotSDK.Core").Image) => Promise<Uint8Array>;
|
|
197
|
+
detectDocument: (image: import("../worker/ScanbotSDK.Core").Image, options: {
|
|
198
|
+
acceptedAngleScore?: number;
|
|
199
|
+
acceptedSizeScore?: number;
|
|
200
|
+
acceptedBrightnessThreshold?: number;
|
|
201
|
+
requiredAspectRatios?: import("./compiled/Geometry").AspectRatio[];
|
|
202
|
+
rectangleOfInterest?: import("./common").Rectangle;
|
|
203
|
+
_marker?: () => void;
|
|
204
|
+
}) => Promise<import("./compiled/DocumentDetectorTypes").DetectionResult>;
|
|
205
|
+
detectAndCropDocument: (image: import("../worker/ScanbotSDK.Core").Image) => Promise<import("../worker/ScanbotSDK.Core").CroppedDetectionResult>;
|
|
206
|
+
createDocumentDetector: (options: {
|
|
207
|
+
acceptedAngleScore?: number;
|
|
208
|
+
acceptedSizeScore?: number;
|
|
209
|
+
acceptedBrightnessThreshold?: number;
|
|
210
|
+
requiredAspectRatios?: import("./compiled/Geometry").AspectRatio[];
|
|
211
|
+
rectangleOfInterest?: import("./common").Rectangle;
|
|
212
|
+
_marker?: () => void;
|
|
213
|
+
}) => Promise<import("../worker/ScanbotSDK.Core").ObjectId<"DocumentDetector">>;
|
|
214
|
+
documentDetectorDetect: (documentDetectorToken: import("../worker/ScanbotSDK.Core").ObjectId<"DocumentDetector">, image: import("../worker/ScanbotSDK.Core").Image) => Promise<import("./compiled/DocumentDetectorTypes").DetectionResult>;
|
|
215
|
+
parseBarcodeDocument: (options: import("./compiled/BarcodeScannerTypes").BarcodeDocumentFormat[], data: string) => Promise<import("./compiled/GenericDocument").GenericDocument>;
|
|
216
|
+
createBarcodeRecognizer: (options: {
|
|
217
|
+
configurators?: import("./compiled/BarcodeConfigs").BarcodeConfig[];
|
|
218
|
+
engineMode?: import("./compiled/BarcodeScannerTypes").EngineMode;
|
|
219
|
+
live?: boolean;
|
|
220
|
+
acceptedDocumentFormats?: import("./compiled/BarcodeScannerTypes").BarcodeDocumentFormat[];
|
|
221
|
+
returnBarcodeImage?: boolean;
|
|
222
|
+
_marker?: () => void;
|
|
223
|
+
}) => Promise<import("../worker/ScanbotSDK.Core").ObjectId<"BarcodeRecognizer">>;
|
|
224
|
+
recognizeBarcodes: (barcodeRecognizerToken: import("../worker/ScanbotSDK.Core").ObjectId<"BarcodeRecognizer">, image: import("../worker/ScanbotSDK.Core").Image) => Promise<import("./compiled/BarcodeScannerTypes").BarcodeScannerResult>;
|
|
225
|
+
beginPdf: (options: {
|
|
226
|
+
readonly attributes?: {
|
|
227
|
+
readonly author?: string;
|
|
228
|
+
readonly creator?: string;
|
|
229
|
+
readonly title?: string;
|
|
230
|
+
readonly subject?: string;
|
|
231
|
+
readonly keywords?: string;
|
|
232
|
+
_marker?: () => void;
|
|
233
|
+
};
|
|
234
|
+
readonly pageSize?: import("./compiled/PdfConfig").PageSize;
|
|
235
|
+
readonly pageDirection?: import("./compiled/PdfConfig").PageDirection;
|
|
236
|
+
readonly pageFit?: import("./compiled/PdfConfig").PageFit;
|
|
237
|
+
readonly dpi?: number;
|
|
238
|
+
readonly jpegQuality?: number;
|
|
239
|
+
readonly resamplingMethod?: import("./compiled/PdfConfig").ResamplingMethod;
|
|
240
|
+
_marker?: () => void;
|
|
241
|
+
}) => Promise<import("../worker/ScanbotSDK.Core").ObjectId<"PdfGenerationContext">>;
|
|
242
|
+
addPageToPdf: (pdfOperation: import("../worker/ScanbotSDK.Core").ObjectId<"PdfGenerationContext">, image: import("../worker/ScanbotSDK.Core").Image) => Promise<void>;
|
|
243
|
+
completePdf: (pdfOperation: import("../worker/ScanbotSDK.Core").ObjectId<"PdfGenerationContext">) => Promise<Uint8Array>;
|
|
244
|
+
beginTiff: (options: {
|
|
245
|
+
compression?: import("./compiled/TiffTypes").CompressionMode;
|
|
246
|
+
jpegQuality?: number;
|
|
247
|
+
zipCompressionLevel?: number;
|
|
248
|
+
dpi?: number;
|
|
249
|
+
userFields?: import("./compiled/TiffTypes").UserField[];
|
|
250
|
+
binarizationFilter?: {
|
|
251
|
+
readonly _type?: "ScanbotBinarizationFilter";
|
|
252
|
+
outputMode?: import("./compiled/ParametricFilters").OutputMode;
|
|
253
|
+
_marker?: () => void;
|
|
254
|
+
} | {
|
|
255
|
+
readonly _type?: "CustomBinarizationFilter";
|
|
256
|
+
outputMode?: import("./compiled/ParametricFilters").OutputMode;
|
|
257
|
+
denoise?: number;
|
|
258
|
+
radius?: number;
|
|
259
|
+
preset?: import("./compiled/ParametricFilters").BinarizationFilterPreset;
|
|
260
|
+
_marker?: () => void;
|
|
261
|
+
} | {
|
|
262
|
+
readonly _type?: "ColorDocumentFilter";
|
|
263
|
+
_marker?: () => void;
|
|
264
|
+
} | {
|
|
265
|
+
readonly _type?: "BrightnessFilter";
|
|
266
|
+
brightness?: number;
|
|
267
|
+
_marker?: () => void;
|
|
268
|
+
} | {
|
|
269
|
+
readonly _type?: "ContrastFilter";
|
|
270
|
+
contrast?: number;
|
|
271
|
+
_marker?: () => void;
|
|
272
|
+
} | {
|
|
273
|
+
readonly _type?: "GrayscaleFilter";
|
|
274
|
+
borderWidthFraction?: number;
|
|
275
|
+
blackOutliersFraction?: number;
|
|
276
|
+
whiteOutliersFraction?: number;
|
|
277
|
+
_marker?: () => void;
|
|
278
|
+
} | {
|
|
279
|
+
readonly _type?: "LegacyFilter";
|
|
280
|
+
filterType?: number;
|
|
281
|
+
_marker?: () => void;
|
|
282
|
+
} | {
|
|
283
|
+
readonly _type?: "WhiteBlackPointFilter";
|
|
284
|
+
blackPoint?: number;
|
|
285
|
+
whitePoint?: number;
|
|
286
|
+
_marker?: () => void;
|
|
287
|
+
};
|
|
288
|
+
_marker?: () => void;
|
|
289
|
+
}) => Promise<import("../worker/ScanbotSDK.Core").ObjectId<"TiffGenerationContext">>;
|
|
290
|
+
addPageToTiff: (tiffOperation: import("../worker/ScanbotSDK.Core").ObjectId<"TiffGenerationContext">, image: import("../worker/ScanbotSDK.Core").Image, binarize: import("./compiled/TiffTypes").Binarize) => Promise<unknown>;
|
|
291
|
+
completeTiff: (tiffOperation: import("../worker/ScanbotSDK.Core").ObjectId<"TiffGenerationContext">) => Promise<Uint8Array>;
|
|
292
|
+
createMRZRecognizer: (configuration: {
|
|
293
|
+
accumulatedResultsVerifierConfig?: {
|
|
294
|
+
maximumNumberOfAccumulatedFrames?: number;
|
|
295
|
+
minimumNumberOfRequiredFramesWithEqualRecognitionResult?: number;
|
|
296
|
+
_marker?: () => void;
|
|
297
|
+
};
|
|
298
|
+
_marker?: () => void;
|
|
299
|
+
}) => Promise<import("../worker/ScanbotSDK.Core").ObjectId<"MrzRecognizerContext">>;
|
|
300
|
+
recognizeMRZ: (mrzRecognizerToken: import("../worker/ScanbotSDK.Core").ObjectId<"MrzRecognizerContext">, image: import("../worker/ScanbotSDK.Core").Image) => Promise<import("./compiled/MRZTypes").RecognitionResult>;
|
|
301
|
+
releaseObject: <T>(objectToken: import("../worker/ScanbotSDK.Core").ObjectId<T>) => Promise<void>;
|
|
302
|
+
createOcrEngine: () => Promise<import("../worker/ScanbotSDK.Core").ObjectId<"TLDROcrContext">>;
|
|
303
|
+
performOcr: (tldrOcrToken: import("../worker/ScanbotSDK.Core").ObjectId<"TLDROcrContext">, image: import("../worker/ScanbotSDK.Core").Image) => Promise<import("./compiled/OcrElements").Page>;
|
|
304
|
+
createGenericTextLineScanner: (configuration: {
|
|
305
|
+
ocrResolutionLimit?: number;
|
|
306
|
+
maximumNumberOfAccumulatedFrames?: number;
|
|
307
|
+
minimumNumberOfRequiredFramesWithEqualRecognitionResult?: number;
|
|
308
|
+
validator?: {
|
|
309
|
+
readonly _type?: "DefaultContentValidator";
|
|
310
|
+
allowedCharacters?: string;
|
|
311
|
+
_marker?: () => void;
|
|
312
|
+
} | {
|
|
313
|
+
readonly _type?: "PresetContentValidator";
|
|
314
|
+
preset?: "VEHICLE_IDENTIFICATION_NUMBER";
|
|
315
|
+
_marker?: () => void;
|
|
316
|
+
} | {
|
|
317
|
+
readonly _type?: "PatternContentValidator";
|
|
318
|
+
allowedCharacters?: string;
|
|
319
|
+
pattern?: string;
|
|
320
|
+
matchSubstring?: boolean;
|
|
321
|
+
_marker?: () => void;
|
|
322
|
+
};
|
|
323
|
+
_marker?: () => void;
|
|
324
|
+
}) => Promise<import("../worker/ScanbotSDK.Core").ObjectId<"GenericTextLineScanner">>;
|
|
325
|
+
recognizeTextLine: (scannerToken: import("../worker/ScanbotSDK.Core").ObjectId<"GenericTextLineScanner">, image: import("../worker/ScanbotSDK.Core").Image) => Promise<import("./compiled/GenericTextLineScannerTypes").ScannerResult>;
|
|
326
|
+
cleanTextLineRecognitionQueue: (scannerToken: import("../worker/ScanbotSDK.Core").ObjectId<"GenericTextLineScanner">) => Promise<void>;
|
|
327
|
+
createDocumentQualityAnalyzer: (options: {
|
|
328
|
+
readonly qualityThresholds?: import("./compiled/DocumentQualityAnalyzerTypes").QualityThreshold[];
|
|
329
|
+
readonly qualityIndices?: import("./compiled/DocumentQualityAnalyzerTypes").Quality[];
|
|
330
|
+
readonly maxImageSize?: number;
|
|
331
|
+
minEstimatedNumberOfSymbolsForDocument?: number;
|
|
332
|
+
readonly minProcessedFraction?: number;
|
|
333
|
+
readonly maxProcessedFraction?: number;
|
|
334
|
+
readonly earlyStopIfNSymbolsFound?: number;
|
|
335
|
+
readonly tileSize?: number;
|
|
336
|
+
_marker?: () => void;
|
|
337
|
+
}) => Promise<import("../worker/ScanbotSDK.Core").ObjectId<"DocumentQualityAnalyzer">>;
|
|
338
|
+
documentQualityAnalyzerAnalyze: (dqaToken: import("../worker/ScanbotSDK.Core").ObjectId<"DocumentQualityAnalyzer">, image: import("../worker/ScanbotSDK.Core").Image) => Promise<import("./compiled/DocumentQualityAnalyzerTypes").AnalysisResult>;
|
|
339
|
+
imageApplyFilter: (image: import("../worker/ScanbotSDK.Core").Image, filter: import("./common").DeepPartial<import("./compiled/ParametricFilters").ParametricFilter>) => Promise<import("./common").RawImage>;
|
|
340
|
+
imageCrop: (image: import("../worker/ScanbotSDK.Core").Image, polygon: [import("./common").Point, import("./common").Point, import("./common").Point, import("./common").Point]) => Promise<import("./common").RawImage>;
|
|
341
|
+
imageResize: (image: import("../worker/ScanbotSDK.Core").Image, destinationSize: number) => Promise<import("./common").RawImage>;
|
|
342
|
+
imageRotate: (image: import("../worker/ScanbotSDK.Core").Image, rotations: import("./compiled/ImageProcessorTypes").ImageRotation) => Promise<import("./common").RawImage>;
|
|
343
|
+
genericDocumentRecognizerCreate: (config: {
|
|
344
|
+
resultAccumulationConfig?: {
|
|
345
|
+
minConfirmations?: number;
|
|
346
|
+
minConfidenceForStableField?: number;
|
|
347
|
+
autoClearThreshold?: number;
|
|
348
|
+
_marker?: () => void;
|
|
349
|
+
};
|
|
350
|
+
fieldExcludeList?: string[];
|
|
351
|
+
acceptedDocumentTypes?: string[];
|
|
352
|
+
_marker?: () => void;
|
|
353
|
+
}) => Promise<import("../worker/ScanbotSDK.Core").ObjectId<"GenericDocumentRecognizer">>;
|
|
354
|
+
genericDocumentRecognizerRecognize: (gdrToken: import("../worker/ScanbotSDK.Core").ObjectId<"GenericDocumentRecognizer">, image: import("../worker/ScanbotSDK.Core").Image, parameters: {
|
|
355
|
+
mode?: import("./compiled/GenericDocumentRecognizerTypes").RecognitionMode;
|
|
356
|
+
_marker?: () => void;
|
|
357
|
+
}) => Promise<import("./compiled/GenericDocumentRecognizerTypes").RecognitionResult>;
|
|
358
|
+
__hasModuleFunction: (functionName: string) => Promise<any>;
|
|
359
|
+
__callModuleFunction: (functionName: string, args?: any[]) => Promise<any>;
|
|
360
|
+
};
|
|
361
|
+
destroy(): void;
|
|
362
|
+
}
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { PdfConfig } from "../bridge/compiled/PdfConfig";
|
|
2
|
+
import { type RecognitionResult as MrzRecognitionResult, RecognizerConfiguration as MrzRecognizerConfig } from "../bridge/compiled/MRZTypes";
|
|
3
|
+
import { Config as DqaConfig, type AnalysisResult as DqaAnalysisResult } from "../bridge/compiled/DocumentQualityAnalyzerTypes";
|
|
4
|
+
import { ParametricFilter } from "../bridge/compiled/ParametricFilters";
|
|
5
|
+
import type { ImageRotation } from "../bridge/compiled/ImageProcessorTypes";
|
|
6
|
+
import { DetectionParameters, type DetectionResult } from "../bridge/compiled/DocumentDetectorTypes";
|
|
7
|
+
import { ScannerConfiguration as GtsConfig, type ScannerResult as GtsResult } from "../bridge/compiled/GenericTextLineScannerTypes";
|
|
8
|
+
import type { Page } from "../bridge/compiled/OcrElements";
|
|
9
|
+
import { type BarcodeDocumentFormat, BarcodeRecognizerParameters, type BarcodeScannerResult } from "../bridge/compiled/BarcodeScannerTypes";
|
|
10
|
+
import { GenericDocumentRecognizerConfig, RecognitionParameters as GdrRecognitionParameters, type RecognitionResult as GdrRecognitionResult } from "../bridge/compiled/GenericDocumentRecognizerTypes";
|
|
11
|
+
import { type Binarize, TIFFWriterParameters } from "../bridge/compiled/TiffTypes";
|
|
12
|
+
import type { RawImage, Point, DeepPartial } from "../bridge/common";
|
|
13
|
+
import type { GenericDocument } from "../bridge/compiled/GenericDocument";
|
|
14
|
+
/** Represents an object of type T residing in the WASM's memory. */
|
|
15
|
+
export declare class ObjectId<T> {
|
|
16
|
+
readonly id: string;
|
|
17
|
+
/** @internal */
|
|
18
|
+
readonly _type?: T;
|
|
19
|
+
constructor(id: string);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Represents an image in a format that can be consumed by the WASM module.
|
|
23
|
+
* That is
|
|
24
|
+
* - either an ImageData object,
|
|
25
|
+
* - an ArrayBuffer or Uint8Array containing the binary data of an encoded image (most common image formats such as PNG and JPEG are supported),
|
|
26
|
+
* - or a RawImage, which are obtained by several SDK functions.
|
|
27
|
+
* */
|
|
28
|
+
export type Image = ImageData | ArrayBuffer | Uint8Array | RawImage;
|
|
29
|
+
type InitializeOptions = {
|
|
30
|
+
captureConsole?: boolean;
|
|
31
|
+
allowThreads?: boolean;
|
|
32
|
+
jpegQuality?: number;
|
|
33
|
+
requestSuffix?: string;
|
|
34
|
+
};
|
|
35
|
+
export declare const commands: {
|
|
36
|
+
initialize: (licenseKey?: string, engine?: string, appId?: string, cdnPath?: string, options?: InitializeOptions) => Promise<any>;
|
|
37
|
+
getLicenseInfo: () => Promise<any>;
|
|
38
|
+
encodeJpeg: (image: Image) => Promise<Uint8Array>;
|
|
39
|
+
detectDocument: (image: Image, options: DeepPartial<DetectionParameters>) => Promise<DetectionResult>;
|
|
40
|
+
detectAndCropDocument: (image: Image) => Promise<CroppedDetectionResult>;
|
|
41
|
+
createDocumentDetector: (options: DeepPartial<DetectionParameters>) => Promise<ObjectId<"DocumentDetector">>;
|
|
42
|
+
documentDetectorDetect: (documentDetectorToken: ObjectId<"DocumentDetector">, image: Image) => Promise<DetectionResult>;
|
|
43
|
+
parseBarcodeDocument: (options: BarcodeDocumentFormat[], data: string) => Promise<GenericDocument | null>;
|
|
44
|
+
createBarcodeRecognizer: (options: DeepPartial<BarcodeRecognizerParameters>) => Promise<ObjectId<"BarcodeRecognizer">>;
|
|
45
|
+
recognizeBarcodes: (barcodeRecognizerToken: ObjectId<"BarcodeRecognizer">, image: Image) => Promise<BarcodeScannerResult>;
|
|
46
|
+
beginPdf: (options: DeepPartial<PdfConfig>) => Promise<ObjectId<"PdfGenerationContext">>;
|
|
47
|
+
addPageToPdf: (pdfOperation: ObjectId<"PdfGenerationContext">, image: Image) => Promise<void>;
|
|
48
|
+
completePdf: (pdfOperation: ObjectId<"PdfGenerationContext">) => Promise<Uint8Array>;
|
|
49
|
+
beginTiff: (options: DeepPartial<TIFFWriterParameters>) => Promise<ObjectId<"TiffGenerationContext">>;
|
|
50
|
+
addPageToTiff: (tiffOperation: ObjectId<"TiffGenerationContext">, image: Image, binarize: Binarize) => Promise<unknown>;
|
|
51
|
+
completeTiff: (tiffOperation: ObjectId<"TiffGenerationContext">) => Promise<Uint8Array>;
|
|
52
|
+
createMRZRecognizer: (configuration: DeepPartial<MrzRecognizerConfig>) => Promise<ObjectId<"MrzRecognizerContext">>;
|
|
53
|
+
recognizeMRZ: (mrzRecognizerToken: ObjectId<"MrzRecognizerContext">, image: Image) => Promise<MrzRecognitionResult>;
|
|
54
|
+
releaseObject: <T>(objectToken: ObjectId<T>) => Promise<void>;
|
|
55
|
+
createOcrEngine: () => Promise<ObjectId<"TLDROcrContext">>;
|
|
56
|
+
performOcr: (tldrOcrToken: ObjectId<"TLDROcrContext">, image: Image) => Promise<Page>;
|
|
57
|
+
createGenericTextLineScanner: (configuration: DeepPartial<GtsConfig>) => Promise<ObjectId<"GenericTextLineScanner">>;
|
|
58
|
+
recognizeTextLine: (scannerToken: ObjectId<"GenericTextLineScanner">, image: Image) => Promise<GtsResult>;
|
|
59
|
+
cleanTextLineRecognitionQueue: (scannerToken: ObjectId<"GenericTextLineScanner">) => Promise<void>;
|
|
60
|
+
createDocumentQualityAnalyzer: (options: DeepPartial<DqaConfig>) => Promise<ObjectId<"DocumentQualityAnalyzer">>;
|
|
61
|
+
documentQualityAnalyzerAnalyze: (dqaToken: ObjectId<"DocumentQualityAnalyzer">, image: Image) => Promise<DqaAnalysisResult>;
|
|
62
|
+
imageApplyFilter: (image: Image, filter: DeepPartial<ParametricFilter>) => Promise<RawImage>;
|
|
63
|
+
imageCrop: (image: Image, polygon: [Point, Point, Point, Point]) => Promise<RawImage>;
|
|
64
|
+
imageResize: (image: Image, destinationSize: number) => Promise<RawImage>;
|
|
65
|
+
imageRotate: (image: Image, rotations: ImageRotation) => Promise<RawImage>;
|
|
66
|
+
genericDocumentRecognizerCreate: (config: DeepPartial<GenericDocumentRecognizerConfig>) => Promise<ObjectId<"GenericDocumentRecognizer">>;
|
|
67
|
+
genericDocumentRecognizerRecognize: (gdrToken: ObjectId<"GenericDocumentRecognizer">, image: Image, parameters: DeepPartial<GdrRecognitionParameters>) => Promise<GdrRecognitionResult>;
|
|
68
|
+
__hasModuleFunction: (functionName: string) => Promise<any>;
|
|
69
|
+
__callModuleFunction: (functionName: string, args?: any[]) => Promise<any>;
|
|
70
|
+
};
|
|
71
|
+
export interface CroppedDetectionResult extends DetectionResult {
|
|
72
|
+
croppedImage: RawImage | null;
|
|
73
|
+
originalImage: Image;
|
|
74
|
+
}
|
|
75
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export * as BarcodeConfigs from './core/bridge/compiled/BarcodeConfigs';
|
|
2
|
+
export * as BarcodeScannerTypes from './core/bridge/compiled/BarcodeScannerTypes';
|
|
3
|
+
export * as BarcodeTypes from './core/bridge/compiled/BarcodeTypes';
|
|
4
|
+
export * as CheckRecognizerTypes from './core/bridge/compiled/CheckRecognizerTypes';
|
|
5
|
+
export * as CommonFieldType from './core/bridge/compiled/CommonFieldType';
|
|
6
|
+
export * as DocumentDetectorTypes from './core/bridge/compiled/DocumentDetectorTypes';
|
|
7
|
+
export * as DocumentQualityAnalyzerTypes from './core/bridge/compiled/DocumentQualityAnalyzerTypes';
|
|
8
|
+
export * as EhicTypes from './core/bridge/compiled/EhicTypes';
|
|
9
|
+
export * as GenericDocument from './core/bridge/compiled/GenericDocument';
|
|
10
|
+
export * as GenericDocumentRecognizerTypes from './core/bridge/compiled/GenericDocumentRecognizerTypes';
|
|
11
|
+
export * as GenericTextLineScannerTypes from './core/bridge/compiled/GenericTextLineScannerTypes';
|
|
12
|
+
export * as Geometry from './core/bridge/compiled/Geometry';
|
|
13
|
+
export * as ImageProcessorTypes from './core/bridge/compiled/ImageProcessorTypes';
|
|
14
|
+
export * as LicensePlateScannerTypes from './core/bridge/compiled/LicensePlateScannerTypes';
|
|
15
|
+
export * as MedicalCertificateTypes from './core/bridge/compiled/MedicalCertificateTypes';
|
|
16
|
+
export * as MRZTypes from './core/bridge/compiled/MRZTypes';
|
|
17
|
+
export * as OcrElements from './core/bridge/compiled/OcrElements';
|
|
18
|
+
export * as ParametricFilters from './core/bridge/compiled/ParametricFilters';
|
|
19
|
+
export * as PdfConfig from './core/bridge/compiled/PdfConfig';
|
|
20
|
+
export * as TiffTypes from './core/bridge/compiled/TiffTypes';
|
|
21
|
+
export * as FrameUtilities from './core/bridge/compiled/FrameUtilities';
|
|
22
|
+
export type { ObjectId, Image, CroppedDetectionResult } from './core/worker/ScanbotSDK.Core';
|
|
23
|
+
export type { PartiallyConstructible, RawImage, DeepPartial, Point, Rectangle } from './core/bridge/common';
|
|
@@ -8,7 +8,9 @@ import { Point } from "./utils/dto/Point";
|
|
|
8
8
|
import { MagneticLine } from "./utils/dto/MagneticLine";
|
|
9
9
|
import { Polygon } from "./utils/dto/Polygon";
|
|
10
10
|
import MagnifierView, { MagnifierOptions } from "./view/cropping/magnifier-view";
|
|
11
|
+
import { ImageProcessorTypes } from "./core-types";
|
|
11
12
|
import { ICroppingViewHandle } from "./interfaces/i-cropping-view-handle";
|
|
13
|
+
import { DocumentDetectorTypes } from "./core-types";
|
|
12
14
|
export interface CroppingViewProps {
|
|
13
15
|
configuration: CroppingViewConfiguration;
|
|
14
16
|
container?: HTMLElement;
|
|
@@ -20,6 +22,7 @@ export interface CroppingViewProps {
|
|
|
20
22
|
}
|
|
21
23
|
export interface CroppingViewState {
|
|
22
24
|
image: string;
|
|
25
|
+
documentDetectionResult: DocumentDetectorTypes.DetectionResult;
|
|
23
26
|
polygon: Polygon;
|
|
24
27
|
calculatedSize: Size;
|
|
25
28
|
animation: {
|
|
@@ -67,7 +70,7 @@ export default class CroppingView extends React.Component<CroppingViewProps, Cro
|
|
|
67
70
|
*/
|
|
68
71
|
apply(): Promise<CroppingResult>;
|
|
69
72
|
MAX_ROTATIONS: number;
|
|
70
|
-
|
|
73
|
+
toCoreRotations(cw: number): ImageProcessorTypes.ImageRotation;
|
|
71
74
|
rotate(rotations: number): Promise<void>;
|
|
72
75
|
detect(): Promise<void>;
|
|
73
76
|
dispose(): void;
|
|
@@ -80,5 +83,4 @@ export default class CroppingView extends React.Component<CroppingViewProps, Cro
|
|
|
80
83
|
calculateScale(existingRotations: number, appliedRotations: number, calculatedSize: Size): number;
|
|
81
84
|
calculateRatio(calculatedSize: Size): number;
|
|
82
85
|
calculateMargin(size: Size): Point;
|
|
83
|
-
private detectContour;
|
|
84
86
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { DocumentScannerConfiguration } from "./model/configuration/document-scanner-configuration";
|
|
3
|
-
import { DocumentDetectionResult } from "./model/document/document-detection-result";
|
|
4
3
|
import { ScanbotCameraProps, ScanbotCameraState, ScannerView } from "./scanner-view";
|
|
5
4
|
import { ShutterButton, ShutterButtonAction } from "./view/shutter-button";
|
|
6
5
|
import { DocumentOutline } from "./view/document-outline";
|
|
7
6
|
import { PolygonMovementPredicate } from "./utils/predicate/polygon-movement-predicate";
|
|
8
7
|
import { Polygon } from "./utils/dto/Polygon";
|
|
9
8
|
import { IDocumentScannerHandle } from "./interfaces/i-document-scanner-handle";
|
|
9
|
+
import { CroppedDetectionResult, ObjectId, DocumentDetectorTypes } from "./core-types";
|
|
10
10
|
export declare class DocumentScannerState extends ScanbotCameraState {
|
|
11
11
|
action: ShutterButtonAction;
|
|
12
12
|
}
|
|
@@ -28,20 +28,20 @@ export default class DocumentScannerView extends ScannerView<DocumentScannerProp
|
|
|
28
28
|
* Public API functions
|
|
29
29
|
*/
|
|
30
30
|
static create(configuration: DocumentScannerConfiguration): Promise<DocumentScannerView>;
|
|
31
|
-
detectAndCrop(): Promise<
|
|
31
|
+
detectAndCrop(): Promise<CroppedDetectionResult>;
|
|
32
32
|
enableAutoCapture(): void;
|
|
33
33
|
disableAutoCapture(): void;
|
|
34
34
|
updateAutoCapture(enabled: boolean): void;
|
|
35
35
|
isAutoCaptureEnabled(): boolean;
|
|
36
|
-
recognizer:
|
|
36
|
+
recognizer: Promise<ObjectId<"DocumentDetector">>;
|
|
37
37
|
/**
|
|
38
38
|
* Internal functions
|
|
39
39
|
*/
|
|
40
40
|
componentDidMount(): Promise<void>;
|
|
41
41
|
componentWillUnmount(): Promise<void>;
|
|
42
42
|
detect(): Promise<void>;
|
|
43
|
-
getStatusString(detectionResult:
|
|
44
|
-
detectInWebWorker(): Promise<
|
|
43
|
+
getStatusString(detectionResult: DocumentDetectorTypes.DetectionResult): DocumentDetectorTypes.DetectionStatus;
|
|
44
|
+
detectInWebWorker(): Promise<DocumentDetectorTypes.DetectionResult>;
|
|
45
45
|
preventAutoCapture?: boolean;
|
|
46
46
|
handleAutoCapture(statusOk: boolean, polygon?: Polygon): Promise<void>;
|
|
47
47
|
updateButton(action: ShutterButtonAction): void;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ScanbotCameraProps, ScanbotCameraState, ScannerView } from "./scanner-view";
|
|
3
|
+
import { IGenericDocumentRecognizerScannerHandle } from "./interfaces/i-generic-document-recognizer-scanner-handle";
|
|
4
|
+
import { GenericDocumentRecognizerConfiguration } from "./model/configuration/generic-document-recognizer-configuration";
|
|
5
|
+
import type ScanbotSDK from "./scanbot-sdk";
|
|
6
|
+
declare class GenericDocumentRecognizerProps extends ScanbotCameraProps {
|
|
7
|
+
configuration: GenericDocumentRecognizerConfiguration;
|
|
8
|
+
sdk: ScanbotSDK;
|
|
9
|
+
}
|
|
10
|
+
export default class GenericDocumentRecognizerView extends ScannerView<GenericDocumentRecognizerProps, ScanbotCameraState> implements IGenericDocumentRecognizerScannerHandle {
|
|
11
|
+
private configuration;
|
|
12
|
+
private genericDocumentRecognizer;
|
|
13
|
+
private enabled;
|
|
14
|
+
private finder?;
|
|
15
|
+
constructor(props: GenericDocumentRecognizerProps);
|
|
16
|
+
static create(sdk: ScanbotSDK, configuration: GenericDocumentRecognizerConfiguration): Promise<IGenericDocumentRecognizerScannerHandle>;
|
|
17
|
+
componentDidMount(): void;
|
|
18
|
+
componentWillUnmount(): Promise<void>;
|
|
19
|
+
private detect;
|
|
20
|
+
render(): React.JSX.Element;
|
|
21
|
+
}
|
|
22
|
+
export {};
|
package/@types/index.d.ts
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
export { IDocumentScannerHandle } from "./interfaces/i-document-scanner-handle";
|
|
2
2
|
export { DocumentScannerConfiguration, StyleConfiguration, TextConfiguration, CaptureButtonStyleConfiguration, OutlineStyleConfiguration, HintTextConfiguration, OutlineLabelStyleConfiguration, CaptureAnimationStyleConfiguration, OutlinePolygonStyleConfiguration } from "./model/configuration/document-scanner-configuration";
|
|
3
|
-
export { DocumentDetectionResult } from "./model/document/document-detection-result";
|
|
4
|
-
export { ContourDetectionResult } from "./model/document/contour-detection-result";
|
|
5
|
-
export * as DetectionStatus from "./model/document/detection-status";
|
|
6
3
|
|
|
7
4
|
export { ViewFinderScannerConfiguration } from "./model/configuration/view-finder-scanner-configuration";
|
|
8
5
|
|
|
@@ -12,32 +9,29 @@ export { CroppingResult } from "./model/response/cropping-result";
|
|
|
12
9
|
|
|
13
10
|
export { IBarcodeScannerHandle } from "./interfaces/i-barcode-scanner-handle";
|
|
14
11
|
export { BarcodeScannerConfiguration } from "./model/configuration/barcode-scanner-configuration";
|
|
15
|
-
export { BarcodeResult } from "./model/barcode/barcode-result";
|
|
16
|
-
export { BarcodeFormat } from "./model/barcode/barcode-format";
|
|
17
|
-
export { EngineMode } from "./model/barcode/engine-mode";
|
|
18
12
|
export { BarcodeCountConfiguration, BarcodeCountStyleConfiguration } from "./model/configuration/barcode-count-configuration";
|
|
13
|
+
export { BarcodeScannerResultWithSize } from "./model/barcode/barcode-result";
|
|
19
14
|
|
|
20
15
|
export { IMrzScannerHandle } from "./interfaces/i-mrz-scanner-handle";
|
|
21
16
|
export { MrzScannerConfiguration, MrzScannerAccumulatedFrameVerificationConfiguration } from "./model/configuration/mrz-scanner-configuration";
|
|
22
|
-
export { MrzResult, MrzCheckDigits, MrzField, MRZFieldValidationStatus } from "./model/mrz/mrz-result";
|
|
23
17
|
export * as SimpleMrzRecognizer from "./service/simple-mrz-recognizer";
|
|
24
18
|
|
|
25
|
-
export { TextDataScannerResult } from './model/generic-text-line-recognizer/text-data-scanner-result';
|
|
26
19
|
export { TextDataScannerConfiguration, TextDetectionCallback } from "./model/configuration/text-data-scanner-configuration";
|
|
27
20
|
export { ITextDataScannerHandle } from "./interfaces/i-text-data-scanner-handle";
|
|
28
21
|
|
|
29
22
|
export { VINScannerConfiguration } from "./model/configuration/vin-scanner-configuration";
|
|
30
23
|
|
|
24
|
+
export { GenericDocumentRecognizerConfiguration } from "./model/configuration/generic-document-recognizer-configuration";
|
|
25
|
+
export { default as GenericDocumentRecognizer } from "./service/generic-document-recognizer";
|
|
26
|
+
|
|
27
|
+
export { PdfGenerator } from "./service/pdf-generator";
|
|
28
|
+
export { TiffGenerator } from "./service/tiff-generator";
|
|
29
|
+
|
|
31
30
|
export { OcrData, default as OcrEngine, Rect } from "./service/ocr-engine";
|
|
32
31
|
export { Point } from "./utils/dto/Point";
|
|
33
32
|
export { MagneticLine } from "./utils/dto/MagneticLine";
|
|
34
33
|
|
|
35
|
-
export { ImageProcessor, Rotation } from "./service/image-processor";
|
|
36
|
-
export * as ParametricFilters from "./core/compiled/ParametricFilters";
|
|
37
|
-
|
|
38
|
-
export { default as DocumentQualityAnalyzerConfiguration } from "./model/configuration/document-quality-analyzer-configuration";
|
|
39
34
|
export { default as DocumentQualityAnalyzer } from "./service/document-quality-analyzer";
|
|
40
|
-
export { default as DocumentQualityAnalyzerResult, DocumentQuality } from "./model/response/document-quality-analyzer-result";
|
|
41
35
|
|
|
42
36
|
export { default as PublicUtils } from "./service/public-utils";
|
|
43
37
|
export { Size } from "./utils/dto/Size";
|
|
@@ -45,16 +39,15 @@ export { VideoSize } from "./utils/dto/VideoSize";
|
|
|
45
39
|
|
|
46
40
|
export { SelectionOverlayConfiguration, IBarcodePolygonHandle, IBarcodePolygonLabelHandle, BarcodePolygonStyle, SelectionOverlayTextFormat, SelectionOverlayStyleConfiguration, BarcodePolygonLabelStyle } from "./model/configuration/selection-overlay-configuration";
|
|
47
41
|
|
|
48
|
-
export {
|
|
49
|
-
export { default as TiffGenerator, TiffGenerationOptions } from "./service/tiff-generator";
|
|
50
|
-
|
|
51
|
-
export { BinarizationFilter, ColorFilter, ImageFilter } from "./model/filter-types";
|
|
42
|
+
export { BinarizationFilter, ColorFilter } from "./model/filter-types";
|
|
52
43
|
export { Polygon } from "./utils/dto/Polygon";
|
|
53
|
-
export { Barcode } from "./model/barcode/barcode";
|
|
54
44
|
|
|
55
45
|
export { InitializationOptions } from "./model/configuration/initialization-options";
|
|
56
46
|
export { LicenseInfo } from "./model/response/license-info";
|
|
57
47
|
export { CameraInfo, CameraFacingMode } from "./model/camera-info";
|
|
58
48
|
|
|
49
|
+
export { ConsumeType } from "./consume-type";
|
|
50
|
+
|
|
59
51
|
export { default as ScanbotSDKUI2 } from "./ui2/scanbot-sdk-ui";
|
|
60
|
-
export * as UIConfig from "./ui2/configuration";
|
|
52
|
+
export * as UIConfig from "./ui2/configuration";
|
|
53
|
+
export * as Config from "./core-types";
|