mindee 4.6.1 → 4.7.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
CHANGED
package/README.md
CHANGED
|
@@ -47,7 +47,7 @@ const inputSource = mindeeClient.docFromBase64(myInputString, "my-file-name")
|
|
|
47
47
|
|
|
48
48
|
A stream:
|
|
49
49
|
```js
|
|
50
|
-
const inputSource = mindeeClient.
|
|
50
|
+
const inputSource = mindeeClient.docFromStream(myReadableStream, "my-file-name")
|
|
51
51
|
```
|
|
52
52
|
|
|
53
53
|
A buffer:
|
package/package.json
CHANGED
|
@@ -12,5 +12,7 @@ export interface FieldConstructor {
|
|
|
12
12
|
export declare class StringField extends Field {
|
|
13
13
|
/** The value. */
|
|
14
14
|
value?: string;
|
|
15
|
+
/** Value as it appears on the document. */
|
|
16
|
+
rawValue?: string;
|
|
15
17
|
constructor({ prediction, valueKey, reconstructed, pageId, }: FieldConstructor);
|
|
16
18
|
}
|
|
@@ -8,6 +8,9 @@ const field_1 = require("./field");
|
|
|
8
8
|
class StringField extends field_1.Field {
|
|
9
9
|
constructor({ prediction = {}, valueKey = "value", reconstructed = false, pageId, }) {
|
|
10
10
|
super({ prediction, valueKey, reconstructed, pageId });
|
|
11
|
+
if (prediction["raw_value"]) {
|
|
12
|
+
this.rawValue = prediction["raw_value"];
|
|
13
|
+
}
|
|
11
14
|
}
|
|
12
15
|
}
|
|
13
16
|
exports.StringField = StringField;
|
|
@@ -39,6 +39,8 @@ export declare class InvoiceV4Document implements Prediction {
|
|
|
39
39
|
totalAmount: AmountField;
|
|
40
40
|
/** The net amount paid: does not include taxes, fees, and discounts. */
|
|
41
41
|
totalNet: AmountField;
|
|
42
|
+
/** The total tax: includes all the taxes paid for this invoice. */
|
|
43
|
+
totalTax: AmountField;
|
|
42
44
|
constructor(rawPrediction: StringDict, pageId?: number);
|
|
43
45
|
/**
|
|
44
46
|
* Default string representation.
|
|
@@ -87,6 +87,10 @@ class InvoiceV4Document {
|
|
|
87
87
|
prediction: rawPrediction["total_net"],
|
|
88
88
|
pageId: pageId,
|
|
89
89
|
});
|
|
90
|
+
this.totalTax = new standard_1.AmountField({
|
|
91
|
+
prediction: rawPrediction["total_tax"],
|
|
92
|
+
pageId: pageId,
|
|
93
|
+
});
|
|
90
94
|
}
|
|
91
95
|
/**
|
|
92
96
|
* Default string representation.
|
|
@@ -117,6 +121,7 @@ class InvoiceV4Document {
|
|
|
117
121
|
:Due Date: ${this.dueDate}
|
|
118
122
|
:Total Net: ${this.totalNet}
|
|
119
123
|
:Total Amount: ${this.totalAmount}
|
|
124
|
+
:Total Tax: ${this.totalTax}
|
|
120
125
|
:Taxes: ${this.taxes}
|
|
121
126
|
:Supplier Payment Details: ${supplierPaymentDetails}
|
|
122
127
|
:Supplier Name: ${this.supplierName}
|