mindee 4.0.1 → 4.0.2
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/CHANGELOG.md +8 -0
- package/package.json +1 -1
- package/src/client.d.ts +58 -32
- package/src/client.js +50 -19
- package/src/http/endpoint.js +9 -11
- package/src/index.d.ts +1 -1
- package/src/input/base.d.ts +1 -0
- package/src/input/base.js +3 -0
- package/src/input/pageOptions.d.ts +4 -0
- package/src/input/pageOptions.js +3 -0
- package/src/input/sources.d.ts +2 -3
- package/src/input/sources.js +2 -1
- package/src/parsing/common/apiRequest.d.ts +9 -0
- package/src/parsing/common/apiRequest.js +5 -0
- package/src/parsing/common/apiResponse.d.ts +9 -0
- package/src/parsing/common/apiResponse.js +8 -0
- package/src/parsing/common/asyncPredictResponse.d.ts +24 -3
- package/src/parsing/common/asyncPredictResponse.js +15 -0
- package/src/parsing/common/document.d.ts +17 -0
- package/src/parsing/common/document.js +16 -4
- package/src/parsing/common/extras/cropperExtra.d.ts +3 -0
- package/src/parsing/common/extras/cropperExtra.js +3 -0
- package/src/parsing/common/extras/extras.d.ts +3 -0
- package/src/parsing/common/extras/extras.js +3 -0
- package/src/parsing/common/inference.d.ts +26 -0
- package/src/parsing/common/inference.js +23 -2
- package/src/parsing/common/mvisionV1.d.ts +3 -0
- package/src/parsing/common/mvisionV1.js +3 -0
- package/src/parsing/common/ocr.d.ts +3 -0
- package/src/parsing/common/ocr.js +3 -0
- package/src/parsing/common/ocrPage.d.ts +3 -0
- package/src/parsing/common/ocrPage.js +3 -0
- package/src/parsing/common/orientation.d.ts +3 -0
- package/src/parsing/common/orientation.js +3 -0
- package/src/parsing/common/page.d.ts +19 -0
- package/src/parsing/common/page.js +15 -0
- package/src/parsing/common/predictResponse.d.ts +11 -0
- package/src/parsing/common/predictResponse.js +10 -0
- package/src/parsing/custom/classificationField.d.ts +3 -0
- package/src/parsing/custom/classificationField.js +3 -0
- package/src/parsing/custom/listField.d.ts +6 -0
- package/src/parsing/custom/listField.js +6 -0
- package/src/parsing/standard/amount.d.ts +3 -0
- package/src/parsing/standard/amount.js +3 -0
- package/src/parsing/standard/base.d.ts +3 -0
- package/src/parsing/standard/base.js +3 -0
- package/src/parsing/standard/locale.d.ts +3 -0
- package/src/parsing/standard/locale.js +3 -0
- package/src/parsing/standard/paymentDetails.d.ts +3 -0
- package/src/parsing/standard/paymentDetails.js +3 -0
- package/src/parsing/standard/position.d.ts +3 -0
- package/src/parsing/standard/position.js +3 -0
- package/src/parsing/standard/tax.d.ts +3 -0
- package/src/parsing/standard/tax.js +3 -0
- package/src/product/cropper/cropperV1.d.ts +7 -0
- package/src/product/cropper/cropperV1.js +6 -0
- package/src/product/cropper/cropperV1Document.d.ts +6 -0
- package/src/product/cropper/cropperV1Document.js +6 -0
- package/src/product/custom/customV1.d.ts +7 -0
- package/src/product/custom/customV1.js +6 -0
- package/src/product/custom/customV1Document.d.ts +16 -0
- package/src/product/custom/customV1Document.js +16 -2
- package/src/product/custom/customV1Page.d.ts +7 -0
- package/src/product/custom/customV1Page.js +7 -0
- package/src/product/eu/licensePlate/licensePlateV1.d.ts +7 -0
- package/src/product/eu/licensePlate/licensePlateV1.js +6 -0
- package/src/product/eu/licensePlate/licensePlateV1Document.d.ts +3 -0
- package/src/product/eu/licensePlate/licensePlateV1Document.js +3 -0
- package/src/product/financialDocument/financialDocumentV1.d.ts +7 -0
- package/src/product/financialDocument/financialDocumentV1.js +6 -0
- package/src/product/financialDocument/financialDocumentV1Document.d.ts +3 -0
- package/src/product/financialDocument/financialDocumentV1Document.js +3 -0
- package/src/product/fr/bankAccountDetails/bankAccountDetailsV1.d.ts +7 -0
- package/src/product/fr/bankAccountDetails/bankAccountDetailsV1.js +6 -0
- package/src/product/fr/bankAccountDetails/bankAccountDetailsV1Document.d.ts +3 -0
- package/src/product/fr/bankAccountDetails/bankAccountDetailsV1Document.js +3 -0
- package/src/product/fr/bankAccountDetails/bankAccountDetailsV2.d.ts +7 -0
- package/src/product/fr/bankAccountDetails/bankAccountDetailsV2.js +6 -0
- package/src/product/fr/bankAccountDetails/bankAccountDetailsV2Document.d.ts +3 -0
- package/src/product/fr/bankAccountDetails/bankAccountDetailsV2Document.js +3 -0
- package/src/product/fr/carteVitale/carteVitaleV1.d.ts +7 -0
- package/src/product/fr/carteVitale/carteVitaleV1.js +6 -0
- package/src/product/fr/carteVitale/carteVitaleV1Document.d.ts +3 -0
- package/src/product/fr/carteVitale/carteVitaleV1Document.js +3 -0
- package/src/product/fr/idCard/idCardV1.d.ts +7 -0
- package/src/product/fr/idCard/idCardV1.js +6 -0
- package/src/product/fr/idCard/idCardV1Document.d.ts +3 -0
- package/src/product/fr/idCard/idCardV1Document.js +3 -0
- package/src/product/invoice/invoiceV4.d.ts +7 -0
- package/src/product/invoice/invoiceV4.js +6 -0
- package/src/product/invoice/invoiceV4Document.d.ts +3 -1
- package/src/product/invoice/invoiceV4Document.js +3 -1
- package/src/product/invoice/invoiceV4LineItem.d.ts +9 -0
- package/src/product/invoice/invoiceV4LineItem.js +9 -0
- package/src/product/invoiceSplitter/invoiceSplitterV1.d.ts +7 -0
- package/src/product/invoiceSplitter/invoiceSplitterV1.js +6 -0
- package/src/product/invoiceSplitter/invoiceSplitterV1Document.d.ts +6 -0
- package/src/product/invoiceSplitter/invoiceSplitterV1Document.js +6 -0
- package/src/product/invoiceSplitter/invoiceSplitterV1PageGroup.d.ts +8 -0
- package/src/product/invoiceSplitter/invoiceSplitterV1PageGroup.js +7 -0
- package/src/product/passport/passportV1.d.ts +7 -0
- package/src/product/passport/passportV1.js +6 -0
- package/src/product/passport/passportV1Document.d.ts +3 -0
- package/src/product/passport/passportV1Document.js +3 -0
- package/src/product/proofOfAddress/proofOfAddressV1.d.ts +7 -0
- package/src/product/proofOfAddress/proofOfAddressV1.js +6 -0
- package/src/product/proofOfAddress/proofOfAddressV1Document.d.ts +3 -0
- package/src/product/proofOfAddress/proofOfAddressV1Document.js +3 -0
- package/src/product/receipt/receiptV4.d.ts +7 -0
- package/src/product/receipt/receiptV4.js +5 -0
- package/src/product/receipt/receiptV4Document.d.ts +6 -0
- package/src/product/receipt/receiptV4Document.js +6 -0
- package/src/product/receipt/receiptV5.d.ts +7 -0
- package/src/product/receipt/receiptV5.js +6 -0
- package/src/product/receipt/receiptV5Document.d.ts +3 -0
- package/src/product/receipt/receiptV5Document.js +3 -0
- package/src/product/us/bankCheck/bankCheckV1.d.ts +7 -0
- package/src/product/us/bankCheck/bankCheckV1.js +6 -0
- package/src/product/us/bankCheck/bankCheckV1Document.d.ts +3 -0
- package/src/product/us/bankCheck/bankCheckV1Document.js +3 -0
- package/src/product/us/driverLicense/driverLicenseV1.d.ts +7 -0
- package/src/product/us/driverLicense/driverLicenseV1.js +6 -0
- package/src/product/us/driverLicense/driverLicenseV1Document.d.ts +3 -0
- package/src/product/us/driverLicense/driverLicenseV1Document.js +3 -0
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PageGroup = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Pages indexes in a group.
|
|
6
|
+
*/
|
|
4
7
|
class PageGroup {
|
|
5
8
|
constructor(prediction) {
|
|
9
|
+
/** List of page indexes. */
|
|
6
10
|
this.pageIndexes = [];
|
|
7
11
|
this.pageIndexes = prediction.page_indexes;
|
|
8
12
|
this.confidence = prediction["confidence"];
|
|
9
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* Default string representation.
|
|
16
|
+
*/
|
|
10
17
|
toString() {
|
|
11
18
|
return `:Page indexes: ${this.pageIndexes.join(", ")}`;
|
|
12
19
|
}
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { Inference, StringDict, Page } from "../../parsing/common";
|
|
2
2
|
import { PassportV1Document } from "./passportV1Document";
|
|
3
|
+
/**
|
|
4
|
+
* Inference prediction for Passport, API version 1.
|
|
5
|
+
*/
|
|
3
6
|
export declare class PassportV1 extends Inference {
|
|
7
|
+
/** The endpoint's name. */
|
|
4
8
|
endpointName: string;
|
|
9
|
+
/** The endpoint's version. */
|
|
5
10
|
endpointVersion: string;
|
|
11
|
+
/** The document-level prediction. */
|
|
6
12
|
prediction: PassportV1Document;
|
|
13
|
+
/** The document's pages. */
|
|
7
14
|
pages: Page<PassportV1Document>[];
|
|
8
15
|
constructor(rawPrediction: StringDict);
|
|
9
16
|
}
|
|
@@ -3,11 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PassportV1 = void 0;
|
|
4
4
|
const common_1 = require("../../parsing/common");
|
|
5
5
|
const passportV1Document_1 = require("./passportV1Document");
|
|
6
|
+
/**
|
|
7
|
+
* Inference prediction for Passport, API version 1.
|
|
8
|
+
*/
|
|
6
9
|
class PassportV1 extends common_1.Inference {
|
|
7
10
|
constructor(rawPrediction) {
|
|
8
11
|
super(rawPrediction);
|
|
12
|
+
/** The endpoint's name. */
|
|
9
13
|
this.endpointName = "passport";
|
|
14
|
+
/** The endpoint's version. */
|
|
10
15
|
this.endpointVersion = "1";
|
|
16
|
+
/** The document's pages. */
|
|
11
17
|
this.pages = [];
|
|
12
18
|
this.prediction = new passportV1Document_1.PassportV1Document(rawPrediction["prediction"]);
|
|
13
19
|
this.pages = rawPrediction["pages"].map((page) => new common_1.Page(passportV1Document_1.PassportV1Document, page, page["id"], page["orientation"]));
|
|
@@ -27,5 +27,8 @@ export declare class PassportV1Document implements Prediction {
|
|
|
27
27
|
/** The surname of the passport holder. */
|
|
28
28
|
surname: StringField;
|
|
29
29
|
constructor(rawPrediction: StringDict, pageId?: number);
|
|
30
|
+
/**
|
|
31
|
+
* Default string representation.
|
|
32
|
+
*/
|
|
30
33
|
toString(): string;
|
|
31
34
|
}
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { Inference, StringDict, Page } from "../../parsing/common";
|
|
2
2
|
import { ProofOfAddressV1Document } from "./proofOfAddressV1Document";
|
|
3
|
+
/**
|
|
4
|
+
* Inference prediction for Proof of Address, API version 1.
|
|
5
|
+
*/
|
|
3
6
|
export declare class ProofOfAddressV1 extends Inference {
|
|
7
|
+
/** The endpoint's name. */
|
|
4
8
|
endpointName: string;
|
|
9
|
+
/** The endpoint's version. */
|
|
5
10
|
endpointVersion: string;
|
|
11
|
+
/** The document-level prediction. */
|
|
6
12
|
prediction: ProofOfAddressV1Document;
|
|
13
|
+
/** The document's pages. */
|
|
7
14
|
pages: Page<ProofOfAddressV1Document>[];
|
|
8
15
|
constructor(rawPrediction: StringDict);
|
|
9
16
|
}
|
|
@@ -3,11 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ProofOfAddressV1 = void 0;
|
|
4
4
|
const common_1 = require("../../parsing/common");
|
|
5
5
|
const proofOfAddressV1Document_1 = require("./proofOfAddressV1Document");
|
|
6
|
+
/**
|
|
7
|
+
* Inference prediction for Proof of Address, API version 1.
|
|
8
|
+
*/
|
|
6
9
|
class ProofOfAddressV1 extends common_1.Inference {
|
|
7
10
|
constructor(rawPrediction) {
|
|
8
11
|
super(rawPrediction);
|
|
12
|
+
/** The endpoint's name. */
|
|
9
13
|
this.endpointName = "proof_of_address";
|
|
14
|
+
/** The endpoint's version. */
|
|
10
15
|
this.endpointVersion = "1";
|
|
16
|
+
/** The document's pages. */
|
|
11
17
|
this.pages = [];
|
|
12
18
|
this.prediction = new proofOfAddressV1Document_1.ProofOfAddressV1Document(rawPrediction["prediction"]);
|
|
13
19
|
this.pages = rawPrediction["pages"].map((page) => new common_1.Page(proofOfAddressV1Document_1.ProofOfAddressV1Document, page, page["id"], page["orientation"]));
|
|
@@ -23,5 +23,8 @@ export declare class ProofOfAddressV1Document implements Prediction {
|
|
|
23
23
|
/** The name of the person or company receiving the document. */
|
|
24
24
|
recipientName: StringField;
|
|
25
25
|
constructor(rawPrediction: StringDict, pageId?: number);
|
|
26
|
+
/**
|
|
27
|
+
* Default string representation.
|
|
28
|
+
*/
|
|
26
29
|
toString(): string;
|
|
27
30
|
}
|
|
@@ -53,6 +53,9 @@ class ProofOfAddressV1Document {
|
|
|
53
53
|
pageId: pageId,
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* Default string representation.
|
|
58
|
+
*/
|
|
56
59
|
toString() {
|
|
57
60
|
const issuerCompanyRegistration = this.issuerCompanyRegistration.join("\n ");
|
|
58
61
|
const recipientCompanyRegistration = this.recipientCompanyRegistration.join("\n ");
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { Inference, StringDict, Page } from "../../parsing/common";
|
|
2
2
|
import { ReceiptV4Document } from "./receiptV4Document";
|
|
3
|
+
/**
|
|
4
|
+
* Inference prediction for Receipt, API version 4.
|
|
5
|
+
*/
|
|
3
6
|
export declare class ReceiptV4 extends Inference {
|
|
7
|
+
/** The endpoint's name. */
|
|
4
8
|
endpointName: string;
|
|
9
|
+
/** The endpoint's version. */
|
|
5
10
|
endpointVersion: string;
|
|
11
|
+
/** The document-level prediction. */
|
|
6
12
|
prediction: ReceiptV4Document;
|
|
13
|
+
/** The document's pages. */
|
|
7
14
|
pages: Page<ReceiptV4Document>[];
|
|
8
15
|
constructor(rawPrediction: StringDict);
|
|
9
16
|
}
|
|
@@ -3,10 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ReceiptV4 = void 0;
|
|
4
4
|
const common_1 = require("../../parsing/common");
|
|
5
5
|
const receiptV4Document_1 = require("./receiptV4Document");
|
|
6
|
+
/**
|
|
7
|
+
* Inference prediction for Receipt, API version 4.
|
|
8
|
+
*/
|
|
6
9
|
class ReceiptV4 extends common_1.Inference {
|
|
7
10
|
constructor(rawPrediction) {
|
|
8
11
|
super(rawPrediction);
|
|
12
|
+
/** The endpoint's name. */
|
|
9
13
|
this.endpointName = "expense_receipts";
|
|
14
|
+
/** The endpoint's version. */
|
|
10
15
|
this.endpointVersion = "4";
|
|
11
16
|
this.prediction = new receiptV4Document_1.ReceiptV4Document(rawPrediction["prediction"]);
|
|
12
17
|
this.pages = rawPrediction["pages"].map((page) => new common_1.Page(receiptV4Document_1.ReceiptV4Document, page, page["id"], page["orientation"]));
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { Prediction, StringDict } from "../../parsing/common";
|
|
2
2
|
import { ClassificationField, AmountField, DateField, StringField, LocaleField, TaxField } from "../../parsing/standard";
|
|
3
|
+
/**
|
|
4
|
+
* Document data for Receipt, API version 5.
|
|
5
|
+
*/
|
|
3
6
|
export declare class ReceiptV4Document implements Prediction {
|
|
4
7
|
/** Where the purchase was made, the language, and the currency. */
|
|
5
8
|
locale: LocaleField;
|
|
@@ -26,5 +29,8 @@ export declare class ReceiptV4Document implements Prediction {
|
|
|
26
29
|
/** Total tax amount of the purchase. */
|
|
27
30
|
totalTax: AmountField;
|
|
28
31
|
constructor(rawPrediction: StringDict, pageId?: number);
|
|
32
|
+
/**
|
|
33
|
+
* Default string representation.
|
|
34
|
+
*/
|
|
29
35
|
toString(): string;
|
|
30
36
|
}
|
|
@@ -3,6 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ReceiptV4Document = void 0;
|
|
4
4
|
const common_1 = require("../../parsing/common");
|
|
5
5
|
const standard_1 = require("../../parsing/standard");
|
|
6
|
+
/**
|
|
7
|
+
* Document data for Receipt, API version 5.
|
|
8
|
+
*/
|
|
6
9
|
class ReceiptV4Document {
|
|
7
10
|
constructor(rawPrediction, pageId) {
|
|
8
11
|
this.locale = new standard_1.LocaleField({
|
|
@@ -48,6 +51,9 @@ class ReceiptV4Document {
|
|
|
48
51
|
});
|
|
49
52
|
this.taxes = new standard_1.Taxes().init(rawPrediction["taxes"], pageId);
|
|
50
53
|
}
|
|
54
|
+
/**
|
|
55
|
+
* Default string representation.
|
|
56
|
+
*/
|
|
51
57
|
toString() {
|
|
52
58
|
const outStr = `:Locale: ${this.locale}
|
|
53
59
|
:Date: ${this.date}
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { Inference, StringDict, Page } from "../../parsing/common";
|
|
2
2
|
import { ReceiptV5Document } from "./receiptV5Document";
|
|
3
|
+
/**
|
|
4
|
+
* Inference prediction for Receipt, API version 5.
|
|
5
|
+
*/
|
|
3
6
|
export declare class ReceiptV5 extends Inference {
|
|
7
|
+
/** The endpoint's name. */
|
|
4
8
|
endpointName: string;
|
|
9
|
+
/** The endpoint's version. */
|
|
5
10
|
endpointVersion: string;
|
|
11
|
+
/** The document-level prediction. */
|
|
6
12
|
prediction: ReceiptV5Document;
|
|
13
|
+
/** The document's pages. */
|
|
7
14
|
pages: Page<ReceiptV5Document>[];
|
|
8
15
|
constructor(rawPrediction: StringDict);
|
|
9
16
|
}
|
|
@@ -3,11 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ReceiptV5 = void 0;
|
|
4
4
|
const common_1 = require("../../parsing/common");
|
|
5
5
|
const receiptV5Document_1 = require("./receiptV5Document");
|
|
6
|
+
/**
|
|
7
|
+
* Inference prediction for Receipt, API version 5.
|
|
8
|
+
*/
|
|
6
9
|
class ReceiptV5 extends common_1.Inference {
|
|
7
10
|
constructor(rawPrediction) {
|
|
8
11
|
super(rawPrediction);
|
|
12
|
+
/** The endpoint's name. */
|
|
9
13
|
this.endpointName = "expense_receipts";
|
|
14
|
+
/** The endpoint's version. */
|
|
10
15
|
this.endpointVersion = "5";
|
|
16
|
+
/** The document's pages. */
|
|
11
17
|
this.pages = [];
|
|
12
18
|
this.prediction = new receiptV5Document_1.ReceiptV5Document(rawPrediction["prediction"]);
|
|
13
19
|
this.pages = rawPrediction["pages"].map((page) => new common_1.Page(receiptV5Document_1.ReceiptV5Document, page, page["id"], page["orientation"]));
|
|
@@ -38,5 +38,8 @@ export declare class ReceiptV5Document implements Prediction {
|
|
|
38
38
|
/** The total amount of taxes. */
|
|
39
39
|
totalTax: AmountField;
|
|
40
40
|
constructor(rawPrediction: StringDict, pageId?: number);
|
|
41
|
+
/**
|
|
42
|
+
* Default string representation.
|
|
43
|
+
*/
|
|
41
44
|
toString(): string;
|
|
42
45
|
}
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import { Inference, StringDict, Page } from "../../../parsing/common";
|
|
2
2
|
import { BankCheckV1Document } from "./bankCheckV1Document";
|
|
3
3
|
import { BankCheckV1Page } from "./bankCheckV1Page";
|
|
4
|
+
/**
|
|
5
|
+
* Inference prediction for Bank Check, API version 1.
|
|
6
|
+
*/
|
|
4
7
|
export declare class BankCheckV1 extends Inference {
|
|
8
|
+
/** The endpoint's name. */
|
|
5
9
|
endpointName: string;
|
|
10
|
+
/** The endpoint's version. */
|
|
6
11
|
endpointVersion: string;
|
|
12
|
+
/** The document-level prediction. */
|
|
7
13
|
prediction: BankCheckV1Document;
|
|
14
|
+
/** The document's pages. */
|
|
8
15
|
pages: Page<BankCheckV1Page>[];
|
|
9
16
|
constructor(rawPrediction: StringDict);
|
|
10
17
|
}
|
|
@@ -4,11 +4,17 @@ exports.BankCheckV1 = void 0;
|
|
|
4
4
|
const common_1 = require("../../../parsing/common");
|
|
5
5
|
const bankCheckV1Document_1 = require("./bankCheckV1Document");
|
|
6
6
|
const bankCheckV1Page_1 = require("./bankCheckV1Page");
|
|
7
|
+
/**
|
|
8
|
+
* Inference prediction for Bank Check, API version 1.
|
|
9
|
+
*/
|
|
7
10
|
class BankCheckV1 extends common_1.Inference {
|
|
8
11
|
constructor(rawPrediction) {
|
|
9
12
|
super(rawPrediction);
|
|
13
|
+
/** The endpoint's name. */
|
|
10
14
|
this.endpointName = "bank_check";
|
|
15
|
+
/** The endpoint's version. */
|
|
11
16
|
this.endpointVersion = "1";
|
|
17
|
+
/** The document's pages. */
|
|
12
18
|
this.pages = [];
|
|
13
19
|
this.prediction = new bankCheckV1Document_1.BankCheckV1Document(rawPrediction["prediction"]);
|
|
14
20
|
this.pages = rawPrediction["pages"].map((page) => new common_1.Page(bankCheckV1Page_1.BankCheckV1Page, page, page["id"], page["orientation"]));
|
|
@@ -17,5 +17,8 @@ export declare class BankCheckV1Document implements Prediction {
|
|
|
17
17
|
/** The check issuer's routing number. */
|
|
18
18
|
routingNumber: StringField;
|
|
19
19
|
constructor(rawPrediction: StringDict, pageId?: number);
|
|
20
|
+
/**
|
|
21
|
+
* Default string representation.
|
|
22
|
+
*/
|
|
20
23
|
toString(): string;
|
|
21
24
|
}
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import { Inference, StringDict, Page } from "../../../parsing/common";
|
|
2
2
|
import { DriverLicenseV1Document } from "./driverLicenseV1Document";
|
|
3
3
|
import { DriverLicenseV1Page } from "./driverLicenseV1Page";
|
|
4
|
+
/**
|
|
5
|
+
* Inference prediction for Driver License, API version 1.
|
|
6
|
+
*/
|
|
4
7
|
export declare class DriverLicenseV1 extends Inference {
|
|
8
|
+
/** The endpoint's name. */
|
|
5
9
|
endpointName: string;
|
|
10
|
+
/** The endpoint's version. */
|
|
6
11
|
endpointVersion: string;
|
|
12
|
+
/** The document-level prediction. */
|
|
7
13
|
prediction: DriverLicenseV1Document;
|
|
14
|
+
/** The document's pages. */
|
|
8
15
|
pages: Page<DriverLicenseV1Page>[];
|
|
9
16
|
constructor(rawPrediction: StringDict);
|
|
10
17
|
}
|
|
@@ -4,11 +4,17 @@ exports.DriverLicenseV1 = void 0;
|
|
|
4
4
|
const common_1 = require("../../../parsing/common");
|
|
5
5
|
const driverLicenseV1Document_1 = require("./driverLicenseV1Document");
|
|
6
6
|
const driverLicenseV1Page_1 = require("./driverLicenseV1Page");
|
|
7
|
+
/**
|
|
8
|
+
* Inference prediction for Driver License, API version 1.
|
|
9
|
+
*/
|
|
7
10
|
class DriverLicenseV1 extends common_1.Inference {
|
|
8
11
|
constructor(rawPrediction) {
|
|
9
12
|
super(rawPrediction);
|
|
13
|
+
/** The endpoint's name. */
|
|
10
14
|
this.endpointName = "us_driver_license";
|
|
15
|
+
/** The endpoint's version. */
|
|
11
16
|
this.endpointVersion = "1";
|
|
17
|
+
/** The document's pages. */
|
|
12
18
|
this.pages = [];
|
|
13
19
|
this.prediction = new driverLicenseV1Document_1.DriverLicenseV1Document(rawPrediction["prediction"]);
|
|
14
20
|
this.pages = rawPrediction["pages"].map((page) => new common_1.Page(driverLicenseV1Page_1.DriverLicenseV1Page, page, page["id"], page["orientation"]));
|
|
@@ -39,5 +39,8 @@ export declare class DriverLicenseV1Document implements Prediction {
|
|
|
39
39
|
/** US driver license holders weight */
|
|
40
40
|
weight: StringField;
|
|
41
41
|
constructor(rawPrediction: StringDict, pageId?: number);
|
|
42
|
+
/**
|
|
43
|
+
* Default string representation.
|
|
44
|
+
*/
|
|
42
45
|
toString(): string;
|
|
43
46
|
}
|