feat(abbyy-rtr): add new options (#2915)

* Update index.ts

cordova-plugin-abbyy-rtr-sdk has updated a new field of orientation as per the version 1.0.9

* Update index.ts
This commit is contained in:
mysoret 2019-02-14 03:45:37 -05:00 committed by Daniel Sogl
parent fc0a238229
commit 959a9135e4

View File

@ -9,7 +9,6 @@ declare const AbbyyRtrSdk: any;
* default setting will be used. * default setting will be used.
*/ */
export interface TextCaptureOptions { export interface TextCaptureOptions {
/** /**
* The name of the license file. This file must be located in the * The name of the license file. This file must be located in the
* www/rtr_assets/ directory in your project. * www/rtr_assets/ directory in your project.
@ -57,6 +56,11 @@ export interface TextCaptureOptions {
* the latest recognition result. * the latest recognition result.
*/ */
isStopButtonVisible?: boolean; isStopButtonVisible?: boolean;
/**
* Specify the orientation, possible values 'landscape' or 'portrait'.
*/
orientation?: string;
} }
/** /**
@ -64,7 +68,6 @@ export interface TextCaptureOptions {
* The callback you implement should parse this object and show results to user. * The callback you implement should parse this object and show results to user.
*/ */
export interface TextCaptureResult { export interface TextCaptureResult {
/** /**
* An array of objects representing recognized lines of text. * An array of objects representing recognized lines of text.
* These objects have the following keys: * These objects have the following keys:
@ -75,7 +78,7 @@ export interface TextCaptureResult {
* · rect (string): position and size of the bounding rectangle, * · rect (string): position and size of the bounding rectangle,
* a string of 4 integers separated with whitespaces ("x y width height"). * a string of 4 integers separated with whitespaces ("x y width height").
*/ */
textLines: { text: string, quadrangle: string, rect?: string }[]; textLines: { text: string; quadrangle: string; rect?: string }[];
/** /**
* Additional information. This object has the following keys: * Additional information. This object has the following keys:
@ -91,10 +94,10 @@ export interface TextCaptureResult {
* the array contains language identifiers (["English", "French", "German"]). * the array contains language identifiers (["English", "French", "German"]).
*/ */
resultInfo: { resultInfo: {
stabilityStatus: string, stabilityStatus: string;
userAction: string, userAction: string;
frameSize: string, frameSize: string;
recognitionLanguages: string[] recognitionLanguages: string[];
}; };
/** /**
@ -114,7 +117,6 @@ export interface TextCaptureResult {
* keys: you must specify either one of them, but not both at the same time. * keys: you must specify either one of them, but not both at the same time.
*/ */
export interface DataCaptureOptions { export interface DataCaptureOptions {
/** /**
* The predefined data capture profile to use, for example: "MRZ". * The predefined data capture profile to use, for example: "MRZ".
* Note: For the list of supported documents, see Specifications Data * Note: For the list of supported documents, see Specifications Data
@ -134,10 +136,10 @@ export interface DataCaptureOptions {
* the regular expression that should be matched when capturing a field. * the regular expression that should be matched when capturing a field.
*/ */
customDataCaptureScenario?: { customDataCaptureScenario?: {
name: string, name: string;
description: string, description: string;
recognitionLanguages: string[], recognitionLanguages: string[];
fields: { regEx: string }[] fields: { regEx: string }[];
}; };
/** /**
@ -175,6 +177,11 @@ export interface DataCaptureOptions {
* the latest recognition result. * the latest recognition result.
*/ */
isStopButtonVisible?: boolean; isStopButtonVisible?: boolean;
/**
* Specify the orientation, possible values 'landscape' or 'portrait'.
*/
orientation?: string;
} }
/** /**
@ -182,7 +189,6 @@ export interface DataCaptureOptions {
* implement should parse this object and show results to user. * implement should parse this object and show results to user.
*/ */
export interface DataCaptureResult { export interface DataCaptureResult {
/** /**
* The data scheme which was applied during data capture. * The data scheme which was applied during data capture.
* The value is an object which has two keys: * The value is an object which has two keys:
@ -195,8 +201,8 @@ export interface DataCaptureResult {
* present in the result. * present in the result.
*/ */
dataScheme?: { dataScheme?: {
id: string, id: string;
name: string name: string;
}; };
/** /**
@ -222,15 +228,15 @@ export interface DataCaptureResult {
* of 4 integers separated with whitespaces ("x y width height"). * of 4 integers separated with whitespaces ("x y width height").
*/ */
dataFields: { dataFields: {
id: string, id: string;
name: string, name: string;
text: string, text: string;
quadrangle: string, quadrangle: string;
components: { components: {
text: string, text: string;
quadrangle: string, quadrangle: string;
rect: string rect: string;
} };
}; };
/** /**
@ -245,9 +251,9 @@ export interface DataCaptureResult {
* with 2 integers separated with a whitespace ("720 1280"). * with 2 integers separated with a whitespace ("720 1280").
*/ */
resultInfo: { resultInfo: {
stabilityStatus: string, stabilityStatus: string;
userAction: string, userAction: string;
frameSize: string frameSize: string;
}; };
/** /**
@ -297,7 +303,6 @@ export interface DataCaptureResult {
}) })
@Injectable() @Injectable()
export class AbbyyRTR extends IonicNativePlugin { export class AbbyyRTR extends IonicNativePlugin {
/** /**
* Opens a modal dialog with controls for the Text Capture scenario. * Opens a modal dialog with controls for the Text Capture scenario.
* @param {TextCaptureOptions} options * @param {TextCaptureOptions} options