mindee 4.23.1 → 4.24.0
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 +16 -0
- package/package.json +1 -1
- package/src/cli.js +7 -236
- package/src/cliProducts.d.ts +11 -0
- package/src/cliProducts.js +306 -0
- package/src/imageOperations/invoiceSplitterExtractor/invoiceSplitterExtractor.js +1 -1
- package/src/product/deliveryNote/deliveryNoteV1Document.d.ts +1 -1
- package/src/product/deliveryNote/deliveryNoteV1Document.js +1 -1
- package/src/product/financialDocument/financialDocumentV1Document.d.ts +17 -14
- package/src/product/financialDocument/financialDocumentV1Document.js +5 -5
- package/src/product/financialDocument/financialDocumentV1LineItem.d.ts +1 -1
- package/src/product/financialDocument/financialDocumentV1LineItem.js +1 -1
- package/src/product/fr/energyBill/energyBillV1Document.d.ts +1 -1
- package/src/product/fr/energyBill/energyBillV1Document.js +4 -2
- package/src/product/fr/energyBill/energyBillV1EnergyUsage.d.ts +4 -0
- package/src/product/fr/energyBill/energyBillV1EnergyUsage.js +24 -1
- package/src/product/fr/energyBill/energyBillV1MeterDetail.d.ts +1 -1
- package/src/product/fr/energyBill/energyBillV1MeterDetail.js +2 -2
- package/src/product/fr/internal.d.ts +1 -1
- package/src/product/fr/internal.js +2 -2
- package/src/product/ind/internal.d.ts +1 -1
- package/src/product/ind/internal.js +2 -2
- package/src/product/index.d.ts +4 -7
- package/src/product/index.js +6 -11
- package/src/product/internal.d.ts +1 -2
- package/src/product/internal.js +2 -3
- package/src/product/invoice/invoiceV4Document.d.ts +14 -14
- package/src/product/invoice/invoiceV4Document.js +5 -5
- package/src/product/invoice/invoiceV4LineItem.d.ts +2 -2
- package/src/product/invoice/invoiceV4LineItem.js +1 -1
- package/src/product/invoiceSplitter/index.d.ts +1 -0
- package/src/product/invoiceSplitter/index.js +5 -0
- package/src/product/invoiceSplitter/internal.d.ts +1 -1
- package/src/product/invoiceSplitter/internal.js +3 -3
- package/src/product/invoiceSplitter/invoiceSplitterV1.d.ts +1 -1
- package/src/product/invoiceSplitter/invoiceSplitterV1.js +7 -2
- package/src/product/invoiceSplitter/invoiceSplitterV1Document.d.ts +5 -5
- package/src/product/invoiceSplitter/invoiceSplitterV1Document.js +17 -10
- package/src/product/invoiceSplitter/invoiceSplitterV1InvoicePageGroup.d.ts +28 -0
- package/src/product/invoiceSplitter/invoiceSplitterV1InvoicePageGroup.js +53 -0
- package/src/product/receipt/internal.d.ts +0 -2
- package/src/product/receipt/internal.js +1 -5
- package/src/product/receipt/receiptV5Document.d.ts +8 -8
- package/src/product/receipt/receiptV5Document.js +2 -2
- package/src/product/receipt/receiptV5LineItem.d.ts +1 -1
- package/src/product/receipt/receiptV5LineItem.js +1 -1
- package/src/product/us/healthcareCard/healthcareCardV1Document.d.ts +1 -1
- package/src/product/us/healthcareCard/healthcareCardV1Document.js +1 -1
- package/src/product/us/healthcareCard/index.d.ts +0 -2
- package/src/product/us/healthcareCard/index.js +1 -5
- package/src/product/us/index.d.ts +0 -2
- package/src/product/us/index.js +1 -5
- package/src/product/us/internal.d.ts +1 -3
- package/src/product/us/internal.js +2 -4
- package/src/product/eu/driverLicense/driverLicenseV1.d.ts +0 -17
- package/src/product/eu/driverLicense/driverLicenseV1.js +0 -28
- package/src/product/eu/driverLicense/driverLicenseV1Document.d.ts +0 -36
- package/src/product/eu/driverLicense/driverLicenseV1Document.js +0 -79
- package/src/product/eu/driverLicense/driverLicenseV1Page.d.ts +0 -14
- package/src/product/eu/driverLicense/driverLicenseV1Page.js +0 -29
- package/src/product/eu/driverLicense/index.d.ts +0 -1
- package/src/product/eu/driverLicense/index.js +0 -5
- package/src/product/eu/driverLicense/internal.d.ts +0 -3
- package/src/product/eu/driverLicense/internal.js +0 -9
- package/src/product/eu/index.d.ts +0 -2
- package/src/product/eu/index.js +0 -7
- package/src/product/eu/internal.d.ts +0 -2
- package/src/product/eu/internal.js +0 -28
- package/src/product/eu/licensePlate/index.d.ts +0 -1
- package/src/product/eu/licensePlate/index.js +0 -5
- package/src/product/eu/licensePlate/internal.d.ts +0 -2
- package/src/product/eu/licensePlate/internal.js +0 -7
- package/src/product/eu/licensePlate/licensePlateV1.d.ts +0 -16
- package/src/product/eu/licensePlate/licensePlateV1.js +0 -27
- package/src/product/eu/licensePlate/licensePlateV1Document.d.ts +0 -14
- package/src/product/eu/licensePlate/licensePlateV1Document.js +0 -28
- package/src/product/invoiceSplitter/invoiceSplitterV1PageGroup.d.ts +0 -15
- package/src/product/invoiceSplitter/invoiceSplitterV1PageGroup.js +0 -21
- package/src/product/proofOfAddress/index.d.ts +0 -1
- package/src/product/proofOfAddress/index.js +0 -5
- package/src/product/proofOfAddress/internal.d.ts +0 -2
- package/src/product/proofOfAddress/internal.js +0 -7
- package/src/product/proofOfAddress/proofOfAddressV1.d.ts +0 -16
- package/src/product/proofOfAddress/proofOfAddressV1.js +0 -27
- package/src/product/proofOfAddress/proofOfAddressV1Document.d.ts +0 -30
- package/src/product/proofOfAddress/proofOfAddressV1Document.js +0 -75
- package/src/product/receipt/receiptV4.d.ts +0 -16
- package/src/product/receipt/receiptV4.js +0 -20
- package/src/product/receipt/receiptV4Document.d.ts +0 -36
- package/src/product/receipt/receiptV4Document.js +0 -73
- package/src/product/us/driverLicense/driverLicenseV1.d.ts +0 -17
- package/src/product/us/driverLicense/driverLicenseV1.js +0 -28
- package/src/product/us/driverLicense/driverLicenseV1Document.d.ts +0 -46
- package/src/product/us/driverLicense/driverLicenseV1Document.js +0 -104
- package/src/product/us/driverLicense/driverLicenseV1Page.d.ts +0 -14
- package/src/product/us/driverLicense/driverLicenseV1Page.js +0 -29
- package/src/product/us/driverLicense/index.d.ts +0 -1
- package/src/product/us/driverLicense/index.js +0 -5
- package/src/product/us/driverLicense/internal.d.ts +0 -3
- package/src/product/us/driverLicense/internal.js +0 -9
- package/src/product/us/w9/index.d.ts +0 -1
- package/src/product/us/w9/index.js +0 -5
- package/src/product/us/w9/internal.d.ts +0 -3
- package/src/product/us/w9/internal.js +0 -9
- package/src/product/us/w9/w9V1.d.ts +0 -17
- package/src/product/us/w9/w9V1.js +0 -28
- package/src/product/us/w9/w9V1Document.d.ts +0 -10
- package/src/product/us/w9/w9V1Document.js +0 -15
- package/src/product/us/w9/w9V1Page.d.ts +0 -34
- package/src/product/us/w9/w9V1Page.js +0 -78
|
@@ -4,7 +4,7 @@ exports.InvoiceSplitterV1 = void 0;
|
|
|
4
4
|
const common_1 = require("../../parsing/common");
|
|
5
5
|
const invoiceSplitterV1Document_1 = require("./invoiceSplitterV1Document");
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Invoice Splitter API version 1 inference prediction.
|
|
8
8
|
*/
|
|
9
9
|
class InvoiceSplitterV1 extends common_1.Inference {
|
|
10
10
|
constructor(rawPrediction) {
|
|
@@ -16,7 +16,12 @@ class InvoiceSplitterV1 extends common_1.Inference {
|
|
|
16
16
|
/** The document's pages. */
|
|
17
17
|
this.pages = [];
|
|
18
18
|
this.prediction = new invoiceSplitterV1Document_1.InvoiceSplitterV1Document(rawPrediction["prediction"]);
|
|
19
|
-
|
|
19
|
+
rawPrediction["pages"].forEach((page) => {
|
|
20
|
+
if (page.prediction !== undefined && page.prediction !== null &&
|
|
21
|
+
Object.keys(page.prediction).length > 0) {
|
|
22
|
+
this.pages.push(new common_1.Page(invoiceSplitterV1Document_1.InvoiceSplitterV1Document, page, page["id"], page["orientation"]));
|
|
23
|
+
}
|
|
24
|
+
});
|
|
20
25
|
}
|
|
21
26
|
}
|
|
22
27
|
exports.InvoiceSplitterV1 = InvoiceSplitterV1;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Prediction, StringDict } from "../../parsing/common";
|
|
2
|
-
import {
|
|
2
|
+
import { InvoiceSplitterV1InvoicePageGroup } from "./invoiceSplitterV1InvoicePageGroup";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Invoice Splitter API version 1.2 document data.
|
|
5
5
|
*/
|
|
6
6
|
export declare class InvoiceSplitterV1Document implements Prediction {
|
|
7
|
-
/** List of page
|
|
8
|
-
invoicePageGroups:
|
|
9
|
-
constructor(rawPrediction: StringDict);
|
|
7
|
+
/** List of page groups. Each group represents a single invoice within a multi-invoice document. */
|
|
8
|
+
invoicePageGroups: InvoiceSplitterV1InvoicePageGroup[];
|
|
9
|
+
constructor(rawPrediction: StringDict, pageId?: number);
|
|
10
10
|
/**
|
|
11
11
|
* Default string representation.
|
|
12
12
|
*/
|
|
@@ -2,26 +2,33 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.InvoiceSplitterV1Document = void 0;
|
|
4
4
|
const common_1 = require("../../parsing/common");
|
|
5
|
-
const
|
|
5
|
+
const invoiceSplitterV1InvoicePageGroup_1 = require("./invoiceSplitterV1InvoicePageGroup");
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Invoice Splitter API version 1.2 document data.
|
|
8
8
|
*/
|
|
9
9
|
class InvoiceSplitterV1Document {
|
|
10
|
-
constructor(rawPrediction) {
|
|
11
|
-
/** List of page
|
|
10
|
+
constructor(rawPrediction, pageId) {
|
|
11
|
+
/** List of page groups. Each group represents a single invoice within a multi-invoice document. */
|
|
12
12
|
this.invoicePageGroups = [];
|
|
13
13
|
rawPrediction["invoice_page_groups"] &&
|
|
14
|
-
rawPrediction["invoice_page_groups"].
|
|
14
|
+
rawPrediction["invoice_page_groups"].map((itemPrediction) => this.invoicePageGroups.push(new invoiceSplitterV1InvoicePageGroup_1.InvoiceSplitterV1InvoicePageGroup({
|
|
15
|
+
prediction: itemPrediction,
|
|
16
|
+
pageId: pageId,
|
|
17
|
+
})));
|
|
15
18
|
}
|
|
16
19
|
/**
|
|
17
20
|
* Default string representation.
|
|
18
21
|
*/
|
|
19
22
|
toString() {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
.
|
|
24
|
-
|
|
23
|
+
let invoicePageGroupsSummary = "";
|
|
24
|
+
if (this.invoicePageGroups && this.invoicePageGroups.length > 0) {
|
|
25
|
+
const invoicePageGroupsColSizes = [74];
|
|
26
|
+
invoicePageGroupsSummary += "\n" + (0, common_1.lineSeparator)(invoicePageGroupsColSizes, "-") + "\n ";
|
|
27
|
+
invoicePageGroupsSummary += "| Page Indexes ";
|
|
28
|
+
invoicePageGroupsSummary += "|\n" + (0, common_1.lineSeparator)(invoicePageGroupsColSizes, "=");
|
|
29
|
+
invoicePageGroupsSummary += this.invoicePageGroups.map((item) => "\n " + item.toTableLine() + "\n" + (0, common_1.lineSeparator)(invoicePageGroupsColSizes, "-")).join("");
|
|
30
|
+
}
|
|
31
|
+
const outStr = `:Invoice Page Groups: ${invoicePageGroupsSummary}`.trimEnd();
|
|
25
32
|
return (0, common_1.cleanOutString)(outStr);
|
|
26
33
|
}
|
|
27
34
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { StringDict } from "../../parsing/common";
|
|
2
|
+
import { Polygon } from "../../geometry";
|
|
3
|
+
/**
|
|
4
|
+
* List of page groups. Each group represents a single invoice within a multi-invoice document.
|
|
5
|
+
*/
|
|
6
|
+
export declare class InvoiceSplitterV1InvoicePageGroup {
|
|
7
|
+
#private;
|
|
8
|
+
/** List of page indexes that belong to the same invoice (group). */
|
|
9
|
+
pageIndexes: Array<number> | null;
|
|
10
|
+
/** Confidence score */
|
|
11
|
+
confidence: number;
|
|
12
|
+
/** The document page on which the information was found. */
|
|
13
|
+
pageId: number;
|
|
14
|
+
/**
|
|
15
|
+
* Contains the relative vertices coordinates (points) of a polygon containing
|
|
16
|
+
* the field in the document.
|
|
17
|
+
*/
|
|
18
|
+
polygon: Polygon;
|
|
19
|
+
constructor({ prediction }: StringDict);
|
|
20
|
+
/**
|
|
21
|
+
* Default string representation.
|
|
22
|
+
*/
|
|
23
|
+
toString(): string;
|
|
24
|
+
/**
|
|
25
|
+
* Output in a format suitable for inclusion in an rST table.
|
|
26
|
+
*/
|
|
27
|
+
toTableLine(): string;
|
|
28
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
3
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
4
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
5
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
6
|
+
};
|
|
7
|
+
var _InvoiceSplitterV1InvoicePageGroup_instances, _InvoiceSplitterV1InvoicePageGroup_printableValues;
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.InvoiceSplitterV1InvoicePageGroup = void 0;
|
|
10
|
+
/**
|
|
11
|
+
* List of page groups. Each group represents a single invoice within a multi-invoice document.
|
|
12
|
+
*/
|
|
13
|
+
class InvoiceSplitterV1InvoicePageGroup {
|
|
14
|
+
constructor({ prediction = {} }) {
|
|
15
|
+
_InvoiceSplitterV1InvoicePageGroup_instances.add(this);
|
|
16
|
+
/** Confidence score */
|
|
17
|
+
this.confidence = 0.0;
|
|
18
|
+
/**
|
|
19
|
+
* Contains the relative vertices coordinates (points) of a polygon containing
|
|
20
|
+
* the field in the document.
|
|
21
|
+
*/
|
|
22
|
+
this.polygon = [];
|
|
23
|
+
this.pageIndexes = prediction["page_indexes"];
|
|
24
|
+
this.pageId = prediction["page_id"];
|
|
25
|
+
this.confidence = prediction["confidence"] ? prediction.confidence : 0.0;
|
|
26
|
+
if (prediction["polygon"]) {
|
|
27
|
+
this.polygon = prediction.polygon;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Default string representation.
|
|
32
|
+
*/
|
|
33
|
+
toString() {
|
|
34
|
+
const printable = __classPrivateFieldGet(this, _InvoiceSplitterV1InvoicePageGroup_instances, "m", _InvoiceSplitterV1InvoicePageGroup_printableValues).call(this);
|
|
35
|
+
return ("Page Indexes: " +
|
|
36
|
+
printable.pageIndexes);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Output in a format suitable for inclusion in an rST table.
|
|
40
|
+
*/
|
|
41
|
+
toTableLine() {
|
|
42
|
+
const printable = __classPrivateFieldGet(this, _InvoiceSplitterV1InvoicePageGroup_instances, "m", _InvoiceSplitterV1InvoicePageGroup_printableValues).call(this);
|
|
43
|
+
return ("| " +
|
|
44
|
+
printable.pageIndexes.padEnd(72) +
|
|
45
|
+
" |");
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.InvoiceSplitterV1InvoicePageGroup = InvoiceSplitterV1InvoicePageGroup;
|
|
49
|
+
_InvoiceSplitterV1InvoicePageGroup_instances = new WeakSet(), _InvoiceSplitterV1InvoicePageGroup_printableValues = function _InvoiceSplitterV1InvoicePageGroup_printableValues() {
|
|
50
|
+
return {
|
|
51
|
+
pageIndexes: this.pageIndexes?.join(", ") ?? "",
|
|
52
|
+
};
|
|
53
|
+
};
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ReceiptV5LineItem = exports.ReceiptV5Document = exports.ReceiptV5 =
|
|
4
|
-
var receiptV4_1 = require("./receiptV4");
|
|
5
|
-
Object.defineProperty(exports, "ReceiptV4", { enumerable: true, get: function () { return receiptV4_1.ReceiptV4; } });
|
|
6
|
-
var receiptV4Document_1 = require("./receiptV4Document");
|
|
7
|
-
Object.defineProperty(exports, "ReceiptV4Document", { enumerable: true, get: function () { return receiptV4Document_1.ReceiptV4Document; } });
|
|
3
|
+
exports.ReceiptV5LineItem = exports.ReceiptV5Document = exports.ReceiptV5 = void 0;
|
|
8
4
|
var receiptV5_1 = require("./receiptV5");
|
|
9
5
|
Object.defineProperty(exports, "ReceiptV5", { enumerable: true, get: function () { return receiptV5_1.ReceiptV5; } });
|
|
10
6
|
var receiptV5Document_1 = require("./receiptV5Document");
|
|
@@ -5,29 +5,29 @@ import { AmountField, ClassificationField, CompanyRegistrationField, DateField,
|
|
|
5
5
|
* Receipt API version 5.3 document data.
|
|
6
6
|
*/
|
|
7
7
|
export declare class ReceiptV5Document implements Prediction {
|
|
8
|
-
/** The purchase category
|
|
8
|
+
/** The purchase category of the receipt. */
|
|
9
9
|
category: ClassificationField;
|
|
10
10
|
/** The date the purchase was made. */
|
|
11
11
|
date: DateField;
|
|
12
|
-
/**
|
|
12
|
+
/** The type of receipt: EXPENSE RECEIPT or CREDIT CARD RECEIPT. */
|
|
13
13
|
documentType: ClassificationField;
|
|
14
|
-
/** List of line
|
|
14
|
+
/** List of all line items on the receipt. */
|
|
15
15
|
lineItems: ReceiptV5LineItem[];
|
|
16
|
-
/** The locale
|
|
16
|
+
/** The locale of the document. */
|
|
17
17
|
locale: LocaleField;
|
|
18
18
|
/** The receipt number or identifier. */
|
|
19
19
|
receiptNumber: StringField;
|
|
20
|
-
/** The purchase subcategory
|
|
20
|
+
/** The purchase subcategory of the receipt for transport and food. */
|
|
21
21
|
subcategory: ClassificationField;
|
|
22
22
|
/** The address of the supplier or merchant. */
|
|
23
23
|
supplierAddress: StringField;
|
|
24
|
-
/** List of company
|
|
24
|
+
/** List of company registration numbers associated to the supplier. */
|
|
25
25
|
supplierCompanyRegistrations: CompanyRegistrationField[];
|
|
26
26
|
/** The name of the supplier or merchant. */
|
|
27
27
|
supplierName: StringField;
|
|
28
28
|
/** The phone number of the supplier or merchant. */
|
|
29
29
|
supplierPhoneNumber: StringField;
|
|
30
|
-
/**
|
|
30
|
+
/** The list of taxes present on the receipt. */
|
|
31
31
|
taxes: Taxes;
|
|
32
32
|
/** The time the purchase was made. */
|
|
33
33
|
time: StringField;
|
|
@@ -37,7 +37,7 @@ export declare class ReceiptV5Document implements Prediction {
|
|
|
37
37
|
totalAmount: AmountField;
|
|
38
38
|
/** The net amount paid: does not include taxes, fees, and discounts. */
|
|
39
39
|
totalNet: AmountField;
|
|
40
|
-
/** The
|
|
40
|
+
/** The sum of all taxes. */
|
|
41
41
|
totalTax: AmountField;
|
|
42
42
|
constructor(rawPrediction: StringDict, pageId?: number);
|
|
43
43
|
/**
|
|
@@ -9,9 +9,9 @@ const standard_1 = require("../../parsing/standard");
|
|
|
9
9
|
*/
|
|
10
10
|
class ReceiptV5Document {
|
|
11
11
|
constructor(rawPrediction, pageId) {
|
|
12
|
-
/** List of line
|
|
12
|
+
/** List of all line items on the receipt. */
|
|
13
13
|
this.lineItems = [];
|
|
14
|
-
/** List of company
|
|
14
|
+
/** List of company registration numbers associated to the supplier. */
|
|
15
15
|
this.supplierCompanyRegistrations = [];
|
|
16
16
|
this.category = new standard_1.ClassificationField({
|
|
17
17
|
prediction: rawPrediction["category"],
|
|
@@ -9,7 +9,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
9
9
|
exports.ReceiptV5LineItem = void 0;
|
|
10
10
|
const common_1 = require("../../parsing/common");
|
|
11
11
|
/**
|
|
12
|
-
* List of line
|
|
12
|
+
* List of all line items on the receipt.
|
|
13
13
|
*/
|
|
14
14
|
class ReceiptV5LineItem {
|
|
15
15
|
constructor({ prediction = {} }) {
|
|
@@ -2,7 +2,7 @@ import { Prediction, StringDict } from "../../../parsing/common";
|
|
|
2
2
|
import { HealthcareCardV1Copay } from "./healthcareCardV1Copay";
|
|
3
3
|
import { DateField, StringField } from "../../../parsing/standard";
|
|
4
4
|
/**
|
|
5
|
-
* Healthcare Card API version 1.
|
|
5
|
+
* Healthcare Card API version 1.1 document data.
|
|
6
6
|
*/
|
|
7
7
|
export declare class HealthcareCardV1Document implements Prediction {
|
|
8
8
|
/** The name of the company that provides the healthcare plan. */
|
|
@@ -5,7 +5,7 @@ const common_1 = require("../../../parsing/common");
|
|
|
5
5
|
const healthcareCardV1Copay_1 = require("./healthcareCardV1Copay");
|
|
6
6
|
const standard_1 = require("../../../parsing/standard");
|
|
7
7
|
/**
|
|
8
|
-
* Healthcare Card API version 1.
|
|
8
|
+
* Healthcare Card API version 1.1 document data.
|
|
9
9
|
*/
|
|
10
10
|
class HealthcareCardV1Document {
|
|
11
11
|
constructor(rawPrediction, pageId) {
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.HealthcareCardV1 = void 0;
|
|
4
4
|
var healthcareCardV1_1 = require("./healthcareCardV1");
|
|
5
5
|
Object.defineProperty(exports, "HealthcareCardV1", { enumerable: true, get: function () { return healthcareCardV1_1.HealthcareCardV1; } });
|
|
6
|
-
var healthcareCardV1Copay_1 = require("./healthcareCardV1Copay");
|
|
7
|
-
Object.defineProperty(exports, "HealthcareCardV1Copay", { enumerable: true, get: function () { return healthcareCardV1Copay_1.HealthcareCardV1Copay; } });
|
|
8
|
-
var healthcareCardV1Document_1 = require("./healthcareCardV1Document");
|
|
9
|
-
Object.defineProperty(exports, "HealthcareCardV1Document", { enumerable: true, get: function () { return healthcareCardV1Document_1.HealthcareCardV1Document; } });
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
export { BankCheckV1 } from "./bankCheck/bankCheckV1";
|
|
2
|
-
export { DriverLicenseV1 } from "./driverLicense/driverLicenseV1";
|
|
3
2
|
export { HealthcareCardV1 } from "./healthcareCard/healthcareCardV1";
|
|
4
3
|
export { UsMailV2 } from "./usMail/usMailV2";
|
|
5
4
|
export { UsMailV3 } from "./usMail/usMailV3";
|
|
6
|
-
export { W9V1 } from "./w9/w9V1";
|
package/src/product/us/index.js
CHANGED
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.UsMailV3 = exports.UsMailV2 = exports.HealthcareCardV1 = exports.BankCheckV1 = void 0;
|
|
4
4
|
var bankCheckV1_1 = require("./bankCheck/bankCheckV1");
|
|
5
5
|
Object.defineProperty(exports, "BankCheckV1", { enumerable: true, get: function () { return bankCheckV1_1.BankCheckV1; } });
|
|
6
|
-
var driverLicenseV1_1 = require("./driverLicense/driverLicenseV1");
|
|
7
|
-
Object.defineProperty(exports, "DriverLicenseV1", { enumerable: true, get: function () { return driverLicenseV1_1.DriverLicenseV1; } });
|
|
8
6
|
var healthcareCardV1_1 = require("./healthcareCard/healthcareCardV1");
|
|
9
7
|
Object.defineProperty(exports, "HealthcareCardV1", { enumerable: true, get: function () { return healthcareCardV1_1.HealthcareCardV1; } });
|
|
10
8
|
var usMailV2_1 = require("./usMail/usMailV2");
|
|
11
9
|
Object.defineProperty(exports, "UsMailV2", { enumerable: true, get: function () { return usMailV2_1.UsMailV2; } });
|
|
12
10
|
var usMailV3_1 = require("./usMail/usMailV3");
|
|
13
11
|
Object.defineProperty(exports, "UsMailV3", { enumerable: true, get: function () { return usMailV3_1.UsMailV3; } });
|
|
14
|
-
var w9V1_1 = require("./w9/w9V1");
|
|
15
|
-
Object.defineProperty(exports, "W9V1", { enumerable: true, get: function () { return w9V1_1.W9V1; } });
|
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
export * as bankCheck from "./bankCheck/internal";
|
|
2
|
-
export * as
|
|
3
|
-
export * as us from "./healthcareCard/internal";
|
|
2
|
+
export * as healthcareCard from "./healthcareCard/internal";
|
|
4
3
|
export * as usMail from "./usMail/internal";
|
|
5
|
-
export * as w9 from "./w9/internal";
|
|
@@ -23,9 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.
|
|
26
|
+
exports.usMail = exports.healthcareCard = exports.bankCheck = void 0;
|
|
27
27
|
exports.bankCheck = __importStar(require("./bankCheck/internal"));
|
|
28
|
-
exports.
|
|
29
|
-
exports.us = __importStar(require("./healthcareCard/internal"));
|
|
28
|
+
exports.healthcareCard = __importStar(require("./healthcareCard/internal"));
|
|
30
29
|
exports.usMail = __importStar(require("./usMail/internal"));
|
|
31
|
-
exports.w9 = __importStar(require("./w9/internal"));
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Inference, StringDict, Page } from "../../../parsing/common";
|
|
2
|
-
import { DriverLicenseV1Document } from "./driverLicenseV1Document";
|
|
3
|
-
import { DriverLicenseV1Page } from "./driverLicenseV1Page";
|
|
4
|
-
/**
|
|
5
|
-
* Driver License API version 1 inference prediction.
|
|
6
|
-
*/
|
|
7
|
-
export declare class DriverLicenseV1 extends Inference {
|
|
8
|
-
/** The endpoint's name. */
|
|
9
|
-
endpointName: string;
|
|
10
|
-
/** The endpoint's version. */
|
|
11
|
-
endpointVersion: string;
|
|
12
|
-
/** The document-level prediction. */
|
|
13
|
-
prediction: DriverLicenseV1Document;
|
|
14
|
-
/** The document's pages. */
|
|
15
|
-
pages: Page<DriverLicenseV1Page>[];
|
|
16
|
-
constructor(rawPrediction: StringDict);
|
|
17
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DriverLicenseV1 = void 0;
|
|
4
|
-
const common_1 = require("../../../parsing/common");
|
|
5
|
-
const driverLicenseV1Document_1 = require("./driverLicenseV1Document");
|
|
6
|
-
const driverLicenseV1Page_1 = require("./driverLicenseV1Page");
|
|
7
|
-
/**
|
|
8
|
-
* Driver License API version 1 inference prediction.
|
|
9
|
-
*/
|
|
10
|
-
class DriverLicenseV1 extends common_1.Inference {
|
|
11
|
-
constructor(rawPrediction) {
|
|
12
|
-
super(rawPrediction);
|
|
13
|
-
/** The endpoint's name. */
|
|
14
|
-
this.endpointName = "eu_driver_license";
|
|
15
|
-
/** The endpoint's version. */
|
|
16
|
-
this.endpointVersion = "1";
|
|
17
|
-
/** The document's pages. */
|
|
18
|
-
this.pages = [];
|
|
19
|
-
this.prediction = new driverLicenseV1Document_1.DriverLicenseV1Document(rawPrediction["prediction"]);
|
|
20
|
-
rawPrediction["pages"].forEach((page) => {
|
|
21
|
-
if (page.prediction !== undefined && page.prediction !== null &&
|
|
22
|
-
Object.keys(page.prediction).length > 0) {
|
|
23
|
-
this.pages.push(new common_1.Page(driverLicenseV1Page_1.DriverLicenseV1Page, page, page["id"], page["orientation"]));
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
exports.DriverLicenseV1 = DriverLicenseV1;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { Prediction, StringDict } from "../../../parsing/common";
|
|
2
|
-
import { DateField, StringField } from "../../../parsing/standard";
|
|
3
|
-
/**
|
|
4
|
-
* Driver License API version 1.0 document data.
|
|
5
|
-
*/
|
|
6
|
-
export declare class DriverLicenseV1Document implements Prediction {
|
|
7
|
-
/** EU driver license holders address */
|
|
8
|
-
address: StringField;
|
|
9
|
-
/** EU driver license holders categories */
|
|
10
|
-
category: StringField;
|
|
11
|
-
/** Country code extracted as a string. */
|
|
12
|
-
countryCode: StringField;
|
|
13
|
-
/** The date of birth of the document holder */
|
|
14
|
-
dateOfBirth: DateField;
|
|
15
|
-
/** ID number of the Document. */
|
|
16
|
-
documentId: StringField;
|
|
17
|
-
/** Date the document expires */
|
|
18
|
-
expiryDate: DateField;
|
|
19
|
-
/** First name(s) of the driver license holder */
|
|
20
|
-
firstName: StringField;
|
|
21
|
-
/** Authority that issued the document */
|
|
22
|
-
issueAuthority: StringField;
|
|
23
|
-
/** Date the document was issued */
|
|
24
|
-
issueDate: DateField;
|
|
25
|
-
/** Last name of the driver license holder. */
|
|
26
|
-
lastName: StringField;
|
|
27
|
-
/** Machine-readable license number */
|
|
28
|
-
mrz: StringField;
|
|
29
|
-
/** Place where the driver license holder was born */
|
|
30
|
-
placeOfBirth: StringField;
|
|
31
|
-
constructor(rawPrediction: StringDict, pageId?: number);
|
|
32
|
-
/**
|
|
33
|
-
* Default string representation.
|
|
34
|
-
*/
|
|
35
|
-
toString(): string;
|
|
36
|
-
}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DriverLicenseV1Document = void 0;
|
|
4
|
-
const common_1 = require("../../../parsing/common");
|
|
5
|
-
const standard_1 = require("../../../parsing/standard");
|
|
6
|
-
/**
|
|
7
|
-
* Driver License API version 1.0 document data.
|
|
8
|
-
*/
|
|
9
|
-
class DriverLicenseV1Document {
|
|
10
|
-
constructor(rawPrediction, pageId) {
|
|
11
|
-
this.address = new standard_1.StringField({
|
|
12
|
-
prediction: rawPrediction["address"],
|
|
13
|
-
pageId: pageId,
|
|
14
|
-
});
|
|
15
|
-
this.category = new standard_1.StringField({
|
|
16
|
-
prediction: rawPrediction["category"],
|
|
17
|
-
pageId: pageId,
|
|
18
|
-
});
|
|
19
|
-
this.countryCode = new standard_1.StringField({
|
|
20
|
-
prediction: rawPrediction["country_code"],
|
|
21
|
-
pageId: pageId,
|
|
22
|
-
});
|
|
23
|
-
this.dateOfBirth = new standard_1.DateField({
|
|
24
|
-
prediction: rawPrediction["date_of_birth"],
|
|
25
|
-
pageId: pageId,
|
|
26
|
-
});
|
|
27
|
-
this.documentId = new standard_1.StringField({
|
|
28
|
-
prediction: rawPrediction["document_id"],
|
|
29
|
-
pageId: pageId,
|
|
30
|
-
});
|
|
31
|
-
this.expiryDate = new standard_1.DateField({
|
|
32
|
-
prediction: rawPrediction["expiry_date"],
|
|
33
|
-
pageId: pageId,
|
|
34
|
-
});
|
|
35
|
-
this.firstName = new standard_1.StringField({
|
|
36
|
-
prediction: rawPrediction["first_name"],
|
|
37
|
-
pageId: pageId,
|
|
38
|
-
});
|
|
39
|
-
this.issueAuthority = new standard_1.StringField({
|
|
40
|
-
prediction: rawPrediction["issue_authority"],
|
|
41
|
-
pageId: pageId,
|
|
42
|
-
});
|
|
43
|
-
this.issueDate = new standard_1.DateField({
|
|
44
|
-
prediction: rawPrediction["issue_date"],
|
|
45
|
-
pageId: pageId,
|
|
46
|
-
});
|
|
47
|
-
this.lastName = new standard_1.StringField({
|
|
48
|
-
prediction: rawPrediction["last_name"],
|
|
49
|
-
pageId: pageId,
|
|
50
|
-
});
|
|
51
|
-
this.mrz = new standard_1.StringField({
|
|
52
|
-
prediction: rawPrediction["mrz"],
|
|
53
|
-
pageId: pageId,
|
|
54
|
-
});
|
|
55
|
-
this.placeOfBirth = new standard_1.StringField({
|
|
56
|
-
prediction: rawPrediction["place_of_birth"],
|
|
57
|
-
pageId: pageId,
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Default string representation.
|
|
62
|
-
*/
|
|
63
|
-
toString() {
|
|
64
|
-
const outStr = `:Country Code: ${this.countryCode}
|
|
65
|
-
:Document ID: ${this.documentId}
|
|
66
|
-
:Driver License Category: ${this.category}
|
|
67
|
-
:Last Name: ${this.lastName}
|
|
68
|
-
:First Name: ${this.firstName}
|
|
69
|
-
:Date Of Birth: ${this.dateOfBirth}
|
|
70
|
-
:Place Of Birth: ${this.placeOfBirth}
|
|
71
|
-
:Expiry Date: ${this.expiryDate}
|
|
72
|
-
:Issue Date: ${this.issueDate}
|
|
73
|
-
:Issue Authority: ${this.issueAuthority}
|
|
74
|
-
:MRZ: ${this.mrz}
|
|
75
|
-
:Address: ${this.address}`.trimEnd();
|
|
76
|
-
return (0, common_1.cleanOutString)(outStr);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
exports.DriverLicenseV1Document = DriverLicenseV1Document;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { StringDict } from "../../../parsing/common";
|
|
2
|
-
import { PositionField } from "../../../parsing/standard";
|
|
3
|
-
import { DriverLicenseV1Document } from "./driverLicenseV1Document";
|
|
4
|
-
/**
|
|
5
|
-
* Driver License API version 1.0 page data.
|
|
6
|
-
*/
|
|
7
|
-
export declare class DriverLicenseV1Page extends DriverLicenseV1Document {
|
|
8
|
-
/** Has a photo of the EU driver license holder */
|
|
9
|
-
photo: PositionField;
|
|
10
|
-
/** Has a signature of the EU driver license holder */
|
|
11
|
-
signature: PositionField;
|
|
12
|
-
constructor(rawPrediction: StringDict, pageId?: number);
|
|
13
|
-
toString(): string;
|
|
14
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DriverLicenseV1Page = void 0;
|
|
4
|
-
const common_1 = require("../../../parsing/common");
|
|
5
|
-
const standard_1 = require("../../../parsing/standard");
|
|
6
|
-
const driverLicenseV1Document_1 = require("./driverLicenseV1Document");
|
|
7
|
-
/**
|
|
8
|
-
* Driver License API version 1.0 page data.
|
|
9
|
-
*/
|
|
10
|
-
class DriverLicenseV1Page extends driverLicenseV1Document_1.DriverLicenseV1Document {
|
|
11
|
-
constructor(rawPrediction, pageId) {
|
|
12
|
-
super(rawPrediction, pageId);
|
|
13
|
-
this.photo = new standard_1.PositionField({
|
|
14
|
-
prediction: rawPrediction["photo"],
|
|
15
|
-
pageId: pageId,
|
|
16
|
-
});
|
|
17
|
-
this.signature = new standard_1.PositionField({
|
|
18
|
-
prediction: rawPrediction["signature"],
|
|
19
|
-
pageId: pageId,
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
toString() {
|
|
23
|
-
let outStr = `:Photo: ${this.photo}
|
|
24
|
-
:Signature: ${this.signature}`.trimEnd();
|
|
25
|
-
outStr += "\n" + super.toString();
|
|
26
|
-
return (0, common_1.cleanOutString)(outStr);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
exports.DriverLicenseV1Page = DriverLicenseV1Page;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { DriverLicenseV1 } from "./driverLicenseV1";
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DriverLicenseV1 = void 0;
|
|
4
|
-
var driverLicenseV1_1 = require("./driverLicenseV1");
|
|
5
|
-
Object.defineProperty(exports, "DriverLicenseV1", { enumerable: true, get: function () { return driverLicenseV1_1.DriverLicenseV1; } });
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DriverLicenseV1Page = exports.DriverLicenseV1Document = exports.DriverLicenseV1 = void 0;
|
|
4
|
-
var driverLicenseV1_1 = require("./driverLicenseV1");
|
|
5
|
-
Object.defineProperty(exports, "DriverLicenseV1", { enumerable: true, get: function () { return driverLicenseV1_1.DriverLicenseV1; } });
|
|
6
|
-
var driverLicenseV1Document_1 = require("./driverLicenseV1Document");
|
|
7
|
-
Object.defineProperty(exports, "DriverLicenseV1Document", { enumerable: true, get: function () { return driverLicenseV1Document_1.DriverLicenseV1Document; } });
|
|
8
|
-
var driverLicenseV1Page_1 = require("./driverLicenseV1Page");
|
|
9
|
-
Object.defineProperty(exports, "DriverLicenseV1Page", { enumerable: true, get: function () { return driverLicenseV1Page_1.DriverLicenseV1Page; } });
|
package/src/product/eu/index.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LicensePlateV1 = exports.DriverLicenseV1 = void 0;
|
|
4
|
-
var driverLicenseV1_1 = require("./driverLicense/driverLicenseV1");
|
|
5
|
-
Object.defineProperty(exports, "DriverLicenseV1", { enumerable: true, get: function () { return driverLicenseV1_1.DriverLicenseV1; } });
|
|
6
|
-
var licensePlateV1_1 = require("./licensePlate/licensePlateV1");
|
|
7
|
-
Object.defineProperty(exports, "LicensePlateV1", { enumerable: true, get: function () { return licensePlateV1_1.LicensePlateV1; } });
|