scanbot-web-sdk 6.0.0-dev.2 → 6.0.0-dev.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@types/consume-type.d.ts +2 -1
- package/@types/core/bridge/common.d.ts +1 -1
- package/@types/core/bridge/compiled/BarcodeScannerTypes.d.ts +5 -3
- package/@types/core/bridge/compiled/GDRTypes.d.ts +38 -0
- package/@types/core/bridge/compiled/GenericDocument.d.ts +38 -0
- package/@types/core/bridge/compiled/GenericDocumentRecognizerConfigs.d.ts +183 -0
- package/@types/core/bridge/compiled/GenericDocumentRecognizerTypes.d.ts +7 -6
- package/@types/core/bridge/compiled/GenericDocumentTypes.d.ts +38 -0
- package/@types/core/bridge/compiled/ParametricFilters.d.ts +4 -2
- package/@types/core/bridge/worker-bridge.d.ts +584 -26
- package/@types/core/worker/ScanbotSDK.Core.d.ts +18 -7
- package/@types/core-types.d.ts +3 -1
- package/@types/document-scanner-view.d.ts +3 -1
- package/@types/index.d.ts +39 -4
- package/@types/model/barcode/barcode-result.d.ts +12 -2
- package/@types/model/barcode/barcode.d.ts +2 -1
- package/@types/model/camera-info.d.ts +3 -2
- package/@types/model/configuration/barcode-scanner-configuration.d.ts +6 -3
- package/@types/model/configuration/cropping-view-configuration.d.ts +5 -0
- package/@types/model/configuration/document-scanner-configuration.d.ts +2 -8
- package/@types/model/configuration/generic-document-recognizer-configuration.d.ts +1 -1
- package/@types/model/configuration/initialization-options.d.ts +8 -0
- package/@types/model/configuration/mrz-scanner-configuration.d.ts +1 -1
- package/@types/model/configuration/scanner-configuration.d.ts +7 -0
- package/@types/model/configuration/selection-overlay-configuration.d.ts +2 -2
- package/@types/model/configuration/view-finder-scanner-configuration.d.ts +1 -1
- package/@types/model/error/media-error.d.ts +1 -0
- package/@types/scanbot-sdk.d.ts +355 -52
- package/@types/service/generic-document-recognizer.d.ts +3 -1
- package/@types/service/simple-mrz-recognizer.d.ts +3 -1
- package/@types/service/text-data-recognizer.d.ts +3 -1
- package/@types/ui2/common.d.ts +8 -0
- package/@types/ui2/configuration/ActionBarConfiguration.d.ts +30 -30
- package/@types/ui2/configuration/ArTrackingOverlayConfiguration.d.ts +220 -220
- package/@types/ui2/configuration/BarcodeInfoMapping.d.ts +51 -51
- package/@types/ui2/configuration/BarcodeItemMapper.d.ts +2 -2
- package/@types/ui2/configuration/BarcodeRecognizerConfiguration.d.ts +32 -32
- package/@types/ui2/configuration/BarcodeScannerConfiguration.d.ts +168 -168
- package/@types/ui2/configuration/BarcodeScannerTypes.d.ts +1 -6
- package/@types/ui2/configuration/BarcodeScannerUIResult.d.ts +29 -0
- package/@types/ui2/configuration/BarcodeTextLocalization.d.ts +124 -69
- package/@types/ui2/configuration/BarcodeTypes.d.ts +1 -1
- package/@types/ui2/configuration/BarcodeUseCase.d.ts +4 -3
- package/@types/ui2/configuration/CameraConfiguration.d.ts +32 -32
- package/@types/ui2/configuration/CameraPermission.d.ts +33 -33
- package/@types/ui2/configuration/Common.d.ts +190 -190
- package/@types/ui2/configuration/CommonFieldType.d.ts +1 -0
- package/@types/ui2/configuration/FindAndPickScanningModeUseCase.d.ts +364 -12
- package/@types/ui2/configuration/GenericDocument.d.ts +1 -0
- package/@types/ui2/configuration/MultipleScanningModeUseCase.d.ts +488 -488
- package/@types/ui2/configuration/ScanbotAlertDialog.d.ts +27 -27
- package/@types/ui2/configuration/SingleScanningModeUseCase.d.ts +169 -169
- package/@types/ui2/configuration/TopBarConfiguration.d.ts +36 -36
- package/@types/ui2/configuration/UserGuidanceConfiguration.d.ts +16 -16
- package/@types/ui2/configuration/ViewFinderConfiguration.d.ts +45 -45
- package/@types/ui2/configuration.d.ts +2 -1
- package/@types/ui2/controllers/barcode-scanner-controller.d.ts +2 -2
- package/@types/ui2/controllers/multiple-scanning-mode-controller.d.ts +4 -2
- package/@types/ui2/controllers/single-scanning-mode-controller.d.ts +4 -2
- package/@types/ui2/model/counted-barcodes.d.ts +12 -19
- package/@types/ui2/scanbot-sdk-ui.d.ts +2 -2
- package/@types/ui2/scanbot-ui-library.d.ts +3 -2
- package/@types/ui2/utils/barcode-mapper/expected-barcode-mapper.d.ts +13 -0
- package/@types/ui2/utils/barcode-mapper/i-barcode-mapper.d.ts +18 -0
- package/@types/ui2/utils/{barcode-mapper.d.ts → barcode-mapper/user-barcode-mapper.d.ts} +4 -16
- package/@types/ui2/utils/find-and-pick.ts/expected-barcode-counter.d.ts +7 -0
- package/@types/ui2/utils/styled-badge.d.ts +1 -1
- package/@types/ui2/views/ar/ar-badge.d.ts +18 -0
- package/@types/ui2/views/ar/ar-overlay-barcode-info.d.ts +5 -1
- package/@types/ui2/views/ar/vertical-positions.d.ts +12 -0
- package/@types/ui2/views/barcode-info/barcode-info.d.ts +3 -1
- package/@types/ui2/views/barcode-scanner.d.ts +5 -5
- package/@types/ui2/views/dialog/base/confirmation-dialog.d.ts +20 -0
- package/@types/ui2/views/dialog/find-and-pick-submit-dialog.d.ts +10 -0
- package/@types/ui2/views/drawer/barcode-result-drawer.d.ts +1 -1
- package/@types/ui2/views/drawer/counting-button.d.ts +1 -1
- package/@types/ui2/views/drawer/subviews/barcode-drawer-empty-state.d.ts +1 -1
- package/@types/ui2/views/drawer/subviews/barcode-list-item.d.ts +5 -4
- package/@types/ui2/views/drawer/subviews/barcode-list.d.ts +8 -1
- package/@types/ui2/views/drawer/subviews/drawer-header-content.d.ts +1 -1
- package/@types/utils/barcode-utils.d.ts +10 -0
- package/@types/utils/browser-cameras.d.ts +92 -0
- package/@types/utils/dto/Polygon.d.ts +2 -1
- package/@types/utils/stats.d.ts +4 -0
- package/@types/utils/video-stream.d.ts +3 -3
- package/@types/utils/video-to-image-data/two-d-video-to-image-data.d.ts +8 -0
- package/@types/utils/video-to-image-data/video-to-image-data.d.ts +5 -0
- package/@types/utils/video-to-image-data/webgl-video-to-image-data.d.ts +21 -0
- package/@types/view/barcode-polygon/animated-barcode-selection-overlay.d.ts +1 -0
- package/@types/view/scanbot-camera-view.d.ts +9 -3
- package/@types/worker/worker-bridge.d.ts +587 -30
- package/bundle/ScanbotSDK.min.js +4 -4
- package/bundle/ScanbotSDK.ui2.min.js +16 -16
- package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd-threads.js +1 -1
- package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd-threads.wasm +0 -0
- package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd.wasm +0 -0
- package/bundle/bin/barcode-scanner/ScanbotSDK.Asm.wasm +0 -0
- package/bundle/bin/barcode-scanner/ScanbotSDK.Core-simd-threads.js +1 -1
- package/bundle/bin/barcode-scanner/ScanbotSDK.Core-simd.js +1 -1
- package/bundle/bin/barcode-scanner/ScanbotSDK.Core.js +1 -1
- package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.js +1 -1
- package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.wasm +0 -0
- package/bundle/bin/complete/ScanbotSDK.Asm-simd.wasm +0 -0
- package/bundle/bin/complete/ScanbotSDK.Asm.wasm +0 -0
- package/bundle/bin/complete/ScanbotSDK.Core-simd-threads.js +1 -1
- package/bundle/bin/complete/ScanbotSDK.Core-simd.js +1 -1
- package/bundle/bin/complete/ScanbotSDK.Core.js +1 -1
- package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd-threads.js +1 -1
- package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd-threads.wasm +0 -0
- package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd.wasm +0 -0
- package/bundle/bin/document-scanner/ScanbotSDK.Asm.wasm +0 -0
- package/bundle/bin/document-scanner/ScanbotSDK.Core-simd-threads.js +1 -1
- package/bundle/bin/document-scanner/ScanbotSDK.Core-simd.js +1 -1
- package/bundle/bin/document-scanner/ScanbotSDK.Core.js +1 -1
- package/package.json +2 -2
- package/@types/core/bridge/compiled_schemas_v3/BarcodeConfigs.d.ts +0 -973
- package/@types/core/bridge/compiled_schemas_v3/BarcodeScannerTypes.d.ts +0 -183
- package/@types/core/bridge/compiled_schemas_v3/BarcodeTypes.d.ts +0 -183
- package/@types/core/bridge/compiled_schemas_v3/CheckRecognizerTypes.d.ts +0 -29
- package/@types/core/bridge/compiled_schemas_v3/CommonFieldType.d.ts +0 -59
- package/@types/core/bridge/compiled_schemas_v3/DocumentDetectorTypes.d.ts +0 -196
- package/@types/core/bridge/compiled_schemas_v3/DocumentQualityAnalyzerTypes.d.ts +0 -105
- package/@types/core/bridge/compiled_schemas_v3/EhicTypes.d.ts +0 -218
- package/@types/core/bridge/compiled_schemas_v3/FrameUtilities.d.ts +0 -18
- package/@types/core/bridge/compiled_schemas_v3/GenericDocument.d.ts +0 -198
- package/@types/core/bridge/compiled_schemas_v3/GenericDocumentRecognizerTypes.d.ts +0 -104
- package/@types/core/bridge/compiled_schemas_v3/GenericTextLineScannerTypes.d.ts +0 -165
- package/@types/core/bridge/compiled_schemas_v3/Geometry.d.ts +0 -49
- package/@types/core/bridge/compiled_schemas_v3/ImageProcessorTypes.d.ts +0 -13
- package/@types/core/bridge/compiled_schemas_v3/LicensePlateScannerTypes.d.ts +0 -67
- package/@types/core/bridge/compiled_schemas_v3/MRZTypes.d.ts +0 -52
- package/@types/core/bridge/compiled_schemas_v3/MedicalCertificateTypes.d.ts +0 -306
- package/@types/core/bridge/compiled_schemas_v3/OcrElements.d.ts +0 -129
- package/@types/core/bridge/compiled_schemas_v3/ParametricFilters.d.ts +0 -186
- package/@types/core/bridge/compiled_schemas_v3/PdfConfig.d.ts +0 -197
- package/@types/core/bridge/compiled_schemas_v3/TiffTypes.d.ts +0 -183
- package/@types/ui2/configuration/BarcodeItem.d.ts +0 -6
- package/@types/ui2/configuration/utils.d.ts +0 -6
- /package/@types/ui2/views/dialog/{styled-dialog.d.ts → base/styled-dialog.d.ts} +0 -0
|
@@ -7,7 +7,7 @@ import { DetectionParameters, type DetectionResult } from "../bridge/compiled/Do
|
|
|
7
7
|
import { ScannerConfiguration as GtsConfig, type ScannerResult as GtsResult } from "../bridge/compiled/GenericTextLineScannerTypes";
|
|
8
8
|
import type { Page } from "../bridge/compiled/OcrElements";
|
|
9
9
|
import { type BarcodeDocumentFormat, BarcodeRecognizerParameters, type BarcodeScannerResult } from "../bridge/compiled/BarcodeScannerTypes";
|
|
10
|
-
import {
|
|
10
|
+
import { GenericDocumentRecognizerParameters, RecognitionParameters as GdrRecognitionParameters, type RecognitionResult as GdrRecognitionResult } from "../bridge/compiled/GenericDocumentRecognizerTypes";
|
|
11
11
|
import { type Binarize, TIFFWriterParameters } from "../bridge/compiled/TiffTypes";
|
|
12
12
|
import type { RawImage, Point, DeepPartial } from "../bridge/common";
|
|
13
13
|
import type { GenericDocument } from "../bridge/compiled/GenericDocument";
|
|
@@ -39,10 +39,14 @@ export declare const commands: {
|
|
|
39
39
|
detectDocument: (image: Image, options: DeepPartial<DetectionParameters>) => Promise<DetectionResult>;
|
|
40
40
|
detectAndCropDocument: (image: Image) => Promise<CroppedDetectionResult>;
|
|
41
41
|
createDocumentDetector: (options: DeepPartial<DetectionParameters>) => Promise<ObjectId<"DocumentDetector">>;
|
|
42
|
-
documentDetectorDetect: (documentDetectorToken: ObjectId<"DocumentDetector">, image:
|
|
42
|
+
documentDetectorDetect: <ImageType extends Image>(documentDetectorToken: ObjectId<"DocumentDetector">, image: ImageType) => Promise<DetectionResult & {
|
|
43
|
+
originalImage: ImageType;
|
|
44
|
+
}>;
|
|
43
45
|
parseBarcodeDocument: (options: BarcodeDocumentFormat[], data: string) => Promise<GenericDocument | null>;
|
|
44
46
|
createBarcodeRecognizer: (options: DeepPartial<BarcodeRecognizerParameters>) => Promise<ObjectId<"BarcodeRecognizer">>;
|
|
45
|
-
recognizeBarcodes: (barcodeRecognizerToken: ObjectId<"BarcodeRecognizer">, image:
|
|
47
|
+
recognizeBarcodes: <ImageType_1 extends Image>(barcodeRecognizerToken: ObjectId<"BarcodeRecognizer">, image: ImageType_1) => Promise<BarcodeScannerResult & {
|
|
48
|
+
originalImage: ImageType_1;
|
|
49
|
+
}>;
|
|
46
50
|
beginPdf: (options: DeepPartial<PdfConfig>) => Promise<ObjectId<"PdfGenerationContext">>;
|
|
47
51
|
addPageToPdf: (pdfOperation: ObjectId<"PdfGenerationContext">, image: Image) => Promise<void>;
|
|
48
52
|
completePdf: (pdfOperation: ObjectId<"PdfGenerationContext">) => Promise<Uint8Array>;
|
|
@@ -50,12 +54,16 @@ export declare const commands: {
|
|
|
50
54
|
addPageToTiff: (tiffOperation: ObjectId<"TiffGenerationContext">, image: Image, binarize: Binarize) => Promise<unknown>;
|
|
51
55
|
completeTiff: (tiffOperation: ObjectId<"TiffGenerationContext">) => Promise<Uint8Array>;
|
|
52
56
|
createMRZRecognizer: (configuration: DeepPartial<MrzRecognizerConfig>) => Promise<ObjectId<"MrzRecognizerContext">>;
|
|
53
|
-
recognizeMRZ: (mrzRecognizerToken: ObjectId<"MrzRecognizerContext">, image:
|
|
57
|
+
recognizeMRZ: <ImageType_2 extends Image>(mrzRecognizerToken: ObjectId<"MrzRecognizerContext">, image: ImageType_2) => Promise<MrzRecognitionResult & {
|
|
58
|
+
originalImage: ImageType_2;
|
|
59
|
+
}>;
|
|
54
60
|
releaseObject: <T>(objectToken: ObjectId<T>) => Promise<void>;
|
|
55
61
|
createOcrEngine: () => Promise<ObjectId<"TLDROcrContext">>;
|
|
56
62
|
performOcr: (tldrOcrToken: ObjectId<"TLDROcrContext">, image: Image) => Promise<Page>;
|
|
57
63
|
createGenericTextLineScanner: (configuration: DeepPartial<GtsConfig>) => Promise<ObjectId<"GenericTextLineScanner">>;
|
|
58
|
-
recognizeTextLine: (scannerToken: ObjectId<"GenericTextLineScanner">, image:
|
|
64
|
+
recognizeTextLine: <ImageType_3 extends Image>(scannerToken: ObjectId<"GenericTextLineScanner">, image: ImageType_3) => Promise<GtsResult & {
|
|
65
|
+
originalImage: ImageType_3;
|
|
66
|
+
}>;
|
|
59
67
|
cleanTextLineRecognitionQueue: (scannerToken: ObjectId<"GenericTextLineScanner">) => Promise<void>;
|
|
60
68
|
createDocumentQualityAnalyzer: (options: DeepPartial<DqaConfig>) => Promise<ObjectId<"DocumentQualityAnalyzer">>;
|
|
61
69
|
documentQualityAnalyzerAnalyze: (dqaToken: ObjectId<"DocumentQualityAnalyzer">, image: Image) => Promise<DqaAnalysisResult>;
|
|
@@ -63,8 +71,11 @@ export declare const commands: {
|
|
|
63
71
|
imageCrop: (image: Image, polygon: [Point, Point, Point, Point]) => Promise<RawImage>;
|
|
64
72
|
imageResize: (image: Image, destinationSize: number) => Promise<RawImage>;
|
|
65
73
|
imageRotate: (image: Image, rotations: ImageRotation) => Promise<RawImage>;
|
|
66
|
-
genericDocumentRecognizerCreate: (
|
|
67
|
-
genericDocumentRecognizerRecognize: (gdrToken: ObjectId<"GenericDocumentRecognizer">, image:
|
|
74
|
+
genericDocumentRecognizerCreate: (parameters: DeepPartial<GenericDocumentRecognizerParameters>) => Promise<ObjectId<"GenericDocumentRecognizer">>;
|
|
75
|
+
genericDocumentRecognizerRecognize: <ImageType_4 extends Image>(gdrToken: ObjectId<"GenericDocumentRecognizer">, image: ImageType_4, parameters: DeepPartial<GdrRecognitionParameters>) => Promise<GdrRecognitionResult & {
|
|
76
|
+
originalImage: ImageType_4;
|
|
77
|
+
}>;
|
|
78
|
+
version: () => Promise<string>;
|
|
68
79
|
__hasModuleFunction: (functionName: string) => Promise<any>;
|
|
69
80
|
__callModuleFunction: (functionName: string, args?: any[]) => Promise<any>;
|
|
70
81
|
};
|
package/@types/core-types.d.ts
CHANGED
|
@@ -7,7 +7,9 @@ export * as DocumentDetectorTypes from './core/bridge/compiled/DocumentDetectorT
|
|
|
7
7
|
export * as DocumentQualityAnalyzerTypes from './core/bridge/compiled/DocumentQualityAnalyzerTypes';
|
|
8
8
|
export * as EhicTypes from './core/bridge/compiled/EhicTypes';
|
|
9
9
|
export * as GenericDocument from './core/bridge/compiled/GenericDocument';
|
|
10
|
+
export * as GenericDocumentRecognizerConfigs from './core/bridge/compiled/GenericDocumentRecognizerConfigs';
|
|
10
11
|
export * as GenericDocumentRecognizerTypes from './core/bridge/compiled/GenericDocumentRecognizerTypes';
|
|
12
|
+
export * as GenericDocumentTypes from './core/bridge/compiled/GenericDocumentTypes';
|
|
11
13
|
export * as GenericTextLineScannerTypes from './core/bridge/compiled/GenericTextLineScannerTypes';
|
|
12
14
|
export * as Geometry from './core/bridge/compiled/Geometry';
|
|
13
15
|
export * as ImageProcessorTypes from './core/bridge/compiled/ImageProcessorTypes';
|
|
@@ -20,4 +22,4 @@ export * as PdfConfig from './core/bridge/compiled/PdfConfig';
|
|
|
20
22
|
export * as TiffTypes from './core/bridge/compiled/TiffTypes';
|
|
21
23
|
export * as FrameUtilities from './core/bridge/compiled/FrameUtilities';
|
|
22
24
|
export type { ObjectId, Image, CroppedDetectionResult } from './core/worker/ScanbotSDK.Core';
|
|
23
|
-
export
|
|
25
|
+
export { PartiallyConstructible, type RawImage, type DeepPartial, type Point, type Rectangle } from './core/bridge/common';
|
|
@@ -41,7 +41,9 @@ export default class DocumentScannerView extends ScannerView<DocumentScannerProp
|
|
|
41
41
|
componentWillUnmount(): Promise<void>;
|
|
42
42
|
detect(): Promise<void>;
|
|
43
43
|
getStatusString(detectionResult: DocumentDetectorTypes.DetectionResult): DocumentDetectorTypes.DetectionStatus;
|
|
44
|
-
detectInWebWorker(): Promise<DocumentDetectorTypes.DetectionResult
|
|
44
|
+
detectInWebWorker(): Promise<DocumentDetectorTypes.DetectionResult & {
|
|
45
|
+
originalImage: ImageData;
|
|
46
|
+
}>;
|
|
45
47
|
preventAutoCapture?: boolean;
|
|
46
48
|
handleAutoCapture(statusOk: boolean, polygon?: Polygon): Promise<void>;
|
|
47
49
|
updateButton(action: ShutterButtonAction): void;
|
package/@types/index.d.ts
CHANGED
|
@@ -28,26 +28,61 @@ export { PdfGenerator } from "./service/pdf-generator";
|
|
|
28
28
|
export { TiffGenerator } from "./service/tiff-generator";
|
|
29
29
|
|
|
30
30
|
export { OcrData, default as OcrEngine, Rect } from "./service/ocr-engine";
|
|
31
|
-
export { Point } from "./utils/dto/Point";
|
|
32
31
|
export { MagneticLine } from "./utils/dto/MagneticLine";
|
|
33
32
|
|
|
34
33
|
export { default as DocumentQualityAnalyzer } from "./service/document-quality-analyzer";
|
|
35
34
|
|
|
36
|
-
export {
|
|
35
|
+
export { PublicUtils } from "./service/public-utils";
|
|
37
36
|
export { Size } from "./utils/dto/Size";
|
|
38
37
|
export { VideoSize } from "./utils/dto/VideoSize";
|
|
39
38
|
|
|
40
39
|
export { SelectionOverlayConfiguration, IBarcodePolygonHandle, IBarcodePolygonLabelHandle, BarcodePolygonStyle, SelectionOverlayTextFormat, SelectionOverlayStyleConfiguration, BarcodePolygonLabelStyle } from "./model/configuration/selection-overlay-configuration";
|
|
41
40
|
|
|
42
|
-
export { BinarizationFilter, ColorFilter } from "./model/filter-types";
|
|
43
41
|
export { Polygon } from "./utils/dto/Polygon";
|
|
44
42
|
|
|
43
|
+
//TODO We currently have two implementations of Point in: utils/dto/Point & core-types. Should this be refactored?
|
|
44
|
+
export { Point as Point2 } from "./utils/dto/Point";
|
|
45
|
+
|
|
45
46
|
export { InitializationOptions } from "./model/configuration/initialization-options";
|
|
46
47
|
export { LicenseInfo } from "./model/response/license-info";
|
|
47
48
|
export { CameraInfo, CameraFacingMode } from "./model/camera-info";
|
|
48
49
|
|
|
49
50
|
export { ConsumeType } from "./consume-type";
|
|
50
51
|
|
|
52
|
+
export { BrowserCameras, CameraDetectionStrategy, DiscoverCameraMode } from './utils/browser-cameras';
|
|
53
|
+
|
|
51
54
|
export { default as ScanbotSDKUI2 } from "./ui2/scanbot-sdk-ui";
|
|
52
55
|
export * as UIConfig from "./ui2/configuration";
|
|
53
|
-
export
|
|
56
|
+
export {
|
|
57
|
+
BarcodeConfigs,
|
|
58
|
+
BarcodeScannerTypes,
|
|
59
|
+
BarcodeTypes,
|
|
60
|
+
CheckRecognizerTypes,
|
|
61
|
+
CommonFieldType,
|
|
62
|
+
DocumentDetectorTypes,
|
|
63
|
+
DocumentQualityAnalyzerTypes,
|
|
64
|
+
EhicTypes,
|
|
65
|
+
GenericDocument,
|
|
66
|
+
GenericDocumentRecognizerConfigs,
|
|
67
|
+
GenericDocumentRecognizerTypes,
|
|
68
|
+
GenericDocumentTypes,
|
|
69
|
+
GenericTextLineScannerTypes,
|
|
70
|
+
Geometry,
|
|
71
|
+
ImageProcessorTypes,
|
|
72
|
+
LicensePlateScannerTypes,
|
|
73
|
+
MedicalCertificateTypes,
|
|
74
|
+
MRZTypes,
|
|
75
|
+
OcrElements,
|
|
76
|
+
ParametricFilters,
|
|
77
|
+
PdfConfig,
|
|
78
|
+
TiffTypes,
|
|
79
|
+
FrameUtilities,
|
|
80
|
+
ObjectId, Image, CroppedDetectionResult,
|
|
81
|
+
PartiallyConstructible, RawImage, DeepPartial, Point, Rectangle
|
|
82
|
+
} from "./core-types";
|
|
83
|
+
|
|
84
|
+
// We also need to export the Config-namespace as a whole, because it is directly used in
|
|
85
|
+
// ScanbotSDK.ts and without it, the API docs would be incomplete.
|
|
86
|
+
// In the API docs, Config and the types that are directly exported from ./core-types above are
|
|
87
|
+
// automatically reconciled.
|
|
88
|
+
export * as Config from "./core-types";
|
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
import { Size } from "../../utils/dto/Size";
|
|
2
2
|
import type { BarcodeScannerTypes } from "../../core-types";
|
|
3
3
|
export declare class BarcodeScannerResultWithSize {
|
|
4
|
+
coreResult: {
|
|
5
|
+
barcodes: BarcodeScannerTypes.BarcodeItem[];
|
|
6
|
+
originalImage?: ImageData;
|
|
7
|
+
};
|
|
4
8
|
barcodes: BarcodeScannerTypes.BarcodeItem[];
|
|
5
|
-
originalImageSize: Size;
|
|
6
|
-
|
|
9
|
+
originalImageSize: Size | null;
|
|
10
|
+
/**
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
constructor(coreResult: {
|
|
14
|
+
barcodes: BarcodeScannerTypes.BarcodeItem[];
|
|
15
|
+
originalImage?: ImageData;
|
|
16
|
+
});
|
|
7
17
|
isEmpty(): boolean;
|
|
8
18
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { BarcodeScannerTypes } from "../../core-types";
|
|
2
2
|
export declare function barcodesEqual(barcodeItem1: BarcodeScannerTypes.BarcodeItem, barcodeItem2: BarcodeScannerTypes.BarcodeItem): boolean;
|
|
3
3
|
export declare function barcodeId(barcode: BarcodeScannerTypes.BarcodeItem): string;
|
|
4
|
+
export declare function barcodeItemFromText(text: string): BarcodeScannerTypes.BarcodeItem;
|
|
@@ -2,6 +2,7 @@ export type CameraFacingMode = 'front' | 'back' | 'unknown';
|
|
|
2
2
|
export interface CameraInfo {
|
|
3
3
|
deviceId: string;
|
|
4
4
|
label: string;
|
|
5
|
-
|
|
6
|
-
supportsTorchControl
|
|
5
|
+
maxNumPixels: number | undefined;
|
|
6
|
+
supportsTorchControl: boolean | undefined;
|
|
7
|
+
facingMode: CameraFacingMode;
|
|
7
8
|
}
|
|
@@ -2,7 +2,6 @@ import { SelectionOverlayConfiguration } from "./selection-overlay-configuration
|
|
|
2
2
|
import { BarcodeCountConfiguration } from "./barcode-count-configuration";
|
|
3
3
|
import { ViewFinderScannerConfiguration } from "./view-finder-scanner-configuration";
|
|
4
4
|
import { BarcodeScannerTypes, type DeepPartial } from "../../core-types";
|
|
5
|
-
import type { Size } from "../../utils/dto/Size";
|
|
6
5
|
import type { BarcodeScannerResultWithSize } from "../barcode/barcode-result";
|
|
7
6
|
export declare class BarcodeScannerConfiguration extends ViewFinderScannerConfiguration {
|
|
8
7
|
constructor();
|
|
@@ -28,8 +27,12 @@ export declare class BarcodeScannerConfiguration extends ViewFinderScannerConfig
|
|
|
28
27
|
/**
|
|
29
28
|
*/
|
|
30
29
|
onBarcodesDetected?: (e: BarcodeScannerResultWithSize) => void;
|
|
31
|
-
/**
|
|
32
|
-
|
|
30
|
+
/**
|
|
31
|
+
* Note that the ImageData is only available at the point in time when _onDetectionFailed is invoked.
|
|
32
|
+
* The underlying buffer will be reused in the next detection cycle and will not be available anymore.
|
|
33
|
+
* @internal
|
|
34
|
+
* */
|
|
35
|
+
_onDetectionFailed?: (originalImageSize: ImageData) => void;
|
|
33
36
|
/**
|
|
34
37
|
* If set, limit the resolution of the image that is used for barcode recognition.
|
|
35
38
|
* A lower value will result in faster processing times but may reduce recognition quality.
|
|
@@ -43,6 +43,11 @@ export declare class CroppingViewConfiguration extends BaseConfiguration {
|
|
|
43
43
|
* Enhances drag-to-crop experience. True by default
|
|
44
44
|
*/
|
|
45
45
|
disableScroll?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* The polygon that defines the initial cropping area.
|
|
48
|
+
* All points should have relative coordinates between 0 and 1.
|
|
49
|
+
* If this is not set, the cropping area is initialized with an automatically detected outline of the document.
|
|
50
|
+
*/
|
|
46
51
|
polygon?: Polygon;
|
|
47
52
|
image: Image;
|
|
48
53
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ScannerConfiguration } from "./scanner-configuration";
|
|
2
|
-
import { DocumentDetectorTypes, DeepPartial } from "../../core-types";
|
|
2
|
+
import { DocumentDetectorTypes, DeepPartial, CroppedDetectionResult } from "../../core-types";
|
|
3
3
|
export declare class TextConfiguration {
|
|
4
4
|
constructor(hint?: HintTextConfiguration);
|
|
5
5
|
hint?: HintTextConfiguration;
|
|
@@ -92,13 +92,7 @@ export declare class DocumentScannerConfiguration extends ScannerConfiguration {
|
|
|
92
92
|
/**
|
|
93
93
|
* Document detected callback. Continuous callback,
|
|
94
94
|
* stopped only when detection is stopped or camera widget is disposed.
|
|
95
|
-
* Result contains the following properties:
|
|
96
|
-
* detectionStatus: "OK",
|
|
97
|
-
* success: true,
|
|
98
|
-
* cropped: "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD...",
|
|
99
|
-
* original: "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD...",
|
|
100
|
-
* polygon: Array(4)}
|
|
101
95
|
*/
|
|
102
|
-
onDocumentDetected?: (
|
|
96
|
+
onDocumentDetected?: (result: CroppedDetectionResult) => void;
|
|
103
97
|
static fromJson(json: any): DocumentScannerConfiguration;
|
|
104
98
|
}
|
|
@@ -2,7 +2,7 @@ import type { DeepPartial, GenericDocumentRecognizerTypes } from "../../core-typ
|
|
|
2
2
|
import { ViewFinderScannerConfiguration } from "./view-finder-scanner-configuration";
|
|
3
3
|
export declare class GenericDocumentRecognizerConfiguration extends ViewFinderScannerConfiguration {
|
|
4
4
|
constructor();
|
|
5
|
-
detectorParameters?: DeepPartial<GenericDocumentRecognizerTypes.
|
|
5
|
+
detectorParameters?: DeepPartial<GenericDocumentRecognizerTypes.GenericDocumentRecognizerParameters>;
|
|
6
6
|
/** Callback is called for every analyzed frame. */
|
|
7
7
|
onDocumentDetected?: (result: GenericDocumentRecognizerTypes.RecognitionResult) => void;
|
|
8
8
|
static fromJson(json: DeepPartial<GenericDocumentRecognizerConfiguration>): GenericDocumentRecognizerConfiguration;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CameraDetectionStrategy } from "../../utils/browser-cameras";
|
|
1
2
|
export interface InitializationOptions {
|
|
2
3
|
/**
|
|
3
4
|
* Scanbot Web SDK License key. Required
|
|
@@ -29,4 +30,11 @@ export interface InitializationOptions {
|
|
|
29
30
|
* Defaults to '?CURRENT_SDK_VERSION'.
|
|
30
31
|
*/
|
|
31
32
|
requestSuffix?: string;
|
|
33
|
+
/**
|
|
34
|
+
* On devices with multiple cameras, it is difficult to choose which camera to use for scanning.
|
|
35
|
+
* You can choose from several different automatic detection strategies described by
|
|
36
|
+
* {@link CameraDetectionStrategy}.
|
|
37
|
+
* Defaults to `FAST_DEFERRED`.
|
|
38
|
+
*/
|
|
39
|
+
bestCameraDetectionStrategy?: CameraDetectionStrategy;
|
|
32
40
|
}
|
|
@@ -10,7 +10,7 @@ export interface MrzScannerAccumulatedFrameVerificationConfiguration {
|
|
|
10
10
|
export declare class MrzScannerConfiguration extends ViewFinderScannerConfiguration {
|
|
11
11
|
constructor();
|
|
12
12
|
/** {@displayType `DeepPartial<MRZTypes.RecognizerConfiguration>`} {@link Config.MRZTypes.RecognizerConfiguration}*/
|
|
13
|
-
recognizerConfiguration
|
|
13
|
+
recognizerConfiguration?: DeepPartial<MRZTypes.RecognizerConfiguration>;
|
|
14
14
|
onMrzDetected?: (e: MRZTypes.RecognitionResult) => void;
|
|
15
15
|
_onDetectionFailed?: (e: ImageData) => void;
|
|
16
16
|
static fromJson(json: any): MrzScannerConfiguration;
|
|
@@ -16,6 +16,10 @@ export declare class ScannerConfiguration extends BaseConfiguration {
|
|
|
16
16
|
*/
|
|
17
17
|
videoConstraints?: any;
|
|
18
18
|
mirrored?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Camera id or camera label.
|
|
21
|
+
* A list of available cameras can be obtained from {@link ScanbotSDK.cameras}.
|
|
22
|
+
**/
|
|
19
23
|
preferredCamera?: string;
|
|
20
24
|
spinnerColor?: string;
|
|
21
25
|
backgroundColor?: string;
|
|
@@ -27,6 +31,9 @@ export declare class ScannerConfiguration extends BaseConfiguration {
|
|
|
27
31
|
static mapVideoConstraints(json: any, configuration: ScannerConfiguration): void;
|
|
28
32
|
/**
|
|
29
33
|
* Error callback of the SDK.
|
|
34
|
+
* If any error was reported, your scanner might not be scanning anymore, e.g. due to an out-of-memory error.
|
|
35
|
+
* You should dispose the scanner and use {@link ScanbotSDK.destroy} and {@link ScanbotSDK.initialize} to
|
|
36
|
+
* re-initialize the SDK.
|
|
30
37
|
*/
|
|
31
38
|
onError?: (e: any) => void;
|
|
32
39
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { BarcodeScannerTypes } from "../../core-types";
|
|
2
2
|
export type SelectionOverlayTextFormat = "Text" | "TextAndFormat" | "None";
|
|
3
3
|
export declare class BarcodePolygonStyle {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
fillColor?: string;
|
|
5
|
+
strokeColor?: string;
|
|
6
6
|
strokeWidth?: number;
|
|
7
7
|
cornerRadius?: number;
|
|
8
8
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ScannerConfiguration } from "./scanner-configuration";
|
|
2
2
|
import { ViewFinderConfiguration, UserGuidanceConfiguration } from "../../ui2/configuration";
|
|
3
|
-
import { DeepPartial } from "../../ui2/
|
|
3
|
+
import { DeepPartial } from "../../ui2/common";
|
|
4
4
|
export declare class ViewFinderScannerConfiguration extends ScannerConfiguration {
|
|
5
5
|
constructor(resolution: {
|
|
6
6
|
width: number;
|