mindee 1.2.0 → 1.3.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 +10 -0
- package/LICENSE +21 -202
- package/README.md +15 -2
- package/coverage.lcov +0 -0
- package/lib/api/financialDocument.js +1 -1
- package/lib/api/invoice.js +1 -1
- package/lib/api/response.js +1 -1
- package/lib/documents/fields/field.js +4 -2
- package/lib/documents/financialDocument.js +8 -51
- package/lib/documents/invoice.js +9 -48
- package/lib/documents/receipt.js +5 -5
- package/lib/inputs.js +2 -0
- package/mindee/api/request.js +15 -13
- package/mindee/inputs.js +14 -8
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
## v1.3.0
|
|
4
|
+
|
|
5
|
+
### Changes
|
|
6
|
+
|
|
7
|
+
- :sparkles: allow sending the filename for streams and base64
|
|
8
|
+
- fixes :bug: not able to specify MIME type
|
|
9
|
+
- :page_facing_up: change license to MIT
|
|
10
|
+
- :white_check_mark: add node18 to tests
|
|
11
|
+
- various package updates
|
|
12
|
+
|
|
3
13
|
## v1.2.0
|
|
4
14
|
|
|
5
15
|
### Fixes
|
package/LICENSE
CHANGED
|
@@ -1,202 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
-
exercising permissions granted by this License.
|
|
25
|
-
|
|
26
|
-
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
-
including but not limited to software source code, documentation
|
|
28
|
-
source, and configuration files.
|
|
29
|
-
|
|
30
|
-
"Object" form shall mean any form resulting from mechanical
|
|
31
|
-
transformation or translation of a Source form, including but
|
|
32
|
-
not limited to compiled object code, generated documentation,
|
|
33
|
-
and conversions to other media types.
|
|
34
|
-
|
|
35
|
-
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
-
Object form, made available under the License, as indicated by a
|
|
37
|
-
copyright notice that is included in or attached to the work
|
|
38
|
-
(an example is provided in the Appendix below).
|
|
39
|
-
|
|
40
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
-
form, that is based on (or derived from) the Work and for which the
|
|
42
|
-
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
-
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
-
of this License, Derivative Works shall not include works that remain
|
|
45
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
-
the Work and Derivative Works thereof.
|
|
47
|
-
|
|
48
|
-
"Contribution" shall mean any work of authorship, including
|
|
49
|
-
the original version of the Work and any modifications or additions
|
|
50
|
-
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
-
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
-
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
-
means any form of electronic, verbal, or written communication sent
|
|
55
|
-
to the Licensor or its representatives, including but not limited to
|
|
56
|
-
communication on electronic mailing lists, source code control systems,
|
|
57
|
-
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
-
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
-
excluding communication that is conspicuously marked or otherwise
|
|
60
|
-
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
-
|
|
62
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
-
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
-
subsequently incorporated within the Work.
|
|
65
|
-
|
|
66
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
-
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
-
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
-
Work and such Derivative Works in Source or Object form.
|
|
72
|
-
|
|
73
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
-
(except as stated in this section) patent license to make, have made,
|
|
77
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
-
where such license applies only to those patent claims licensable
|
|
79
|
-
by such Contributor that are necessarily infringed by their
|
|
80
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
-
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
-
institute patent litigation against any entity (including a
|
|
83
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
-
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
-
or contributory patent infringement, then any patent licenses
|
|
86
|
-
granted to You under this License for that Work shall terminate
|
|
87
|
-
as of the date such litigation is filed.
|
|
88
|
-
|
|
89
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
-
modifications, and in Source or Object form, provided that You
|
|
92
|
-
meet the following conditions:
|
|
93
|
-
|
|
94
|
-
(a) You must give any other recipients of the Work or
|
|
95
|
-
Derivative Works a copy of this License; and
|
|
96
|
-
|
|
97
|
-
(b) You must cause any modified files to carry prominent notices
|
|
98
|
-
stating that You changed the files; and
|
|
99
|
-
|
|
100
|
-
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
-
that You distribute, all copyright, patent, trademark, and
|
|
102
|
-
attribution notices from the Source form of the Work,
|
|
103
|
-
excluding those notices that do not pertain to any part of
|
|
104
|
-
the Derivative Works; and
|
|
105
|
-
|
|
106
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
-
distribution, then any Derivative Works that You distribute must
|
|
108
|
-
include a readable copy of the attribution notices contained
|
|
109
|
-
within such NOTICE file, excluding those notices that do not
|
|
110
|
-
pertain to any part of the Derivative Works, in at least one
|
|
111
|
-
of the following places: within a NOTICE text file distributed
|
|
112
|
-
as part of the Derivative Works; within the Source form or
|
|
113
|
-
documentation, if provided along with the Derivative Works; or,
|
|
114
|
-
within a display generated by the Derivative Works, if and
|
|
115
|
-
wherever such third-party notices normally appear. The contents
|
|
116
|
-
of the NOTICE file are for informational purposes only and
|
|
117
|
-
do not modify the License. You may add Your own attribution
|
|
118
|
-
notices within Derivative Works that You distribute, alongside
|
|
119
|
-
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
-
that such additional attribution notices cannot be construed
|
|
121
|
-
as modifying the License.
|
|
122
|
-
|
|
123
|
-
You may add Your own copyright statement to Your modifications and
|
|
124
|
-
may provide additional or different license terms and conditions
|
|
125
|
-
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
-
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
-
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
-
the conditions stated in this License.
|
|
129
|
-
|
|
130
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
-
this License, without any additional terms or conditions.
|
|
134
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
-
the terms of any separate license agreement you may have executed
|
|
136
|
-
with Licensor regarding such Contributions.
|
|
137
|
-
|
|
138
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
-
except as required for reasonable and customary use in describing the
|
|
141
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
-
|
|
143
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
-
implied, including, without limitation, any warranties or conditions
|
|
148
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
-
appropriateness of using or redistributing the Work and assume any
|
|
151
|
-
risks associated with Your exercise of permissions under this License.
|
|
152
|
-
|
|
153
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
-
unless required by applicable law (such as deliberate and grossly
|
|
156
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
-
liable to You for damages, including any direct, indirect, special,
|
|
158
|
-
incidental, or consequential damages of any character arising as a
|
|
159
|
-
result of this License or out of the use or inability to use the
|
|
160
|
-
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
-
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
-
other commercial damages or losses), even if such Contributor
|
|
163
|
-
has been advised of the possibility of such damages.
|
|
164
|
-
|
|
165
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
-
or other liability obligations and/or rights consistent with this
|
|
169
|
-
License. However, in accepting such obligations, You may act only
|
|
170
|
-
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
-
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
-
defend, and hold each Contributor harmless for any liability
|
|
173
|
-
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
-
of your accepting any such warranty or additional liability.
|
|
175
|
-
|
|
176
|
-
END OF TERMS AND CONDITIONS
|
|
177
|
-
|
|
178
|
-
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
-
|
|
180
|
-
To apply the Apache License to your work, attach the following
|
|
181
|
-
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
-
replaced with your own identifying information. (Don't include
|
|
183
|
-
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
-
comment syntax for the file format. We also recommend that a
|
|
185
|
-
file or class name and description of purpose be included on the
|
|
186
|
-
same "printed page" as the copyright notice for easier
|
|
187
|
-
identification within third-party archives.
|
|
188
|
-
|
|
189
|
-
Copyright [yyyy] [name of copyright owner]
|
|
190
|
-
|
|
191
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
-
you may not use this file except in compliance with the License.
|
|
193
|
-
You may obtain a copy of the License at
|
|
194
|
-
|
|
195
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
-
|
|
197
|
-
Unless required by applicable law or agreed to in writing, software
|
|
198
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
-
See the License for the specific language governing permissions and
|
|
201
|
-
limitations under the License.
|
|
202
|
-
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020-Present Mindee
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Mindee Client Library for Node.js
|
|
2
2
|
|
|
3
3
|
# Installation
|
|
4
4
|
|
|
@@ -35,10 +35,23 @@ mindeeClient.financialDocument.parse({
|
|
|
35
35
|
});
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
Three
|
|
38
|
+
Three APIs are actually supported: invoice (`ìnvoice`), receipt (`receipt`) and financial document (`financialDocument`)
|
|
39
39
|
|
|
40
40
|
You can find more examples on how to use the SDK into the folder `examples`.
|
|
41
41
|
|
|
42
|
+
## MIME Types
|
|
43
|
+
When using `stream` or `base64` inputs, the MIME type is guessed using magic numbers.
|
|
44
|
+
In some cases, for example with non-standard files, it will not be possible to detect the MIME type in this way.
|
|
45
|
+
|
|
46
|
+
If you are getting MIME type errors, you will need to specify a file name having the correct extension, for example:
|
|
47
|
+
```js
|
|
48
|
+
mindeeClient.invoice.parse({
|
|
49
|
+
input: base64String,
|
|
50
|
+
inputType: "base64",
|
|
51
|
+
filename: "myfile.pdf",
|
|
52
|
+
});
|
|
53
|
+
```
|
|
54
|
+
|
|
42
55
|
## Client
|
|
43
56
|
|
|
44
57
|
The Mindee client can take multiple parameters to be initialize.
|
package/coverage.lcov
CHANGED
|
File without changes
|
|
@@ -46,7 +46,7 @@ class APIFinancialDocument extends APIObject {
|
|
|
46
46
|
});
|
|
47
47
|
yield inputFile.init();
|
|
48
48
|
_this.apiToken = inputFile.fileExtension === "application/pdf" ? _this.invoiceToken : _this.receiptToken;
|
|
49
|
-
var url = inputFile.fileExtension === "application/pdf" ? "/invoices/
|
|
49
|
+
var url = inputFile.fileExtension === "application/pdf" ? "/invoices/v2/predict" : "/expense_receipts/v3/predict";
|
|
50
50
|
|
|
51
51
|
_superprop_getParse().call(_this);
|
|
52
52
|
|
package/lib/api/invoice.js
CHANGED
package/lib/api/response.js
CHANGED
|
@@ -82,7 +82,7 @@ class Response {
|
|
|
82
82
|
this[this.documentType] = constructors[this.documentType]({
|
|
83
83
|
apiPrediction: this.httpResponse.data.document.inference.prediction,
|
|
84
84
|
inputFile: this.input,
|
|
85
|
-
pageNumber:
|
|
85
|
+
pageNumber: -1,
|
|
86
86
|
level: "document"
|
|
87
87
|
});
|
|
88
88
|
}
|
|
@@ -19,11 +19,13 @@ class Field {
|
|
|
19
19
|
this.pageNumber = pageNumber;
|
|
20
20
|
this.reconstructed = reconstructed;
|
|
21
21
|
this.value = undefined;
|
|
22
|
-
this.probability =
|
|
23
|
-
this.bbox =
|
|
22
|
+
this.probability = 0.0;
|
|
23
|
+
this.bbox = [];
|
|
24
24
|
|
|
25
25
|
if (valueKey in prediction && prediction[valueKey] !== null) {
|
|
26
26
|
this.value = prediction[valueKey];
|
|
27
|
+
if (prediction.probability) this.probability = prediction.probability;
|
|
28
|
+
if (prediction.segmentation) this.bbox = prediction.segmentation.bounding_box || [];
|
|
27
29
|
|
|
28
30
|
if (extraFields) {
|
|
29
31
|
for (var fieldName of extraFields) {
|
|
@@ -45,17 +45,13 @@ class FinancialDocument extends Document {
|
|
|
45
45
|
* @param {Object} Date - date value for creating FinancialDocument object from scratch
|
|
46
46
|
* @param {Object} InvoiceNumber - Invoice number value for creating FinancialDocument object from scratch
|
|
47
47
|
* @param {Object} taxes - taxes value for creating FinancialDocument object from scratch
|
|
48
|
-
* @param {Object}
|
|
49
|
-
* @param {Object} supplierAddress - supplier address value for creating FinancialDocument object from scratch
|
|
48
|
+
* @param {Object} merchantName - merchant name value for creating FinancialDocument object from scratch
|
|
50
49
|
* @param {Object} paymentDetails - payment details value for creating FinancialDocument object from scratch
|
|
51
50
|
* @param {Object} companyNumber - company number value for creating FinancialDocument object from scratch
|
|
52
51
|
* @param {Object} vatNumber - vat number value for creating FinancialDocument object from scratch
|
|
53
52
|
* @param {Object} orientation - orientation value for creating FinancialDocument object from scratch
|
|
54
53
|
* @param {Object} totalTax - total tax value for creating FinancialDocument object from scratch
|
|
55
54
|
* @param {Object} time - time value for creating FinancialDocument object from scratch
|
|
56
|
-
* @param {Object} customerName - customer name value for creating FinancialDocument object from scratch
|
|
57
|
-
* @param {Object} customerAddress - customer address value for creating FinancialDocument object from scratch
|
|
58
|
-
* @param {Object} customerCompanyRegistration - customer company registration value for creating FinancialDocument object from scratch
|
|
59
55
|
* @param {Object} pageNumber - pageNumber for multi pages pdf input
|
|
60
56
|
* @param {String} level - specify whether object is built from "page" level or "document" level prediction
|
|
61
57
|
*/
|
|
@@ -71,16 +67,12 @@ class FinancialDocument extends Document {
|
|
|
71
67
|
dueDate: _dueDate = undefined,
|
|
72
68
|
taxes: _taxes = undefined,
|
|
73
69
|
supplier: _supplier = undefined,
|
|
74
|
-
supplierAddress: _supplierAddress = undefined,
|
|
75
70
|
paymentDetails: _paymentDetails = undefined,
|
|
76
71
|
companyNumber: _companyNumber = undefined,
|
|
77
72
|
vatNumber: _vatNumber = undefined,
|
|
78
73
|
orientation: _orientation = undefined,
|
|
79
74
|
totalTax: _totalTax = undefined,
|
|
80
75
|
time: _time = undefined,
|
|
81
|
-
customerName: _customerName = undefined,
|
|
82
|
-
customerAddress: _customerAddress = undefined,
|
|
83
|
-
customerCompanyRegistration: _customerCompanyRegistration = undefined,
|
|
84
76
|
pageNumber: _pageNumber = 0,
|
|
85
77
|
level = "page"
|
|
86
78
|
} = _ref;
|
|
@@ -106,17 +98,13 @@ class FinancialDocument extends Document {
|
|
|
106
98
|
dueDate: _dueDate,
|
|
107
99
|
taxes: _taxes,
|
|
108
100
|
supplier: _supplier,
|
|
109
|
-
supplierAddress: _supplierAddress,
|
|
110
101
|
paymentDetails: _paymentDetails,
|
|
111
102
|
companyNumber: _companyNumber,
|
|
112
103
|
vatNumber: _vatNumber,
|
|
113
104
|
orientation: _orientation,
|
|
114
105
|
pageNumber: _pageNumber,
|
|
115
106
|
totalTax: _totalTax,
|
|
116
|
-
time: _time
|
|
117
|
-
customerName: _customerName,
|
|
118
|
-
customerAddress: _customerAddress,
|
|
119
|
-
customerCompanyRegistration: _customerCompanyRegistration
|
|
107
|
+
time: _time
|
|
120
108
|
});
|
|
121
109
|
} else {
|
|
122
110
|
_classPrivateMethodGet(this, _initFromApiPrediction, _initFromApiPrediction2).call(this, _apiPrediction, _inputFile, _pageNumber);
|
|
@@ -147,11 +135,7 @@ var _initFromScratch2 = function _initFromScratch2(_ref2) {
|
|
|
147
135
|
orientation,
|
|
148
136
|
pageNumber,
|
|
149
137
|
supplier,
|
|
150
|
-
|
|
151
|
-
time,
|
|
152
|
-
customerName,
|
|
153
|
-
customerAddress,
|
|
154
|
-
customerCompanyRegistration
|
|
138
|
+
time
|
|
155
139
|
} = _ref2;
|
|
156
140
|
|
|
157
141
|
var constructPrediction = function constructPrediction(item) {
|
|
@@ -171,16 +155,12 @@ var _initFromScratch2 = function _initFromScratch2(_ref2) {
|
|
|
171
155
|
this.date = new Date(constructPrediction(date));
|
|
172
156
|
this.dueDate = new Date(constructPrediction(dueDate));
|
|
173
157
|
this.supplier = new Field(constructPrediction(supplier));
|
|
174
|
-
this.supplierAddress = new Field(this.constructPrediction(supplierAddress));
|
|
175
158
|
this.time = new Field(constructPrediction(time));
|
|
176
159
|
this.orientation = new Orientation(constructPrediction(orientation));
|
|
177
160
|
this.invoiceNumber = new Field(constructPrediction(invoiceNumber));
|
|
178
161
|
this.paymentDetails = new Field(constructPrediction(paymentDetails));
|
|
179
162
|
this.companyNumber = new Field(constructPrediction(companyNumber));
|
|
180
163
|
this.vatNumber = new Field(constructPrediction(vatNumber));
|
|
181
|
-
this.customerName = new Field(this.constructPrediction(customerName));
|
|
182
|
-
this.customerAddress = new Field(this.constructPrediction(customerAddress));
|
|
183
|
-
this.customerCompanyRegistration = new Field(this.constructPrediction(customerCompanyRegistration));
|
|
184
164
|
|
|
185
165
|
if (taxes !== undefined) {
|
|
186
166
|
this.taxes = [];
|
|
@@ -215,7 +195,6 @@ var _initFromApiPrediction2 = function _initFromApiPrediction2(apiPrediction, in
|
|
|
215
195
|
this.dueDate = invoice.dueDate;
|
|
216
196
|
this.taxes = invoice.taxes;
|
|
217
197
|
this.supplier = invoice.supplier;
|
|
218
|
-
this.supplierAddress = invoice.supplierAddress;
|
|
219
198
|
this.paymentDetails = invoice.paymentDetails;
|
|
220
199
|
this.companyNumber = invoice.companyNumber;
|
|
221
200
|
this.orientation = invoice.orientation;
|
|
@@ -223,12 +202,9 @@ var _initFromApiPrediction2 = function _initFromApiPrediction2(apiPrediction, in
|
|
|
223
202
|
this.time = new Field({
|
|
224
203
|
prediction: {
|
|
225
204
|
value: undefined,
|
|
226
|
-
|
|
205
|
+
probability: 0.0
|
|
227
206
|
}
|
|
228
207
|
});
|
|
229
|
-
this.customerName = invoice.customerName;
|
|
230
|
-
this.customerAddress = invoice.customerAddress;
|
|
231
|
-
this.customerCompanyRegistration = invoice.customerCompanyRegistration;
|
|
232
208
|
} else {
|
|
233
209
|
var receipt = new Receipt({
|
|
234
210
|
apiPrediction,
|
|
@@ -244,45 +220,26 @@ var _initFromApiPrediction2 = function _initFromApiPrediction2(apiPrediction, in
|
|
|
244
220
|
this.totalIncl = receipt.totalIncl;
|
|
245
221
|
this.totalExcl = receipt.totalExcl;
|
|
246
222
|
this.supplier = receipt.merchantName;
|
|
247
|
-
this.supplierAddress = new Field({
|
|
248
|
-
prediction: {
|
|
249
|
-
value: undefined,
|
|
250
|
-
confidence: 0.0
|
|
251
|
-
}
|
|
252
|
-
});
|
|
253
223
|
this.time = receipt.time;
|
|
254
224
|
this.totalTax = receipt.totalTax;
|
|
255
225
|
this.invoiceNumber = new Field({
|
|
256
226
|
prediction: {
|
|
257
227
|
value: undefined,
|
|
258
|
-
|
|
228
|
+
probability: 0.0
|
|
259
229
|
}
|
|
260
230
|
});
|
|
261
231
|
this.paymentDetails = new Field({
|
|
262
232
|
prediction: {
|
|
263
233
|
value: undefined,
|
|
264
|
-
|
|
234
|
+
probability: 0.0
|
|
265
235
|
}
|
|
266
236
|
});
|
|
267
237
|
this.companyNumber = new Field({
|
|
268
238
|
prediction: {
|
|
269
239
|
value: undefined,
|
|
270
|
-
|
|
271
|
-
}
|
|
272
|
-
});
|
|
273
|
-
this.customerName = new Field({
|
|
274
|
-
prediction: {
|
|
275
|
-
value: undefined,
|
|
276
|
-
confidence: 0.0
|
|
277
|
-
}
|
|
278
|
-
});
|
|
279
|
-
this.customerAddress = new Field({
|
|
280
|
-
prediction: {
|
|
281
|
-
value: undefined,
|
|
282
|
-
confidence: 0.0
|
|
240
|
+
probability: 0.0
|
|
283
241
|
}
|
|
284
242
|
});
|
|
285
|
-
this.customerCompanyRegistration = [];
|
|
286
243
|
}
|
|
287
244
|
};
|
|
288
245
|
|
|
@@ -310,7 +267,7 @@ var _taxesMatchTotalIncl2 = function _taxesMatchTotalIncl2() {
|
|
|
310
267
|
|
|
311
268
|
if (this.totalIncl.value * (1 - eps) - 0.02 <= reconstructedTotal && reconstructedTotal <= this.totalIncl.value * (1 + eps) + 0.02) {
|
|
312
269
|
this.taxes = this.taxes.map(tax => _objectSpread(_objectSpread({}, tax), {}, {
|
|
313
|
-
|
|
270
|
+
probability: 1.0
|
|
314
271
|
}));
|
|
315
272
|
this.totalTax.probability = 1.0;
|
|
316
273
|
this.totalIncl.probability = 1.0;
|
package/lib/documents/invoice.js
CHANGED
|
@@ -57,15 +57,11 @@ class Invoice extends Document {
|
|
|
57
57
|
* @param {Object} invoiceNumber - invoice number value for creating Invoice object from scratch
|
|
58
58
|
* @param {Object} taxes - taxes value for creating Invoice object from scratch
|
|
59
59
|
* @param {Object} supplier - supplier value for creating Invoice object from scratch
|
|
60
|
-
* @param {Object} supplierAddress - supplier address value for creating Invoice object from scratch
|
|
61
60
|
* @param {Object} paymentDetails - payment details value for creating Invoice object from scratch
|
|
62
61
|
* @param {Object} companyNumber - company number value for creating Invoice object from scratch
|
|
63
62
|
* @param {Object} vatNumber - vat number value for creating Invoice object from scratch
|
|
64
63
|
* @param {Object} orientation - orientation value for creating Invoice object from scratch
|
|
65
64
|
* @param {Object} totalTax - total tax value for creating Invoice object from scratch
|
|
66
|
-
* @param {Object} customerName - customer name value for creating Invoice object from scratch
|
|
67
|
-
* @param {Object} customerAddress - customer address value for creating Invoice object from scratch
|
|
68
|
-
* @param {Object} customerCompanyRegistration - customer company registration value for creating Invoice object from scratch
|
|
69
65
|
* @param {Number} pageNumber - pageNumber for multi pages pdf input
|
|
70
66
|
* @param {String} level - specify whether object is built from "page" level or "document" level prediction
|
|
71
67
|
*/
|
|
@@ -81,15 +77,11 @@ class Invoice extends Document {
|
|
|
81
77
|
dueDate: _dueDate = undefined,
|
|
82
78
|
taxes: _taxes = undefined,
|
|
83
79
|
supplier: _supplier = undefined,
|
|
84
|
-
supplierAddress: _supplierAddress = undefined,
|
|
85
80
|
paymentDetails: _paymentDetails = undefined,
|
|
86
81
|
companyNumber: _companyNumber = undefined,
|
|
87
82
|
vatNumber: _vatNumber = undefined,
|
|
88
83
|
orientation: _orientation = undefined,
|
|
89
84
|
totalTax: _totalTax = undefined,
|
|
90
|
-
customerName: _customerName = undefined,
|
|
91
|
-
customerAddress: _customerAddress = undefined,
|
|
92
|
-
customerCompanyRegistration: _customerCompanyRegistration = undefined,
|
|
93
85
|
pageNumber: _pageNumber = 0,
|
|
94
86
|
level = "page"
|
|
95
87
|
} = _ref;
|
|
@@ -139,16 +131,12 @@ class Invoice extends Document {
|
|
|
139
131
|
dueDate: _dueDate,
|
|
140
132
|
taxes: _taxes,
|
|
141
133
|
supplier: _supplier,
|
|
142
|
-
supplierAddress: _supplierAddress,
|
|
143
134
|
paymentDetails: _paymentDetails,
|
|
144
135
|
companyNumber: _companyNumber,
|
|
145
136
|
vatNumber: _vatNumber,
|
|
146
137
|
orientation: _orientation,
|
|
147
138
|
pageNumber: _pageNumber,
|
|
148
|
-
totalTax: _totalTax
|
|
149
|
-
customerName: _customerName,
|
|
150
|
-
customerAddress: _customerAddress,
|
|
151
|
-
customerCompanyRegistration: _customerCompanyRegistration
|
|
139
|
+
totalTax: _totalTax
|
|
152
140
|
});
|
|
153
141
|
} else {
|
|
154
142
|
_classPrivateMethodGet(this, _initFromApiPrediction, _initFromApiPrediction2).call(this, _apiPrediction, _pageNumber);
|
|
@@ -160,7 +148,7 @@ class Invoice extends Document {
|
|
|
160
148
|
}
|
|
161
149
|
|
|
162
150
|
toString() {
|
|
163
|
-
return "\n -----Invoice data-----\n Filename: ".concat(this.filename, "\n Invoice number: ").concat(this.invoiceNumber.value, "\n Total amount including taxes: ").concat(this.totalIncl.value, "\n Total amount excluding taxes: ").concat(this.totalExcl.value, "\n Invoice Date: ").concat(this.invoiceDate.value, "\n Supplier name: ").concat(this.supplier.value, "\n
|
|
151
|
+
return "\n -----Invoice data-----\n Filename: ".concat(this.filename, "\n Invoice number: ").concat(this.invoiceNumber.value, "\n Total amount including taxes: ").concat(this.totalIncl.value, "\n Total amount excluding taxes: ").concat(this.totalExcl.value, "\n Invoice Date: ").concat(this.invoiceDate.value, "\n Supplier name: ").concat(this.supplier.value, "\n Taxes: ").concat(this.taxes.map(tax => tax.toString()).join(" - "), "\n Total taxes: ").concat(this.totalTax.value, "\n ");
|
|
164
152
|
}
|
|
165
153
|
|
|
166
154
|
}
|
|
@@ -176,15 +164,11 @@ var _initFromScratch2 = function _initFromScratch2(_ref2) {
|
|
|
176
164
|
dueDate,
|
|
177
165
|
taxes,
|
|
178
166
|
supplier,
|
|
179
|
-
supplierAddress,
|
|
180
167
|
paymentDetails,
|
|
181
168
|
companyNumber,
|
|
182
169
|
vatNumber,
|
|
183
170
|
orientation,
|
|
184
|
-
pageNumber
|
|
185
|
-
customerName,
|
|
186
|
-
customerAddress,
|
|
187
|
-
customerCompanyRegistration
|
|
171
|
+
pageNumber
|
|
188
172
|
} = _ref2;
|
|
189
173
|
this.locale = new Locale(this.constructPrediction(locale));
|
|
190
174
|
this.totalIncl = new Amount(this.constructPrediction(totalIncl));
|
|
@@ -194,14 +178,10 @@ var _initFromScratch2 = function _initFromScratch2(_ref2) {
|
|
|
194
178
|
this.invoiceDate = new Date(this.constructPrediction(invoiceDate));
|
|
195
179
|
this.dueDate = new Date(this.constructPrediction(dueDate));
|
|
196
180
|
this.supplier = new Field(this.constructPrediction(supplier));
|
|
197
|
-
this.supplierAddress = new Field(this.constructPrediction(supplierAddress));
|
|
198
181
|
this.invoiceNumber = new Field(this.constructPrediction(invoiceNumber));
|
|
199
182
|
this.paymentDetails = new Field(this.constructPrediction(paymentDetails));
|
|
200
183
|
this.companyNumber = new Field(this.constructPrediction(companyNumber));
|
|
201
184
|
this.vatNumber = new Field(this.constructPrediction(vatNumber));
|
|
202
|
-
this.customerName = new Field(this.constructPrediction(customerName));
|
|
203
|
-
this.customerAddress = new Field(this.constructPrediction(customerAddress));
|
|
204
|
-
this.customerCompanyRegistration = new Field(this.constructPrediction(customerCompanyRegistration));
|
|
205
185
|
|
|
206
186
|
if (taxes !== undefined) {
|
|
207
187
|
this.taxes = [];
|
|
@@ -238,7 +218,7 @@ var _initFromApiPrediction2 = function _initFromApiPrediction2(apiPrediction, pa
|
|
|
238
218
|
this.totalTax = new Amount({
|
|
239
219
|
prediction: {
|
|
240
220
|
value: undefined,
|
|
241
|
-
|
|
221
|
+
probability: 0.0
|
|
242
222
|
},
|
|
243
223
|
valueKey: "value",
|
|
244
224
|
pageNumber
|
|
@@ -287,25 +267,6 @@ var _initFromApiPrediction2 = function _initFromApiPrediction2(apiPrediction, pa
|
|
|
287
267
|
prediction: apiPrediction.supplier,
|
|
288
268
|
pageNumber
|
|
289
269
|
});
|
|
290
|
-
this.supplierAddress = new Field({
|
|
291
|
-
prediction: apiPrediction.supplier_address,
|
|
292
|
-
pageNumber
|
|
293
|
-
});
|
|
294
|
-
this.customerName = new Field({
|
|
295
|
-
prediction: apiPrediction.customer,
|
|
296
|
-
pageNumber
|
|
297
|
-
});
|
|
298
|
-
this.customerAddress = new Field({
|
|
299
|
-
prediction: apiPrediction.customer_address,
|
|
300
|
-
pageNumber
|
|
301
|
-
});
|
|
302
|
-
this.customerCompanyRegistration = apiPrediction.customer_company_registration.map(function (customerCompanyRegistration) {
|
|
303
|
-
return new Field({
|
|
304
|
-
prediction: customerCompanyRegistration,
|
|
305
|
-
pageNumber,
|
|
306
|
-
extraFields: ["type"]
|
|
307
|
-
});
|
|
308
|
-
});
|
|
309
270
|
this.paymentDetails = apiPrediction.payment_details.map(function (paymentDetail) {
|
|
310
271
|
return new PaymentDetails({
|
|
311
272
|
prediction: paymentDetail,
|
|
@@ -322,7 +283,7 @@ var _initFromApiPrediction2 = function _initFromApiPrediction2(apiPrediction, pa
|
|
|
322
283
|
this.orientation = new Orientation(this.constructPrediction({
|
|
323
284
|
prediction: {
|
|
324
285
|
value: undefined,
|
|
325
|
-
|
|
286
|
+
probability: 0.0,
|
|
326
287
|
degrees: undefined
|
|
327
288
|
}
|
|
328
289
|
}));
|
|
@@ -431,7 +392,7 @@ var _reconstructTotalTax2 = function _reconstructTotalTax2() {
|
|
|
431
392
|
value: this.taxes.reduce((acc, tax) => {
|
|
432
393
|
return tax.value !== undefined ? acc + tax.value : acc;
|
|
433
394
|
}, 0),
|
|
434
|
-
|
|
395
|
+
probability: Field.arrayProbability(this.taxes)
|
|
435
396
|
};
|
|
436
397
|
if (totalTax.value > 0) this.totalTax = new Amount({
|
|
437
398
|
prediction: totalTax,
|
|
@@ -445,7 +406,7 @@ var _reconstructTotalTaxFromTotals2 = function _reconstructTotalTaxFromTotals2()
|
|
|
445
406
|
if (this.totalTax.value === undefined && this.totalIncl.value > 0 && this.totalExcl.value > 0 && this.totalExcl.value <= this.totalIncl.value) {
|
|
446
407
|
var totalTax = {
|
|
447
408
|
value: this.totalIncl.value - this.totalExcl.value,
|
|
448
|
-
|
|
409
|
+
probability: this.totalIncl.probability * this.totalExcl.probability
|
|
449
410
|
};
|
|
450
411
|
if (totalTax.value > 0) this.totalTax = new Amount({
|
|
451
412
|
prediction: totalTax,
|
|
@@ -461,7 +422,7 @@ var _reconstructTotalExcl2 = function _reconstructTotalExcl2() {
|
|
|
461
422
|
value: this.totalIncl.value - this.taxes.reduce((acc, tax) => {
|
|
462
423
|
return tax.value !== undefined ? acc + tax.value : acc;
|
|
463
424
|
}, 0),
|
|
464
|
-
|
|
425
|
+
probability: Field.arrayProbability(this.taxes) * this.totalIncl.probability
|
|
465
426
|
};
|
|
466
427
|
this.totalExcl = new Amount({
|
|
467
428
|
prediction: totalExcl,
|
|
@@ -477,7 +438,7 @@ var _reconstructTotalIncl2 = function _reconstructTotalIncl2() {
|
|
|
477
438
|
value: this.totalExcl.value + this.taxes.reduce((acc, tax) => {
|
|
478
439
|
return tax.value ? acc + tax.value : acc;
|
|
479
440
|
}, 0.0),
|
|
480
|
-
|
|
441
|
+
probability: Field.arrayProbability(this.taxes) * this.totalExcl.probability
|
|
481
442
|
};
|
|
482
443
|
this.totalIncl = new Amount({
|
|
483
444
|
prediction: totalIncl,
|
package/lib/documents/receipt.js
CHANGED
|
@@ -229,7 +229,7 @@ var _initFromApiPrediction2 = function _initFromApiPrediction2(apiPrediction, pa
|
|
|
229
229
|
this.totalTax = new Amount({
|
|
230
230
|
prediction: {
|
|
231
231
|
value: undefined,
|
|
232
|
-
|
|
232
|
+
probability: 0
|
|
233
233
|
},
|
|
234
234
|
valueKey: "value",
|
|
235
235
|
pageNumber
|
|
@@ -237,7 +237,7 @@ var _initFromApiPrediction2 = function _initFromApiPrediction2(apiPrediction, pa
|
|
|
237
237
|
this.totalExcl = new Amount({
|
|
238
238
|
prediction: {
|
|
239
239
|
value: undefined,
|
|
240
|
-
|
|
240
|
+
probability: 0
|
|
241
241
|
},
|
|
242
242
|
valueKey: "value",
|
|
243
243
|
pageNumber
|
|
@@ -252,7 +252,7 @@ var _initFromApiPrediction2 = function _initFromApiPrediction2(apiPrediction, pa
|
|
|
252
252
|
this.orientation = new Orientation(this.constructPrediction({
|
|
253
253
|
prediction: {
|
|
254
254
|
value: undefined,
|
|
255
|
-
|
|
255
|
+
probability: 0.0,
|
|
256
256
|
degrees: undefined
|
|
257
257
|
}
|
|
258
258
|
}));
|
|
@@ -305,7 +305,7 @@ var _reconstructTotalExclFromTCCAndTaxes2 = function _reconstructTotalExclFromTC
|
|
|
305
305
|
if (this.taxes.length && this.totalIncl.value != null) {
|
|
306
306
|
var totalExcl = {
|
|
307
307
|
value: this.totalIncl.value - Field.arraySum(this.taxes),
|
|
308
|
-
|
|
308
|
+
probability: Field.arrayProbability(this.taxes) * this.totalIncl.probability
|
|
309
309
|
};
|
|
310
310
|
this.totalExcl = new Amount({
|
|
311
311
|
prediction: totalExcl,
|
|
@@ -319,7 +319,7 @@ var _reconstructTotalTax2 = function _reconstructTotalTax2() {
|
|
|
319
319
|
if (this.taxes.length && this.totalTax.value == null) {
|
|
320
320
|
var totalTax = {
|
|
321
321
|
value: this.taxes.map(tax => tax.value || 0).reduce((a, b) => a + b, 0),
|
|
322
|
-
|
|
322
|
+
probability: Field.arrayProbability(this.taxes)
|
|
323
323
|
};
|
|
324
324
|
if (totalTax.value > 0) this.totalTax = new Amount({
|
|
325
325
|
prediction: totalTax,
|
package/lib/inputs.js
CHANGED
|
@@ -104,6 +104,8 @@ class Input {
|
|
|
104
104
|
|
|
105
105
|
var filetype = _this3.filename.split(".").pop();
|
|
106
106
|
|
|
107
|
+
console.log(_this3.filename.split("."));
|
|
108
|
+
|
|
107
109
|
if (!(filetype in _this3.MIMETYPES)) {
|
|
108
110
|
errorHandler.throw(new Error("File type is not allowed. It must be ".concat(Object.keys(_this3.MIMETYPES).toString())));
|
|
109
111
|
}
|
package/mindee/api/request.js
CHANGED
|
@@ -7,23 +7,26 @@ const os = require("os");
|
|
|
7
7
|
const request = (url, method, headers, input, includeWords = false) => {
|
|
8
8
|
return new Promise(function (resolve, reject) {
|
|
9
9
|
let form = new FormData();
|
|
10
|
-
let body;
|
|
11
10
|
|
|
12
11
|
headers["User-Agent"] = `mindee-api-nodejs@v${sdkVersion} nodejs-${
|
|
13
12
|
process.version
|
|
14
13
|
} ${os.type().toLowerCase()}`;
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
|
|
15
|
+
const fileParams = { filename: input.filename };
|
|
16
|
+
|
|
17
|
+
if (input.inputType === "base64") {
|
|
18
|
+
form.append(
|
|
19
|
+
"document",
|
|
20
|
+
Buffer.from(input.fileObject, "base64"),
|
|
21
|
+
fileParams
|
|
22
|
+
);
|
|
23
|
+
} else {
|
|
17
24
|
form.append("document", input.fileObject, fileParams);
|
|
18
|
-
if (includeWords) form.append("include_mvision", "true");
|
|
19
|
-
headers = { ...headers, ...form.getHeaders() };
|
|
20
|
-
} else if (input.inputType === "base64") {
|
|
21
|
-
let body_obj = { document: input.fileObject };
|
|
22
|
-
if (includeWords) body_obj["include_mvision"] = "true";
|
|
23
|
-
body = JSON.stringify(body_obj);
|
|
24
|
-
headers["Content-Type"] = "application/json";
|
|
25
|
-
headers["Content-Length"] = body.length;
|
|
26
25
|
}
|
|
26
|
+
if (includeWords) {
|
|
27
|
+
form.append("include_mvision", "true");
|
|
28
|
+
}
|
|
29
|
+
headers = { ...headers, ...form.getHeaders() };
|
|
27
30
|
|
|
28
31
|
const uri = new URL(url);
|
|
29
32
|
const options = {
|
|
@@ -61,8 +64,7 @@ const request = (url, method, headers, input, includeWords = false) => {
|
|
|
61
64
|
}
|
|
62
65
|
|
|
63
66
|
if (input.inputType === "base64") {
|
|
64
|
-
|
|
65
|
-
req.end();
|
|
67
|
+
form.pipe(req);
|
|
66
68
|
}
|
|
67
69
|
});
|
|
68
70
|
};
|
package/mindee/inputs.js
CHANGED
|
@@ -52,18 +52,24 @@ class Input {
|
|
|
52
52
|
async initBase64() {
|
|
53
53
|
this.fileObject = this.file;
|
|
54
54
|
this.filepath = undefined;
|
|
55
|
-
this.fileExtension = undefined;
|
|
56
55
|
|
|
57
|
-
if (this.
|
|
58
|
-
const
|
|
56
|
+
if (this.filename === undefined) {
|
|
57
|
+
const mimeType = await fileType.fromBuffer(
|
|
59
58
|
Buffer.from(this.fileObject, "base64")
|
|
60
59
|
);
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
} else
|
|
65
|
-
|
|
60
|
+
if (mimeType !== undefined) {
|
|
61
|
+
this.fileExtension = mimeType.mime;
|
|
62
|
+
this.filename = `from_${this.inputType}.${mimeType.ext}`;
|
|
63
|
+
} else {
|
|
64
|
+
throw "Could not determine the MIME type. Please specify the 'filename' option.";
|
|
66
65
|
}
|
|
66
|
+
} else {
|
|
67
|
+
const filetype = this.filename.split(".").pop();
|
|
68
|
+
this.fileExtension = this.MIMETYPES[filetype];
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if (this.fileExtension === "application/pdf" && this.allowCutPdf == true) {
|
|
72
|
+
await this.cutPdf();
|
|
67
73
|
}
|
|
68
74
|
}
|
|
69
75
|
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mindee",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Mindee
|
|
3
|
+
"version": "1.3.0",
|
|
4
|
+
"description": "Mindee Client Library for Node.js",
|
|
5
5
|
"main": "mindee/index.js",
|
|
6
|
-
"license": "
|
|
6
|
+
"license": "MIT",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"build": "babel mindee -d lib",
|
|
9
9
|
"test": "npm run build && mocha tests/**/*.js",
|
|
@@ -34,12 +34,12 @@
|
|
|
34
34
|
"prettier": "^2.2.0"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"base64-arraybuffer": "^1.0.
|
|
37
|
+
"base64-arraybuffer": "^1.0.2",
|
|
38
38
|
"base64-stream": "^1.0.0",
|
|
39
39
|
"concat-stream": "^2.0.0",
|
|
40
40
|
"file-type": "^16.5.3",
|
|
41
41
|
"form-data": "^3.0.1",
|
|
42
|
-
"pdf-lib": "^1.
|
|
42
|
+
"pdf-lib": "^1.17.1"
|
|
43
43
|
},
|
|
44
44
|
"keywords": [
|
|
45
45
|
"javascript",
|