mindee 4.14.0 → 4.15.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 +19 -0
- package/README.md +9 -9
- package/package.json +3 -2
- package/src/client.d.ts +5 -3
- package/src/client.js +7 -1
- package/src/http/endpoint.d.ts +3 -1
- package/src/http/endpoint.js +12 -8
- package/src/http/responseValidation.js +11 -4
- package/src/imageOperations/invoiceSplitterExtractor/invoiceSplitterExtractor.d.ts +2 -1
- package/src/imageOperations/invoiceSplitterExtractor/invoiceSplitterExtractor.js +2 -1
- package/src/imageOperations/multiReceiptsExtractor/multiReceiptsExtractor.js +3 -1
- package/src/input/localResponse.d.ts +1 -0
- package/src/input/localResponse.js +1 -0
- package/src/parsing/common/document.d.ts +1 -0
- package/src/parsing/common/document.js +27 -6
- package/src/parsing/common/extras/fullTextOcrExtra.d.ts +11 -0
- package/src/parsing/common/extras/fullTextOcrExtra.js +20 -0
- package/src/parsing/common/extras/index.d.ts +3 -0
- package/src/parsing/common/extras/index.js +9 -0
- package/src/parsing/common/index.d.ts +1 -0
- package/src/parsing/common/index.js +25 -1
- package/src/parsing/common/page.d.ts +1 -0
- package/src/parsing/common/page.js +30 -7
- package/src/parsing/generated/generatedObject.d.ts +3 -3
- package/src/parsing/generated/generatedObject.js +14 -5
- package/src/pdf/pdfOperation.d.ts +1 -1
- package/src/pdf/pdfOperation.js +12 -7
- package/src/product/barcodeReader/index.d.ts +1 -0
- package/src/product/barcodeReader/index.js +5 -0
- package/src/product/cropper/index.d.ts +1 -0
- package/src/product/cropper/index.js +5 -0
- package/src/product/eu/driverLicense/index.d.ts +1 -0
- package/src/product/eu/driverLicense/index.js +5 -0
- package/src/product/eu/driverLicense/internal.d.ts +1 -0
- package/src/product/eu/driverLicense/internal.js +3 -1
- package/src/product/eu/index.d.ts +1 -1
- package/src/product/eu/index.js +3 -3
- package/src/product/eu/internal.d.ts +1 -1
- package/src/product/eu/internal.js +2 -2
- package/src/product/eu/licensePlate/index.d.ts +1 -0
- package/src/product/eu/licensePlate/index.js +5 -0
- package/src/product/financialDocument/index.d.ts +1 -0
- package/src/product/financialDocument/index.js +5 -0
- package/src/product/fr/bankAccountDetails/index.d.ts +2 -0
- package/src/product/fr/bankAccountDetails/index.js +7 -0
- package/src/product/fr/bankAccountDetails/internal.d.ts +1 -1
- package/src/product/fr/bankAccountDetails/internal.js +3 -3
- package/src/product/fr/carteGrise/index.d.ts +1 -0
- package/src/product/fr/carteGrise/index.js +5 -0
- package/src/product/fr/carteVitale/index.d.ts +1 -0
- package/src/product/fr/carteVitale/index.js +5 -0
- package/src/product/fr/idCard/index.d.ts +2 -0
- package/src/product/fr/idCard/index.js +7 -0
- package/src/product/fr/idCard/internal.d.ts +3 -1
- package/src/product/fr/idCard/internal.js +7 -3
- package/src/product/fr/index.d.ts +3 -3
- package/src/product/fr/index.js +7 -7
- package/src/product/fr/internal.d.ts +1 -1
- package/src/product/fr/internal.js +2 -2
- package/src/product/generated/generatedV1.js +2 -1
- package/src/product/index.d.ts +2 -2
- package/src/product/index.js +5 -5
- package/src/product/internal.d.ts +1 -1
- package/src/product/internal.js +2 -2
- package/src/product/internationalId/index.d.ts +1 -0
- package/src/product/internationalId/index.js +5 -0
- package/src/product/invoice/index.d.ts +1 -0
- package/src/product/invoice/index.js +5 -0
- package/src/product/multiReceiptsDetector/index.d.ts +1 -0
- package/src/product/multiReceiptsDetector/index.js +5 -0
- package/src/product/passport/index.d.ts +1 -0
- package/src/product/passport/index.js +5 -0
- package/src/product/proofOfAddress/index.d.ts +1 -0
- package/src/product/proofOfAddress/index.js +5 -0
- package/src/product/receipt/index.d.ts +1 -0
- package/src/product/receipt/index.js +5 -0
- package/src/product/resume/index.d.ts +1 -0
- package/src/product/resume/index.js +5 -0
- package/src/product/resume/internal.d.ts +1 -1
- package/src/product/resume/internal.js +3 -3
- package/src/product/us/bankCheck/index.d.ts +1 -0
- package/src/product/us/bankCheck/index.js +5 -0
- package/src/product/us/driverLicense/index.d.ts +1 -0
- package/src/product/us/driverLicense/index.js +5 -0
- package/src/product/us/healthcareCard/internal.d.ts +3 -0
- package/src/product/us/healthcareCard/internal.js +9 -0
- package/src/product/us/internal.d.ts +1 -0
- package/src/product/us/internal.js +2 -1
- package/src/product/us/w9/index.d.ts +1 -0
- package/src/product/us/w9/index.js +5 -0
package/src/pdf/pdfOperation.js
CHANGED
|
@@ -5,27 +5,32 @@ const handler_1 = require("../errors/handler");
|
|
|
5
5
|
const pdf_lib_1 = require("pdf-lib");
|
|
6
6
|
const input_1 = require("../input");
|
|
7
7
|
const errors_1 = require("../errors");
|
|
8
|
+
const logger_1 = require("../logger");
|
|
8
9
|
/**
|
|
9
10
|
* Cut pages from a pdf file. If pages index are out of bound, it will throw an error.
|
|
10
11
|
* @param file
|
|
11
12
|
* @param pageOptions
|
|
12
|
-
* @returns the new
|
|
13
|
+
* @returns the new cut pdf file.
|
|
13
14
|
*/
|
|
14
15
|
async function extractPages(file, pageOptions) {
|
|
15
16
|
const currentPdf = await pdf_lib_1.PDFDocument.load(file, {
|
|
16
17
|
ignoreEncryption: true,
|
|
17
18
|
});
|
|
18
19
|
const newPdf = await pdf_lib_1.PDFDocument.create();
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
if (currentPdf.getPageCount() < pageOptions.onMinPages) {
|
|
20
|
+
const pageCount = currentPdf.getPageCount();
|
|
21
|
+
if (pageCount < pageOptions.onMinPages) {
|
|
22
|
+
logger_1.logger.debug(`File skipped because it had less than ${pageOptions} pages (${pageCount}).`);
|
|
23
23
|
return { file: file, totalPagesRemoved: 0 };
|
|
24
24
|
}
|
|
25
|
+
if (pageOptions.pageIndexes.length > pageCount) {
|
|
26
|
+
handler_1.errorHandler.throw(new errors_1.MindeeError("The total indexes of pages to cut is superior to the total page count of the file (" +
|
|
27
|
+
pageCount +
|
|
28
|
+
")."));
|
|
29
|
+
}
|
|
25
30
|
const pageIndexes = [];
|
|
26
31
|
pageOptions.pageIndexes.forEach((pageIndex) => {
|
|
27
32
|
if (pageIndex < 0) {
|
|
28
|
-
pageIndexes.push(
|
|
33
|
+
pageIndexes.push(pageCount - Math.abs(pageIndex));
|
|
29
34
|
}
|
|
30
35
|
else {
|
|
31
36
|
pageIndexes.push(pageIndex);
|
|
@@ -55,7 +60,7 @@ async function extractPages(file, pageOptions) {
|
|
|
55
60
|
else {
|
|
56
61
|
throw new Error(`The operation ${pageOptions.operation} is not available.`);
|
|
57
62
|
}
|
|
58
|
-
const sumRemovedPages =
|
|
63
|
+
const sumRemovedPages = pageCount - newPdf.getPageCount();
|
|
59
64
|
const fileBuffer = Buffer.from(await newPdf.save());
|
|
60
65
|
return { file: fileBuffer, totalPagesRemoved: sumRemovedPages };
|
|
61
66
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { BarcodeReaderV1 } from "./barcodeReaderV1";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BarcodeReaderV1 = void 0;
|
|
4
|
+
var barcodeReaderV1_1 = require("./barcodeReaderV1");
|
|
5
|
+
Object.defineProperty(exports, "BarcodeReaderV1", { enumerable: true, get: function () { return barcodeReaderV1_1.BarcodeReaderV1; } });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CropperV1 } from "./cropperV1";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CropperV1 = void 0;
|
|
4
|
+
var cropperV1_1 = require("./cropperV1");
|
|
5
|
+
Object.defineProperty(exports, "CropperV1", { enumerable: true, get: function () { return cropperV1_1.CropperV1; } });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DriverLicenseV1 } from "./driverLicenseV1";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DriverLicenseV1 = void 0;
|
|
4
|
+
var driverLicenseV1_1 = require("./driverLicenseV1");
|
|
5
|
+
Object.defineProperty(exports, "DriverLicenseV1", { enumerable: true, get: function () { return driverLicenseV1_1.DriverLicenseV1; } });
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DriverLicenseV1Document = exports.DriverLicenseV1 = void 0;
|
|
3
|
+
exports.DriverLicenseV1Page = exports.DriverLicenseV1Document = exports.DriverLicenseV1 = void 0;
|
|
4
4
|
var driverLicenseV1_1 = require("./driverLicenseV1");
|
|
5
5
|
Object.defineProperty(exports, "DriverLicenseV1", { enumerable: true, get: function () { return driverLicenseV1_1.DriverLicenseV1; } });
|
|
6
6
|
var driverLicenseV1Document_1 = require("./driverLicenseV1Document");
|
|
7
7
|
Object.defineProperty(exports, "DriverLicenseV1Document", { enumerable: true, get: function () { return driverLicenseV1Document_1.DriverLicenseV1Document; } });
|
|
8
|
+
var driverLicenseV1Page_1 = require("./driverLicenseV1Page");
|
|
9
|
+
Object.defineProperty(exports, "DriverLicenseV1Page", { enumerable: true, get: function () { return driverLicenseV1Page_1.DriverLicenseV1Page; } });
|
package/src/product/eu/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
var licensePlateV1_1 = require("./licensePlate/licensePlateV1");
|
|
5
|
-
Object.defineProperty(exports, "LicensePlateV1", { enumerable: true, get: function () { return licensePlateV1_1.LicensePlateV1; } });
|
|
3
|
+
exports.LicensePlateV1 = exports.DriverLicenseV1 = void 0;
|
|
6
4
|
var driverLicenseV1_1 = require("./driverLicense/driverLicenseV1");
|
|
7
5
|
Object.defineProperty(exports, "DriverLicenseV1", { enumerable: true, get: function () { return driverLicenseV1_1.DriverLicenseV1; } });
|
|
6
|
+
var licensePlateV1_1 = require("./licensePlate/licensePlateV1");
|
|
7
|
+
Object.defineProperty(exports, "LicensePlateV1", { enumerable: true, get: function () { return licensePlateV1_1.LicensePlateV1; } });
|
|
@@ -23,6 +23,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.
|
|
27
|
-
exports.licensePlate = __importStar(require("./licensePlate/internal"));
|
|
26
|
+
exports.licensePlate = exports.driverLicense = void 0;
|
|
28
27
|
exports.driverLicense = __importStar(require("./driverLicense/internal"));
|
|
28
|
+
exports.licensePlate = __importStar(require("./licensePlate/internal"));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { LicensePlateV1 } from "./licensePlateV1";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LicensePlateV1 = void 0;
|
|
4
|
+
var licensePlateV1_1 = require("./licensePlateV1");
|
|
5
|
+
Object.defineProperty(exports, "LicensePlateV1", { enumerable: true, get: function () { return licensePlateV1_1.LicensePlateV1; } });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { FinancialDocumentV1 } from "./financialDocumentV1";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FinancialDocumentV1 = void 0;
|
|
4
|
+
var financialDocumentV1_1 = require("./financialDocumentV1");
|
|
5
|
+
Object.defineProperty(exports, "FinancialDocumentV1", { enumerable: true, get: function () { return financialDocumentV1_1.FinancialDocumentV1; } });
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BankAccountDetailsV2 = exports.BankAccountDetailsV1 = void 0;
|
|
4
|
+
var bankAccountDetailsV1_1 = require("./bankAccountDetailsV1");
|
|
5
|
+
Object.defineProperty(exports, "BankAccountDetailsV1", { enumerable: true, get: function () { return bankAccountDetailsV1_1.BankAccountDetailsV1; } });
|
|
6
|
+
var bankAccountDetailsV2_1 = require("./bankAccountDetailsV2");
|
|
7
|
+
Object.defineProperty(exports, "BankAccountDetailsV2", { enumerable: true, get: function () { return bankAccountDetailsV2_1.BankAccountDetailsV2; } });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { BankAccountDetailsV1 } from "./bankAccountDetailsV1";
|
|
2
2
|
export { BankAccountDetailsV1Document } from "./bankAccountDetailsV1Document";
|
|
3
3
|
export { BankAccountDetailsV2 } from "./bankAccountDetailsV2";
|
|
4
|
-
export { BankAccountDetailsV2Document } from "./bankAccountDetailsV2Document";
|
|
5
4
|
export { BankAccountDetailsV2Bban } from "./bankAccountDetailsV2Bban";
|
|
5
|
+
export { BankAccountDetailsV2Document } from "./bankAccountDetailsV2Document";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.BankAccountDetailsV2Document = exports.BankAccountDetailsV2Bban = exports.BankAccountDetailsV2 = exports.BankAccountDetailsV1Document = exports.BankAccountDetailsV1 = void 0;
|
|
4
4
|
var bankAccountDetailsV1_1 = require("./bankAccountDetailsV1");
|
|
5
5
|
Object.defineProperty(exports, "BankAccountDetailsV1", { enumerable: true, get: function () { return bankAccountDetailsV1_1.BankAccountDetailsV1; } });
|
|
6
6
|
var bankAccountDetailsV1Document_1 = require("./bankAccountDetailsV1Document");
|
|
7
7
|
Object.defineProperty(exports, "BankAccountDetailsV1Document", { enumerable: true, get: function () { return bankAccountDetailsV1Document_1.BankAccountDetailsV1Document; } });
|
|
8
8
|
var bankAccountDetailsV2_1 = require("./bankAccountDetailsV2");
|
|
9
9
|
Object.defineProperty(exports, "BankAccountDetailsV2", { enumerable: true, get: function () { return bankAccountDetailsV2_1.BankAccountDetailsV2; } });
|
|
10
|
-
var bankAccountDetailsV2Document_1 = require("./bankAccountDetailsV2Document");
|
|
11
|
-
Object.defineProperty(exports, "BankAccountDetailsV2Document", { enumerable: true, get: function () { return bankAccountDetailsV2Document_1.BankAccountDetailsV2Document; } });
|
|
12
10
|
var bankAccountDetailsV2Bban_1 = require("./bankAccountDetailsV2Bban");
|
|
13
11
|
Object.defineProperty(exports, "BankAccountDetailsV2Bban", { enumerable: true, get: function () { return bankAccountDetailsV2Bban_1.BankAccountDetailsV2Bban; } });
|
|
12
|
+
var bankAccountDetailsV2Document_1 = require("./bankAccountDetailsV2Document");
|
|
13
|
+
Object.defineProperty(exports, "BankAccountDetailsV2Document", { enumerable: true, get: function () { return bankAccountDetailsV2Document_1.BankAccountDetailsV2Document; } });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CarteGriseV1 } from "./carteGriseV1";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CarteGriseV1 = void 0;
|
|
4
|
+
var carteGriseV1_1 = require("./carteGriseV1");
|
|
5
|
+
Object.defineProperty(exports, "CarteGriseV1", { enumerable: true, get: function () { return carteGriseV1_1.CarteGriseV1; } });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CarteVitaleV1 } from "./carteVitaleV1";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CarteVitaleV1 = void 0;
|
|
4
|
+
var carteVitaleV1_1 = require("./carteVitaleV1");
|
|
5
|
+
Object.defineProperty(exports, "CarteVitaleV1", { enumerable: true, get: function () { return carteVitaleV1_1.CarteVitaleV1; } });
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IdCardV2 = exports.IdCardV1 = void 0;
|
|
4
|
+
var idCardV1_1 = require("./idCardV1");
|
|
5
|
+
Object.defineProperty(exports, "IdCardV1", { enumerable: true, get: function () { return idCardV1_1.IdCardV1; } });
|
|
6
|
+
var idCardV2_1 = require("./idCardV2");
|
|
7
|
+
Object.defineProperty(exports, "IdCardV2", { enumerable: true, get: function () { return idCardV2_1.IdCardV2; } });
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { IdCardV1 } from "./idCardV1";
|
|
2
|
-
export { IdCardV2 } from "./idCardV2";
|
|
3
2
|
export { IdCardV1Document } from "./idCardV1Document";
|
|
4
3
|
export { IdCardV1Page } from "./idCardV1Page";
|
|
4
|
+
export { IdCardV2 } from "./idCardV2";
|
|
5
|
+
export { IdCardV2Document } from "./idCardV2Document";
|
|
6
|
+
export { IdCardV2Page } from "./idCardV2Page";
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.IdCardV2Page = exports.IdCardV2Document = exports.IdCardV2 = exports.IdCardV1Page = exports.IdCardV1Document = exports.IdCardV1 = void 0;
|
|
4
4
|
var idCardV1_1 = require("./idCardV1");
|
|
5
5
|
Object.defineProperty(exports, "IdCardV1", { enumerable: true, get: function () { return idCardV1_1.IdCardV1; } });
|
|
6
|
-
var idCardV2_1 = require("./idCardV2");
|
|
7
|
-
Object.defineProperty(exports, "IdCardV2", { enumerable: true, get: function () { return idCardV2_1.IdCardV2; } });
|
|
8
6
|
var idCardV1Document_1 = require("./idCardV1Document");
|
|
9
7
|
Object.defineProperty(exports, "IdCardV1Document", { enumerable: true, get: function () { return idCardV1Document_1.IdCardV1Document; } });
|
|
10
8
|
var idCardV1Page_1 = require("./idCardV1Page");
|
|
11
9
|
Object.defineProperty(exports, "IdCardV1Page", { enumerable: true, get: function () { return idCardV1Page_1.IdCardV1Page; } });
|
|
10
|
+
var idCardV2_1 = require("./idCardV2");
|
|
11
|
+
Object.defineProperty(exports, "IdCardV2", { enumerable: true, get: function () { return idCardV2_1.IdCardV2; } });
|
|
12
|
+
var idCardV2Document_1 = require("./idCardV2Document");
|
|
13
|
+
Object.defineProperty(exports, "IdCardV2Document", { enumerable: true, get: function () { return idCardV2Document_1.IdCardV2Document; } });
|
|
14
|
+
var idCardV2Page_1 = require("./idCardV2Page");
|
|
15
|
+
Object.defineProperty(exports, "IdCardV2Page", { enumerable: true, get: function () { return idCardV2Page_1.IdCardV2Page; } });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { IdCardV1 } from "./idCard/idCardV1";
|
|
2
|
-
export { IdCardV2 } from "./idCard/idCardV2";
|
|
3
|
-
export { CarteGriseV1 } from "./carteGrise/carteGriseV1";
|
|
4
1
|
export { BankAccountDetailsV1 } from "./bankAccountDetails/bankAccountDetailsV1";
|
|
5
2
|
export { BankAccountDetailsV2 } from "./bankAccountDetails/bankAccountDetailsV2";
|
|
3
|
+
export { CarteGriseV1 } from "./carteGrise/carteGriseV1";
|
|
6
4
|
export { CarteVitaleV1 } from "./carteVitale/carteVitaleV1";
|
|
5
|
+
export { IdCardV1 } from "./idCard/idCardV1";
|
|
6
|
+
export { IdCardV2 } from "./idCard/idCardV2";
|
package/src/product/fr/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
var idCardV1_1 = require("./idCard/idCardV1");
|
|
5
|
-
Object.defineProperty(exports, "IdCardV1", { enumerable: true, get: function () { return idCardV1_1.IdCardV1; } });
|
|
6
|
-
var idCardV2_1 = require("./idCard/idCardV2");
|
|
7
|
-
Object.defineProperty(exports, "IdCardV2", { enumerable: true, get: function () { return idCardV2_1.IdCardV2; } });
|
|
8
|
-
var carteGriseV1_1 = require("./carteGrise/carteGriseV1");
|
|
9
|
-
Object.defineProperty(exports, "CarteGriseV1", { enumerable: true, get: function () { return carteGriseV1_1.CarteGriseV1; } });
|
|
3
|
+
exports.IdCardV2 = exports.IdCardV1 = exports.CarteVitaleV1 = exports.CarteGriseV1 = exports.BankAccountDetailsV2 = exports.BankAccountDetailsV1 = void 0;
|
|
10
4
|
var bankAccountDetailsV1_1 = require("./bankAccountDetails/bankAccountDetailsV1");
|
|
11
5
|
Object.defineProperty(exports, "BankAccountDetailsV1", { enumerable: true, get: function () { return bankAccountDetailsV1_1.BankAccountDetailsV1; } });
|
|
12
6
|
var bankAccountDetailsV2_1 = require("./bankAccountDetails/bankAccountDetailsV2");
|
|
13
7
|
Object.defineProperty(exports, "BankAccountDetailsV2", { enumerable: true, get: function () { return bankAccountDetailsV2_1.BankAccountDetailsV2; } });
|
|
8
|
+
var carteGriseV1_1 = require("./carteGrise/carteGriseV1");
|
|
9
|
+
Object.defineProperty(exports, "CarteGriseV1", { enumerable: true, get: function () { return carteGriseV1_1.CarteGriseV1; } });
|
|
14
10
|
var carteVitaleV1_1 = require("./carteVitale/carteVitaleV1");
|
|
15
11
|
Object.defineProperty(exports, "CarteVitaleV1", { enumerable: true, get: function () { return carteVitaleV1_1.CarteVitaleV1; } });
|
|
12
|
+
var idCardV1_1 = require("./idCard/idCardV1");
|
|
13
|
+
Object.defineProperty(exports, "IdCardV1", { enumerable: true, get: function () { return idCardV1_1.IdCardV1; } });
|
|
14
|
+
var idCardV2_1 = require("./idCard/idCardV2");
|
|
15
|
+
Object.defineProperty(exports, "IdCardV2", { enumerable: true, get: function () { return idCardV2_1.IdCardV2; } });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export * as bankAccountDetails from "./bankAccountDetails/internal";
|
|
2
|
+
export * as carteGrise from "./carteGrise/internal";
|
|
2
3
|
export * as carteVitale from "./carteVitale/internal";
|
|
3
4
|
export * as idCard from "./idCard/internal";
|
|
4
|
-
export * as carteGrise from "./carteGrise/internal";
|
|
@@ -23,8 +23,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.
|
|
26
|
+
exports.idCard = exports.carteVitale = exports.carteGrise = exports.bankAccountDetails = void 0;
|
|
27
27
|
exports.bankAccountDetails = __importStar(require("./bankAccountDetails/internal"));
|
|
28
|
+
exports.carteGrise = __importStar(require("./carteGrise/internal"));
|
|
28
29
|
exports.carteVitale = __importStar(require("./carteVitale/internal"));
|
|
29
30
|
exports.idCard = __importStar(require("./idCard/internal"));
|
|
30
|
-
exports.carteGrise = __importStar(require("./carteGrise/internal"));
|
|
@@ -17,7 +17,8 @@ class GeneratedV1 extends common_1.Inference {
|
|
|
17
17
|
/** The document's pages. */
|
|
18
18
|
this.pages = [];
|
|
19
19
|
this.prediction = new generatedV1Document_1.GeneratedV1Document(rawPrediction["prediction"]);
|
|
20
|
-
this.pages = rawPrediction["pages"].length > 0 && Object.keys(rawPrediction["pages"][0]["prediction"]).length > 0 ?
|
|
20
|
+
this.pages = rawPrediction["pages"].length > 0 && Object.keys(rawPrediction["pages"][0]["prediction"]).length > 0 ?
|
|
21
|
+
rawPrediction["pages"].map((page) => new common_1.Page(generatedV1Page_1.GeneratedV1Page, page, page["id"])) : [];
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
24
|
exports.GeneratedV1 = GeneratedV1;
|
package/src/product/index.d.ts
CHANGED
|
@@ -2,11 +2,11 @@ export { BarcodeReaderV1 } from "./barcodeReader/barcodeReaderV1";
|
|
|
2
2
|
export { CropperV1 } from "./cropper/cropperV1";
|
|
3
3
|
export { CustomV1 } from "./custom/customV1";
|
|
4
4
|
export { FinancialDocumentV1 } from "./financialDocument/financialDocumentV1";
|
|
5
|
-
export {
|
|
5
|
+
export { GeneratedV1 } from "./generated/generatedV1";
|
|
6
6
|
export { InternationalIdV1 } from "./internationalId/internationalIdV1";
|
|
7
7
|
export { InternationalIdV2 } from "./internationalId/internationalIdV2";
|
|
8
|
+
export { InvoiceV4 } from "./invoice/invoiceV4";
|
|
8
9
|
export { InvoiceSplitterV1 } from "./invoiceSplitter/invoiceSplitterV1";
|
|
9
|
-
export { GeneratedV1 } from "./generated/generatedV1";
|
|
10
10
|
export { MultiReceiptsDetectorV1 } from "./multiReceiptsDetector/multiReceiptsDetectorV1";
|
|
11
11
|
export { PassportV1 } from "./passport/passportV1";
|
|
12
12
|
export { ProofOfAddressV1 } from "./proofOfAddress/proofOfAddressV1";
|
package/src/product/index.js
CHANGED
|
@@ -23,7 +23,7 @@ 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.MultiReceiptsDetectorV1 = exports.
|
|
26
|
+
exports.us = exports.fr = exports.eu = exports.ResumeV1 = exports.ReceiptV5 = exports.ReceiptV4 = exports.ProofOfAddressV1 = exports.PassportV1 = exports.MultiReceiptsDetectorV1 = exports.InvoiceSplitterV1 = exports.InvoiceV4 = exports.InternationalIdV2 = exports.InternationalIdV1 = exports.GeneratedV1 = exports.FinancialDocumentV1 = exports.CustomV1 = exports.CropperV1 = 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 cropperV1_1 = require("./cropper/cropperV1");
|
|
@@ -32,16 +32,16 @@ var customV1_1 = require("./custom/customV1");
|
|
|
32
32
|
Object.defineProperty(exports, "CustomV1", { enumerable: true, get: function () { return customV1_1.CustomV1; } });
|
|
33
33
|
var financialDocumentV1_1 = require("./financialDocument/financialDocumentV1");
|
|
34
34
|
Object.defineProperty(exports, "FinancialDocumentV1", { enumerable: true, get: function () { return financialDocumentV1_1.FinancialDocumentV1; } });
|
|
35
|
-
var
|
|
36
|
-
Object.defineProperty(exports, "
|
|
35
|
+
var generatedV1_1 = require("./generated/generatedV1");
|
|
36
|
+
Object.defineProperty(exports, "GeneratedV1", { enumerable: true, get: function () { return generatedV1_1.GeneratedV1; } });
|
|
37
37
|
var internationalIdV1_1 = require("./internationalId/internationalIdV1");
|
|
38
38
|
Object.defineProperty(exports, "InternationalIdV1", { enumerable: true, get: function () { return internationalIdV1_1.InternationalIdV1; } });
|
|
39
39
|
var internationalIdV2_1 = require("./internationalId/internationalIdV2");
|
|
40
40
|
Object.defineProperty(exports, "InternationalIdV2", { enumerable: true, get: function () { return internationalIdV2_1.InternationalIdV2; } });
|
|
41
|
+
var invoiceV4_1 = require("./invoice/invoiceV4");
|
|
42
|
+
Object.defineProperty(exports, "InvoiceV4", { enumerable: true, get: function () { return invoiceV4_1.InvoiceV4; } });
|
|
41
43
|
var invoiceSplitterV1_1 = require("./invoiceSplitter/invoiceSplitterV1");
|
|
42
44
|
Object.defineProperty(exports, "InvoiceSplitterV1", { enumerable: true, get: function () { return invoiceSplitterV1_1.InvoiceSplitterV1; } });
|
|
43
|
-
var generatedV1_1 = require("./generated/generatedV1");
|
|
44
|
-
Object.defineProperty(exports, "GeneratedV1", { enumerable: true, get: function () { return generatedV1_1.GeneratedV1; } });
|
|
45
45
|
var multiReceiptsDetectorV1_1 = require("./multiReceiptsDetector/multiReceiptsDetectorV1");
|
|
46
46
|
Object.defineProperty(exports, "MultiReceiptsDetectorV1", { enumerable: true, get: function () { return multiReceiptsDetectorV1_1.MultiReceiptsDetectorV1; } });
|
|
47
47
|
var passportV1_1 = require("./passport/passportV1");
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export * as barcodeReader from "./barcodeReader/internal";
|
|
2
2
|
export * as cropper from "./cropper/internal";
|
|
3
3
|
export * as custom from "./custom/internal";
|
|
4
|
-
export * as generated from "./generated/internal";
|
|
5
4
|
export * as eu from "./eu/internal";
|
|
6
5
|
export * as financialDocument from "./financialDocument/internal";
|
|
7
6
|
export * as fr from "./fr/internal";
|
|
7
|
+
export * as generated from "./generated/internal";
|
|
8
8
|
export * as internationalId from "./internationalId/internal";
|
|
9
9
|
export * as invoice from "./invoice/internal";
|
|
10
10
|
export * as invoiceSplitter from "./invoiceSplitter/internal";
|
package/src/product/internal.js
CHANGED
|
@@ -23,14 +23,14 @@ 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.multiReceiptsDetector = exports.invoiceSplitter = exports.invoice = exports.internationalId = exports.
|
|
26
|
+
exports.us = exports.resume = exports.receipt = exports.proofOfAddress = exports.passport = exports.multiReceiptsDetector = exports.invoiceSplitter = exports.invoice = exports.internationalId = exports.generated = exports.fr = exports.financialDocument = exports.eu = exports.custom = exports.cropper = exports.barcodeReader = void 0;
|
|
27
27
|
exports.barcodeReader = __importStar(require("./barcodeReader/internal"));
|
|
28
28
|
exports.cropper = __importStar(require("./cropper/internal"));
|
|
29
29
|
exports.custom = __importStar(require("./custom/internal"));
|
|
30
|
-
exports.generated = __importStar(require("./generated/internal"));
|
|
31
30
|
exports.eu = __importStar(require("./eu/internal"));
|
|
32
31
|
exports.financialDocument = __importStar(require("./financialDocument/internal"));
|
|
33
32
|
exports.fr = __importStar(require("./fr/internal"));
|
|
33
|
+
exports.generated = __importStar(require("./generated/internal"));
|
|
34
34
|
exports.internationalId = __importStar(require("./internationalId/internal"));
|
|
35
35
|
exports.invoice = __importStar(require("./invoice/internal"));
|
|
36
36
|
exports.invoiceSplitter = __importStar(require("./invoiceSplitter/internal"));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { InternationalIdV2 } from "./internationalIdV2";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InternationalIdV2 = void 0;
|
|
4
|
+
var internationalIdV2_1 = require("./internationalIdV2");
|
|
5
|
+
Object.defineProperty(exports, "InternationalIdV2", { enumerable: true, get: function () { return internationalIdV2_1.InternationalIdV2; } });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { InvoiceV4 } from "./invoiceV4";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InvoiceV4 = void 0;
|
|
4
|
+
var invoiceV4_1 = require("./invoiceV4");
|
|
5
|
+
Object.defineProperty(exports, "InvoiceV4", { enumerable: true, get: function () { return invoiceV4_1.InvoiceV4; } });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MultiReceiptsDetectorV1 } from "./multiReceiptsDetectorV1";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MultiReceiptsDetectorV1 = void 0;
|
|
4
|
+
var multiReceiptsDetectorV1_1 = require("./multiReceiptsDetectorV1");
|
|
5
|
+
Object.defineProperty(exports, "MultiReceiptsDetectorV1", { enumerable: true, get: function () { return multiReceiptsDetectorV1_1.MultiReceiptsDetectorV1; } });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PassportV1 } from "./passportV1";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PassportV1 = void 0;
|
|
4
|
+
var passportV1_1 = require("./passportV1");
|
|
5
|
+
Object.defineProperty(exports, "PassportV1", { enumerable: true, get: function () { return passportV1_1.PassportV1; } });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ProofOfAddressV1 } from "./proofOfAddressV1";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProofOfAddressV1 = void 0;
|
|
4
|
+
var proofOfAddressV1_1 = require("./proofOfAddressV1");
|
|
5
|
+
Object.defineProperty(exports, "ProofOfAddressV1", { enumerable: true, get: function () { return proofOfAddressV1_1.ProofOfAddressV1; } });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ReceiptV5 } from "./receiptV5";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ReceiptV5 = void 0;
|
|
4
|
+
var receiptV5_1 = require("./receiptV5");
|
|
5
|
+
Object.defineProperty(exports, "ReceiptV5", { enumerable: true, get: function () { return receiptV5_1.ReceiptV5; } });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ResumeV1 } from "./resumeV1";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { ResumeV1 } from "./resumeV1";
|
|
2
|
-
export { ResumeV1Document } from "./resumeV1Document";
|
|
3
2
|
export { ResumeV1Certificate } from "./resumeV1Certificate";
|
|
3
|
+
export { ResumeV1Document } from "./resumeV1Document";
|
|
4
4
|
export { ResumeV1Education } from "./resumeV1Education";
|
|
5
5
|
export { ResumeV1Language } from "./resumeV1Language";
|
|
6
6
|
export { ResumeV1ProfessionalExperience } from "./resumeV1ProfessionalExperience";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ResumeV1SocialNetworksUrl = exports.ResumeV1ProfessionalExperience = exports.ResumeV1Language = exports.ResumeV1Education = exports.
|
|
3
|
+
exports.ResumeV1SocialNetworksUrl = exports.ResumeV1ProfessionalExperience = exports.ResumeV1Language = exports.ResumeV1Education = exports.ResumeV1Document = exports.ResumeV1Certificate = exports.ResumeV1 = void 0;
|
|
4
4
|
var resumeV1_1 = require("./resumeV1");
|
|
5
5
|
Object.defineProperty(exports, "ResumeV1", { enumerable: true, get: function () { return resumeV1_1.ResumeV1; } });
|
|
6
|
-
var resumeV1Document_1 = require("./resumeV1Document");
|
|
7
|
-
Object.defineProperty(exports, "ResumeV1Document", { enumerable: true, get: function () { return resumeV1Document_1.ResumeV1Document; } });
|
|
8
6
|
var resumeV1Certificate_1 = require("./resumeV1Certificate");
|
|
9
7
|
Object.defineProperty(exports, "ResumeV1Certificate", { enumerable: true, get: function () { return resumeV1Certificate_1.ResumeV1Certificate; } });
|
|
8
|
+
var resumeV1Document_1 = require("./resumeV1Document");
|
|
9
|
+
Object.defineProperty(exports, "ResumeV1Document", { enumerable: true, get: function () { return resumeV1Document_1.ResumeV1Document; } });
|
|
10
10
|
var resumeV1Education_1 = require("./resumeV1Education");
|
|
11
11
|
Object.defineProperty(exports, "ResumeV1Education", { enumerable: true, get: function () { return resumeV1Education_1.ResumeV1Education; } });
|
|
12
12
|
var resumeV1Language_1 = require("./resumeV1Language");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { BankCheckV1 } from "./bankCheckV1";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BankCheckV1 = void 0;
|
|
4
|
+
var bankCheckV1_1 = require("./bankCheckV1");
|
|
5
|
+
Object.defineProperty(exports, "BankCheckV1", { enumerable: true, get: function () { return bankCheckV1_1.BankCheckV1; } });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DriverLicenseV1 } from "./driverLicenseV1";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DriverLicenseV1 = void 0;
|
|
4
|
+
var driverLicenseV1_1 = require("./driverLicenseV1");
|
|
5
|
+
Object.defineProperty(exports, "DriverLicenseV1", { enumerable: true, get: function () { return driverLicenseV1_1.DriverLicenseV1; } });
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HealthcareCardV1Document = exports.HealthcareCardV1Copay = exports.HealthcareCardV1 = void 0;
|
|
4
|
+
var healthcareCardV1_1 = require("./healthcareCardV1");
|
|
5
|
+
Object.defineProperty(exports, "HealthcareCardV1", { enumerable: true, get: function () { return healthcareCardV1_1.HealthcareCardV1; } });
|
|
6
|
+
var healthcareCardV1Copay_1 = require("./healthcareCardV1Copay");
|
|
7
|
+
Object.defineProperty(exports, "HealthcareCardV1Copay", { enumerable: true, get: function () { return healthcareCardV1Copay_1.HealthcareCardV1Copay; } });
|
|
8
|
+
var healthcareCardV1Document_1 = require("./healthcareCardV1Document");
|
|
9
|
+
Object.defineProperty(exports, "HealthcareCardV1Document", { enumerable: true, get: function () { return healthcareCardV1Document_1.HealthcareCardV1Document; } });
|
|
@@ -23,8 +23,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.w9 = exports.usMail = exports.driverLicense = exports.bankCheck = void 0;
|
|
26
|
+
exports.w9 = exports.usMail = exports.us = exports.driverLicense = exports.bankCheck = void 0;
|
|
27
27
|
exports.bankCheck = __importStar(require("./bankCheck/internal"));
|
|
28
28
|
exports.driverLicense = __importStar(require("./driverLicense/internal"));
|
|
29
|
+
exports.us = __importStar(require("./healthcareCard/internal"));
|
|
29
30
|
exports.usMail = __importStar(require("./usMail/internal"));
|
|
30
31
|
exports.w9 = __importStar(require("./w9/internal"));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { W9V1 } from "./w9V1";
|