UNPKG

capacitor-plugin-scanbot-sdk

Version:

Scanbot Document and Barcode Scanner SDK for Capacitor

360 lines (339 loc) 12.2 kB
import { DocumentScannerParameters } from '../../document_scanner/DocumentScannerTypes'; import { CameraPermissionScreen } from '../../ui_v2/common/CameraPermission'; import { BadgeStyle, BarButtonConfiguration, ButtonConfiguration, IconButton, PolygonStyle, StyledText, Timeouts, Vibration } from '../../ui_v2/common/Common'; import { ScanbotAlertDialog } from '../../ui_v2/common/ScanbotAlertDialog'; import { UserGuidanceConfiguration } from '../../ui_v2/common/UserGuidanceConfiguration'; import { ViewFinderConfiguration } from '../../ui_v2/common/ViewFinderConfiguration'; import { AcknowledgementScreenConfiguration } from '../../ui_v2/document/AcknowledgementScreenConfiguration'; import { DocumentScannerCameraConfiguration } from '../../ui_v2/document/DocumentScannerCameraConfiguration'; import type { UserGuidanceVisibility } from '../../ui_v2/document/DocumentScannerGuidanceVisibility'; import { DocumentScannerUserGuidance } from '../../ui_v2/document/DocumentScannerUserGuidance'; import { IntroductionScreenConfiguration } from '../../ui_v2/document/IntroductionScreenConfiguration'; import type { DeepPartial } from '../../utils/utils'; import { PartiallyConstructible } from '../../utils/utils'; /** Configuration of the 'shutter' button. */ export declare class ShutterButton extends PartiallyConstructible { /** Determines if the 'shutter' button can be tapped to manually snap a document when 'auto snapping mode' is active. Default is true */ enabledInAutoSnappingMode: boolean; /** The text to be read when the 'shutter' button is selected via the accessibility mode. Default is "?accessibilityDescriptionCameraShutterButton" */ accessibilityDescription: string; /** The outer color of the 'shutter' button. Default is "?sbColorOnPrimary" */ outerColor: string; /** The inner color of the 'shutter' button. Default is "?sbColorOnPrimary" */ innerColor: string; /** @param source {@displayType `DeepPartial<ShutterButton>`} */ constructor(source?: DeepPartial<ShutterButton>); } /** Configuration of the 'preview' button. */ export type PreviewButton = PagePreviewMode | TextButtonMode | NoButtonMode; /** Configuration of the scan assistance overlay. */ export declare class ScanAssistanceOverlay extends PartiallyConstructible { /** Determines whether the scan assistance overlay is visible or not. If the viewfinder is enabled, this flag is ignored and the scan assistance overlay is not displayed. Default is true */ visible: boolean; /** The background color of the scan assistance overlay. Default is "?sbColorModalOverlay" */ backgroundColor: string; /** The foreground color of the scan assistance overlay image. Default is "?sbColorSurface" */ foregroundColor: string; /** @param source {@displayType `DeepPartial<ScanAssistanceOverlay>`} */ constructor(source?: DeepPartial<ScanAssistanceOverlay>); } /** Configuration of the 'preview' button in 'page preview mode'. */ export declare class PagePreviewMode extends PartiallyConstructible { readonly _type: 'PagePreviewMode'; /** The text to be read when the 'preview' button is selected via the accessibility mode. Default is "?accessibilityDescriptionCameraPreviewButton" */ accessibilityDescription: string; /** The color of the image placeholder. Default is "?sbColorOnSurfaceVariant" */ imagePlaceholderColor: string; /** Configuration of the page counter icon. */ pageCounter: BadgeStyle; /** @param source {@displayType `DeepPartial<PagePreviewMode>`} */ constructor(source?: DeepPartial<PagePreviewMode>); } /** Configuration of the 'preview' button in 'text button mode'. */ export declare class TextButtonMode extends PartiallyConstructible { readonly _type: 'TextButtonMode'; /** The text to be read when the 'preview' button is selected via the accessibility mode. Default is "?accessibilityDescriptionCameraPreviewButton" */ accessibilityDescription: string; /** Configuration of the text style for the 'preview' button. */ style: StyledText; /** @param source {@displayType `DeepPartial<TextButtonMode>`} */ constructor(source?: DeepPartial<TextButtonMode>); } /** Configuration of the 'preview' button in 'no button mode'. */ export declare class NoButtonMode extends PartiallyConstructible { readonly _type: 'NoButtonMode'; /** Whether the button is visible. Default is false */ readonly visible: boolean; /** @param source {@displayType `DeepPartial<NoButtonMode>`} */ constructor(source?: DeepPartial<NoButtonMode>); } /** Configuration of the bottom bar for the camera screen. */ export declare class CameraBottomBar extends PartiallyConstructible { /** Configuration of the 'import' button. */ importButton: BarButtonConfiguration; /** Configuration of the 'auto snapping mode' button. */ autoSnappingModeButton: BarButtonConfiguration; /** Configuration of the 'manual snapping mode' button. */ manualSnappingModeButton: BarButtonConfiguration; /** Configuration of the 'shutter' button. */ shutterButton: ShutterButton; /** Configuration of the 'flashlight' button when in the 'on' state. */ torchOnButton: BarButtonConfiguration; /** Configuration of the 'flashlight' button when in the 'off' state. */ torchOffButton: BarButtonConfiguration; /** Configuration of the 'preview' button. */ previewButton: PreviewButton; /** @param source {@displayType `DeepPartial<CameraBottomBar>`} */ constructor(source?: DeepPartial<CameraBottomBar>); } /** The type of animation to display after snapping a page. */ export type PageSnapFeedbackMode = PageSnapFunnelAnimation | PageSnapCheckMarkAnimation | PageSnapFeedbackNone; /** Configuration of the funnel animation. */ export declare class PageSnapFunnelAnimation extends PartiallyConstructible { readonly _type: 'PageSnapFunnelAnimation'; /** The overlay color for the funnel animation. Default is "?sbColorModalOverlay" */ overlayColor: string; /** @param source {@displayType `DeepPartial<PageSnapFunnelAnimation>`} */ constructor(source?: DeepPartial<PageSnapFunnelAnimation>); } /** Configuration of the check mark animation. */ export declare class PageSnapCheckMarkAnimation extends PartiallyConstructible { readonly _type: 'PageSnapCheckMarkAnimation'; /** The overlay color for the check mark animation. Default is "?sbColorModalOverlay" */ overlayColor: string; /** The background color for the check mark animation. Default is "?sbColorOutline" */ checkMarkBackgroundColor: string; /** The check mark color for the check mark animation. Default is "#00000000" */ checkMarkColor: string; /** @param source {@displayType `DeepPartial<PageSnapCheckMarkAnimation>`} */ constructor(source?: DeepPartial<PageSnapCheckMarkAnimation>); } /** To not use a snap animation. */ export declare class PageSnapFeedbackNone extends PartiallyConstructible { readonly _type: 'PageSnapFeedbackNone'; /** @param source {@displayType `DeepPartial<PageSnapFeedbackNone>`} */ constructor(source?: DeepPartial<PageSnapFeedbackNone>); } /** Configuration of the feedback shown after snapping a page. */ export declare class CaptureFeedback extends PartiallyConstructible { /** Whether the camera preview should blink or not after snapping a page. Default is true */ cameraBlinkEnabled: boolean; /** The type of animation to display after snapping a page. */ snapFeedbackMode: PageSnapFeedbackMode; /** @param source {@displayType `DeepPartial<CaptureFeedback>`} */ constructor(source?: DeepPartial<CaptureFeedback>); } /** Configuration of the document contour detection polygon. */ export declare class DocumentPolygonConfiguration extends PartiallyConstructible { /** Determines the visibility mode for the polygon. Default is ENABLED */ visibility: UserGuidanceVisibility; /** Configuration of the polygon when the detected document status is 'OK'. */ documentOk: PolygonStyle; /** Configuration of the polygon when the detected document status is 'not OK'. */ documentNotOk: PolygonStyle; /** Configuration of the animated polygon when the document is being scanned for capturing in 'auto snapping mode'. */ autoSnapProgress: PolygonStyle; /** @param source {@displayType `DeepPartial<DocumentPolygonConfiguration>`} */ constructor(source?: DeepPartial<DocumentPolygonConfiguration>); } /** Configuration of the screen for scanning the pages with the camera. */ export declare class CameraScreenConfiguration extends PartiallyConstructible { /** Configuration of the acknowledgement screen. */ acknowledgement: AcknowledgementScreenConfiguration; /** Configuration of the document scanner introduction screen. */ introduction: IntroductionScreenConfiguration; /** Configuration of the scan assistance overlay. */ scanAssistanceOverlay: ScanAssistanceOverlay; /** Configuration of the camera permission screen. */ cameraPermission: CameraPermissionScreen; /** Configuration of the title, located in the top bar. */ topBarTitle: StyledText; /** Configuration of the 'introduction' button, located in the top bar. */ topBarIntroButton: IconButton; /** Configuration of the 'cancel' button, located in the top bar. */ topBarBackButton: ButtonConfiguration; /** Configuration of the static user guidance, located just below the top bar. */ topUserGuidance: UserGuidanceConfiguration; /** Configuration of the hints guiding users through the scanning process. */ userGuidance: DocumentScannerUserGuidance; /** The background color of the camera screen. Default is "#000000FF" */ backgroundColor: string; /** If set to true, images imported from the gallery/photo library will be analyzed and eventually rotated to correct their orientation. Default is true */ autoRotateImages: boolean; /** If set to true, the review screen will be shown after each added page. Default is false */ openReviewAfterEachScan: boolean; /** Configuration of the camera behavior. */ cameraConfiguration: DocumentScannerCameraConfiguration; /** The parameters of the document scanner. */ scannerParameters: DocumentScannerParameters; /** Configuration of the document contour detection polygon. */ polygon: DocumentPolygonConfiguration; /** Configuration of the bottom bar for the camera screen. */ bottomBar: CameraBottomBar; /** Configuration of the viewfinder. */ viewFinder: ViewFinderConfiguration; /** Configuration of the feedback shown after snapping a page. */ captureFeedback: CaptureFeedback; /** Configuration of the scan confirmation vibration. */ vibration: Vibration; /** Configuration of timeouts. */ timeouts: Timeouts; /** Configuration of the alert dialog displayed when the scan limit is reached. */ limitReachedAlertDialog: ScanbotAlertDialog; /** Configuration of the alert dialog displayed when the 'cancel' button is pressed. */ cancelAlertDialog: ScanbotAlertDialog; /** @param source {@displayType `DeepPartial<CameraScreenConfiguration>`} */ constructor(source?: DeepPartial<CameraScreenConfiguration>); }