mindee 4.9.1 → 4.11.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 +14 -0
- package/package.json +1 -1
- package/src/errors/handler.d.ts +1 -0
- package/src/errors/handler.js +1 -0
- package/src/http/error.js +9 -3
- package/src/input/sources.js +1 -2
- package/src/product/barcodeReader/barcodeReaderV1.d.ts +1 -1
- package/src/product/barcodeReader/barcodeReaderV1.js +1 -1
- package/src/product/barcodeReader/barcodeReaderV1Document.d.ts +1 -1
- package/src/product/barcodeReader/barcodeReaderV1Document.js +1 -1
- package/src/product/cropper/cropperV1.d.ts +1 -1
- package/src/product/cropper/cropperV1.js +1 -1
- package/src/product/cropper/cropperV1Document.d.ts +1 -1
- package/src/product/cropper/cropperV1Document.js +1 -1
- package/src/product/cropper/cropperV1Page.d.ts +1 -1
- package/src/product/cropper/cropperV1Page.js +1 -1
- package/src/product/eu/driverLicense/driverLicenseV1.d.ts +1 -1
- package/src/product/eu/driverLicense/driverLicenseV1.js +1 -1
- package/src/product/eu/driverLicense/driverLicenseV1Document.d.ts +1 -1
- package/src/product/eu/driverLicense/driverLicenseV1Document.js +1 -1
- package/src/product/eu/driverLicense/driverLicenseV1Page.d.ts +1 -1
- package/src/product/eu/driverLicense/driverLicenseV1Page.js +1 -1
- package/src/product/eu/licensePlate/licensePlateV1.d.ts +1 -1
- package/src/product/eu/licensePlate/licensePlateV1.js +1 -1
- package/src/product/eu/licensePlate/licensePlateV1Document.d.ts +1 -1
- package/src/product/eu/licensePlate/licensePlateV1Document.js +1 -1
- package/src/product/financialDocument/financialDocumentV1.d.ts +1 -1
- package/src/product/financialDocument/financialDocumentV1.js +1 -1
- package/src/product/financialDocument/financialDocumentV1Document.d.ts +11 -1
- package/src/product/financialDocument/financialDocumentV1Document.js +26 -1
- package/src/product/fr/bankAccountDetails/bankAccountDetailsV1.d.ts +1 -1
- package/src/product/fr/bankAccountDetails/bankAccountDetailsV1.js +1 -1
- package/src/product/fr/bankAccountDetails/bankAccountDetailsV1Document.d.ts +1 -1
- package/src/product/fr/bankAccountDetails/bankAccountDetailsV1Document.js +1 -1
- package/src/product/fr/bankAccountDetails/bankAccountDetailsV2.d.ts +1 -1
- package/src/product/fr/bankAccountDetails/bankAccountDetailsV2.js +1 -1
- package/src/product/fr/bankAccountDetails/bankAccountDetailsV2Document.d.ts +1 -1
- package/src/product/fr/bankAccountDetails/bankAccountDetailsV2Document.js +1 -1
- package/src/product/fr/carteGrise/carteGriseV1.d.ts +1 -1
- package/src/product/fr/carteGrise/carteGriseV1.js +1 -1
- package/src/product/fr/carteGrise/carteGriseV1Document.d.ts +1 -1
- package/src/product/fr/carteGrise/carteGriseV1Document.js +1 -1
- package/src/product/fr/carteVitale/carteVitaleV1.d.ts +1 -1
- package/src/product/fr/carteVitale/carteVitaleV1.js +1 -1
- package/src/product/fr/carteVitale/carteVitaleV1Document.d.ts +1 -1
- package/src/product/fr/carteVitale/carteVitaleV1Document.js +1 -1
- package/src/product/fr/idCard/idCardV1.d.ts +1 -1
- package/src/product/fr/idCard/idCardV1.js +1 -1
- package/src/product/fr/idCard/idCardV1Document.d.ts +1 -1
- package/src/product/fr/idCard/idCardV1Document.js +1 -1
- package/src/product/fr/idCard/idCardV1Page.d.ts +1 -1
- package/src/product/fr/idCard/idCardV1Page.js +1 -1
- package/src/product/fr/idCard/idCardV2.d.ts +1 -1
- package/src/product/fr/idCard/idCardV2.js +1 -1
- package/src/product/fr/idCard/idCardV2Document.d.ts +1 -1
- package/src/product/fr/idCard/idCardV2Document.js +1 -1
- package/src/product/fr/idCard/idCardV2Page.d.ts +1 -1
- package/src/product/fr/idCard/idCardV2Page.js +1 -1
- package/src/product/internationalId/internationalIdV2.d.ts +1 -1
- package/src/product/internationalId/internationalIdV2.js +1 -1
- package/src/product/internationalId/internationalIdV2Document.d.ts +1 -1
- package/src/product/internationalId/internationalIdV2Document.js +1 -1
- package/src/product/invoice/invoiceV4.d.ts +1 -1
- package/src/product/invoice/invoiceV4.js +1 -1
- package/src/product/invoice/invoiceV4Document.d.ts +13 -1
- package/src/product/invoice/invoiceV4Document.js +31 -1
- package/src/product/multiReceiptsDetector/multiReceiptsDetectorV1.d.ts +1 -1
- package/src/product/multiReceiptsDetector/multiReceiptsDetectorV1.js +1 -1
- package/src/product/multiReceiptsDetector/multiReceiptsDetectorV1Document.d.ts +1 -1
- package/src/product/multiReceiptsDetector/multiReceiptsDetectorV1Document.js +1 -1
- package/src/product/passport/passportV1.d.ts +1 -1
- package/src/product/passport/passportV1.js +1 -1
- package/src/product/passport/passportV1Document.d.ts +1 -1
- package/src/product/passport/passportV1Document.js +1 -1
- package/src/product/proofOfAddress/proofOfAddressV1.d.ts +1 -1
- package/src/product/proofOfAddress/proofOfAddressV1.js +1 -1
- package/src/product/proofOfAddress/proofOfAddressV1Document.d.ts +1 -1
- package/src/product/proofOfAddress/proofOfAddressV1Document.js +1 -1
- package/src/product/receipt/receiptV5.d.ts +1 -1
- package/src/product/receipt/receiptV5.js +1 -1
- package/src/product/receipt/receiptV5Document.d.ts +1 -1
- package/src/product/receipt/receiptV5Document.js +1 -1
- package/src/product/resume/resumeV1.d.ts +1 -1
- package/src/product/resume/resumeV1.js +1 -1
- package/src/product/resume/resumeV1Document.d.ts +1 -1
- package/src/product/resume/resumeV1Document.js +1 -1
- package/src/product/us/bankCheck/bankCheckV1.d.ts +1 -1
- package/src/product/us/bankCheck/bankCheckV1.js +1 -1
- package/src/product/us/bankCheck/bankCheckV1Document.d.ts +1 -1
- package/src/product/us/bankCheck/bankCheckV1Document.js +1 -1
- package/src/product/us/bankCheck/bankCheckV1Page.d.ts +1 -1
- package/src/product/us/bankCheck/bankCheckV1Page.js +1 -1
- package/src/product/us/driverLicense/driverLicenseV1.d.ts +1 -1
- package/src/product/us/driverLicense/driverLicenseV1.js +1 -1
- package/src/product/us/driverLicense/driverLicenseV1Document.d.ts +1 -1
- package/src/product/us/driverLicense/driverLicenseV1Document.js +1 -1
- package/src/product/us/driverLicense/driverLicenseV1Page.d.ts +1 -1
- package/src/product/us/driverLicense/driverLicenseV1Page.js +1 -1
- package/src/product/us/w9/w9V1.d.ts +1 -1
- package/src/product/us/w9/w9V1.js +1 -1
- package/src/product/us/w9/w9V1Document.d.ts +1 -1
- package/src/product/us/w9/w9V1Document.js +1 -1
- package/src/product/us/w9/w9V1Page.d.ts +1 -1
- package/src/product/us/w9/w9V1Page.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
# v4.11.0 - 2024-04-30
|
|
4
|
+
### Changes
|
|
5
|
+
* :sparkles: update invoice to 4.6 & financial document to 1.6 (#269)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
# v4.10.0 - 2024-04-12
|
|
9
|
+
### Changes
|
|
10
|
+
* :sparkles: update Invoice to v4.5 (#264)
|
|
11
|
+
|
|
12
|
+
### Fixes
|
|
13
|
+
* :bug: fix error management not following intended flow (#267)
|
|
14
|
+
* :recycle: deprecated old error handler (#266)
|
|
15
|
+
|
|
16
|
+
|
|
3
17
|
## v4.9.1 - 2024-03-05
|
|
4
18
|
### Changes
|
|
5
19
|
* :recycle: update error handling to account for future evolutions
|
package/package.json
CHANGED
package/src/errors/handler.d.ts
CHANGED
package/src/errors/handler.js
CHANGED
|
@@ -4,6 +4,7 @@ exports.errorHandler = exports.ErrorHandler = void 0;
|
|
|
4
4
|
const logger_1 = require("../logger");
|
|
5
5
|
/**
|
|
6
6
|
* Custom Error handling class.
|
|
7
|
+
* @deprecated Clashes with current implementation of some errors, which may cause unexpected behaviors.
|
|
7
8
|
*/
|
|
8
9
|
class ErrorHandler {
|
|
9
10
|
constructor(throwOnError = true) {
|
package/src/http/error.js
CHANGED
|
@@ -5,10 +5,16 @@ const errors_1 = require("../errors");
|
|
|
5
5
|
const handler_1 = require("../errors/handler");
|
|
6
6
|
function handleError(urlName, response, serverError) {
|
|
7
7
|
let code;
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
try {
|
|
9
|
+
if (response.data.api_request["status_code"] === 200 && response.data?.job?.error?.code) {
|
|
10
|
+
code = 500;
|
|
11
|
+
response.data.api_request.error = response.data.job.error;
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
code = response.data.api_request["status_code"];
|
|
15
|
+
}
|
|
10
16
|
}
|
|
11
|
-
|
|
17
|
+
catch (e) {
|
|
12
18
|
code = 500;
|
|
13
19
|
}
|
|
14
20
|
let errorObj;
|
package/src/input/sources.js
CHANGED
|
@@ -26,7 +26,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
26
26
|
exports.BufferInput = exports.UrlInput = exports.BytesInput = exports.StreamInput = exports.Base64Input = exports.PathInput = void 0;
|
|
27
27
|
const fs_1 = require("fs");
|
|
28
28
|
const path = __importStar(require("path"));
|
|
29
|
-
const handler_1 = require("../errors/handler");
|
|
30
29
|
const buffer_1 = require("buffer");
|
|
31
30
|
const logger_1 = require("../logger");
|
|
32
31
|
const base_1 = require("./base");
|
|
@@ -113,7 +112,7 @@ class UrlInput extends base_1.InputSource {
|
|
|
113
112
|
}
|
|
114
113
|
async init() {
|
|
115
114
|
if (!this.url.toLowerCase().startsWith("https")) {
|
|
116
|
-
|
|
115
|
+
throw new Error("URL must be HTTPS");
|
|
117
116
|
}
|
|
118
117
|
this.fileObject = this.url;
|
|
119
118
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Inference, StringDict, Page } from "../../parsing/common";
|
|
2
2
|
import { BarcodeReaderV1Document } from "./barcodeReaderV1Document";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Barcode Reader API version 1 inference prediction.
|
|
5
5
|
*/
|
|
6
6
|
export declare class BarcodeReaderV1 extends Inference {
|
|
7
7
|
/** The endpoint's name. */
|
|
@@ -4,7 +4,7 @@ exports.BarcodeReaderV1 = void 0;
|
|
|
4
4
|
const common_1 = require("../../parsing/common");
|
|
5
5
|
const barcodeReaderV1Document_1 = require("./barcodeReaderV1Document");
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Barcode Reader API version 1 inference prediction.
|
|
8
8
|
*/
|
|
9
9
|
class BarcodeReaderV1 extends common_1.Inference {
|
|
10
10
|
constructor(rawPrediction) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Prediction, StringDict } from "../../parsing/common";
|
|
2
2
|
import { StringField } from "../../parsing/standard";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Barcode Reader API version 1.0 document data.
|
|
5
5
|
*/
|
|
6
6
|
export declare class BarcodeReaderV1Document implements Prediction {
|
|
7
7
|
/** List of decoded 1D barcodes. */
|
|
@@ -4,7 +4,7 @@ exports.BarcodeReaderV1Document = void 0;
|
|
|
4
4
|
const common_1 = require("../../parsing/common");
|
|
5
5
|
const standard_1 = require("../../parsing/standard");
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Barcode Reader API version 1.0 document data.
|
|
8
8
|
*/
|
|
9
9
|
class BarcodeReaderV1Document {
|
|
10
10
|
constructor(rawPrediction, pageId) {
|
|
@@ -2,7 +2,7 @@ import { Inference, StringDict, Page } from "../../parsing/common";
|
|
|
2
2
|
import { CropperV1Document } from "./cropperV1Document";
|
|
3
3
|
import { CropperV1Page } from "./cropperV1Page";
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Cropper API version 1 inference prediction.
|
|
6
6
|
*/
|
|
7
7
|
export declare class CropperV1 extends Inference {
|
|
8
8
|
/** The endpoint's name. */
|
|
@@ -5,7 +5,7 @@ const common_1 = require("../../parsing/common");
|
|
|
5
5
|
const cropperV1Document_1 = require("./cropperV1Document");
|
|
6
6
|
const cropperV1Page_1 = require("./cropperV1Page");
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Cropper API version 1 inference prediction.
|
|
9
9
|
*/
|
|
10
10
|
class CropperV1 extends common_1.Inference {
|
|
11
11
|
constructor(rawPrediction) {
|
|
@@ -2,7 +2,7 @@ import { StringDict } from "../../parsing/common";
|
|
|
2
2
|
import { PositionField } from "../../parsing/standard";
|
|
3
3
|
import { CropperV1Document } from "./cropperV1Document";
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Cropper API version 1.1 page data.
|
|
6
6
|
*/
|
|
7
7
|
export declare class CropperV1Page extends CropperV1Document {
|
|
8
8
|
/** List of documents found in the image. */
|
|
@@ -5,7 +5,7 @@ const common_1 = require("../../parsing/common");
|
|
|
5
5
|
const standard_1 = require("../../parsing/standard");
|
|
6
6
|
const cropperV1Document_1 = require("./cropperV1Document");
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Cropper API version 1.1 page data.
|
|
9
9
|
*/
|
|
10
10
|
class CropperV1Page extends cropperV1Document_1.CropperV1Document {
|
|
11
11
|
constructor(rawPrediction, pageId) {
|
|
@@ -2,7 +2,7 @@ import { Inference, StringDict, Page } from "../../../parsing/common";
|
|
|
2
2
|
import { DriverLicenseV1Document } from "./driverLicenseV1Document";
|
|
3
3
|
import { DriverLicenseV1Page } from "./driverLicenseV1Page";
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Driver License API version 1 inference prediction.
|
|
6
6
|
*/
|
|
7
7
|
export declare class DriverLicenseV1 extends Inference {
|
|
8
8
|
/** The endpoint's name. */
|
|
@@ -5,7 +5,7 @@ const common_1 = require("../../../parsing/common");
|
|
|
5
5
|
const driverLicenseV1Document_1 = require("./driverLicenseV1Document");
|
|
6
6
|
const driverLicenseV1Page_1 = require("./driverLicenseV1Page");
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Driver License API version 1 inference prediction.
|
|
9
9
|
*/
|
|
10
10
|
class DriverLicenseV1 extends common_1.Inference {
|
|
11
11
|
constructor(rawPrediction) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Prediction, StringDict } from "../../../parsing/common";
|
|
2
2
|
import { DateField, StringField } from "../../../parsing/standard";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Driver License API version 1.0 document data.
|
|
5
5
|
*/
|
|
6
6
|
export declare class DriverLicenseV1Document implements Prediction {
|
|
7
7
|
/** EU driver license holders address */
|
|
@@ -4,7 +4,7 @@ exports.DriverLicenseV1Document = void 0;
|
|
|
4
4
|
const common_1 = require("../../../parsing/common");
|
|
5
5
|
const standard_1 = require("../../../parsing/standard");
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Driver License API version 1.0 document data.
|
|
8
8
|
*/
|
|
9
9
|
class DriverLicenseV1Document {
|
|
10
10
|
constructor(rawPrediction, pageId) {
|
|
@@ -2,7 +2,7 @@ import { StringDict } from "../../../parsing/common";
|
|
|
2
2
|
import { PositionField } from "../../../parsing/standard";
|
|
3
3
|
import { DriverLicenseV1Document } from "./driverLicenseV1Document";
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Driver License API version 1.0 page data.
|
|
6
6
|
*/
|
|
7
7
|
export declare class DriverLicenseV1Page extends DriverLicenseV1Document {
|
|
8
8
|
/** Has a photo of the EU driver license holder */
|
|
@@ -5,7 +5,7 @@ const common_1 = require("../../../parsing/common");
|
|
|
5
5
|
const standard_1 = require("../../../parsing/standard");
|
|
6
6
|
const driverLicenseV1Document_1 = require("./driverLicenseV1Document");
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Driver License API version 1.0 page data.
|
|
9
9
|
*/
|
|
10
10
|
class DriverLicenseV1Page extends driverLicenseV1Document_1.DriverLicenseV1Document {
|
|
11
11
|
constructor(rawPrediction, pageId) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Inference, StringDict, Page } from "../../../parsing/common";
|
|
2
2
|
import { LicensePlateV1Document } from "./licensePlateV1Document";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* License Plate API version 1 inference prediction.
|
|
5
5
|
*/
|
|
6
6
|
export declare class LicensePlateV1 extends Inference {
|
|
7
7
|
/** The endpoint's name. */
|
|
@@ -4,7 +4,7 @@ exports.LicensePlateV1 = void 0;
|
|
|
4
4
|
const common_1 = require("../../../parsing/common");
|
|
5
5
|
const licensePlateV1Document_1 = require("./licensePlateV1Document");
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* License Plate API version 1 inference prediction.
|
|
8
8
|
*/
|
|
9
9
|
class LicensePlateV1 extends common_1.Inference {
|
|
10
10
|
constructor(rawPrediction) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Prediction, StringDict } from "../../../parsing/common";
|
|
2
2
|
import { StringField } from "../../../parsing/standard";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* License Plate API version 1.1 document data.
|
|
5
5
|
*/
|
|
6
6
|
export declare class LicensePlateV1Document implements Prediction {
|
|
7
7
|
/** List of all license plates found in the image. */
|
|
@@ -4,7 +4,7 @@ exports.LicensePlateV1Document = void 0;
|
|
|
4
4
|
const common_1 = require("../../../parsing/common");
|
|
5
5
|
const standard_1 = require("../../../parsing/standard");
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* License Plate API version 1.1 document data.
|
|
8
8
|
*/
|
|
9
9
|
class LicensePlateV1Document {
|
|
10
10
|
constructor(rawPrediction, pageId) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Inference, StringDict, Page } from "../../parsing/common";
|
|
2
2
|
import { FinancialDocumentV1Document } from "./financialDocumentV1Document";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Financial Document API version 1 inference prediction.
|
|
5
5
|
*/
|
|
6
6
|
export declare class FinancialDocumentV1 extends Inference {
|
|
7
7
|
/** The endpoint's name. */
|
|
@@ -4,7 +4,7 @@ exports.FinancialDocumentV1 = void 0;
|
|
|
4
4
|
const common_1 = require("../../parsing/common");
|
|
5
5
|
const financialDocumentV1Document_1 = require("./financialDocumentV1Document");
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Financial Document API version 1 inference prediction.
|
|
8
8
|
*/
|
|
9
9
|
class FinancialDocumentV1 extends common_1.Inference {
|
|
10
10
|
constructor(rawPrediction) {
|
|
@@ -2,15 +2,19 @@ import { Prediction, StringDict } from "../../parsing/common";
|
|
|
2
2
|
import { FinancialDocumentV1LineItem } from "./financialDocumentV1LineItem";
|
|
3
3
|
import { AmountField, ClassificationField, CompanyRegistrationField, DateField, LocaleField, PaymentDetailsField, StringField, Taxes } from "../../parsing/standard";
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Financial Document API version 1.6 document data.
|
|
6
6
|
*/
|
|
7
7
|
export declare class FinancialDocumentV1Document implements Prediction {
|
|
8
|
+
/** The customer's address used for billing. */
|
|
9
|
+
billingAddress: StringField;
|
|
8
10
|
/** The purchase category among predefined classes. */
|
|
9
11
|
category: ClassificationField;
|
|
10
12
|
/** The address of the customer. */
|
|
11
13
|
customerAddress: StringField;
|
|
12
14
|
/** List of company registrations associated to the customer. */
|
|
13
15
|
customerCompanyRegistrations: CompanyRegistrationField[];
|
|
16
|
+
/** The customer account number or identifier from the supplier. */
|
|
17
|
+
customerId: StringField;
|
|
14
18
|
/** The name of the customer. */
|
|
15
19
|
customerName: StringField;
|
|
16
20
|
/** The date the purchase was made. */
|
|
@@ -27,18 +31,24 @@ export declare class FinancialDocumentV1Document implements Prediction {
|
|
|
27
31
|
locale: LocaleField;
|
|
28
32
|
/** List of Reference numbers, including PO number. */
|
|
29
33
|
referenceNumbers: StringField[];
|
|
34
|
+
/** The customer's address used for shipping. */
|
|
35
|
+
shippingAddress: StringField;
|
|
30
36
|
/** The purchase subcategory among predefined classes for transport and food. */
|
|
31
37
|
subcategory: ClassificationField;
|
|
32
38
|
/** The address of the supplier or merchant. */
|
|
33
39
|
supplierAddress: StringField;
|
|
34
40
|
/** List of company registrations associated to the supplier. */
|
|
35
41
|
supplierCompanyRegistrations: CompanyRegistrationField[];
|
|
42
|
+
/** The email of the supplier or merchant. */
|
|
43
|
+
supplierEmail: StringField;
|
|
36
44
|
/** The name of the supplier or merchant. */
|
|
37
45
|
supplierName: StringField;
|
|
38
46
|
/** List of payment details associated to the supplier. */
|
|
39
47
|
supplierPaymentDetails: PaymentDetailsField[];
|
|
40
48
|
/** The phone number of the supplier or merchant. */
|
|
41
49
|
supplierPhoneNumber: StringField;
|
|
50
|
+
/** The website URL of the supplier or merchant. */
|
|
51
|
+
supplierWebsite: StringField;
|
|
42
52
|
/** List of tax lines information. */
|
|
43
53
|
taxes: Taxes;
|
|
44
54
|
/** The time the purchase was made. */
|
|
@@ -5,7 +5,7 @@ const common_1 = require("../../parsing/common");
|
|
|
5
5
|
const financialDocumentV1LineItem_1 = require("./financialDocumentV1LineItem");
|
|
6
6
|
const standard_1 = require("../../parsing/standard");
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Financial Document API version 1.6 document data.
|
|
9
9
|
*/
|
|
10
10
|
class FinancialDocumentV1Document {
|
|
11
11
|
constructor(rawPrediction, pageId) {
|
|
@@ -19,6 +19,10 @@ class FinancialDocumentV1Document {
|
|
|
19
19
|
this.supplierCompanyRegistrations = [];
|
|
20
20
|
/** List of payment details associated to the supplier. */
|
|
21
21
|
this.supplierPaymentDetails = [];
|
|
22
|
+
this.billingAddress = new standard_1.StringField({
|
|
23
|
+
prediction: rawPrediction["billing_address"],
|
|
24
|
+
pageId: pageId,
|
|
25
|
+
});
|
|
22
26
|
this.category = new standard_1.ClassificationField({
|
|
23
27
|
prediction: rawPrediction["category"],
|
|
24
28
|
});
|
|
@@ -31,6 +35,10 @@ class FinancialDocumentV1Document {
|
|
|
31
35
|
prediction: itemPrediction,
|
|
32
36
|
pageId: pageId,
|
|
33
37
|
})));
|
|
38
|
+
this.customerId = new standard_1.StringField({
|
|
39
|
+
prediction: rawPrediction["customer_id"],
|
|
40
|
+
pageId: pageId,
|
|
41
|
+
});
|
|
34
42
|
this.customerName = new standard_1.StringField({
|
|
35
43
|
prediction: rawPrediction["customer_name"],
|
|
36
44
|
pageId: pageId,
|
|
@@ -63,6 +71,10 @@ class FinancialDocumentV1Document {
|
|
|
63
71
|
prediction: itemPrediction,
|
|
64
72
|
pageId: pageId,
|
|
65
73
|
})));
|
|
74
|
+
this.shippingAddress = new standard_1.StringField({
|
|
75
|
+
prediction: rawPrediction["shipping_address"],
|
|
76
|
+
pageId: pageId,
|
|
77
|
+
});
|
|
66
78
|
this.subcategory = new standard_1.ClassificationField({
|
|
67
79
|
prediction: rawPrediction["subcategory"],
|
|
68
80
|
});
|
|
@@ -75,6 +87,10 @@ class FinancialDocumentV1Document {
|
|
|
75
87
|
prediction: itemPrediction,
|
|
76
88
|
pageId: pageId,
|
|
77
89
|
})));
|
|
90
|
+
this.supplierEmail = new standard_1.StringField({
|
|
91
|
+
prediction: rawPrediction["supplier_email"],
|
|
92
|
+
pageId: pageId,
|
|
93
|
+
});
|
|
78
94
|
this.supplierName = new standard_1.StringField({
|
|
79
95
|
prediction: rawPrediction["supplier_name"],
|
|
80
96
|
pageId: pageId,
|
|
@@ -88,6 +104,10 @@ class FinancialDocumentV1Document {
|
|
|
88
104
|
prediction: rawPrediction["supplier_phone_number"],
|
|
89
105
|
pageId: pageId,
|
|
90
106
|
});
|
|
107
|
+
this.supplierWebsite = new standard_1.StringField({
|
|
108
|
+
prediction: rawPrediction["supplier_website"],
|
|
109
|
+
pageId: pageId,
|
|
110
|
+
});
|
|
91
111
|
this.taxes = new standard_1.Taxes().init(rawPrediction["taxes"], pageId);
|
|
92
112
|
this.time = new standard_1.StringField({
|
|
93
113
|
prediction: rawPrediction["time"],
|
|
@@ -146,8 +166,13 @@ class FinancialDocumentV1Document {
|
|
|
146
166
|
:Supplier Address: ${this.supplierAddress}
|
|
147
167
|
:Supplier Phone Number: ${this.supplierPhoneNumber}
|
|
148
168
|
:Customer Name: ${this.customerName}
|
|
169
|
+
:Supplier Website: ${this.supplierWebsite}
|
|
170
|
+
:Supplier Email: ${this.supplierEmail}
|
|
149
171
|
:Customer Company Registrations: ${customerCompanyRegistrations}
|
|
150
172
|
:Customer Address: ${this.customerAddress}
|
|
173
|
+
:Customer ID: ${this.customerId}
|
|
174
|
+
:Shipping Address: ${this.shippingAddress}
|
|
175
|
+
:Billing Address: ${this.billingAddress}
|
|
151
176
|
:Document Type: ${this.documentType}
|
|
152
177
|
:Purchase Subcategory: ${this.subcategory}
|
|
153
178
|
:Purchase Category: ${this.category}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Inference, StringDict, Page } from "../../../parsing/common";
|
|
2
2
|
import { BankAccountDetailsV1Document } from "./bankAccountDetailsV1Document";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Bank Account Details API version 1 inference prediction.
|
|
5
5
|
*/
|
|
6
6
|
export declare class BankAccountDetailsV1 extends Inference {
|
|
7
7
|
/** The endpoint's name. */
|
|
@@ -4,7 +4,7 @@ exports.BankAccountDetailsV1 = void 0;
|
|
|
4
4
|
const common_1 = require("../../../parsing/common");
|
|
5
5
|
const bankAccountDetailsV1Document_1 = require("./bankAccountDetailsV1Document");
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Bank Account Details API version 1 inference prediction.
|
|
8
8
|
*/
|
|
9
9
|
class BankAccountDetailsV1 extends common_1.Inference {
|
|
10
10
|
constructor(rawPrediction) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Prediction, StringDict } from "../../../parsing/common";
|
|
2
2
|
import { StringField } from "../../../parsing/standard";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Bank Account Details API version 1.0 document data.
|
|
5
5
|
*/
|
|
6
6
|
export declare class BankAccountDetailsV1Document implements Prediction {
|
|
7
7
|
/** The name of the account holder as seen on the document. */
|
|
@@ -4,7 +4,7 @@ exports.BankAccountDetailsV1Document = void 0;
|
|
|
4
4
|
const common_1 = require("../../../parsing/common");
|
|
5
5
|
const standard_1 = require("../../../parsing/standard");
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Bank Account Details API version 1.0 document data.
|
|
8
8
|
*/
|
|
9
9
|
class BankAccountDetailsV1Document {
|
|
10
10
|
constructor(rawPrediction, pageId) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Inference, StringDict, Page } from "../../../parsing/common";
|
|
2
2
|
import { BankAccountDetailsV2Document } from "./bankAccountDetailsV2Document";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Bank Account Details API version 2 inference prediction.
|
|
5
5
|
*/
|
|
6
6
|
export declare class BankAccountDetailsV2 extends Inference {
|
|
7
7
|
/** The endpoint's name. */
|
|
@@ -4,7 +4,7 @@ exports.BankAccountDetailsV2 = void 0;
|
|
|
4
4
|
const common_1 = require("../../../parsing/common");
|
|
5
5
|
const bankAccountDetailsV2Document_1 = require("./bankAccountDetailsV2Document");
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Bank Account Details API version 2 inference prediction.
|
|
8
8
|
*/
|
|
9
9
|
class BankAccountDetailsV2 extends common_1.Inference {
|
|
10
10
|
constructor(rawPrediction) {
|
|
@@ -2,7 +2,7 @@ import { Prediction, StringDict } from "../../../parsing/common";
|
|
|
2
2
|
import { BankAccountDetailsV2Bban } from "./bankAccountDetailsV2Bban";
|
|
3
3
|
import { StringField } from "../../../parsing/standard";
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Bank Account Details API version 2.0 document data.
|
|
6
6
|
*/
|
|
7
7
|
export declare class BankAccountDetailsV2Document implements Prediction {
|
|
8
8
|
/** Full extraction of the account holders names. */
|
|
@@ -5,7 +5,7 @@ const common_1 = require("../../../parsing/common");
|
|
|
5
5
|
const bankAccountDetailsV2Bban_1 = require("./bankAccountDetailsV2Bban");
|
|
6
6
|
const standard_1 = require("../../../parsing/standard");
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Bank Account Details API version 2.0 document data.
|
|
9
9
|
*/
|
|
10
10
|
class BankAccountDetailsV2Document {
|
|
11
11
|
constructor(rawPrediction, pageId) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Inference, StringDict, Page } from "../../../parsing/common";
|
|
2
2
|
import { CarteGriseV1Document } from "./carteGriseV1Document";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Carte Grise API version 1 inference prediction.
|
|
5
5
|
*/
|
|
6
6
|
export declare class CarteGriseV1 extends Inference {
|
|
7
7
|
/** The endpoint's name. */
|
|
@@ -4,7 +4,7 @@ exports.CarteGriseV1 = void 0;
|
|
|
4
4
|
const common_1 = require("../../../parsing/common");
|
|
5
5
|
const carteGriseV1Document_1 = require("./carteGriseV1Document");
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Carte Grise API version 1 inference prediction.
|
|
8
8
|
*/
|
|
9
9
|
class CarteGriseV1 extends common_1.Inference {
|
|
10
10
|
constructor(rawPrediction) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Prediction, StringDict } from "../../../parsing/common";
|
|
2
2
|
import { DateField, StringField } from "../../../parsing/standard";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Carte Grise API version 1.1 document data.
|
|
5
5
|
*/
|
|
6
6
|
export declare class CarteGriseV1Document implements Prediction {
|
|
7
7
|
/** The vehicle's license plate number. */
|
|
@@ -4,7 +4,7 @@ exports.CarteGriseV1Document = void 0;
|
|
|
4
4
|
const common_1 = require("../../../parsing/common");
|
|
5
5
|
const standard_1 = require("../../../parsing/standard");
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Carte Grise API version 1.1 document data.
|
|
8
8
|
*/
|
|
9
9
|
class CarteGriseV1Document {
|
|
10
10
|
constructor(rawPrediction, pageId) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Inference, StringDict, Page } from "../../../parsing/common";
|
|
2
2
|
import { CarteVitaleV1Document } from "./carteVitaleV1Document";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Carte Vitale API version 1 inference prediction.
|
|
5
5
|
*/
|
|
6
6
|
export declare class CarteVitaleV1 extends Inference {
|
|
7
7
|
/** The endpoint's name. */
|
|
@@ -4,7 +4,7 @@ exports.CarteVitaleV1 = void 0;
|
|
|
4
4
|
const common_1 = require("../../../parsing/common");
|
|
5
5
|
const carteVitaleV1Document_1 = require("./carteVitaleV1Document");
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Carte Vitale API version 1 inference prediction.
|
|
8
8
|
*/
|
|
9
9
|
class CarteVitaleV1 extends common_1.Inference {
|
|
10
10
|
constructor(rawPrediction) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Prediction, StringDict } from "../../../parsing/common";
|
|
2
2
|
import { DateField, StringField } from "../../../parsing/standard";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Carte Vitale API version 1.1 document data.
|
|
5
5
|
*/
|
|
6
6
|
export declare class CarteVitaleV1Document implements Prediction {
|
|
7
7
|
/** The given name(s) of the card holder. */
|
|
@@ -4,7 +4,7 @@ exports.CarteVitaleV1Document = void 0;
|
|
|
4
4
|
const common_1 = require("../../../parsing/common");
|
|
5
5
|
const standard_1 = require("../../../parsing/standard");
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Carte Vitale API version 1.1 document data.
|
|
8
8
|
*/
|
|
9
9
|
class CarteVitaleV1Document {
|
|
10
10
|
constructor(rawPrediction, pageId) {
|
|
@@ -2,7 +2,7 @@ import { Inference, StringDict, Page } from "../../../parsing/common";
|
|
|
2
2
|
import { IdCardV1Document } from "./idCardV1Document";
|
|
3
3
|
import { IdCardV1Page } from "./idCardV1Page";
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Carte Nationale d'Identité API version 1 inference prediction.
|
|
6
6
|
*/
|
|
7
7
|
export declare class IdCardV1 extends Inference {
|
|
8
8
|
/** The endpoint's name. */
|
|
@@ -5,7 +5,7 @@ const common_1 = require("../../../parsing/common");
|
|
|
5
5
|
const idCardV1Document_1 = require("./idCardV1Document");
|
|
6
6
|
const idCardV1Page_1 = require("./idCardV1Page");
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Carte Nationale d'Identité API version 1 inference prediction.
|
|
9
9
|
*/
|
|
10
10
|
class IdCardV1 extends common_1.Inference {
|
|
11
11
|
constructor(rawPrediction) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Prediction, StringDict } from "../../../parsing/common";
|
|
2
2
|
import { DateField, StringField } from "../../../parsing/standard";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Carte Nationale d'Identité API version 1.1 document data.
|
|
5
5
|
*/
|
|
6
6
|
export declare class IdCardV1Document implements Prediction {
|
|
7
7
|
/** The name of the issuing authority. */
|