mindee 4.17.1 → 4.18.1
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 +17 -0
- package/package.json +12 -15
- package/src/cli.js +5 -6
- package/src/client.d.ts +0 -3
- package/src/client.js +8 -8
- package/src/geometry/boundingBoxUtils.js +5 -6
- package/src/geometry/polygonUtils.js +13 -14
- package/src/http/baseEndpoint.d.ts +0 -2
- package/src/http/baseEndpoint.js +1 -1
- package/src/http/error.js +4 -4
- package/src/http/responseValidation.js +3 -4
- package/src/imageOperations/common/extractedImage.d.ts +0 -1
- package/src/imageOperations/common/imageExtractor.js +1 -2
- package/src/imageOperations/invoiceSplitterExtractor/invoiceSplitterExtractor.js +1 -2
- package/src/imageOperations/multiReceiptsExtractor/multiReceiptsExtractor.js +1 -2
- package/src/input/base.d.ts +0 -1
- package/src/input/localResponse.d.ts +0 -1
- package/src/input/localResponse.js +2 -2
- package/src/input/pageOptions.js +1 -1
- package/src/input/sources.d.ts +0 -2
- package/src/parsing/common/page.js +1 -1
- package/src/parsing/common/summaryHelper.js +4 -5
- package/src/parsing/custom/lineItems.js +2 -2
- package/src/parsing/generated/generatedObject.js +2 -2
- package/src/parsing/standard/paymentDetails.js +4 -4
- package/src/pdf/pdfOperation.d.ts +0 -1
- package/src/pdf/pdfOperation.js +2 -3
- package/src/product/businessCard/businessCardV1.d.ts +16 -0
- package/src/product/businessCard/businessCardV1.js +27 -0
- package/src/product/businessCard/businessCardV1Document.d.ts +34 -0
- package/src/product/businessCard/businessCardV1Document.js +78 -0
- package/src/product/businessCard/index.d.ts +1 -0
- package/src/product/businessCard/index.js +5 -0
- package/src/product/businessCard/internal.d.ts +2 -0
- package/src/product/businessCard/internal.js +7 -0
- package/src/product/deliveryNote/deliveryNoteV1.d.ts +16 -0
- package/src/product/deliveryNote/deliveryNoteV1.js +27 -0
- package/src/product/deliveryNote/deliveryNoteV1Document.d.ts +26 -0
- package/src/product/deliveryNote/deliveryNoteV1Document.js +54 -0
- package/src/product/deliveryNote/index.d.ts +1 -0
- package/src/product/deliveryNote/index.js +5 -0
- package/src/product/deliveryNote/internal.d.ts +2 -0
- package/src/product/deliveryNote/internal.js +7 -0
- package/src/product/financialDocument/financialDocumentV1Document.d.ts +1 -1
- package/src/product/financialDocument/financialDocumentV1Document.js +1 -1
- package/src/product/ind/index.d.ts +1 -0
- package/src/product/ind/index.js +5 -0
- package/src/product/ind/indianPassport/index.d.ts +1 -0
- package/src/product/ind/indianPassport/index.js +5 -0
- package/src/product/ind/indianPassport/indianPassportV1.d.ts +16 -0
- package/src/product/ind/indianPassport/indianPassportV1.js +27 -0
- package/src/product/ind/indianPassport/indianPassportV1Document.d.ts +58 -0
- package/src/product/ind/indianPassport/indianPassportV1Document.js +132 -0
- package/src/product/ind/indianPassport/internal.d.ts +2 -0
- package/src/product/ind/indianPassport/internal.js +7 -0
- package/src/product/ind/internal.d.ts +1 -0
- package/src/product/ind/internal.js +27 -0
- package/src/product/index.d.ts +3 -0
- package/src/product/index.js +6 -1
- package/src/product/internal.d.ts +2 -0
- package/src/product/internal.js +3 -1
- package/src/product/invoice/invoiceV4Document.d.ts +1 -1
- package/src/product/invoice/invoiceV4Document.js +1 -1
- package/src/product/resume/resumeV1Document.d.ts +1 -1
- package/src/product/resume/resumeV1Document.js +3 -2
- package/src/product/resume/resumeV1ProfessionalExperience.d.ts +2 -0
- package/src/product/resume/resumeV1ProfessionalExperience.js +10 -0
package/src/product/index.js
CHANGED
|
@@ -23,15 +23,19 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.us = exports.fr = exports.eu = exports.ResumeV1 = exports.ReceiptV5 = exports.ReceiptV4 = exports.ProofOfAddressV1 = exports.PassportV1 = exports.NutritionFactsLabelV1 = exports.MultiReceiptsDetectorV1 = exports.InvoiceSplitterV1 = exports.InvoiceV4 = exports.InternationalIdV2 = exports.InternationalIdV1 = exports.GeneratedV1 = exports.FinancialDocumentV1 = exports.CustomV1 = exports.CropperV1 = exports.BillOfLadingV1 = exports.BarcodeReaderV1 = void 0;
|
|
26
|
+
exports.us = exports.ind = exports.fr = exports.eu = exports.ResumeV1 = exports.ReceiptV5 = exports.ReceiptV4 = exports.ProofOfAddressV1 = exports.PassportV1 = exports.NutritionFactsLabelV1 = exports.MultiReceiptsDetectorV1 = exports.InvoiceSplitterV1 = exports.InvoiceV4 = exports.InternationalIdV2 = exports.InternationalIdV1 = exports.GeneratedV1 = exports.FinancialDocumentV1 = exports.DeliveryNoteV1 = exports.CustomV1 = exports.CropperV1 = exports.BusinessCardV1 = exports.BillOfLadingV1 = exports.BarcodeReaderV1 = void 0;
|
|
27
27
|
var barcodeReaderV1_1 = require("./barcodeReader/barcodeReaderV1");
|
|
28
28
|
Object.defineProperty(exports, "BarcodeReaderV1", { enumerable: true, get: function () { return barcodeReaderV1_1.BarcodeReaderV1; } });
|
|
29
29
|
var billOfLadingV1_1 = require("./billOfLading/billOfLadingV1");
|
|
30
30
|
Object.defineProperty(exports, "BillOfLadingV1", { enumerable: true, get: function () { return billOfLadingV1_1.BillOfLadingV1; } });
|
|
31
|
+
var businessCardV1_1 = require("./businessCard/businessCardV1");
|
|
32
|
+
Object.defineProperty(exports, "BusinessCardV1", { enumerable: true, get: function () { return businessCardV1_1.BusinessCardV1; } });
|
|
31
33
|
var cropperV1_1 = require("./cropper/cropperV1");
|
|
32
34
|
Object.defineProperty(exports, "CropperV1", { enumerable: true, get: function () { return cropperV1_1.CropperV1; } });
|
|
33
35
|
var customV1_1 = require("./custom/customV1");
|
|
34
36
|
Object.defineProperty(exports, "CustomV1", { enumerable: true, get: function () { return customV1_1.CustomV1; } });
|
|
37
|
+
var deliveryNoteV1_1 = require("./deliveryNote/deliveryNoteV1");
|
|
38
|
+
Object.defineProperty(exports, "DeliveryNoteV1", { enumerable: true, get: function () { return deliveryNoteV1_1.DeliveryNoteV1; } });
|
|
35
39
|
var financialDocumentV1_1 = require("./financialDocument/financialDocumentV1");
|
|
36
40
|
Object.defineProperty(exports, "FinancialDocumentV1", { enumerable: true, get: function () { return financialDocumentV1_1.FinancialDocumentV1; } });
|
|
37
41
|
var generatedV1_1 = require("./generated/generatedV1");
|
|
@@ -60,4 +64,5 @@ var resumeV1_1 = require("./resume/resumeV1");
|
|
|
60
64
|
Object.defineProperty(exports, "ResumeV1", { enumerable: true, get: function () { return resumeV1_1.ResumeV1; } });
|
|
61
65
|
exports.eu = __importStar(require("./eu"));
|
|
62
66
|
exports.fr = __importStar(require("./fr"));
|
|
67
|
+
exports.ind = __importStar(require("./ind"));
|
|
63
68
|
exports.us = __importStar(require("./us"));
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export * as barcodeReader from "./barcodeReader/internal";
|
|
2
2
|
export * as billOfLading from "./billOfLading/internal";
|
|
3
|
+
export * as businessCard from "./businessCard/internal";
|
|
3
4
|
export * as cropper from "./cropper/internal";
|
|
4
5
|
export * as custom from "./custom/internal";
|
|
6
|
+
export * as deliveryNote from "./deliveryNote/internal";
|
|
5
7
|
export * as eu from "./eu/internal";
|
|
6
8
|
export * as financialDocument from "./financialDocument/internal";
|
|
7
9
|
export * as fr from "./fr/internal";
|
package/src/product/internal.js
CHANGED
|
@@ -23,11 +23,13 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.us = exports.resume = exports.receipt = exports.proofOfAddress = exports.passport = exports.nutritionFactsLabel = exports.multiReceiptsDetector = exports.invoiceSplitter = exports.invoice = exports.internationalId = exports.generated = exports.fr = exports.financialDocument = exports.eu = exports.custom = exports.cropper = exports.billOfLading = exports.barcodeReader = void 0;
|
|
26
|
+
exports.us = exports.resume = exports.receipt = exports.proofOfAddress = exports.passport = exports.nutritionFactsLabel = exports.multiReceiptsDetector = exports.invoiceSplitter = exports.invoice = exports.internationalId = exports.generated = exports.fr = exports.financialDocument = exports.eu = exports.deliveryNote = exports.custom = exports.cropper = exports.businessCard = exports.billOfLading = exports.barcodeReader = void 0;
|
|
27
27
|
exports.barcodeReader = __importStar(require("./barcodeReader/internal"));
|
|
28
28
|
exports.billOfLading = __importStar(require("./billOfLading/internal"));
|
|
29
|
+
exports.businessCard = __importStar(require("./businessCard/internal"));
|
|
29
30
|
exports.cropper = __importStar(require("./cropper/internal"));
|
|
30
31
|
exports.custom = __importStar(require("./custom/internal"));
|
|
32
|
+
exports.deliveryNote = __importStar(require("./deliveryNote/internal"));
|
|
31
33
|
exports.eu = __importStar(require("./eu/internal"));
|
|
32
34
|
exports.financialDocument = __importStar(require("./financialDocument/internal"));
|
|
33
35
|
exports.fr = __importStar(require("./fr/internal"));
|
|
@@ -2,7 +2,7 @@ import { Prediction, StringDict } from "../../parsing/common";
|
|
|
2
2
|
import { InvoiceV4LineItem } from "./invoiceV4LineItem";
|
|
3
3
|
import { AmountField, ClassificationField, CompanyRegistrationField, DateField, LocaleField, PaymentDetailsField, StringField, Taxes } from "../../parsing/standard";
|
|
4
4
|
/**
|
|
5
|
-
* Invoice API version 4.
|
|
5
|
+
* Invoice API version 4.9 document data.
|
|
6
6
|
*/
|
|
7
7
|
export declare class InvoiceV4Document implements Prediction {
|
|
8
8
|
/** The customer's address used for billing. */
|
|
@@ -5,7 +5,7 @@ const common_1 = require("../../parsing/common");
|
|
|
5
5
|
const invoiceV4LineItem_1 = require("./invoiceV4LineItem");
|
|
6
6
|
const standard_1 = require("../../parsing/standard");
|
|
7
7
|
/**
|
|
8
|
-
* Invoice API version 4.
|
|
8
|
+
* Invoice API version 4.9 document data.
|
|
9
9
|
*/
|
|
10
10
|
class InvoiceV4Document {
|
|
11
11
|
constructor(rawPrediction, pageId) {
|
|
@@ -6,7 +6,7 @@ import { ResumeV1ProfessionalExperience } from "./resumeV1ProfessionalExperience
|
|
|
6
6
|
import { ResumeV1Certificate } from "./resumeV1Certificate";
|
|
7
7
|
import { ClassificationField, StringField } from "../../parsing/standard";
|
|
8
8
|
/**
|
|
9
|
-
* Resume API version 1.
|
|
9
|
+
* Resume API version 1.1 document data.
|
|
10
10
|
*/
|
|
11
11
|
export declare class ResumeV1Document implements Prediction {
|
|
12
12
|
/** The location information of the candidate, including city, state, and country. */
|
|
@@ -9,7 +9,7 @@ const resumeV1ProfessionalExperience_1 = require("./resumeV1ProfessionalExperien
|
|
|
9
9
|
const resumeV1Certificate_1 = require("./resumeV1Certificate");
|
|
10
10
|
const standard_1 = require("../../parsing/standard");
|
|
11
11
|
/**
|
|
12
|
-
* Resume API version 1.
|
|
12
|
+
* Resume API version 1.1 document data.
|
|
13
13
|
*/
|
|
14
14
|
class ResumeV1Document {
|
|
15
15
|
constructor(rawPrediction, pageId) {
|
|
@@ -150,10 +150,11 @@ class ResumeV1Document {
|
|
|
150
150
|
}
|
|
151
151
|
let professionalExperiencesSummary = "";
|
|
152
152
|
if (this.professionalExperiences && this.professionalExperiences.length > 0) {
|
|
153
|
-
const professionalExperiencesColSizes = [17, 12, 27, 11, 10, 22, 13, 12];
|
|
153
|
+
const professionalExperiencesColSizes = [17, 12, 38, 27, 11, 10, 22, 13, 12];
|
|
154
154
|
professionalExperiencesSummary += "\n" + (0, common_1.lineSeparator)(professionalExperiencesColSizes, "-") + "\n ";
|
|
155
155
|
professionalExperiencesSummary += "| Contract Type ";
|
|
156
156
|
professionalExperiencesSummary += "| Department ";
|
|
157
|
+
professionalExperiencesSummary += "| Description ";
|
|
157
158
|
professionalExperiencesSummary += "| Employer ";
|
|
158
159
|
professionalExperiencesSummary += "| End Month ";
|
|
159
160
|
professionalExperiencesSummary += "| End Year ";
|
|
@@ -9,6 +9,8 @@ export declare class ResumeV1ProfessionalExperience {
|
|
|
9
9
|
contractType: string | null;
|
|
10
10
|
/** The specific department or division within the company. */
|
|
11
11
|
department: string | null;
|
|
12
|
+
/** The description of the professional experience as written in the document. */
|
|
13
|
+
description: string | null;
|
|
12
14
|
/** The name of the company or organization. */
|
|
13
15
|
employer: string | null;
|
|
14
16
|
/** The month when the professional experience ended. */
|
|
@@ -23,6 +23,7 @@ class ResumeV1ProfessionalExperience {
|
|
|
23
23
|
this.polygon = [];
|
|
24
24
|
this.contractType = prediction["contract_type"];
|
|
25
25
|
this.department = prediction["department"];
|
|
26
|
+
this.description = prediction["description"];
|
|
26
27
|
this.employer = prediction["employer"];
|
|
27
28
|
this.endMonth = prediction["end_month"];
|
|
28
29
|
this.endYear = prediction["end_year"];
|
|
@@ -44,6 +45,8 @@ class ResumeV1ProfessionalExperience {
|
|
|
44
45
|
printable.contractType +
|
|
45
46
|
", Department: " +
|
|
46
47
|
printable.department +
|
|
48
|
+
", Description: " +
|
|
49
|
+
printable.description +
|
|
47
50
|
", Employer: " +
|
|
48
51
|
printable.employer +
|
|
49
52
|
", End Month: " +
|
|
@@ -67,6 +70,8 @@ class ResumeV1ProfessionalExperience {
|
|
|
67
70
|
" | " +
|
|
68
71
|
printable.department.padEnd(10) +
|
|
69
72
|
" | " +
|
|
73
|
+
printable.description.padEnd(36) +
|
|
74
|
+
" | " +
|
|
70
75
|
printable.employer.padEnd(25) +
|
|
71
76
|
" | " +
|
|
72
77
|
printable.endMonth.padEnd(9) +
|
|
@@ -94,6 +99,11 @@ _ResumeV1ProfessionalExperience_instances = new WeakSet(), _ResumeV1Professional
|
|
|
94
99
|
(0, common_1.cleanSpecialChars)(this.department) :
|
|
95
100
|
(0, common_1.cleanSpecialChars)(this.department).slice(0, 7) + "..." :
|
|
96
101
|
"",
|
|
102
|
+
description: this.description ?
|
|
103
|
+
this.description.length <= 36 ?
|
|
104
|
+
(0, common_1.cleanSpecialChars)(this.description) :
|
|
105
|
+
(0, common_1.cleanSpecialChars)(this.description).slice(0, 33) + "..." :
|
|
106
|
+
"",
|
|
97
107
|
employer: this.employer ?
|
|
98
108
|
this.employer.length <= 25 ?
|
|
99
109
|
(0, common_1.cleanSpecialChars)(this.employer) :
|