Skip to content

Commit

Permalink
feat(abbyy-rtr): add new options (#2915)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
mysoret authored and danielsogl committed Feb 14, 2019
1 parent fc0a238 commit 959a913
Showing 1 changed file with 32 additions and 27 deletions.
59 changes: 32 additions & 27 deletions src/@ionic-native/plugins/abbyy-rtr/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ declare const AbbyyRtrSdk: any;
* default setting will be used.
*/
export interface TextCaptureOptions {

/**
* The name of the license file. This file must be located in the
* www/rtr_assets/ directory in your project.
Expand Down Expand Up @@ -57,14 +56,18 @@ export interface TextCaptureOptions {
* the latest recognition result.
*/
isStopButtonVisible?: boolean;

/**
* Specify the orientation, possible values 'landscape' or 'portrait'.
*/
orientation?: string;
}

/**
* JSON object that represents text recognition results.
* The callback you implement should parse this object and show results to user.
*/
export interface TextCaptureResult {

/**
* An array of objects representing recognized lines of text.
* These objects have the following keys:
Expand All @@ -75,7 +78,7 @@ export interface TextCaptureResult {
* · rect (string): position and size of the bounding rectangle,
* 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:
Expand All @@ -91,10 +94,10 @@ export interface TextCaptureResult {
* the array contains language identifiers (["English", "French", "German"]).
*/
resultInfo: {
stabilityStatus: string,
userAction: string,
frameSize: string,
recognitionLanguages: string[]
stabilityStatus: string;
userAction: string;
frameSize: string;
recognitionLanguages: string[];
};

/**
Expand All @@ -114,7 +117,6 @@ export interface TextCaptureResult {
* keys: you must specify either one of them, but not both at the same time.
*/
export interface DataCaptureOptions {

/**
* The predefined data capture profile to use, for example: "MRZ".
* Note: For the list of supported documents, see Specifications — Data
Expand All @@ -134,10 +136,10 @@ export interface DataCaptureOptions {
* the regular expression that should be matched when capturing a field.
*/
customDataCaptureScenario?: {
name: string,
description: string,
recognitionLanguages: string[],
fields: { regEx: string }[]
name: string;
description: string;
recognitionLanguages: string[];
fields: { regEx: string }[];
};

/**
Expand Down Expand Up @@ -175,14 +177,18 @@ export interface DataCaptureOptions {
* the latest recognition result.
*/
isStopButtonVisible?: boolean;

/**
* Specify the orientation, possible values 'landscape' or 'portrait'.
*/
orientation?: string;
}

/**
* JSON object that represents data recognition results. The callback you
* implement should parse this object and show results to user.
*/
export interface DataCaptureResult {

/**
* The data scheme which was applied during data capture.
* The value is an object which has two keys:
Expand All @@ -195,8 +201,8 @@ export interface DataCaptureResult {
* present in the result.
*/
dataScheme?: {
id: string,
name: string
id: string;
name: string;
};

/**
Expand All @@ -222,15 +228,15 @@ export interface DataCaptureResult {
* of 4 integers separated with whitespaces ("x y width height").
*/
dataFields: {
id: string,
name: string,
text: string,
quadrangle: string,
id: string;
name: string;
text: string;
quadrangle: string;
components: {
text: string,
quadrangle: string,
rect: string
}
text: string;
quadrangle: string;
rect: string;
};
};

/**
Expand All @@ -245,9 +251,9 @@ export interface DataCaptureResult {
* with 2 integers separated with a whitespace ("720 1280").
*/
resultInfo: {
stabilityStatus: string,
userAction: string,
frameSize: string
stabilityStatus: string;
userAction: string;
frameSize: string;
};

/**
Expand Down Expand Up @@ -297,7 +303,6 @@ export interface DataCaptureResult {
})
@Injectable()
export class AbbyyRTR extends IonicNativePlugin {

/**
* Opens a modal dialog with controls for the Text Capture scenario.
* @param {TextCaptureOptions} options
Expand Down

0 comments on commit 959a913

Please sign in to comment.