mindee 4.23.0 → 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.
Files changed (110) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/package.json +1 -2
  3. package/src/cli.js +7 -236
  4. package/src/cliProducts.d.ts +11 -0
  5. package/src/cliProducts.js +306 -0
  6. package/src/imageOperations/invoiceSplitterExtractor/invoiceSplitterExtractor.js +1 -1
  7. package/src/product/deliveryNote/deliveryNoteV1Document.d.ts +1 -1
  8. package/src/product/deliveryNote/deliveryNoteV1Document.js +1 -1
  9. package/src/product/financialDocument/financialDocumentV1Document.d.ts +17 -14
  10. package/src/product/financialDocument/financialDocumentV1Document.js +5 -5
  11. package/src/product/financialDocument/financialDocumentV1LineItem.d.ts +1 -1
  12. package/src/product/financialDocument/financialDocumentV1LineItem.js +1 -1
  13. package/src/product/fr/energyBill/energyBillV1Document.d.ts +1 -1
  14. package/src/product/fr/energyBill/energyBillV1Document.js +4 -2
  15. package/src/product/fr/energyBill/energyBillV1EnergyUsage.d.ts +4 -0
  16. package/src/product/fr/energyBill/energyBillV1EnergyUsage.js +24 -1
  17. package/src/product/fr/energyBill/energyBillV1MeterDetail.d.ts +1 -1
  18. package/src/product/fr/energyBill/energyBillV1MeterDetail.js +2 -2
  19. package/src/product/fr/internal.d.ts +1 -1
  20. package/src/product/fr/internal.js +2 -2
  21. package/src/product/ind/internal.d.ts +1 -1
  22. package/src/product/ind/internal.js +2 -2
  23. package/src/product/index.d.ts +4 -7
  24. package/src/product/index.js +6 -11
  25. package/src/product/internal.d.ts +1 -2
  26. package/src/product/internal.js +2 -3
  27. package/src/product/invoice/invoiceV4Document.d.ts +14 -14
  28. package/src/product/invoice/invoiceV4Document.js +5 -5
  29. package/src/product/invoice/invoiceV4LineItem.d.ts +2 -2
  30. package/src/product/invoice/invoiceV4LineItem.js +1 -1
  31. package/src/product/invoiceSplitter/index.d.ts +1 -0
  32. package/src/product/invoiceSplitter/index.js +5 -0
  33. package/src/product/invoiceSplitter/internal.d.ts +1 -1
  34. package/src/product/invoiceSplitter/internal.js +3 -3
  35. package/src/product/invoiceSplitter/invoiceSplitterV1.d.ts +1 -1
  36. package/src/product/invoiceSplitter/invoiceSplitterV1.js +7 -2
  37. package/src/product/invoiceSplitter/invoiceSplitterV1Document.d.ts +5 -5
  38. package/src/product/invoiceSplitter/invoiceSplitterV1Document.js +17 -10
  39. package/src/product/invoiceSplitter/invoiceSplitterV1InvoicePageGroup.d.ts +28 -0
  40. package/src/product/invoiceSplitter/invoiceSplitterV1InvoicePageGroup.js +53 -0
  41. package/src/product/receipt/internal.d.ts +0 -2
  42. package/src/product/receipt/internal.js +1 -5
  43. package/src/product/receipt/receiptV5Document.d.ts +8 -8
  44. package/src/product/receipt/receiptV5Document.js +2 -2
  45. package/src/product/receipt/receiptV5LineItem.d.ts +1 -1
  46. package/src/product/receipt/receiptV5LineItem.js +1 -1
  47. package/src/product/us/healthcareCard/healthcareCardV1Document.d.ts +1 -1
  48. package/src/product/us/healthcareCard/healthcareCardV1Document.js +1 -1
  49. package/src/product/us/healthcareCard/index.d.ts +0 -2
  50. package/src/product/us/healthcareCard/index.js +1 -5
  51. package/src/product/us/index.d.ts +0 -2
  52. package/src/product/us/index.js +1 -5
  53. package/src/product/us/internal.d.ts +1 -3
  54. package/src/product/us/internal.js +2 -4
  55. package/src/product/eu/driverLicense/driverLicenseV1.d.ts +0 -17
  56. package/src/product/eu/driverLicense/driverLicenseV1.js +0 -28
  57. package/src/product/eu/driverLicense/driverLicenseV1Document.d.ts +0 -36
  58. package/src/product/eu/driverLicense/driverLicenseV1Document.js +0 -79
  59. package/src/product/eu/driverLicense/driverLicenseV1Page.d.ts +0 -14
  60. package/src/product/eu/driverLicense/driverLicenseV1Page.js +0 -29
  61. package/src/product/eu/driverLicense/index.d.ts +0 -1
  62. package/src/product/eu/driverLicense/index.js +0 -5
  63. package/src/product/eu/driverLicense/internal.d.ts +0 -3
  64. package/src/product/eu/driverLicense/internal.js +0 -9
  65. package/src/product/eu/index.d.ts +0 -2
  66. package/src/product/eu/index.js +0 -7
  67. package/src/product/eu/internal.d.ts +0 -2
  68. package/src/product/eu/internal.js +0 -28
  69. package/src/product/eu/licensePlate/index.d.ts +0 -1
  70. package/src/product/eu/licensePlate/index.js +0 -5
  71. package/src/product/eu/licensePlate/internal.d.ts +0 -2
  72. package/src/product/eu/licensePlate/internal.js +0 -7
  73. package/src/product/eu/licensePlate/licensePlateV1.d.ts +0 -16
  74. package/src/product/eu/licensePlate/licensePlateV1.js +0 -27
  75. package/src/product/eu/licensePlate/licensePlateV1Document.d.ts +0 -14
  76. package/src/product/eu/licensePlate/licensePlateV1Document.js +0 -28
  77. package/src/product/invoiceSplitter/invoiceSplitterV1PageGroup.d.ts +0 -15
  78. package/src/product/invoiceSplitter/invoiceSplitterV1PageGroup.js +0 -21
  79. package/src/product/proofOfAddress/index.d.ts +0 -1
  80. package/src/product/proofOfAddress/index.js +0 -5
  81. package/src/product/proofOfAddress/internal.d.ts +0 -2
  82. package/src/product/proofOfAddress/internal.js +0 -7
  83. package/src/product/proofOfAddress/proofOfAddressV1.d.ts +0 -16
  84. package/src/product/proofOfAddress/proofOfAddressV1.js +0 -27
  85. package/src/product/proofOfAddress/proofOfAddressV1Document.d.ts +0 -30
  86. package/src/product/proofOfAddress/proofOfAddressV1Document.js +0 -75
  87. package/src/product/receipt/receiptV4.d.ts +0 -16
  88. package/src/product/receipt/receiptV4.js +0 -20
  89. package/src/product/receipt/receiptV4Document.d.ts +0 -36
  90. package/src/product/receipt/receiptV4Document.js +0 -73
  91. package/src/product/us/driverLicense/driverLicenseV1.d.ts +0 -17
  92. package/src/product/us/driverLicense/driverLicenseV1.js +0 -28
  93. package/src/product/us/driverLicense/driverLicenseV1Document.d.ts +0 -46
  94. package/src/product/us/driverLicense/driverLicenseV1Document.js +0 -104
  95. package/src/product/us/driverLicense/driverLicenseV1Page.d.ts +0 -14
  96. package/src/product/us/driverLicense/driverLicenseV1Page.js +0 -29
  97. package/src/product/us/driverLicense/index.d.ts +0 -1
  98. package/src/product/us/driverLicense/index.js +0 -5
  99. package/src/product/us/driverLicense/internal.d.ts +0 -3
  100. package/src/product/us/driverLicense/internal.js +0 -9
  101. package/src/product/us/w9/index.d.ts +0 -1
  102. package/src/product/us/w9/index.js +0 -5
  103. package/src/product/us/w9/internal.d.ts +0 -3
  104. package/src/product/us/w9/internal.js +0 -9
  105. package/src/product/us/w9/w9V1.d.ts +0 -17
  106. package/src/product/us/w9/w9V1.js +0 -28
  107. package/src/product/us/w9/w9V1Document.d.ts +0 -10
  108. package/src/product/us/w9/w9V1Document.js +0 -15
  109. package/src/product/us/w9/w9V1Page.d.ts +0 -34
  110. package/src/product/us/w9/w9V1Page.js +0 -78
@@ -1,104 +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.1 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.dateOfBirth = new standard_1.DateField({
16
- prediction: rawPrediction["date_of_birth"],
17
- pageId: pageId,
18
- });
19
- this.ddNumber = new standard_1.StringField({
20
- prediction: rawPrediction["dd_number"],
21
- pageId: pageId,
22
- });
23
- this.dlClass = new standard_1.StringField({
24
- prediction: rawPrediction["dl_class"],
25
- pageId: pageId,
26
- });
27
- this.driverLicenseId = new standard_1.StringField({
28
- prediction: rawPrediction["driver_license_id"],
29
- pageId: pageId,
30
- });
31
- this.endorsements = new standard_1.StringField({
32
- prediction: rawPrediction["endorsements"],
33
- pageId: pageId,
34
- });
35
- this.expiryDate = new standard_1.DateField({
36
- prediction: rawPrediction["expiry_date"],
37
- pageId: pageId,
38
- });
39
- this.eyeColor = new standard_1.StringField({
40
- prediction: rawPrediction["eye_color"],
41
- pageId: pageId,
42
- });
43
- this.firstName = new standard_1.StringField({
44
- prediction: rawPrediction["first_name"],
45
- pageId: pageId,
46
- });
47
- this.hairColor = new standard_1.StringField({
48
- prediction: rawPrediction["hair_color"],
49
- pageId: pageId,
50
- });
51
- this.height = new standard_1.StringField({
52
- prediction: rawPrediction["height"],
53
- pageId: pageId,
54
- });
55
- this.issuedDate = new standard_1.DateField({
56
- prediction: rawPrediction["issued_date"],
57
- pageId: pageId,
58
- });
59
- this.lastName = new standard_1.StringField({
60
- prediction: rawPrediction["last_name"],
61
- pageId: pageId,
62
- });
63
- this.restrictions = new standard_1.StringField({
64
- prediction: rawPrediction["restrictions"],
65
- pageId: pageId,
66
- });
67
- this.sex = new standard_1.StringField({
68
- prediction: rawPrediction["sex"],
69
- pageId: pageId,
70
- });
71
- this.state = new standard_1.StringField({
72
- prediction: rawPrediction["state"],
73
- pageId: pageId,
74
- });
75
- this.weight = new standard_1.StringField({
76
- prediction: rawPrediction["weight"],
77
- pageId: pageId,
78
- });
79
- }
80
- /**
81
- * Default string representation.
82
- */
83
- toString() {
84
- const outStr = `:State: ${this.state}
85
- :Driver License ID: ${this.driverLicenseId}
86
- :Expiry Date: ${this.expiryDate}
87
- :Date Of Issue: ${this.issuedDate}
88
- :Last Name: ${this.lastName}
89
- :First Name: ${this.firstName}
90
- :Address: ${this.address}
91
- :Date Of Birth: ${this.dateOfBirth}
92
- :Restrictions: ${this.restrictions}
93
- :Endorsements: ${this.endorsements}
94
- :Driver License Class: ${this.dlClass}
95
- :Sex: ${this.sex}
96
- :Height: ${this.height}
97
- :Weight: ${this.weight}
98
- :Hair Color: ${this.hairColor}
99
- :Eye Color: ${this.eyeColor}
100
- :Document Discriminator: ${this.ddNumber}`.trimEnd();
101
- return (0, common_1.cleanOutString)(outStr);
102
- }
103
- }
104
- 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.1 page data.
6
- */
7
- export declare class DriverLicenseV1Page extends DriverLicenseV1Document {
8
- /** Has a photo of the US driver license holder */
9
- photo: PositionField;
10
- /** Has a signature of the US 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.1 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,3 +0,0 @@
1
- export { DriverLicenseV1 } from "./driverLicenseV1";
2
- export { DriverLicenseV1Document } from "./driverLicenseV1Document";
3
- export { DriverLicenseV1Page } from "./driverLicenseV1Page";
@@ -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; } });
@@ -1 +0,0 @@
1
- export { W9V1 } from "./w9V1";
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.W9V1 = void 0;
4
- var w9V1_1 = require("./w9V1");
5
- Object.defineProperty(exports, "W9V1", { enumerable: true, get: function () { return w9V1_1.W9V1; } });
@@ -1,3 +0,0 @@
1
- export { W9V1 } from "./w9V1";
2
- export { W9V1Document } from "./w9V1Document";
3
- export { W9V1Page } from "./w9V1Page";
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.W9V1Page = exports.W9V1Document = exports.W9V1 = void 0;
4
- var w9V1_1 = require("./w9V1");
5
- Object.defineProperty(exports, "W9V1", { enumerable: true, get: function () { return w9V1_1.W9V1; } });
6
- var w9V1Document_1 = require("./w9V1Document");
7
- Object.defineProperty(exports, "W9V1Document", { enumerable: true, get: function () { return w9V1Document_1.W9V1Document; } });
8
- var w9V1Page_1 = require("./w9V1Page");
9
- Object.defineProperty(exports, "W9V1Page", { enumerable: true, get: function () { return w9V1Page_1.W9V1Page; } });
@@ -1,17 +0,0 @@
1
- import { Inference, StringDict, Page } from "../../../parsing/common";
2
- import { W9V1Document } from "./w9V1Document";
3
- import { W9V1Page } from "./w9V1Page";
4
- /**
5
- * W9 API version 1 inference prediction.
6
- */
7
- export declare class W9V1 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: W9V1Document;
14
- /** The document's pages. */
15
- pages: Page<W9V1Page>[];
16
- constructor(rawPrediction: StringDict);
17
- }
@@ -1,28 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.W9V1 = void 0;
4
- const common_1 = require("../../../parsing/common");
5
- const w9V1Document_1 = require("./w9V1Document");
6
- const w9V1Page_1 = require("./w9V1Page");
7
- /**
8
- * W9 API version 1 inference prediction.
9
- */
10
- class W9V1 extends common_1.Inference {
11
- constructor(rawPrediction) {
12
- super(rawPrediction);
13
- /** The endpoint's name. */
14
- this.endpointName = "us_w9";
15
- /** The endpoint's version. */
16
- this.endpointVersion = "1";
17
- /** The document's pages. */
18
- this.pages = [];
19
- this.prediction = new w9V1Document_1.W9V1Document();
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(w9V1Page_1.W9V1Page, page, page["id"], page["orientation"]));
24
- }
25
- });
26
- }
27
- }
28
- exports.W9V1 = W9V1;
@@ -1,10 +0,0 @@
1
- import { Prediction } from "../../../parsing/common";
2
- /**
3
- * W9 API version 1.0 document data.
4
- */
5
- export declare class W9V1Document implements Prediction {
6
- /**
7
- * Default string representation.
8
- */
9
- toString(): string;
10
- }
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.W9V1Document = void 0;
4
- /**
5
- * W9 API version 1.0 document data.
6
- */
7
- class W9V1Document {
8
- /**
9
- * Default string representation.
10
- */
11
- toString() {
12
- return "";
13
- }
14
- }
15
- exports.W9V1Document = W9V1Document;
@@ -1,34 +0,0 @@
1
- import { StringDict } from "../../../parsing/common";
2
- import { PositionField, StringField } from "../../../parsing/standard";
3
- import { W9V1Document } from "./w9V1Document";
4
- /**
5
- * W9 API version 1.0 page data.
6
- */
7
- export declare class W9V1Page extends W9V1Document {
8
- /** The street address (number, street, and apt. or suite no.) of the applicant. */
9
- address: StringField;
10
- /** The business name or disregarded entity name, if different from Name. */
11
- businessName: StringField;
12
- /** The city, state, and ZIP code of the applicant. */
13
- cityStateZip: StringField;
14
- /** The employer identification number. */
15
- ein: StringField;
16
- /** Name as shown on the applicant's income tax return. */
17
- name: StringField;
18
- /** Position of the signature date on the document. */
19
- signatureDatePosition: PositionField;
20
- /** Position of the signature on the document. */
21
- signaturePosition: PositionField;
22
- /** The applicant's social security number. */
23
- ssn: StringField;
24
- /** The federal tax classification, which can vary depending on the revision date. */
25
- taxClassification: StringField;
26
- /** Depending on revision year, among S, C, P or D for Limited Liability Company Classification. */
27
- taxClassificationLlc: StringField;
28
- /** Tax Classification Other Details. */
29
- taxClassificationOtherDetails: StringField;
30
- /** The Revision month and year of the W9 form. */
31
- w9RevisionDate: StringField;
32
- constructor(rawPrediction: StringDict, pageId?: number);
33
- toString(): string;
34
- }
@@ -1,78 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.W9V1Page = void 0;
4
- const common_1 = require("../../../parsing/common");
5
- const standard_1 = require("../../../parsing/standard");
6
- const w9V1Document_1 = require("./w9V1Document");
7
- /**
8
- * W9 API version 1.0 page data.
9
- */
10
- class W9V1Page extends w9V1Document_1.W9V1Document {
11
- constructor(rawPrediction, pageId) {
12
- super();
13
- this.address = new standard_1.StringField({
14
- prediction: rawPrediction["address"],
15
- pageId: pageId,
16
- });
17
- this.businessName = new standard_1.StringField({
18
- prediction: rawPrediction["business_name"],
19
- pageId: pageId,
20
- });
21
- this.cityStateZip = new standard_1.StringField({
22
- prediction: rawPrediction["city_state_zip"],
23
- pageId: pageId,
24
- });
25
- this.ein = new standard_1.StringField({
26
- prediction: rawPrediction["ein"],
27
- pageId: pageId,
28
- });
29
- this.name = new standard_1.StringField({
30
- prediction: rawPrediction["name"],
31
- pageId: pageId,
32
- });
33
- this.signatureDatePosition = new standard_1.PositionField({
34
- prediction: rawPrediction["signature_date_position"],
35
- pageId: pageId,
36
- });
37
- this.signaturePosition = new standard_1.PositionField({
38
- prediction: rawPrediction["signature_position"],
39
- pageId: pageId,
40
- });
41
- this.ssn = new standard_1.StringField({
42
- prediction: rawPrediction["ssn"],
43
- pageId: pageId,
44
- });
45
- this.taxClassification = new standard_1.StringField({
46
- prediction: rawPrediction["tax_classification"],
47
- pageId: pageId,
48
- });
49
- this.taxClassificationLlc = new standard_1.StringField({
50
- prediction: rawPrediction["tax_classification_llc"],
51
- pageId: pageId,
52
- });
53
- this.taxClassificationOtherDetails = new standard_1.StringField({
54
- prediction: rawPrediction["tax_classification_other_details"],
55
- pageId: pageId,
56
- });
57
- this.w9RevisionDate = new standard_1.StringField({
58
- prediction: rawPrediction["w9_revision_date"],
59
- pageId: pageId,
60
- });
61
- }
62
- toString() {
63
- const outStr = `:Name: ${this.name}
64
- :SSN: ${this.ssn}
65
- :Address: ${this.address}
66
- :City State Zip: ${this.cityStateZip}
67
- :Business Name: ${this.businessName}
68
- :EIN: ${this.ein}
69
- :Tax Classification: ${this.taxClassification}
70
- :Tax Classification Other Details: ${this.taxClassificationOtherDetails}
71
- :W9 Revision Date: ${this.w9RevisionDate}
72
- :Signature Position: ${this.signaturePosition}
73
- :Signature Date Position: ${this.signatureDatePosition}
74
- :Tax Classification LLC: ${this.taxClassificationLlc}`.trimEnd();
75
- return (0, common_1.cleanOutString)(outStr);
76
- }
77
- }
78
- exports.W9V1Page = W9V1Page;