Skip to content

Commit 769d3f0

Browse files
✨ update invoice to 4.6 & financial document to 1.6 (#269)
1 parent ce37c02 commit 769d3f0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+212
-64
lines changed

docs/financial_document_v1.md

Lines changed: 53 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,20 @@ apiResponse.then((resp) => {
3636
########
3737
Document
3838
########
39-
:Mindee ID: a6b54e2d-a7fa-4e08-8de6-6cd296f50f3d
39+
:Mindee ID: 503895c6-eced-42e2-a6fc-0292b7ccf680
4040
:Filename: default_sample.jpg
4141
4242
Inference
4343
#########
44-
:Product: mindee/financial_document v1.2
44+
:Product: mindee/financial_document v1.6
4545
:Rotation applied: Yes
4646
4747
Prediction
4848
==========
49-
:Locale: en; en; USD;
49+
:Locale: en; USD;
5050
:Invoice Number: INT-001
5151
:Reference Numbers: 2412/2019
52-
:Purchase Date: 2019-02-11
52+
:Purchase Date: 2019-11-02
5353
:Due Date: 2019-02-26
5454
:Total Net: 195.00
5555
:Total Amount: 204.75
@@ -65,8 +65,13 @@ Prediction
6565
:Supplier Address: 4490 Oak Drive Albany, NY 12210
6666
:Supplier Phone Number:
6767
:Customer Name: JESSIE M HORNE
68+
:Supplier Website:
69+
:Supplier Email:
6870
:Customer Company Registrations:
6971
:Customer Address: 2019 Redbud Drive New York, NY 10011
72+
:Customer ID: 1234567890
73+
:Shipping Address: 2019 Redbud Drive New York, NY 10011
74+
:Billing Address: 4312 Wood Road New York, NY 10031
7075
:Document Type: INVOICE
7176
:Purchase Subcategory:
7277
:Purchase Category: miscellaneous
@@ -81,18 +86,18 @@ Prediction
8186
+--------------------------------------+--------------+----------+------------+--------------+--------------+------------+
8287
| New set of pedal arms | | 2.00 | | | 50.00 | 25.00 |
8388
+--------------------------------------+--------------+----------+------------+--------------+--------------+------------+
84-
| Labon 3hrs | | 3.00 | | | 45.00 | 15.00 |
89+
| Labor 3hrs | | 3.00 | | | 45.00 | 15.00 |
8590
+--------------------------------------+--------------+----------+------------+--------------+--------------+------------+
8691
8792
Page Predictions
8893
================
8994
9095
Page 0
9196
------
92-
:Locale: en; en; USD;
97+
:Locale: en; USD;
9398
:Invoice Number: INT-001
9499
:Reference Numbers: 2412/2019
95-
:Purchase Date: 2019-02-11
100+
:Purchase Date: 2019-11-02
96101
:Due Date: 2019-02-26
97102
:Total Net: 195.00
98103
:Total Amount: 204.75
@@ -108,8 +113,13 @@ Page 0
108113
:Supplier Address: 4490 Oak Drive Albany, NY 12210
109114
:Supplier Phone Number:
110115
:Customer Name: JESSIE M HORNE
116+
:Supplier Website:
117+
:Supplier Email:
111118
:Customer Company Registrations:
112119
:Customer Address: 2019 Redbud Drive New York, NY 10011
120+
:Customer ID: 1234567890
121+
:Shipping Address: 2019 Redbud Drive New York, NY 10011
122+
:Billing Address: 4312 Wood Road New York, NY 10031
113123
:Document Type: INVOICE
114124
:Purchase Subcategory:
115125
:Purchase Category: miscellaneous
@@ -124,7 +134,7 @@ Page 0
124134
+--------------------------------------+--------------+----------+------------+--------------+--------------+------------+
125135
| New set of pedal arms | | 2.00 | | | 50.00 | 25.00 |
126136
+--------------------------------------+--------------+----------+------------+--------------+--------------+------------+
127-
| Labon 3hrs | | 3.00 | | | 45.00 | 15.00 |
137+
| Labor 3hrs | | 3.00 | | | 45.00 | 15.00 |
128138
+--------------------------------------+--------------+----------+------------+--------------+--------------+------------+
129139
```
130140

@@ -219,6 +229,13 @@ A `FinancialDocumentV1LineItem` implements the following attributes:
219229
# Attributes
220230
The following fields are extracted for Financial Document V1:
221231

232+
## Billing Address
233+
**billingAddress** ([StringField](#string-field)): The customer's address used for billing.
234+
235+
```js
236+
console.log(result.document.inference.prediction.billingAddress.value);
237+
```
238+
222239
## Purchase Category
223240
**category** ([ClassificationField](#classification-field)): The purchase category among predefined classes.
224241

@@ -242,6 +259,13 @@ for (const customerCompanyRegistrationsElem of result.document.inference.predict
242259
}
243260
```
244261

262+
## Customer ID
263+
**customerId** ([StringField](#string-field)): The customer account number or identifier from the supplier.
264+
265+
```js
266+
console.log(result.document.inference.prediction.customerId.value);
267+
```
268+
245269
## Customer Name
246270
**customerName** ([StringField](#string-field)): The name of the customer.
247271

@@ -302,6 +326,13 @@ for (const referenceNumbersElem of result.document.inference.prediction.referenc
302326
}
303327
```
304328

329+
## Shipping Address
330+
**shippingAddress** ([StringField](#string-field)): The customer's address used for shipping.
331+
332+
```js
333+
console.log(result.document.inference.prediction.shippingAddress.value);
334+
```
335+
305336
## Purchase Subcategory
306337
**subcategory** ([ClassificationField](#classification-field)): The purchase subcategory among predefined classes for transport and food.
307338

@@ -325,6 +356,13 @@ for (const supplierCompanyRegistrationsElem of result.document.inference.predict
325356
}
326357
```
327358

359+
## Supplier Email
360+
**supplierEmail** ([StringField](#string-field)): The email of the supplier or merchant.
361+
362+
```js
363+
console.log(result.document.inference.prediction.supplierEmail.value);
364+
```
365+
328366
## Supplier Name
329367
**supplierName** ([StringField](#string-field)): The name of the supplier or merchant.
330368

@@ -351,6 +389,13 @@ for (const supplierPaymentDetailsElem of result.document.inference.prediction.su
351389
console.log(result.document.inference.prediction.supplierPhoneNumber.value);
352390
```
353391

392+
## Supplier Website
393+
**supplierWebsite** ([StringField](#string-field)): The website URL of the supplier or merchant.
394+
395+
```js
396+
console.log(result.document.inference.prediction.supplierWebsite.value);
397+
```
398+
354399
## Taxes
355400
**taxes** ([TaxField](#taxes-field)[]): List of tax lines information.
356401

docs/invoices_v4.md

Lines changed: 42 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ apiResponse.then((resp) => {
3636
########
3737
Document
3838
########
39-
:Mindee ID: a9062dd1-0d34-42ab-9505-0481a8545106
39+
:Mindee ID: 5c0371d0-1433-43a4-b8fb-a3b11aaf9a0e
4040
:Filename: default_sample.jpg
4141
4242
Inference
4343
#########
44-
:Product: mindee/invoices v4.5
44+
:Product: mindee/invoices v4.6
4545
:Rotation applied: Yes
4646
4747
Prediction
@@ -50,7 +50,7 @@ Prediction
5050
:Invoice Number: 14
5151
:Reference Numbers: AD29094
5252
:Purchase Date: 2018-09-25
53-
:Due Date: 2018-09-25
53+
:Due Date:
5454
:Total Net:
5555
:Total Amount: 2608.20
5656
:Total Tax: 193.20
@@ -63,10 +63,14 @@ Prediction
6363
:Supplier Payment Details:
6464
:Supplier Name: TURNPIKE DESIGNS
6565
:Supplier Company Registrations:
66-
:Supplier Address: 156 University Ave, Toronto ON, Canada M5H 2H7
66+
:Supplier Address: 156 University Ave, Toronto ON, Canada, M5H 2H7
67+
:Supplier Phone Number: 4165551212
68+
:Supplier Website:
69+
:Supplier Email: [email protected]
6770
:Customer Name: JIRO DOI
6871
:Customer Company Registrations:
6972
:Customer Address: 1954 Bloor Street West Toronto, ON, M6P 3K9 Canada
73+
:Customer ID:
7074
:Shipping Address:
7175
:Billing Address: 1954 Bloor Street West Toronto, ON, M6P 3K9 Canada
7276
:Document Type: INVOICE
@@ -90,7 +94,7 @@ Page 0
9094
:Invoice Number: 14
9195
:Reference Numbers: AD29094
9296
:Purchase Date: 2018-09-25
93-
:Due Date: 2018-09-25
97+
:Due Date:
9498
:Total Net:
9599
:Total Amount: 2608.20
96100
:Total Tax: 193.20
@@ -103,10 +107,14 @@ Page 0
103107
:Supplier Payment Details:
104108
:Supplier Name: TURNPIKE DESIGNS
105109
:Supplier Company Registrations:
106-
:Supplier Address: 156 University Ave, Toronto ON, Canada M5H 2H7
110+
:Supplier Address: 156 University Ave, Toronto ON, Canada, M5H 2H7
111+
:Supplier Phone Number: 4165551212
112+
:Supplier Website:
113+
:Supplier Email: [email protected]
107114
:Customer Name: JIRO DOI
108115
:Customer Company Registrations:
109116
:Customer Address: 1954 Bloor Street West Toronto, ON, M6P 3K9 Canada
117+
:Customer ID:
110118
:Shipping Address:
111119
:Billing Address: 1954 Bloor Street West Toronto, ON, M6P 3K9 Canada
112120
:Document Type: INVOICE
@@ -236,6 +244,13 @@ for (const customerCompanyRegistrationsElem of result.document.inference.predict
236244
}
237245
```
238246

247+
## Customer ID
248+
**customerId** ([StringField](#string-field)): The customer account number or identifier from the supplier.
249+
250+
```js
251+
console.log(result.document.inference.prediction.customerId.value);
252+
```
253+
239254
## Customer Name
240255
**customerName** ([StringField](#string-field)): The name of the customer or client.
241256

@@ -319,6 +334,13 @@ for (const supplierCompanyRegistrationsElem of result.document.inference.predict
319334
}
320335
```
321336

337+
## Supplier Email
338+
**supplierEmail** ([StringField](#string-field)): The email of the supplier or merchant.
339+
340+
```js
341+
console.log(result.document.inference.prediction.supplierEmail.value);
342+
```
343+
322344
## Supplier Name
323345
**supplierName** ([StringField](#string-field)): The name of the supplier or merchant.
324346

@@ -338,6 +360,20 @@ for (const supplierPaymentDetailsElem of result.document.inference.prediction.su
338360
}
339361
```
340362

363+
## Supplier Phone Number
364+
**supplierPhoneNumber** ([StringField](#string-field)): The phone number of the supplier or merchant.
365+
366+
```js
367+
console.log(result.document.inference.prediction.supplierPhoneNumber.value);
368+
```
369+
370+
## Supplier Website
371+
**supplierWebsite** ([StringField](#string-field)): The website URL of the supplier or merchant.
372+
373+
```js
374+
console.log(result.document.inference.prediction.supplierWebsite.value);
375+
```
376+
341377
## Taxes
342378
**taxes** ([TaxField](#taxes-field)[]): List of tax line details.
343379

src/product/barcodeReader/barcodeReaderV1.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Inference, StringDict, Page } from "../../parsing/common";
22
import { BarcodeReaderV1Document } from "./barcodeReaderV1Document";
33

44
/**
5-
* Inference prediction for Barcode Reader, API version 1.
5+
* Barcode Reader API version 1 inference prediction.
66
*/
77
export class BarcodeReaderV1 extends Inference {
88
/** The endpoint's name. */

src/product/barcodeReader/barcodeReaderV1Document.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
import { StringField } from "../../parsing/standard";
77

88
/**
9-
* Document data for Barcode Reader, API version 1.
9+
* Barcode Reader API version 1.0 document data.
1010
*/
1111
export class BarcodeReaderV1Document implements Prediction {
1212
/** List of decoded 1D barcodes. */

src/product/cropper/cropperV1.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { CropperV1Document } from "./cropperV1Document";
33
import { CropperV1Page } from "./cropperV1Page";
44

55
/**
6-
* Inference prediction for Cropper, API version 1.
6+
* Cropper API version 1 inference prediction.
77
*/
88
export class CropperV1 extends Inference {
99
/** The endpoint's name. */

src/product/cropper/cropperV1Document.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Prediction } from "../../parsing/common";
22

33

44
/**
5-
* Document data for Cropper, API version 1.
5+
* Cropper API version 1.1 document data.
66
*/
77
export class CropperV1Document implements Prediction {
88
/**

src/product/cropper/cropperV1Page.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { PositionField } from "../../parsing/standard";
44
import { CropperV1Document } from "./cropperV1Document";
55

66
/**
7-
* Page data for Cropper, API version 1.
7+
* Cropper API version 1.1 page data.
88
*/
99
export class CropperV1Page extends CropperV1Document {
1010
/** List of documents found in the image. */

src/product/eu/driverLicense/driverLicenseV1.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { DriverLicenseV1Document } from "./driverLicenseV1Document";
33
import { DriverLicenseV1Page } from "./driverLicenseV1Page";
44

55
/**
6-
* Inference prediction for Driver License, API version 1.
6+
* Driver License API version 1 inference prediction.
77
*/
88
export class DriverLicenseV1 extends Inference {
99
/** The endpoint's name. */

src/product/eu/driverLicense/driverLicenseV1Document.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
import { DateField, StringField } from "../../../parsing/standard";
77

88
/**
9-
* Document data for Driver License, API version 1.
9+
* Driver License API version 1.0 document data.
1010
*/
1111
export class DriverLicenseV1Document implements Prediction {
1212
/** EU driver license holders address */

src/product/eu/driverLicense/driverLicenseV1Page.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { PositionField } from "../../../parsing/standard";
44
import { DriverLicenseV1Document } from "./driverLicenseV1Document";
55

66
/**
7-
* Page data for Driver License, API version 1.
7+
* Driver License API version 1.0 page data.
88
*/
99
export class DriverLicenseV1Page extends DriverLicenseV1Document {
1010
/** Has a photo of the EU driver license holder */

0 commit comments

Comments
 (0)