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
@@ -7,11 +7,11 @@ import { AmountField, ClassificationField, CompanyRegistrationField, DateField,
7
7
  export declare class FinancialDocumentV1Document implements Prediction {
8
8
  /** The customer's address used for billing. */
9
9
  billingAddress: StringField;
10
- /** The purchase category among predefined classes. */
10
+ /** The purchase category, only for receipts. */
11
11
  category: ClassificationField;
12
12
  /** The address of the customer. */
13
13
  customerAddress: StringField;
14
- /** List of company registrations associated to the customer. */
14
+ /** List of company registration numbers associated to the customer. */
15
15
  customerCompanyRegistrations: CompanyRegistrationField[];
16
16
  /** The customer account number or identifier from the supplier. */
17
17
  customerId: StringField;
@@ -19,47 +19,50 @@ export declare class FinancialDocumentV1Document implements Prediction {
19
19
  customerName: StringField;
20
20
  /** The date the purchase was made. */
21
21
  date: DateField;
22
- /** The document number or identifier. */
22
+ /** The document number or identifier (invoice number or receipt number). */
23
23
  documentNumber: StringField;
24
- /** One of: 'INVOICE', 'CREDIT NOTE', 'CREDIT CARD RECEIPT', 'EXPENSE RECEIPT'. */
24
+ /**
25
+ * The type of the document: INVOICE or CREDIT NOTE if it is an invoice, CREDIT CARD RECEIPT or EXPENSE RECEIPT if it
26
+ * is a receipt.
27
+ */
25
28
  documentType: ClassificationField;
26
29
  /** The date on which the payment is due. */
27
30
  dueDate: DateField;
28
31
  /** The invoice number or identifier only if document is an invoice. */
29
32
  invoiceNumber: StringField;
30
- /** List of line item details. */
33
+ /** List of line item present on the document. */
31
34
  lineItems: FinancialDocumentV1LineItem[];
32
- /** The locale detected on the document. */
35
+ /** The locale of the document. */
33
36
  locale: LocaleField;
34
37
  /** The date on which the payment is due / fullfilled. */
35
38
  paymentDate: DateField;
36
- /** The purchase order number. */
39
+ /** The purchase order number, only if the document is an invoice. */
37
40
  poNumber: StringField;
38
41
  /** The receipt number or identifier only if document is a receipt. */
39
42
  receiptNumber: StringField;
40
- /** List of Reference numbers, including PO number. */
43
+ /** List of Reference numbers, including PO number, only if the document is an invoice. */
41
44
  referenceNumbers: StringField[];
42
45
  /** The customer's address used for shipping. */
43
46
  shippingAddress: StringField;
44
- /** The purchase subcategory among predefined classes for transport and food. */
47
+ /** The purchase subcategory for transport and food, only for receipts. */
45
48
  subcategory: ClassificationField;
46
49
  /** The address of the supplier or merchant. */
47
50
  supplierAddress: StringField;
48
- /** List of company registrations associated to the supplier. */
51
+ /** List of company registration numbers associated to the supplier. */
49
52
  supplierCompanyRegistrations: CompanyRegistrationField[];
50
53
  /** The email of the supplier or merchant. */
51
54
  supplierEmail: StringField;
52
55
  /** The name of the supplier or merchant. */
53
56
  supplierName: StringField;
54
- /** List of payment details associated to the supplier. */
57
+ /** List of payment details associated to the supplier (only for invoices). */
55
58
  supplierPaymentDetails: PaymentDetailsField[];
56
59
  /** The phone number of the supplier or merchant. */
57
60
  supplierPhoneNumber: StringField;
58
61
  /** The website URL of the supplier or merchant. */
59
62
  supplierWebsite: StringField;
60
- /** List of tax lines information. */
63
+ /** List of all taxes on the document. */
61
64
  taxes: Taxes;
62
- /** The time the purchase was made. */
65
+ /** The time the purchase was made (only for receipts). */
63
66
  time: StringField;
64
67
  /** The total amount of tip and gratuity */
65
68
  tip: AmountField;
@@ -67,7 +70,7 @@ export declare class FinancialDocumentV1Document implements Prediction {
67
70
  totalAmount: AmountField;
68
71
  /** The net amount paid: does not include taxes, fees, and discounts. */
69
72
  totalNet: AmountField;
70
- /** The total amount of taxes. */
73
+ /** The sum of all taxes present on the document. */
71
74
  totalTax: AmountField;
72
75
  constructor(rawPrediction: StringDict, pageId?: number);
73
76
  /**
@@ -9,15 +9,15 @@ const standard_1 = require("../../parsing/standard");
9
9
  */
10
10
  class FinancialDocumentV1Document {
11
11
  constructor(rawPrediction, pageId) {
12
- /** List of company registrations associated to the customer. */
12
+ /** List of company registration numbers associated to the customer. */
13
13
  this.customerCompanyRegistrations = [];
14
- /** List of line item details. */
14
+ /** List of line item present on the document. */
15
15
  this.lineItems = [];
16
- /** List of Reference numbers, including PO number. */
16
+ /** List of Reference numbers, including PO number, only if the document is an invoice. */
17
17
  this.referenceNumbers = [];
18
- /** List of company registrations associated to the supplier. */
18
+ /** List of company registration numbers associated to the supplier. */
19
19
  this.supplierCompanyRegistrations = [];
20
- /** List of payment details associated to the supplier. */
20
+ /** List of payment details associated to the supplier (only for invoices). */
21
21
  this.supplierPaymentDetails = [];
22
22
  this.billingAddress = new standard_1.StringField({
23
23
  prediction: rawPrediction["billing_address"],
@@ -1,7 +1,7 @@
1
1
  import { StringDict } from "../../parsing/common";
2
2
  import { Polygon } from "../../geometry";
3
3
  /**
4
- * List of line item details.
4
+ * List of line item present on the document.
5
5
  */
6
6
  export declare class FinancialDocumentV1LineItem {
7
7
  #private;
@@ -9,7 +9,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.FinancialDocumentV1LineItem = void 0;
10
10
  const common_1 = require("../../parsing/common");
11
11
  /**
12
- * List of line item details.
12
+ * List of line item present on the document.
13
13
  */
14
14
  class FinancialDocumentV1LineItem {
15
15
  constructor({ prediction = {} }) {
@@ -7,7 +7,7 @@ import { EnergyBillV1TaxesAndContribution } from "./energyBillV1TaxesAndContribu
7
7
  import { EnergyBillV1MeterDetail } from "./energyBillV1MeterDetail";
8
8
  import { AmountField, DateField, StringField } from "../../../parsing/standard";
9
9
  /**
10
- * Energy Bill API version 1.0 document data.
10
+ * Energy Bill API version 1.2 document data.
11
11
  */
12
12
  export declare class EnergyBillV1Document implements Prediction {
13
13
  /** The unique identifier associated with a specific contract. */
@@ -10,7 +10,7 @@ const energyBillV1TaxesAndContribution_1 = require("./energyBillV1TaxesAndContri
10
10
  const energyBillV1MeterDetail_1 = require("./energyBillV1MeterDetail");
11
11
  const standard_1 = require("../../../parsing/standard");
12
12
  /**
13
- * Energy Bill API version 1.0 document data.
13
+ * Energy Bill API version 1.2 document data.
14
14
  */
15
15
  class EnergyBillV1Document {
16
16
  constructor(rawPrediction, pageId) {
@@ -99,13 +99,15 @@ class EnergyBillV1Document {
99
99
  }
100
100
  let energyUsageSummary = "";
101
101
  if (this.energyUsage && this.energyUsage.length > 0) {
102
- const energyUsageColSizes = [38, 12, 12, 10, 11, 12];
102
+ const energyUsageColSizes = [13, 38, 12, 12, 10, 11, 17, 12];
103
103
  energyUsageSummary += "\n" + (0, common_1.lineSeparator)(energyUsageColSizes, "-") + "\n ";
104
+ energyUsageSummary += "| Consumption ";
104
105
  energyUsageSummary += "| Description ";
105
106
  energyUsageSummary += "| End Date ";
106
107
  energyUsageSummary += "| Start Date ";
107
108
  energyUsageSummary += "| Tax Rate ";
108
109
  energyUsageSummary += "| Total ";
110
+ energyUsageSummary += "| Unit of Measure ";
109
111
  energyUsageSummary += "| Unit Price ";
110
112
  energyUsageSummary += "|\n" + (0, common_1.lineSeparator)(energyUsageColSizes, "=");
111
113
  energyUsageSummary += this.energyUsage.map((item) => "\n " + item.toTableLine() + "\n" + (0, common_1.lineSeparator)(energyUsageColSizes, "-")).join("");
@@ -5,6 +5,8 @@ import { Polygon } from "../../../geometry";
5
5
  */
6
6
  export declare class EnergyBillV1EnergyUsage {
7
7
  #private;
8
+ /** The price per unit of energy consumed. */
9
+ consumption: number | null;
8
10
  /** Description or details of the energy usage. */
9
11
  description: string | null;
10
12
  /** The end date of the energy usage. */
@@ -15,6 +17,8 @@ export declare class EnergyBillV1EnergyUsage {
15
17
  taxRate: number | null;
16
18
  /** The total cost of energy consumed. */
17
19
  total: number | null;
20
+ /** The unit of measurement for energy consumption. */
21
+ unit: string | null;
18
22
  /** The price per unit of energy consumed. */
19
23
  unitPrice: number | null;
20
24
  /** Confidence score */
@@ -21,6 +21,14 @@ class EnergyBillV1EnergyUsage {
21
21
  * the field in the document.
22
22
  */
23
23
  this.polygon = [];
24
+ if (prediction["consumption"] !== undefined &&
25
+ prediction["consumption"] !== null &&
26
+ !isNaN(prediction["consumption"])) {
27
+ this.consumption = +parseFloat(prediction["consumption"]);
28
+ }
29
+ else {
30
+ this.consumption = null;
31
+ }
24
32
  this.description = prediction["description"];
25
33
  this.endDate = prediction["end_date"];
26
34
  this.startDate = prediction["start_date"];
@@ -40,6 +48,7 @@ class EnergyBillV1EnergyUsage {
40
48
  else {
41
49
  this.total = null;
42
50
  }
51
+ this.unit = prediction["unit"];
43
52
  if (prediction["unit_price"] !== undefined &&
44
53
  prediction["unit_price"] !== null &&
45
54
  !isNaN(prediction["unit_price"])) {
@@ -59,7 +68,9 @@ class EnergyBillV1EnergyUsage {
59
68
  */
60
69
  toString() {
61
70
  const printable = __classPrivateFieldGet(this, _EnergyBillV1EnergyUsage_instances, "m", _EnergyBillV1EnergyUsage_printableValues).call(this);
62
- return ("Description: " +
71
+ return ("Consumption: " +
72
+ printable.consumption +
73
+ ", Description: " +
63
74
  printable.description +
64
75
  ", End Date: " +
65
76
  printable.endDate +
@@ -69,6 +80,8 @@ class EnergyBillV1EnergyUsage {
69
80
  printable.taxRate +
70
81
  ", Total: " +
71
82
  printable.total +
83
+ ", Unit of Measure: " +
84
+ printable.unit +
72
85
  ", Unit Price: " +
73
86
  printable.unitPrice);
74
87
  }
@@ -78,6 +91,8 @@ class EnergyBillV1EnergyUsage {
78
91
  toTableLine() {
79
92
  const printable = __classPrivateFieldGet(this, _EnergyBillV1EnergyUsage_instances, "m", _EnergyBillV1EnergyUsage_printableValues).call(this);
80
93
  return ("| " +
94
+ printable.consumption.padEnd(11) +
95
+ " | " +
81
96
  printable.description.padEnd(36) +
82
97
  " | " +
83
98
  printable.endDate.padEnd(10) +
@@ -88,6 +103,8 @@ class EnergyBillV1EnergyUsage {
88
103
  " | " +
89
104
  printable.total.padEnd(9) +
90
105
  " | " +
106
+ printable.unit.padEnd(15) +
107
+ " | " +
91
108
  printable.unitPrice.padEnd(10) +
92
109
  " |");
93
110
  }
@@ -95,6 +112,7 @@ class EnergyBillV1EnergyUsage {
95
112
  exports.EnergyBillV1EnergyUsage = EnergyBillV1EnergyUsage;
96
113
  _EnergyBillV1EnergyUsage_instances = new WeakSet(), _EnergyBillV1EnergyUsage_printableValues = function _EnergyBillV1EnergyUsage_printableValues() {
97
114
  return {
115
+ consumption: this.consumption !== undefined ? (0, common_1.floatToString)(this.consumption) : "",
98
116
  description: this.description ?
99
117
  this.description.length <= 36 ?
100
118
  (0, common_1.cleanSpecialChars)(this.description) :
@@ -112,6 +130,11 @@ _EnergyBillV1EnergyUsage_instances = new WeakSet(), _EnergyBillV1EnergyUsage_pri
112
130
  "",
113
131
  taxRate: this.taxRate !== undefined ? (0, common_1.floatToString)(this.taxRate) : "",
114
132
  total: this.total !== undefined ? (0, common_1.floatToString)(this.total) : "",
133
+ unit: this.unit ?
134
+ this.unit.length <= 15 ?
135
+ (0, common_1.cleanSpecialChars)(this.unit) :
136
+ (0, common_1.cleanSpecialChars)(this.unit).slice(0, 12) + "..." :
137
+ "",
115
138
  unitPrice: this.unitPrice !== undefined ? (0, common_1.floatToString)(this.unitPrice) : "",
116
139
  };
117
140
  };
@@ -9,7 +9,7 @@ export declare class EnergyBillV1MeterDetail {
9
9
  meterNumber: string | null;
10
10
  /** The type of energy meter. */
11
11
  meterType: string | null;
12
- /** The unit of measurement for energy consumption, which can be kW, m³, or L. */
12
+ /** The unit of power for energy consumption. */
13
13
  unit: string | null;
14
14
  /** Confidence score */
15
15
  confidence: number;
@@ -38,7 +38,7 @@ class EnergyBillV1MeterDetail {
38
38
  printable.meterNumber +
39
39
  ", Meter Type: " +
40
40
  printable.meterType +
41
- ", Unit of Measure: " +
41
+ ", Unit of Power: " +
42
42
  printable.unit);
43
43
  }
44
44
  /**
@@ -49,7 +49,7 @@ class EnergyBillV1MeterDetail {
49
49
  return `
50
50
  :Meter Number: ${printable.meterNumber}
51
51
  :Meter Type: ${printable.meterType}
52
- :Unit of Measure: ${printable.unit}`.trimEnd();
52
+ :Unit of Power: ${printable.unit}`.trimEnd();
53
53
  }
54
54
  }
55
55
  exports.EnergyBillV1MeterDetail = EnergyBillV1MeterDetail;
@@ -1,6 +1,6 @@
1
1
  export * as bankAccountDetails from "./bankAccountDetails/internal";
2
2
  export * as carteGrise from "./carteGrise/internal";
3
3
  export * as energyBill from "./energyBill/internal";
4
- export * as fr from "./healthCard/internal";
4
+ export * as healthCard from "./healthCard/internal";
5
5
  export * as idCard from "./idCard/internal";
6
6
  export * as payslip from "./payslip/internal";
@@ -23,10 +23,10 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.payslip = exports.idCard = exports.fr = exports.energyBill = exports.carteGrise = exports.bankAccountDetails = void 0;
26
+ exports.payslip = exports.idCard = exports.healthCard = exports.energyBill = exports.carteGrise = exports.bankAccountDetails = void 0;
27
27
  exports.bankAccountDetails = __importStar(require("./bankAccountDetails/internal"));
28
28
  exports.carteGrise = __importStar(require("./carteGrise/internal"));
29
29
  exports.energyBill = __importStar(require("./energyBill/internal"));
30
- exports.fr = __importStar(require("./healthCard/internal"));
30
+ exports.healthCard = __importStar(require("./healthCard/internal"));
31
31
  exports.idCard = __importStar(require("./idCard/internal"));
32
32
  exports.payslip = __importStar(require("./payslip/internal"));
@@ -1 +1 @@
1
- export * as ind from "./indianPassport/internal";
1
+ export * as indianPassport from "./indianPassport/internal";
@@ -23,5 +23,5 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.ind = void 0;
27
- exports.ind = __importStar(require("./indianPassport/internal"));
26
+ exports.indianPassport = void 0;
27
+ exports.indianPassport = __importStar(require("./indianPassport/internal"));
@@ -1,3 +1,6 @@
1
+ export * as fr from "./fr";
2
+ export * as ind from "./ind";
3
+ export * as us from "./us";
1
4
  export { BarcodeReaderV1 } from "./barcodeReader/barcodeReaderV1";
2
5
  export { BillOfLadingV1 } from "./billOfLading/billOfLadingV1";
3
6
  export { BusinessCardV1 } from "./businessCard/businessCardV1";
@@ -8,16 +11,10 @@ export { DriverLicenseV1 } from "./driverLicense/driverLicenseV1";
8
11
  export { FinancialDocumentV1 } from "./financialDocument/financialDocumentV1";
9
12
  export { GeneratedV1 } from "./generated/generatedV1";
10
13
  export { InternationalIdV2 } from "./internationalId/internationalIdV2";
11
- export { InvoiceV4 } from "./invoice/invoiceV4";
12
14
  export { InvoiceSplitterV1 } from "./invoiceSplitter/invoiceSplitterV1";
15
+ export { InvoiceV4 } from "./invoice/invoiceV4";
13
16
  export { MultiReceiptsDetectorV1 } from "./multiReceiptsDetector/multiReceiptsDetectorV1";
14
17
  export { NutritionFactsLabelV1 } from "./nutritionFactsLabel/nutritionFactsLabelV1";
15
18
  export { PassportV1 } from "./passport/passportV1";
16
- export { ProofOfAddressV1 } from "./proofOfAddress/proofOfAddressV1";
17
- export { ReceiptV4 } from "./receipt/receiptV4";
18
19
  export { ReceiptV5 } from "./receipt/receiptV5";
19
20
  export { ResumeV1 } from "./resume/resumeV1";
20
- export * as eu from "./eu";
21
- export * as fr from "./fr";
22
- export * as ind from "./ind";
23
- export * as us from "./us";
@@ -23,7 +23,10 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.us = exports.ind = exports.fr = exports.eu = exports.ResumeV1 = exports.ReceiptV5 = exports.ReceiptV4 = exports.ProofOfAddressV1 = exports.PassportV1 = exports.NutritionFactsLabelV1 = exports.MultiReceiptsDetectorV1 = exports.InvoiceSplitterV1 = exports.InvoiceV4 = exports.InternationalIdV2 = exports.GeneratedV1 = exports.FinancialDocumentV1 = exports.DriverLicenseV1 = exports.DeliveryNoteV1 = exports.CustomV1 = exports.CropperV1 = exports.BusinessCardV1 = exports.BillOfLadingV1 = exports.BarcodeReaderV1 = void 0;
26
+ exports.ResumeV1 = exports.ReceiptV5 = exports.PassportV1 = exports.NutritionFactsLabelV1 = exports.MultiReceiptsDetectorV1 = exports.InvoiceV4 = exports.InvoiceSplitterV1 = exports.InternationalIdV2 = exports.GeneratedV1 = exports.FinancialDocumentV1 = exports.DriverLicenseV1 = exports.DeliveryNoteV1 = exports.CustomV1 = exports.CropperV1 = exports.BusinessCardV1 = exports.BillOfLadingV1 = exports.BarcodeReaderV1 = exports.us = exports.ind = exports.fr = void 0;
27
+ exports.fr = __importStar(require("./fr"));
28
+ exports.ind = __importStar(require("./ind"));
29
+ exports.us = __importStar(require("./us"));
27
30
  var barcodeReaderV1_1 = require("./barcodeReader/barcodeReaderV1");
28
31
  Object.defineProperty(exports, "BarcodeReaderV1", { enumerable: true, get: function () { return barcodeReaderV1_1.BarcodeReaderV1; } });
29
32
  var billOfLadingV1_1 = require("./billOfLading/billOfLadingV1");
@@ -44,25 +47,17 @@ var generatedV1_1 = require("./generated/generatedV1");
44
47
  Object.defineProperty(exports, "GeneratedV1", { enumerable: true, get: function () { return generatedV1_1.GeneratedV1; } });
45
48
  var internationalIdV2_1 = require("./internationalId/internationalIdV2");
46
49
  Object.defineProperty(exports, "InternationalIdV2", { enumerable: true, get: function () { return internationalIdV2_1.InternationalIdV2; } });
47
- var invoiceV4_1 = require("./invoice/invoiceV4");
48
- Object.defineProperty(exports, "InvoiceV4", { enumerable: true, get: function () { return invoiceV4_1.InvoiceV4; } });
49
50
  var invoiceSplitterV1_1 = require("./invoiceSplitter/invoiceSplitterV1");
50
51
  Object.defineProperty(exports, "InvoiceSplitterV1", { enumerable: true, get: function () { return invoiceSplitterV1_1.InvoiceSplitterV1; } });
52
+ var invoiceV4_1 = require("./invoice/invoiceV4");
53
+ Object.defineProperty(exports, "InvoiceV4", { enumerable: true, get: function () { return invoiceV4_1.InvoiceV4; } });
51
54
  var multiReceiptsDetectorV1_1 = require("./multiReceiptsDetector/multiReceiptsDetectorV1");
52
55
  Object.defineProperty(exports, "MultiReceiptsDetectorV1", { enumerable: true, get: function () { return multiReceiptsDetectorV1_1.MultiReceiptsDetectorV1; } });
53
56
  var nutritionFactsLabelV1_1 = require("./nutritionFactsLabel/nutritionFactsLabelV1");
54
57
  Object.defineProperty(exports, "NutritionFactsLabelV1", { enumerable: true, get: function () { return nutritionFactsLabelV1_1.NutritionFactsLabelV1; } });
55
58
  var passportV1_1 = require("./passport/passportV1");
56
59
  Object.defineProperty(exports, "PassportV1", { enumerable: true, get: function () { return passportV1_1.PassportV1; } });
57
- var proofOfAddressV1_1 = require("./proofOfAddress/proofOfAddressV1");
58
- Object.defineProperty(exports, "ProofOfAddressV1", { enumerable: true, get: function () { return proofOfAddressV1_1.ProofOfAddressV1; } });
59
- var receiptV4_1 = require("./receipt/receiptV4");
60
- Object.defineProperty(exports, "ReceiptV4", { enumerable: true, get: function () { return receiptV4_1.ReceiptV4; } });
61
60
  var receiptV5_1 = require("./receipt/receiptV5");
62
61
  Object.defineProperty(exports, "ReceiptV5", { enumerable: true, get: function () { return receiptV5_1.ReceiptV5; } });
63
62
  var resumeV1_1 = require("./resume/resumeV1");
64
63
  Object.defineProperty(exports, "ResumeV1", { enumerable: true, get: function () { return resumeV1_1.ResumeV1; } });
65
- exports.eu = __importStar(require("./eu"));
66
- exports.fr = __importStar(require("./fr"));
67
- exports.ind = __importStar(require("./ind"));
68
- exports.us = __importStar(require("./us"));
@@ -5,17 +5,16 @@ export * as cropper from "./cropper/internal";
5
5
  export * as custom from "./custom/internal";
6
6
  export * as deliveryNote from "./deliveryNote/internal";
7
7
  export * as driverLicense from "./driverLicense/internal";
8
- export * as eu from "./eu/internal";
9
8
  export * as financialDocument from "./financialDocument/internal";
10
9
  export * as fr from "./fr/internal";
11
10
  export * as generated from "./generated/internal";
11
+ export * as ind from "./ind/internal";
12
12
  export * as internationalId from "./internationalId/internal";
13
13
  export * as invoice from "./invoice/internal";
14
14
  export * as invoiceSplitter from "./invoiceSplitter/internal";
15
15
  export * as multiReceiptsDetector from "./multiReceiptsDetector/internal";
16
16
  export * as nutritionFactsLabel from "./nutritionFactsLabel/internal";
17
17
  export * as passport from "./passport/internal";
18
- export * as proofOfAddress from "./proofOfAddress/internal";
19
18
  export * as receipt from "./receipt/internal";
20
19
  export * as resume from "./resume/internal";
21
20
  export * as us from "./us/internal";
@@ -23,7 +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.us = exports.resume = exports.receipt = exports.proofOfAddress = exports.passport = exports.nutritionFactsLabel = exports.multiReceiptsDetector = exports.invoiceSplitter = exports.invoice = exports.internationalId = exports.generated = exports.fr = exports.financialDocument = exports.eu = exports.driverLicense = exports.deliveryNote = exports.custom = exports.cropper = exports.businessCard = exports.billOfLading = exports.barcodeReader = void 0;
26
+ exports.us = exports.resume = exports.receipt = exports.passport = exports.nutritionFactsLabel = exports.multiReceiptsDetector = exports.invoiceSplitter = exports.invoice = exports.internationalId = exports.ind = exports.generated = exports.fr = exports.financialDocument = exports.driverLicense = exports.deliveryNote = exports.custom = exports.cropper = exports.businessCard = exports.billOfLading = exports.barcodeReader = void 0;
27
27
  exports.barcodeReader = __importStar(require("./barcodeReader/internal"));
28
28
  exports.billOfLading = __importStar(require("./billOfLading/internal"));
29
29
  exports.businessCard = __importStar(require("./businessCard/internal"));
@@ -31,17 +31,16 @@ exports.cropper = __importStar(require("./cropper/internal"));
31
31
  exports.custom = __importStar(require("./custom/internal"));
32
32
  exports.deliveryNote = __importStar(require("./deliveryNote/internal"));
33
33
  exports.driverLicense = __importStar(require("./driverLicense/internal"));
34
- exports.eu = __importStar(require("./eu/internal"));
35
34
  exports.financialDocument = __importStar(require("./financialDocument/internal"));
36
35
  exports.fr = __importStar(require("./fr/internal"));
37
36
  exports.generated = __importStar(require("./generated/internal"));
37
+ exports.ind = __importStar(require("./ind/internal"));
38
38
  exports.internationalId = __importStar(require("./internationalId/internal"));
39
39
  exports.invoice = __importStar(require("./invoice/internal"));
40
40
  exports.invoiceSplitter = __importStar(require("./invoiceSplitter/internal"));
41
41
  exports.multiReceiptsDetector = __importStar(require("./multiReceiptsDetector/internal"));
42
42
  exports.nutritionFactsLabel = __importStar(require("./nutritionFactsLabel/internal"));
43
43
  exports.passport = __importStar(require("./passport/internal"));
44
- exports.proofOfAddress = __importStar(require("./proofOfAddress/internal"));
45
44
  exports.receipt = __importStar(require("./receipt/internal"));
46
45
  exports.resume = __importStar(require("./resume/internal"));
47
46
  exports.us = __importStar(require("./us/internal"));
@@ -5,11 +5,11 @@ import { AmountField, ClassificationField, CompanyRegistrationField, DateField,
5
5
  * Invoice API version 4.9 document data.
6
6
  */
7
7
  export declare class InvoiceV4Document implements Prediction {
8
- /** The customer's address used for billing. */
8
+ /** The customer billing address. */
9
9
  billingAddress: StringField;
10
10
  /** The address of the customer. */
11
11
  customerAddress: StringField;
12
- /** List of company registrations associated to the customer. */
12
+ /** List of company registration numbers associated to the customer. */
13
13
  customerCompanyRegistrations: CompanyRegistrationField[];
14
14
  /** The customer account number or identifier from the supplier. */
15
15
  customerId: StringField;
@@ -17,45 +17,45 @@ export declare class InvoiceV4Document implements Prediction {
17
17
  customerName: StringField;
18
18
  /** The date the purchase was made. */
19
19
  date: DateField;
20
- /** One of: 'INVOICE', 'CREDIT NOTE'. */
20
+ /** Document type: INVOICE or CREDIT NOTE. */
21
21
  documentType: ClassificationField;
22
22
  /** The date on which the payment is due. */
23
23
  dueDate: DateField;
24
24
  /** The invoice number or identifier. */
25
25
  invoiceNumber: StringField;
26
- /** List of line item details. */
26
+ /** List of all the line items present on the invoice. */
27
27
  lineItems: InvoiceV4LineItem[];
28
- /** The locale detected on the document. */
28
+ /** The locale of the document. */
29
29
  locale: LocaleField;
30
- /** The date on which the payment is due/ was full-filled. */
30
+ /** The date on which the payment is due / was full-filled. */
31
31
  paymentDate: DateField;
32
32
  /** The purchase order number. */
33
33
  poNumber: StringField;
34
- /** List of Reference numbers, including PO number. */
34
+ /** List of all reference numbers on the invoice, including the purchase order number. */
35
35
  referenceNumbers: StringField[];
36
36
  /** Customer's delivery address. */
37
37
  shippingAddress: StringField;
38
38
  /** The address of the supplier or merchant. */
39
39
  supplierAddress: StringField;
40
- /** List of company registrations associated to the supplier. */
40
+ /** List of company registration numbers associated to the supplier. */
41
41
  supplierCompanyRegistrations: CompanyRegistrationField[];
42
- /** The email of the supplier or merchant. */
42
+ /** The email address of the supplier or merchant. */
43
43
  supplierEmail: StringField;
44
44
  /** The name of the supplier or merchant. */
45
45
  supplierName: StringField;
46
- /** List of payment details associated to the supplier. */
46
+ /** List of payment details associated to the supplier of the invoice. */
47
47
  supplierPaymentDetails: PaymentDetailsField[];
48
48
  /** The phone number of the supplier or merchant. */
49
49
  supplierPhoneNumber: StringField;
50
50
  /** The website URL of the supplier or merchant. */
51
51
  supplierWebsite: StringField;
52
- /** List of tax line details. */
52
+ /** List of taxes. Each item contains the detail of the tax. */
53
53
  taxes: Taxes;
54
- /** The total amount paid: includes taxes, tips, fees, and other charges. */
54
+ /** The total amount of the invoice: includes taxes, tips, fees, and other charges. */
55
55
  totalAmount: AmountField;
56
- /** The net amount paid: does not include taxes, fees, and discounts. */
56
+ /** The net amount of the invoice: does not include taxes, fees, and discounts. */
57
57
  totalNet: AmountField;
58
- /** The total tax: includes all the taxes paid for this invoice. */
58
+ /** The total tax: the sum of all the taxes for this invoice. */
59
59
  totalTax: AmountField;
60
60
  constructor(rawPrediction: StringDict, pageId?: number);
61
61
  /**
@@ -9,15 +9,15 @@ const standard_1 = require("../../parsing/standard");
9
9
  */
10
10
  class InvoiceV4Document {
11
11
  constructor(rawPrediction, pageId) {
12
- /** List of company registrations associated to the customer. */
12
+ /** List of company registration numbers associated to the customer. */
13
13
  this.customerCompanyRegistrations = [];
14
- /** List of line item details. */
14
+ /** List of all the line items present on the invoice. */
15
15
  this.lineItems = [];
16
- /** List of Reference numbers, including PO number. */
16
+ /** List of all reference numbers on the invoice, including the purchase order number. */
17
17
  this.referenceNumbers = [];
18
- /** List of company registrations associated to the supplier. */
18
+ /** List of company registration numbers associated to the supplier. */
19
19
  this.supplierCompanyRegistrations = [];
20
- /** List of payment details associated to the supplier. */
20
+ /** List of payment details associated to the supplier of the invoice. */
21
21
  this.supplierPaymentDetails = [];
22
22
  this.billingAddress = new standard_1.StringField({
23
23
  prediction: rawPrediction["billing_address"],
@@ -1,13 +1,13 @@
1
1
  import { StringDict } from "../../parsing/common";
2
2
  import { Polygon } from "../../geometry";
3
3
  /**
4
- * List of line item details.
4
+ * List of all the line items present on the invoice.
5
5
  */
6
6
  export declare class InvoiceV4LineItem {
7
7
  #private;
8
8
  /** The item description. */
9
9
  description: string | null;
10
- /** The product code referring to the item. */
10
+ /** The product code of the item. */
11
11
  productCode: string | null;
12
12
  /** The item quantity */
13
13
  quantity: number | null;
@@ -9,7 +9,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.InvoiceV4LineItem = void 0;
10
10
  const common_1 = require("../../parsing/common");
11
11
  /**
12
- * List of line item details.
12
+ * List of all the line items present on the invoice.
13
13
  */
14
14
  class InvoiceV4LineItem {
15
15
  constructor({ prediction = {} }) {
@@ -0,0 +1 @@
1
+ export { InvoiceSplitterV1 } from "./invoiceSplitterV1";
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InvoiceSplitterV1 = void 0;
4
+ var invoiceSplitterV1_1 = require("./invoiceSplitterV1");
5
+ Object.defineProperty(exports, "InvoiceSplitterV1", { enumerable: true, get: function () { return invoiceSplitterV1_1.InvoiceSplitterV1; } });
@@ -1,3 +1,3 @@
1
1
  export { InvoiceSplitterV1 } from "./invoiceSplitterV1";
2
2
  export { InvoiceSplitterV1Document } from "./invoiceSplitterV1Document";
3
- export { InvoiceSplitterV1PageGroup } from "./invoiceSplitterV1PageGroup";
3
+ export { InvoiceSplitterV1InvoicePageGroup } from "./invoiceSplitterV1InvoicePageGroup";
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.InvoiceSplitterV1PageGroup = exports.InvoiceSplitterV1Document = exports.InvoiceSplitterV1 = void 0;
3
+ exports.InvoiceSplitterV1InvoicePageGroup = exports.InvoiceSplitterV1Document = exports.InvoiceSplitterV1 = void 0;
4
4
  var invoiceSplitterV1_1 = require("./invoiceSplitterV1");
5
5
  Object.defineProperty(exports, "InvoiceSplitterV1", { enumerable: true, get: function () { return invoiceSplitterV1_1.InvoiceSplitterV1; } });
6
6
  var invoiceSplitterV1Document_1 = require("./invoiceSplitterV1Document");
7
7
  Object.defineProperty(exports, "InvoiceSplitterV1Document", { enumerable: true, get: function () { return invoiceSplitterV1Document_1.InvoiceSplitterV1Document; } });
8
- var invoiceSplitterV1PageGroup_1 = require("./invoiceSplitterV1PageGroup");
9
- Object.defineProperty(exports, "InvoiceSplitterV1PageGroup", { enumerable: true, get: function () { return invoiceSplitterV1PageGroup_1.InvoiceSplitterV1PageGroup; } });
8
+ var invoiceSplitterV1InvoicePageGroup_1 = require("./invoiceSplitterV1InvoicePageGroup");
9
+ Object.defineProperty(exports, "InvoiceSplitterV1InvoicePageGroup", { enumerable: true, get: function () { return invoiceSplitterV1InvoicePageGroup_1.InvoiceSplitterV1InvoicePageGroup; } });
@@ -1,7 +1,7 @@
1
1
  import { Inference, StringDict, Page } from "../../parsing/common";
2
2
  import { InvoiceSplitterV1Document } from "./invoiceSplitterV1Document";
3
3
  /**
4
- * Inference prediction for Invoice Splitter, API version 1.
4
+ * Invoice Splitter API version 1 inference prediction.
5
5
  */
6
6
  export declare class InvoiceSplitterV1 extends Inference {
7
7
  /** The endpoint's name. */