Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mindee

Package Overview
Dependencies
Maintainers
1
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mindee - npm Package Compare versions

Comparing version 1.0.4 to 1.0.6

examples/documents/invoices/credit_note.pdf

24

CHANGELOG.md
# CHANGELOG
## v1.0.6 (2021-06-14)
### New
- ✨ Invoices return API document type
## v1.0.4 (2021-02-18)
### New
* :sparkles: :zap: Add a parameter `filename` and a default filename for streams
- :sparkles: :zap: Add a parameter `filename` and a default filename for streams
### Changes
* :zap: Change parse function to use an object instead of multiples parameters
- :zap: Change parse function to use an object instead of multiples parameters

@@ -15,6 +22,6 @@ ## v1.0.3 (2021-02-01)

### Fixes
* :bug: _request parameters
* :bug: `pageNumber` default value
* :bug: reconstruction method set fields to probability
- :bug: \_request parameters
- :bug: `pageNumber` default value
- :bug: reconstruction method set fields to probability

@@ -24,10 +31,11 @@ ## v1.0.2 (2021-02-01)

### Changes
* :zap: Better coverage for total tax
- :zap: Better coverage for total tax
### Fixes
* :bug: `includeWords` is now working
- :bug: `includeWords` is now working
## v1.0.1 (2021-01-11)
* 🎉 First release
- 🎉 First release

@@ -14,2 +14,3 @@ const { Client } = require("mindee");

console.log(res.invoice);
console.log(res.documentType);
})

@@ -20,2 +21,15 @@ .catch((err) => {

// parsing credit note from pdf
mindeeClient.invoice
.parse({ input: "./documents/invoices/credit_note.pdf" })
.then((res) => {
console.log("Success !");
console.log(res.invoices);
console.log(res.invoice);
console.log(res.documentType);
})
.catch((err) => {
console.error(err);
});
// // parsing invoice from multiple page pdf

@@ -26,2 +40,3 @@ mindeeClient.invoice

console.log("Success !");
console.log(res.documentType);
console.log(res.invoices);

@@ -42,2 +57,3 @@ console.log(res.invoice);

console.log("Success !");
console.log(res.documentType);
console.log(res.invoices);

@@ -56,2 +72,3 @@ console.log(res.invoice);

console.log("Success !");
console.log(res.documentType);
console.log(res.invoices);

@@ -58,0 +75,0 @@ console.log(res.invoice);

@@ -55,5 +55,20 @@ "use strict";

}
/**
@param {String} inputFile - Input object
@param {} response - HTTP response
@param {Document} documentType - Document class in {"Receipt", "Invoice", "Financial_document"}
@returns {Response}
*/
wrapResponse(inputFile, response, documentType) {
var _result$httpResponse$, _result$httpResponse$2, _result$httpResponse$3, _result$httpResponse$4, _result$httpResponse$5;
var result = super.wrapResponse(inputFile, response, documentType);
result.documentType = ((_result$httpResponse$ = result.httpResponse.data) === null || _result$httpResponse$ === void 0 ? void 0 : (_result$httpResponse$2 = _result$httpResponse$.predictions) === null || _result$httpResponse$2 === void 0 ? void 0 : (_result$httpResponse$3 = _result$httpResponse$2[0]) === null || _result$httpResponse$3 === void 0 ? void 0 : (_result$httpResponse$4 = _result$httpResponse$3.document_type) === null || _result$httpResponse$4 === void 0 ? void 0 : (_result$httpResponse$5 = _result$httpResponse$4.value) === null || _result$httpResponse$5 === void 0 ? void 0 : _result$httpResponse$5.toLowerCase()) || result.documentType;
return result;
}
}
module.exports = APIInvoice;
{
"name": "mindee",
"version": "1.0.4",
"version": "1.0.6",
"description": "Mindee API SDK for Node.js",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc