New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@docutain/capacitor-plugin-docutain-sdk

Package Overview
Dependencies
Maintainers
0
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@docutain/capacitor-plugin-docutain-sdk - npm Package Compare versions

Comparing version 2.0.0-beta.2 to 2.0.1-beta.1

21

dist/esm/definitions.d.ts

@@ -9,2 +9,5 @@ /**

import type { DocumentScannerConfiguration, AnalyzeConfiguration, LogLevel, PageSourceType, PDFPageFormat } from './model';
/**
* Main class of the Docutain SDK.
*/
export interface DocutainSDKPlugin {

@@ -62,8 +65,13 @@ /**

/**
* This method generates a PDF document from the loaded or scanned pages.
*
* @param fileUri the file uri where to save the PDF document.
* @param overwrite if file already exist, indicate whether to override it or to append number, e.g. TestPDF(1).pdf.
* @param pageFormat the PDF page format, refer to PDFPageFormat.
*/
* This method generates a PDF document from the loaded or scanned pages.
*
* @param filePath the file path where to save the PDF document.
* @param overwrite if file already exist, indicate whether to override it or to append number, e.g. TestPDF(1).pdf.
* @param PDF_PageFormat the PDF page format, refer to PDFPageFormat.
* @param maxSizeKB the maximum file size in KB of the PDF or 0 if no compression should be applied.
* E.g. if you want a max of 10MB, set it to 10 * 1024.
* The PDF will only be compressed if the uncompressed PDF would exceed the max you have set.
* Please be aware, that if the PDF gets compressed, the quality decreases and the PDF generation will take longer.
* @return the file path if PDF document was generated successfully, null otherwise.
*/
writePDF(args: {

@@ -73,2 +81,3 @@ fileUri: string;

pageFormat: PDFPageFormat;
maxSizeKB?: number;
}): Promise<{

@@ -75,0 +84,0 @@ fileUri: string;

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ /**

@@ -81,12 +81,48 @@ /**

}
/**
* A configuration class used to alter the default document analysis behaviour.
*/
export interface AnalyzeConfiguration {
/**
* Read BIC.
*/
readBIC?: boolean;
/**
* Read payment state.
*/
readPaymentState?: boolean;
}
/**
* A configuration class used to alter the default page editing behaviour.
*/
export interface PageEditConfiguration {
/**
* If false, the bottom toolbar will hide the filter page item. Defaults to true.
*/
allowPageFilter?: boolean;
/**
* If false, the bottom toolbar will hide the rotate page item. Defaults to true.
*/
allowPageRotation?: boolean;
/**
* If false, the bottom toolbar will hide the arrange page item. Defaults to true.
*/
allowPageArrangement?: boolean;
/**
* If false, the bottom toolbar will hide the page cropping item. Defaults to true.
*/
allowPageCropping?: boolean;
/**
* If true, the bottom toolbar will show a button allowing to retake the current page. Defaults to false.
*/
allowPageRetake?: boolean;
/**
* If true, each item of the page arrangement functionality will show a delete button.
* Defaults to false.
*/
pageArrangementShowDeleteButton?: boolean;
/**
* If true, each item of the page arrangement functionality will show it's page number.
* Defaults to true.
*/
pageArrangementShowPageNumber?: boolean;

@@ -98,26 +134,305 @@ }

}
/**
* A configuration class used to alter the default color theming behaviour.
*/
export interface ColorConfig {
/**
* is used to tint progress indicators and dialog buttons
*/
ColorPrimary?: DocutainColor;
/**
* is used to tint selectable controls and the capture button.
*/
ColorSecondary?: DocutainColor;
/**
* is used to tint elements that reside on docutain_colorSecondary, like the icon of the capture button.
*/
ColorOnSecondary?: DocutainColor;
/**
* is used to tint the background of the layout containing the buttons of the scan layout, like the capture button or torch button.
*/
ColorScanButtonsLayoutBackground?: DocutainColor;
/**
* is used to tint the foreground of the buttons of the scan layout, like the torch button.
*/
ColorScanButtonsForeground?: DocutainColor;
/**
* is used to tint the polygon overlay which highlights the currently detected document.
*/
ColorScanPolygon?: DocutainColor;
/**
* is used to tint the bottom toolbar background of the image editing page.
*/
ColorBottomBarBackground?: DocutainColor;
/**
* is used to tint the buttons within the bottom toolbar of the image editing page.
*/
ColorBottomBarForeground?: DocutainColor;
/**
* is used to tint the top toolbar background.
*/
ColorTopBarBackground?: DocutainColor;
/**
* is used to tint the elements contained in the top toolbar, like buttons and titles.
*/
ColorTopBarForeground?: DocutainColor;
}
/**
* A configuration class used to alter the default text behaviour.
*/
export interface TextConfiguration {
/**
* The text size of elements residing in the bottom toolbar. Defaults to 10dp.
*/
textSizeBottomToolbar?: number;
/**
* The text size of menu items residing in the top toolbar.
*/
textSizeTopToolbar?: number;
/**
* The text size of the buttons in the scan page, located at the lower part, like the torch button.
*/
textSizeScanButtons?: number;
/**
* The text size of the title in the top toolbar. By default, auto shrinking down till 9.0 is enabled.
* If you define your custom size, automatic shrinking will be disabled.
*/
textSizeTitle?: number;
/**
* The title to be displayed in the scan page top toolbar.
*/
textTitleScanPage?: string;
/**
* The title to be displayed in the edit page top toolbar.
*/
textTitleEditPage?: string;
/**
* The title to be displayed in the filter page top toolbar.
*/
textTitleFilterPage?: string;
/**
* The title to be displayed in the cropping page top toolbar.
*/
textTitleCroppingPage?: string;
/**
* The title to be displayed in the page arrangement page top toolbar.
*/
textTitleArrangementPage?: string;
/**
* The title to be displayed in the confirmation page top toolbar.
*/
textTitleConfirmationPage?: string;
/**
* The title to show in the top toolbar on all pages. It overwrites page specific titles, if any are set.
*/
textDocumentTitle?: string;
/**
* The text to show in the onboarding popup title that appears when the scan page is opened for the first time.
*/
textOnboardingTitle?: string;
/**
* The text to show in the onboarding popup message that appears when the scan page is opened for the first time.
*/
textOnboardingMessage?: string;
/**
* The text to show in the onboarding popup close button that appears when the scan page is opened for the first time.
*/
textOnboardingCloseButton?: string;
/**
* The text size of the onboarding popup title that appears when the scan page is opened for the first time.
*/
textSizeOnboardingTitle?: number;
/**
* The text size of the onboarding popup message that appears when the scan page is opened for the first time.
*/
textSizeOnboardingMessage?: number;
/**
* The text to show when camera is focusing after capture got triggered.
*/
textFocusHint?: string;
/**
* The text to show when user swipes to previous page but is already at the first page.
*/
textFirstPageHint?: string;
/**
* The text to show when user swipes to next page but is already at the last page.
*/
textLastPageHint?: string;
/**
* The text to show when user swipes to next or previous page but only one page is available.
*/
textOnePageHint?: string;
/**
* The text to show in the progress popup that is shown when user clicks the done button but
* some pages still need to be processed.
*/
textScanProgress?: string;
/**
* The text to show for the option to delete the current page within the dialog that will be
* shown when clicking delete while multiple pages are available.
*/
textDeleteDialogCurrentPage?: string;
/**
* The text to show for the option to delete all pages within the dialog that will be
* shown when clicking delete while multiple pages are available.
*/
textDeleteDialogAllPages?: string;
/**
* The text to show for the option to cancel within the dialog that will be
* shown when clicking delete while multiple pages are available.
*/
textDeleteDialogCancel?: string;
}
/**
* A generic button element used for the ready to use UI elements.
*/
export interface DocutainButton {
/**
* The title to show for the button.
*/
title?: string;
/**
* The icon to show for the button.
*/
icon?: string;
}
/**
* A configuration class used to alter the default buttons.
*/
export interface ButtonConfiguration {
/**
* The button that rotates the current page.
*/
buttonEditRotate?: DocutainButton;
/**
* The button that opens the cropping functionality.
*/
buttonEditCrop?: DocutainButton;
/**
* The button that opens the filter functionality.
*/
buttonEditFilter?: DocutainButton;
/**
* The button that opens the page arrangement functionality.
*/
buttonEditArrange?: DocutainButton;
/**
* The button that starts the process of replacing the current page with a new scan.
*/
buttonEditRetake?: DocutainButton;
/**
* The button that deletes the current page or opens a dialog with options if multiple pages
* are available.
*/
buttonEditDelete?: DocutainButton;
/**
* The button that finishes the scan process.
*/
buttonEditFinish?: DocutainButton;
/**
* The button within the cropping functionality that expands the current cropping rectangle
* to the whole page.
*/
buttonCropExpand?: DocutainButton;
/**
* The button within the cropping functionality that snaps the current cropping rectangle
* to the detected document.
*/
buttonCropSnap?: DocutainButton;
/**
* The button within the cropping functionality that finishes the manual cropping process
* according to the current cropping rectangle.
*/
buttonCropFinish?: DocutainButton;
/**
* The button within the scan functionality that is shown when automatic capture is activated.
*/
buttonScanAutoCaptureOn?: DocutainButton;
/**
* The button within the scan functionality that is shown when automatic capture is deactivated.
*/
buttonScanAutoCaptureOff?: DocutainButton;
/**
* The button within the scan functionality that toggles the torch.
*/
buttonScanTorch?: DocutainButton;
/**
* The button within the scan functionality that triggers a manual image capture.
*/
buttonScanCapture?: DocutainButton;
/**
* The button within the scan functionality that finishes the current scan process and leads
* to the editing page.
*/
buttonScanFinish?: DocutainButton;
/**
* The button on the confirmation page that finishes the scan process.
* See [DocumentScannerConfiguration.confirmPages].
*/
buttonConfirmationFinish?: DocutainButton;
}
/**
* A configuration class used to alter the default scan behaviour.
*/
export interface DocumentScannerConfiguration {
/**
* If true, the toolbar will display an Item allowing the user to switch between auto capture and manual capture. Defaults to false.
*/
allowCaptureModeSetting?: boolean;
/**
* If true, the camera will capture the image automatically at the right moment. Defaults to true.
*/
autoCapture?: boolean;
/**
* The default scan filter that will be used after scan. Defaults to [ScanFilter.ILLUSTRATION]. See [ScanFilter] for possible values.
*/
defaultScanFilter?: ScanFilter;
/**
* Your custom image for the onboarding dialog that appears when scan is opened for the first time.
*/
onboardingImageSource?: string;
/**
* Configuration class used to alter the default page editing behaviour.
*/
pageEditConfig?: PageEditConfiguration;
/**
* Configuration class used to alter the default color theming behaviour.
*/
ColorConfig?: ColorConfig;
/**
* Select the source for the document scanner. Defaults to [Source.CAMERA]. See [Source] for possible values.
*/
source?: Source;
/**
* The source images for the document scanner if you have set the [source] to [Source.IMAGE].
*/
sourceImages?: string[];
/**
* If true, image gets automatically cropped if document was detected. This applies only if
* [source] is [Source.IMAGE] or [Source.GALLERY] or [Source.GALLERY_MULTIPLE]. Defaults to true.
*/
autoCrop?: Boolean;
/**
* If true, scanning multi page documents is possible. Set this to false if you need to scan single page documents. Defaults to true.
*/
multiPage?: Boolean;
/**
* If true, the camera will run a focus action right before taking the image. This improves the quality
* of the scanned images, but depending on the device, image capture might take a little bit longer.
* Defaults to true.
*/
preCaptureFocus?: Boolean;
/**
* Configuration class used to alter the default text behaviour.
*/
textConfig?: TextConfiguration;
/**
* Configuration class used to alter the default buttons.
*/
buttonConfig?: ButtonConfiguration;
/**
* If true, a list of all pages (thumbnails) will be displayed before the scan process can be finished.
* Defaults to false.
*/
confirmPages?: Boolean;
}

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ 'use strict';

@@ -0,0 +0,0 @@ var capacitorDocutainSDK = (function (exports, core) {

{
"name": "@docutain/capacitor-plugin-docutain-sdk",
"version": "2.0.0-beta.2",
"version": "2.0.1-beta.1",
"description": "The Docutain SDK for Capacitor brings high quality document scanning, data extraction, text recognition and PDF creation features to your mobile apps, known from the world famous Docutain document management app used by millions of users around the world.",

@@ -75,2 +75,3 @@ "main": "dist/plugin.cjs.js",

"watch": "tsc --watch",
"docgen": "docgen --api DocutainSDKPlugin --output-json dist/docs.json",
"prepublishOnly": "npm run build"

@@ -81,2 +82,3 @@ },

"@capacitor/core": "^6.0.0",
"@capacitor/docgen": "^0.2.2",
"@capacitor/ios": "^6.0.0",

@@ -92,3 +94,4 @@ "@ionic/eslint-config": "^0.3.0",

"swiftlint": "^1.0.1",
"typescript": "~4.1.5"
"typedoc": "^0.26.2",
"typescript": "^4.1.5"
},

@@ -95,0 +98,0 @@ "peerDependencies": {

@@ -7,3 +7,3 @@ # Docutain SDK for Capacitor

It works 100% offline which ensures maximum data safety.
It works 100% offline which ensures maximum data safety.

@@ -10,0 +10,0 @@ It contains modules which are individually licensable.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc