mindee 4.19.0 → 4.21.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.
Files changed (90) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +25 -11
  3. package/package.json +1 -1
  4. package/src/cli.js +10 -20
  5. package/src/client.d.ts +3 -3
  6. package/src/client.js +2 -2
  7. package/src/http/baseEndpoint.js +2 -2
  8. package/src/http/endpoint.js +2 -2
  9. package/src/http/workflowEndpoint.js +2 -2
  10. package/src/imageOperations/invoiceSplitterExtractor/invoiceSplitterExtractor.d.ts +1 -1
  11. package/src/imageOperations/multiReceiptsExtractor/multiReceiptsExtractor.d.ts +1 -1
  12. package/src/input/index.d.ts +1 -2
  13. package/src/input/index.js +16 -15
  14. package/src/input/sources/base64Input.d.ts +12 -0
  15. package/src/input/sources/base64Input.js +22 -0
  16. package/src/input/sources/bufferInput.d.ts +10 -0
  17. package/src/input/sources/bufferInput.js +18 -0
  18. package/src/input/sources/bytesInput.d.ts +12 -0
  19. package/src/input/sources/bytesInput.js +21 -0
  20. package/src/input/sources/index.d.ts +8 -0
  21. package/src/input/sources/index.js +24 -0
  22. package/src/input/sources/inputSource.d.ts +16 -0
  23. package/src/input/sources/inputSource.js +17 -0
  24. package/src/input/sources/localInputSource.d.ts +20 -0
  25. package/src/input/{base.js → sources/localInputSource.js} +16 -26
  26. package/src/input/sources/pathInput.d.ts +11 -0
  27. package/src/input/sources/pathInput.js +27 -0
  28. package/src/input/sources/streamInput.d.ts +14 -0
  29. package/src/input/sources/streamInput.js +28 -0
  30. package/src/input/sources/urlInput.d.ts +32 -0
  31. package/src/input/sources/urlInput.js +98 -0
  32. package/src/product/driverLicense/driverLicenseV1.d.ts +16 -0
  33. package/src/product/driverLicense/driverLicenseV1.js +27 -0
  34. package/src/product/driverLicense/driverLicenseV1Document.d.ts +38 -0
  35. package/src/product/driverLicense/driverLicenseV1Document.js +84 -0
  36. package/src/product/driverLicense/index.d.ts +1 -0
  37. package/src/product/driverLicense/index.js +5 -0
  38. package/src/product/driverLicense/internal.d.ts +2 -0
  39. package/src/product/driverLicense/internal.js +7 -0
  40. package/src/product/fr/{carteVitale/carteVitaleV1.d.ts → healthCard/healthCardV1.d.ts} +5 -5
  41. package/src/product/fr/{carteVitale/carteVitaleV1.js → healthCard/healthCardV1.js} +8 -8
  42. package/src/product/fr/{carteVitale/carteVitaleV1Document.d.ts → healthCard/healthCardV1Document.d.ts} +5 -5
  43. package/src/product/fr/{carteVitale/carteVitaleV1Document.js → healthCard/healthCardV1Document.js} +5 -5
  44. package/src/product/fr/healthCard/index.d.ts +1 -0
  45. package/src/product/fr/healthCard/index.js +5 -0
  46. package/src/product/fr/healthCard/internal.d.ts +2 -0
  47. package/src/product/fr/healthCard/internal.js +7 -0
  48. package/src/product/fr/index.d.ts +2 -1
  49. package/src/product/fr/index.js +5 -3
  50. package/src/product/fr/internal.d.ts +1 -1
  51. package/src/product/fr/internal.js +2 -2
  52. package/src/product/fr/payslip/index.d.ts +1 -0
  53. package/src/product/fr/payslip/index.js +3 -1
  54. package/src/product/fr/payslip/internal.d.ts +10 -0
  55. package/src/product/fr/payslip/internal.js +21 -1
  56. package/src/product/fr/payslip/payslipV3.d.ts +16 -0
  57. package/src/product/fr/payslip/payslipV3.js +27 -0
  58. package/src/product/fr/payslip/payslipV3BankAccountDetail.d.ts +32 -0
  59. package/src/product/fr/payslip/payslipV3BankAccountDetail.js +62 -0
  60. package/src/product/fr/payslip/payslipV3Document.d.ts +35 -0
  61. package/src/product/fr/payslip/payslipV3Document.js +96 -0
  62. package/src/product/fr/payslip/payslipV3Employee.d.ts +40 -0
  63. package/src/product/fr/payslip/payslipV3Employee.js +82 -0
  64. package/src/product/fr/payslip/payslipV3Employer.d.ts +40 -0
  65. package/src/product/fr/payslip/payslipV3Employer.js +82 -0
  66. package/src/product/fr/payslip/payslipV3Employment.d.ts +40 -0
  67. package/src/product/fr/payslip/payslipV3Employment.js +82 -0
  68. package/src/product/fr/payslip/payslipV3PaidTimeOff.d.ts +36 -0
  69. package/src/product/fr/payslip/payslipV3PaidTimeOff.js +107 -0
  70. package/src/product/fr/payslip/payslipV3PayDetail.d.ts +46 -0
  71. package/src/product/fr/payslip/payslipV3PayDetail.js +168 -0
  72. package/src/product/fr/payslip/payslipV3PayPeriod.d.ts +36 -0
  73. package/src/product/fr/payslip/payslipV3PayPeriod.js +72 -0
  74. package/src/product/fr/payslip/payslipV3SalaryDetail.d.ts +36 -0
  75. package/src/product/fr/payslip/payslipV3SalaryDetail.js +110 -0
  76. package/src/product/ind/indianPassport/indianPassportV1Document.d.ts +1 -1
  77. package/src/product/ind/indianPassport/indianPassportV1Document.js +1 -1
  78. package/src/product/index.d.ts +1 -0
  79. package/src/product/index.js +3 -1
  80. package/src/product/internal.d.ts +1 -0
  81. package/src/product/internal.js +2 -1
  82. package/src/product/resume/resumeV1Document.d.ts +1 -1
  83. package/src/product/resume/resumeV1Document.js +1 -1
  84. package/src/input/base.d.ts +0 -36
  85. package/src/input/sources.d.ts +0 -59
  86. package/src/input/sources.js +0 -133
  87. package/src/product/fr/carteVitale/index.d.ts +0 -1
  88. package/src/product/fr/carteVitale/index.js +0 -5
  89. package/src/product/fr/carteVitale/internal.d.ts +0 -2
  90. package/src/product/fr/carteVitale/internal.js +0 -7
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StreamInput = void 0;
4
+ const localInputSource_1 = require("./localInputSource");
5
+ const inputSource_1 = require("./inputSource");
6
+ class StreamInput extends localInputSource_1.LocalInputSource {
7
+ constructor({ inputStream, filename }) {
8
+ super({
9
+ inputType: inputSource_1.INPUT_TYPE_STREAM,
10
+ });
11
+ this.fileObject = Buffer.alloc(0);
12
+ this.filename = filename;
13
+ this.inputStream = inputStream;
14
+ }
15
+ async init() {
16
+ this.fileObject = await this.stream2buffer(this.inputStream);
17
+ this.mimeType = await this.checkMimetype();
18
+ }
19
+ async stream2buffer(stream) {
20
+ return new Promise((resolve, reject) => {
21
+ const _buf = Array();
22
+ stream.on("data", (chunk) => _buf.push(chunk));
23
+ stream.on("end", () => resolve(Buffer.concat(_buf)));
24
+ stream.on("error", (err) => reject(`Error converting stream - ${err}`));
25
+ });
26
+ }
27
+ }
28
+ exports.StreamInput = StreamInput;
@@ -0,0 +1,32 @@
1
+ import { InputSource } from "./inputSource";
2
+ import { BytesInput } from "./bytesInput";
3
+ export declare class UrlInput extends InputSource {
4
+ private readonly url;
5
+ constructor({ url }: {
6
+ url: string;
7
+ });
8
+ init(): Promise<void>;
9
+ private fetchFileContent;
10
+ saveToFile(options: {
11
+ filepath: string;
12
+ filename?: string;
13
+ username?: string;
14
+ password?: string;
15
+ token?: string;
16
+ headers?: Record<string, string>;
17
+ maxRedirects?: number;
18
+ }): Promise<string>;
19
+ asLocalInputSource(options?: {
20
+ filename?: string;
21
+ username?: string;
22
+ password?: string;
23
+ token?: string;
24
+ headers?: Record<string, string>;
25
+ maxRedirects?: number;
26
+ }): Promise<BytesInput>;
27
+ private static extractFilenameFromUrl;
28
+ private static generateFileName;
29
+ private static getFileExtension;
30
+ private fillFilename;
31
+ private makeRequest;
32
+ }
@@ -0,0 +1,98 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UrlInput = void 0;
4
+ const inputSource_1 = require("./inputSource");
5
+ const url_1 = require("url");
6
+ const path_1 = require("path");
7
+ const crypto_1 = require("crypto");
8
+ const promises_1 = require("fs/promises");
9
+ const https_1 = require("https");
10
+ const bytesInput_1 = require("./bytesInput");
11
+ class UrlInput extends inputSource_1.InputSource {
12
+ constructor({ url }) {
13
+ super();
14
+ this.url = url;
15
+ }
16
+ async init() {
17
+ if (!this.url.toLowerCase().startsWith("https")) {
18
+ throw new Error("URL must be HTTPS");
19
+ }
20
+ this.fileObject = this.url;
21
+ }
22
+ async fetchFileContent(options) {
23
+ const { username, password, token, headers = {}, maxRedirects = 3 } = options;
24
+ if (token) {
25
+ headers["Authorization"] = `Bearer ${token}`;
26
+ }
27
+ const auth = username && password ? `${username}:${password}` : undefined;
28
+ return await this.makeRequest(this.url, auth, headers, 0, maxRedirects);
29
+ }
30
+ async saveToFile(options) {
31
+ const { filepath, filename, ...fetchOptions } = options;
32
+ const { content, finalUrl } = await this.fetchFileContent(fetchOptions);
33
+ const finalFilename = this.fillFilename(filename, finalUrl);
34
+ const fullPath = `${filepath}/${finalFilename}`;
35
+ await (0, promises_1.writeFile)(fullPath, content);
36
+ return fullPath;
37
+ }
38
+ async asLocalInputSource(options = {}) {
39
+ const { filename, ...fetchOptions } = options;
40
+ const { content, finalUrl } = await this.fetchFileContent(fetchOptions);
41
+ const finalFilename = this.fillFilename(filename, finalUrl);
42
+ return new bytesInput_1.BytesInput({ inputBytes: content, filename: finalFilename });
43
+ }
44
+ static extractFilenameFromUrl(uri) {
45
+ return (0, path_1.basename)(new url_1.URL(uri).pathname || "");
46
+ }
47
+ static generateFileName(extension = ".tmp") {
48
+ const randomString = (0, crypto_1.randomBytes)(4).toString("hex");
49
+ const timestamp = new Date().toISOString().replace(/[-:]/g, "").split(".")[0];
50
+ return `mindee_temp_${timestamp}_${randomString}${extension}`;
51
+ }
52
+ static getFileExtension(filename) {
53
+ const ext = (0, path_1.extname)(filename);
54
+ return ext ? ext.toLowerCase() : null;
55
+ }
56
+ fillFilename(filename, finalUrl) {
57
+ if (!filename) {
58
+ filename = finalUrl ? UrlInput.extractFilenameFromUrl(finalUrl) : UrlInput.extractFilenameFromUrl(this.url);
59
+ }
60
+ if (!filename || !(0, path_1.extname)(filename)) {
61
+ filename = UrlInput.generateFileName(UrlInput.getFileExtension(filename || "") || undefined);
62
+ }
63
+ return filename;
64
+ }
65
+ async makeRequest(url, auth, headers, redirects, maxRedirects) {
66
+ const parsedUrl = new url_1.URL(url);
67
+ const options = {
68
+ hostname: parsedUrl.hostname,
69
+ path: parsedUrl.pathname + parsedUrl.search,
70
+ method: "GET",
71
+ headers: headers,
72
+ auth: auth,
73
+ };
74
+ const response = await new Promise((resolve, reject) => {
75
+ const req = (0, https_1.request)(options, resolve);
76
+ req.on("error", reject);
77
+ req.end();
78
+ });
79
+ if (response.statusCode && response.statusCode >= 300 && response.statusCode < 400) {
80
+ if (redirects === maxRedirects) {
81
+ throw new Error(`Can't reach URL after ${redirects} out of ${maxRedirects} redirects, aborting operation.`);
82
+ }
83
+ if (response.headers.location) {
84
+ return await this.makeRequest(response.headers.location, auth, headers, redirects + 1, maxRedirects);
85
+ }
86
+ throw new Error("Redirect location not found");
87
+ }
88
+ if (!response.statusCode || response.statusCode >= 400 || response.statusCode < 200) {
89
+ throw new Error(`Couldn't retrieve file from server, error code ${response.statusCode}.`);
90
+ }
91
+ const chunks = [];
92
+ for await (const chunk of response) {
93
+ chunks.push(chunk);
94
+ }
95
+ return { content: Buffer.concat(chunks), finalUrl: url };
96
+ }
97
+ }
98
+ exports.UrlInput = UrlInput;
@@ -0,0 +1,16 @@
1
+ import { Inference, StringDict, Page } from "../../parsing/common";
2
+ import { DriverLicenseV1Document } from "./driverLicenseV1Document";
3
+ /**
4
+ * Driver License API version 1 inference prediction.
5
+ */
6
+ export declare class DriverLicenseV1 extends Inference {
7
+ /** The endpoint's name. */
8
+ endpointName: string;
9
+ /** The endpoint's version. */
10
+ endpointVersion: string;
11
+ /** The document-level prediction. */
12
+ prediction: DriverLicenseV1Document;
13
+ /** The document's pages. */
14
+ pages: Page<DriverLicenseV1Document>[];
15
+ constructor(rawPrediction: StringDict);
16
+ }
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DriverLicenseV1 = void 0;
4
+ const common_1 = require("../../parsing/common");
5
+ const driverLicenseV1Document_1 = require("./driverLicenseV1Document");
6
+ /**
7
+ * Driver License API version 1 inference prediction.
8
+ */
9
+ class DriverLicenseV1 extends common_1.Inference {
10
+ constructor(rawPrediction) {
11
+ super(rawPrediction);
12
+ /** The endpoint's name. */
13
+ this.endpointName = "driver_license";
14
+ /** The endpoint's version. */
15
+ this.endpointVersion = "1";
16
+ /** The document's pages. */
17
+ this.pages = [];
18
+ this.prediction = new driverLicenseV1Document_1.DriverLicenseV1Document(rawPrediction["prediction"]);
19
+ rawPrediction["pages"].forEach((page) => {
20
+ if (page.prediction !== undefined && page.prediction !== null &&
21
+ Object.keys(page.prediction).length > 0) {
22
+ this.pages.push(new common_1.Page(driverLicenseV1Document_1.DriverLicenseV1Document, page, page["id"], page["orientation"]));
23
+ }
24
+ });
25
+ }
26
+ }
27
+ exports.DriverLicenseV1 = DriverLicenseV1;
@@ -0,0 +1,38 @@
1
+ import { Prediction, StringDict } from "../../parsing/common";
2
+ import { DateField, StringField } from "../../parsing/standard";
3
+ /**
4
+ * Driver License API version 1.0 document data.
5
+ */
6
+ export declare class DriverLicenseV1Document implements Prediction {
7
+ /** The category or class of the driver license. */
8
+ category: StringField;
9
+ /** The alpha-3 ISO 3166 code of the country where the driver license was issued. */
10
+ countryCode: StringField;
11
+ /** The date of birth of the driver license holder. */
12
+ dateOfBirth: DateField;
13
+ /** The DD number of the driver license. */
14
+ ddNumber: StringField;
15
+ /** The expiry date of the driver license. */
16
+ expiryDate: DateField;
17
+ /** The first name of the driver license holder. */
18
+ firstName: StringField;
19
+ /** The unique identifier of the driver license. */
20
+ id: StringField;
21
+ /** The date when the driver license was issued. */
22
+ issuedDate: DateField;
23
+ /** The authority that issued the driver license. */
24
+ issuingAuthority: StringField;
25
+ /** The last name of the driver license holder. */
26
+ lastName: StringField;
27
+ /** The Machine Readable Zone (MRZ) of the driver license. */
28
+ mrz: StringField;
29
+ /** The place of birth of the driver license holder. */
30
+ placeOfBirth: StringField;
31
+ /** Second part of the ISO 3166-2 code, consisting of two letters indicating the US State. */
32
+ state: StringField;
33
+ constructor(rawPrediction: StringDict, pageId?: number);
34
+ /**
35
+ * Default string representation.
36
+ */
37
+ toString(): string;
38
+ }
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DriverLicenseV1Document = void 0;
4
+ const common_1 = require("../../parsing/common");
5
+ const standard_1 = require("../../parsing/standard");
6
+ /**
7
+ * Driver License API version 1.0 document data.
8
+ */
9
+ class DriverLicenseV1Document {
10
+ constructor(rawPrediction, pageId) {
11
+ this.category = new standard_1.StringField({
12
+ prediction: rawPrediction["category"],
13
+ pageId: pageId,
14
+ });
15
+ this.countryCode = new standard_1.StringField({
16
+ prediction: rawPrediction["country_code"],
17
+ pageId: pageId,
18
+ });
19
+ this.dateOfBirth = new standard_1.DateField({
20
+ prediction: rawPrediction["date_of_birth"],
21
+ pageId: pageId,
22
+ });
23
+ this.ddNumber = new standard_1.StringField({
24
+ prediction: rawPrediction["dd_number"],
25
+ pageId: pageId,
26
+ });
27
+ this.expiryDate = new standard_1.DateField({
28
+ prediction: rawPrediction["expiry_date"],
29
+ pageId: pageId,
30
+ });
31
+ this.firstName = new standard_1.StringField({
32
+ prediction: rawPrediction["first_name"],
33
+ pageId: pageId,
34
+ });
35
+ this.id = new standard_1.StringField({
36
+ prediction: rawPrediction["id"],
37
+ pageId: pageId,
38
+ });
39
+ this.issuedDate = new standard_1.DateField({
40
+ prediction: rawPrediction["issued_date"],
41
+ pageId: pageId,
42
+ });
43
+ this.issuingAuthority = new standard_1.StringField({
44
+ prediction: rawPrediction["issuing_authority"],
45
+ pageId: pageId,
46
+ });
47
+ this.lastName = new standard_1.StringField({
48
+ prediction: rawPrediction["last_name"],
49
+ pageId: pageId,
50
+ });
51
+ this.mrz = new standard_1.StringField({
52
+ prediction: rawPrediction["mrz"],
53
+ pageId: pageId,
54
+ });
55
+ this.placeOfBirth = new standard_1.StringField({
56
+ prediction: rawPrediction["place_of_birth"],
57
+ pageId: pageId,
58
+ });
59
+ this.state = new standard_1.StringField({
60
+ prediction: rawPrediction["state"],
61
+ pageId: pageId,
62
+ });
63
+ }
64
+ /**
65
+ * Default string representation.
66
+ */
67
+ toString() {
68
+ const outStr = `:Country Code: ${this.countryCode}
69
+ :State: ${this.state}
70
+ :ID: ${this.id}
71
+ :Category: ${this.category}
72
+ :Last Name: ${this.lastName}
73
+ :First Name: ${this.firstName}
74
+ :Date of Birth: ${this.dateOfBirth}
75
+ :Place of Birth: ${this.placeOfBirth}
76
+ :Expiry Date: ${this.expiryDate}
77
+ :Issued Date: ${this.issuedDate}
78
+ :Issuing Authority: ${this.issuingAuthority}
79
+ :MRZ: ${this.mrz}
80
+ :DD Number: ${this.ddNumber}`.trimEnd();
81
+ return (0, common_1.cleanOutString)(outStr);
82
+ }
83
+ }
84
+ exports.DriverLicenseV1Document = DriverLicenseV1Document;
@@ -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,2 @@
1
+ export { DriverLicenseV1 } from "./driverLicenseV1";
2
+ export { DriverLicenseV1Document } from "./driverLicenseV1Document";
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DriverLicenseV1Document = exports.DriverLicenseV1 = void 0;
4
+ var driverLicenseV1_1 = require("./driverLicenseV1");
5
+ Object.defineProperty(exports, "DriverLicenseV1", { enumerable: true, get: function () { return driverLicenseV1_1.DriverLicenseV1; } });
6
+ var driverLicenseV1Document_1 = require("./driverLicenseV1Document");
7
+ Object.defineProperty(exports, "DriverLicenseV1Document", { enumerable: true, get: function () { return driverLicenseV1Document_1.DriverLicenseV1Document; } });
@@ -1,16 +1,16 @@
1
1
  import { Inference, StringDict, Page } from "../../../parsing/common";
2
- import { CarteVitaleV1Document } from "./carteVitaleV1Document";
2
+ import { HealthCardV1Document } from "./healthCardV1Document";
3
3
  /**
4
- * Carte Vitale API version 1 inference prediction.
4
+ * Health Card API version 1 inference prediction.
5
5
  */
6
- export declare class CarteVitaleV1 extends Inference {
6
+ export declare class HealthCardV1 extends Inference {
7
7
  /** The endpoint's name. */
8
8
  endpointName: string;
9
9
  /** The endpoint's version. */
10
10
  endpointVersion: string;
11
11
  /** The document-level prediction. */
12
- prediction: CarteVitaleV1Document;
12
+ prediction: HealthCardV1Document;
13
13
  /** The document's pages. */
14
- pages: Page<CarteVitaleV1Document>[];
14
+ pages: Page<HealthCardV1Document>[];
15
15
  constructor(rawPrediction: StringDict);
16
16
  }
@@ -1,27 +1,27 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CarteVitaleV1 = void 0;
3
+ exports.HealthCardV1 = void 0;
4
4
  const common_1 = require("../../../parsing/common");
5
- const carteVitaleV1Document_1 = require("./carteVitaleV1Document");
5
+ const healthCardV1Document_1 = require("./healthCardV1Document");
6
6
  /**
7
- * Carte Vitale API version 1 inference prediction.
7
+ * Health Card API version 1 inference prediction.
8
8
  */
9
- class CarteVitaleV1 extends common_1.Inference {
9
+ class HealthCardV1 extends common_1.Inference {
10
10
  constructor(rawPrediction) {
11
11
  super(rawPrediction);
12
12
  /** The endpoint's name. */
13
- this.endpointName = "carte_vitale";
13
+ this.endpointName = "french_healthcard";
14
14
  /** The endpoint's version. */
15
15
  this.endpointVersion = "1";
16
16
  /** The document's pages. */
17
17
  this.pages = [];
18
- this.prediction = new carteVitaleV1Document_1.CarteVitaleV1Document(rawPrediction["prediction"]);
18
+ this.prediction = new healthCardV1Document_1.HealthCardV1Document(rawPrediction["prediction"]);
19
19
  rawPrediction["pages"].forEach((page) => {
20
20
  if (page.prediction !== undefined && page.prediction !== null &&
21
21
  Object.keys(page.prediction).length > 0) {
22
- this.pages.push(new common_1.Page(carteVitaleV1Document_1.CarteVitaleV1Document, page, page["id"], page["orientation"]));
22
+ this.pages.push(new common_1.Page(healthCardV1Document_1.HealthCardV1Document, page, page["id"], page["orientation"]));
23
23
  }
24
24
  });
25
25
  }
26
26
  }
27
- exports.CarteVitaleV1 = CarteVitaleV1;
27
+ exports.HealthCardV1 = HealthCardV1;
@@ -1,14 +1,14 @@
1
1
  import { Prediction, StringDict } from "../../../parsing/common";
2
2
  import { DateField, StringField } from "../../../parsing/standard";
3
3
  /**
4
- * Carte Vitale API version 1.1 document data.
4
+ * Health Card API version 1.0 document data.
5
5
  */
6
- export declare class CarteVitaleV1Document implements Prediction {
7
- /** The given name(s) of the card holder. */
6
+ export declare class HealthCardV1Document implements Prediction {
7
+ /** The given names of the card holder. */
8
8
  givenNames: StringField[];
9
- /** The date the card was issued. */
9
+ /** The date when the carte vitale document was issued. */
10
10
  issuanceDate: DateField;
11
- /** The Social Security Number (Numéro de Sécurité Sociale) of the card holder */
11
+ /** The social security number of the card holder. */
12
12
  socialSecurity: StringField;
13
13
  /** The surname of the card holder. */
14
14
  surname: StringField;
@@ -1,14 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CarteVitaleV1Document = void 0;
3
+ exports.HealthCardV1Document = void 0;
4
4
  const common_1 = require("../../../parsing/common");
5
5
  const standard_1 = require("../../../parsing/standard");
6
6
  /**
7
- * Carte Vitale API version 1.1 document data.
7
+ * Health Card API version 1.0 document data.
8
8
  */
9
- class CarteVitaleV1Document {
9
+ class HealthCardV1Document {
10
10
  constructor(rawPrediction, pageId) {
11
- /** The given name(s) of the card holder. */
11
+ /** The given names of the card holder. */
12
12
  this.givenNames = [];
13
13
  rawPrediction["given_names"] &&
14
14
  rawPrediction["given_names"].map((itemPrediction) => this.givenNames.push(new standard_1.StringField({
@@ -40,4 +40,4 @@ class CarteVitaleV1Document {
40
40
  return (0, common_1.cleanOutString)(outStr);
41
41
  }
42
42
  }
43
- exports.CarteVitaleV1Document = CarteVitaleV1Document;
43
+ exports.HealthCardV1Document = HealthCardV1Document;
@@ -0,0 +1 @@
1
+ export { HealthCardV1 } from "./healthCardV1";
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HealthCardV1 = void 0;
4
+ var healthCardV1_1 = require("./healthCardV1");
5
+ Object.defineProperty(exports, "HealthCardV1", { enumerable: true, get: function () { return healthCardV1_1.HealthCardV1; } });
@@ -0,0 +1,2 @@
1
+ export { HealthCardV1 } from "./healthCardV1";
2
+ export { HealthCardV1Document } from "./healthCardV1Document";
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HealthCardV1Document = exports.HealthCardV1 = void 0;
4
+ var healthCardV1_1 = require("./healthCardV1");
5
+ Object.defineProperty(exports, "HealthCardV1", { enumerable: true, get: function () { return healthCardV1_1.HealthCardV1; } });
6
+ var healthCardV1Document_1 = require("./healthCardV1Document");
7
+ Object.defineProperty(exports, "HealthCardV1Document", { enumerable: true, get: function () { return healthCardV1Document_1.HealthCardV1Document; } });
@@ -1,8 +1,9 @@
1
1
  export { BankAccountDetailsV1 } from "./bankAccountDetails/bankAccountDetailsV1";
2
2
  export { BankAccountDetailsV2 } from "./bankAccountDetails/bankAccountDetailsV2";
3
3
  export { CarteGriseV1 } from "./carteGrise/carteGriseV1";
4
- export { CarteVitaleV1 } from "./carteVitale/carteVitaleV1";
5
4
  export { EnergyBillV1 } from "./energyBill/energyBillV1";
5
+ export { HealthCardV1 } from "./healthCard/healthCardV1";
6
6
  export { IdCardV1 } from "./idCard/idCardV1";
7
7
  export { IdCardV2 } from "./idCard/idCardV2";
8
8
  export { PayslipV2 } from "./payslip/payslipV2";
9
+ export { PayslipV3 } from "./payslip/payslipV3";
@@ -1,19 +1,21 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PayslipV2 = exports.IdCardV2 = exports.IdCardV1 = exports.EnergyBillV1 = exports.CarteVitaleV1 = exports.CarteGriseV1 = exports.BankAccountDetailsV2 = exports.BankAccountDetailsV1 = void 0;
3
+ exports.PayslipV3 = exports.PayslipV2 = exports.IdCardV2 = exports.IdCardV1 = exports.HealthCardV1 = exports.EnergyBillV1 = exports.CarteGriseV1 = exports.BankAccountDetailsV2 = exports.BankAccountDetailsV1 = void 0;
4
4
  var bankAccountDetailsV1_1 = require("./bankAccountDetails/bankAccountDetailsV1");
5
5
  Object.defineProperty(exports, "BankAccountDetailsV1", { enumerable: true, get: function () { return bankAccountDetailsV1_1.BankAccountDetailsV1; } });
6
6
  var bankAccountDetailsV2_1 = require("./bankAccountDetails/bankAccountDetailsV2");
7
7
  Object.defineProperty(exports, "BankAccountDetailsV2", { enumerable: true, get: function () { return bankAccountDetailsV2_1.BankAccountDetailsV2; } });
8
8
  var carteGriseV1_1 = require("./carteGrise/carteGriseV1");
9
9
  Object.defineProperty(exports, "CarteGriseV1", { enumerable: true, get: function () { return carteGriseV1_1.CarteGriseV1; } });
10
- var carteVitaleV1_1 = require("./carteVitale/carteVitaleV1");
11
- Object.defineProperty(exports, "CarteVitaleV1", { enumerable: true, get: function () { return carteVitaleV1_1.CarteVitaleV1; } });
12
10
  var energyBillV1_1 = require("./energyBill/energyBillV1");
13
11
  Object.defineProperty(exports, "EnergyBillV1", { enumerable: true, get: function () { return energyBillV1_1.EnergyBillV1; } });
12
+ var healthCardV1_1 = require("./healthCard/healthCardV1");
13
+ Object.defineProperty(exports, "HealthCardV1", { enumerable: true, get: function () { return healthCardV1_1.HealthCardV1; } });
14
14
  var idCardV1_1 = require("./idCard/idCardV1");
15
15
  Object.defineProperty(exports, "IdCardV1", { enumerable: true, get: function () { return idCardV1_1.IdCardV1; } });
16
16
  var idCardV2_1 = require("./idCard/idCardV2");
17
17
  Object.defineProperty(exports, "IdCardV2", { enumerable: true, get: function () { return idCardV2_1.IdCardV2; } });
18
18
  var payslipV2_1 = require("./payslip/payslipV2");
19
19
  Object.defineProperty(exports, "PayslipV2", { enumerable: true, get: function () { return payslipV2_1.PayslipV2; } });
20
+ var payslipV3_1 = require("./payslip/payslipV3");
21
+ Object.defineProperty(exports, "PayslipV3", { enumerable: true, get: function () { return payslipV3_1.PayslipV3; } });
@@ -1,6 +1,6 @@
1
1
  export * as bankAccountDetails from "./bankAccountDetails/internal";
2
2
  export * as carteGrise from "./carteGrise/internal";
3
- export * as carteVitale from "./carteVitale/internal";
4
3
  export * as energyBill from "./energyBill/internal";
4
+ export * as fr from "./healthCard/internal";
5
5
  export * as idCard from "./idCard/internal";
6
6
  export * as payslip from "./payslip/internal";
@@ -23,10 +23,10 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.payslip = exports.idCard = exports.energyBill = exports.carteVitale = exports.carteGrise = exports.bankAccountDetails = void 0;
26
+ exports.payslip = exports.idCard = exports.fr = exports.energyBill = exports.carteGrise = exports.bankAccountDetails = void 0;
27
27
  exports.bankAccountDetails = __importStar(require("./bankAccountDetails/internal"));
28
28
  exports.carteGrise = __importStar(require("./carteGrise/internal"));
29
- exports.carteVitale = __importStar(require("./carteVitale/internal"));
30
29
  exports.energyBill = __importStar(require("./energyBill/internal"));
30
+ exports.fr = __importStar(require("./healthCard/internal"));
31
31
  exports.idCard = __importStar(require("./idCard/internal"));
32
32
  exports.payslip = __importStar(require("./payslip/internal"));
@@ -1 +1,2 @@
1
1
  export { PayslipV2 } from "./payslipV2";
2
+ export { PayslipV3 } from "./payslipV3";
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PayslipV2 = void 0;
3
+ exports.PayslipV3 = exports.PayslipV2 = void 0;
4
4
  var payslipV2_1 = require("./payslipV2");
5
5
  Object.defineProperty(exports, "PayslipV2", { enumerable: true, get: function () { return payslipV2_1.PayslipV2; } });
6
+ var payslipV3_1 = require("./payslipV3");
7
+ Object.defineProperty(exports, "PayslipV3", { enumerable: true, get: function () { return payslipV3_1.PayslipV3; } });
@@ -8,3 +8,13 @@ export { PayslipV2PayDetail } from "./payslipV2PayDetail";
8
8
  export { PayslipV2PayPeriod } from "./payslipV2PayPeriod";
9
9
  export { PayslipV2Pto } from "./payslipV2Pto";
10
10
  export { PayslipV2SalaryDetail } from "./payslipV2SalaryDetail";
11
+ export { PayslipV3 } from "./payslipV3";
12
+ export { PayslipV3BankAccountDetail } from "./payslipV3BankAccountDetail";
13
+ export { PayslipV3Document } from "./payslipV3Document";
14
+ export { PayslipV3Employee } from "./payslipV3Employee";
15
+ export { PayslipV3Employer } from "./payslipV3Employer";
16
+ export { PayslipV3Employment } from "./payslipV3Employment";
17
+ export { PayslipV3PaidTimeOff } from "./payslipV3PaidTimeOff";
18
+ export { PayslipV3PayDetail } from "./payslipV3PayDetail";
19
+ export { PayslipV3PayPeriod } from "./payslipV3PayPeriod";
20
+ export { PayslipV3SalaryDetail } from "./payslipV3SalaryDetail";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PayslipV2SalaryDetail = exports.PayslipV2Pto = exports.PayslipV2PayPeriod = exports.PayslipV2PayDetail = exports.PayslipV2Employment = exports.PayslipV2Employer = exports.PayslipV2Employee = exports.PayslipV2Document = exports.PayslipV2BankAccountDetail = exports.PayslipV2 = void 0;
3
+ exports.PayslipV3SalaryDetail = exports.PayslipV3PayPeriod = exports.PayslipV3PayDetail = exports.PayslipV3PaidTimeOff = exports.PayslipV3Employment = exports.PayslipV3Employer = exports.PayslipV3Employee = exports.PayslipV3Document = exports.PayslipV3BankAccountDetail = exports.PayslipV3 = exports.PayslipV2SalaryDetail = exports.PayslipV2Pto = exports.PayslipV2PayPeriod = exports.PayslipV2PayDetail = exports.PayslipV2Employment = exports.PayslipV2Employer = exports.PayslipV2Employee = exports.PayslipV2Document = exports.PayslipV2BankAccountDetail = exports.PayslipV2 = void 0;
4
4
  var payslipV2_1 = require("./payslipV2");
5
5
  Object.defineProperty(exports, "PayslipV2", { enumerable: true, get: function () { return payslipV2_1.PayslipV2; } });
6
6
  var payslipV2BankAccountDetail_1 = require("./payslipV2BankAccountDetail");
@@ -21,3 +21,23 @@ var payslipV2Pto_1 = require("./payslipV2Pto");
21
21
  Object.defineProperty(exports, "PayslipV2Pto", { enumerable: true, get: function () { return payslipV2Pto_1.PayslipV2Pto; } });
22
22
  var payslipV2SalaryDetail_1 = require("./payslipV2SalaryDetail");
23
23
  Object.defineProperty(exports, "PayslipV2SalaryDetail", { enumerable: true, get: function () { return payslipV2SalaryDetail_1.PayslipV2SalaryDetail; } });
24
+ var payslipV3_1 = require("./payslipV3");
25
+ Object.defineProperty(exports, "PayslipV3", { enumerable: true, get: function () { return payslipV3_1.PayslipV3; } });
26
+ var payslipV3BankAccountDetail_1 = require("./payslipV3BankAccountDetail");
27
+ Object.defineProperty(exports, "PayslipV3BankAccountDetail", { enumerable: true, get: function () { return payslipV3BankAccountDetail_1.PayslipV3BankAccountDetail; } });
28
+ var payslipV3Document_1 = require("./payslipV3Document");
29
+ Object.defineProperty(exports, "PayslipV3Document", { enumerable: true, get: function () { return payslipV3Document_1.PayslipV3Document; } });
30
+ var payslipV3Employee_1 = require("./payslipV3Employee");
31
+ Object.defineProperty(exports, "PayslipV3Employee", { enumerable: true, get: function () { return payslipV3Employee_1.PayslipV3Employee; } });
32
+ var payslipV3Employer_1 = require("./payslipV3Employer");
33
+ Object.defineProperty(exports, "PayslipV3Employer", { enumerable: true, get: function () { return payslipV3Employer_1.PayslipV3Employer; } });
34
+ var payslipV3Employment_1 = require("./payslipV3Employment");
35
+ Object.defineProperty(exports, "PayslipV3Employment", { enumerable: true, get: function () { return payslipV3Employment_1.PayslipV3Employment; } });
36
+ var payslipV3PaidTimeOff_1 = require("./payslipV3PaidTimeOff");
37
+ Object.defineProperty(exports, "PayslipV3PaidTimeOff", { enumerable: true, get: function () { return payslipV3PaidTimeOff_1.PayslipV3PaidTimeOff; } });
38
+ var payslipV3PayDetail_1 = require("./payslipV3PayDetail");
39
+ Object.defineProperty(exports, "PayslipV3PayDetail", { enumerable: true, get: function () { return payslipV3PayDetail_1.PayslipV3PayDetail; } });
40
+ var payslipV3PayPeriod_1 = require("./payslipV3PayPeriod");
41
+ Object.defineProperty(exports, "PayslipV3PayPeriod", { enumerable: true, get: function () { return payslipV3PayPeriod_1.PayslipV3PayPeriod; } });
42
+ var payslipV3SalaryDetail_1 = require("./payslipV3SalaryDetail");
43
+ Object.defineProperty(exports, "PayslipV3SalaryDetail", { enumerable: true, get: function () { return payslipV3SalaryDetail_1.PayslipV3SalaryDetail; } });
@@ -0,0 +1,16 @@
1
+ import { Inference, StringDict, Page } from "../../../parsing/common";
2
+ import { PayslipV3Document } from "./payslipV3Document";
3
+ /**
4
+ * Payslip API version 3 inference prediction.
5
+ */
6
+ export declare class PayslipV3 extends Inference {
7
+ /** The endpoint's name. */
8
+ endpointName: string;
9
+ /** The endpoint's version. */
10
+ endpointVersion: string;
11
+ /** The document-level prediction. */
12
+ prediction: PayslipV3Document;
13
+ /** The document's pages. */
14
+ pages: Page<PayslipV3Document>[];
15
+ constructor(rawPrediction: StringDict);
16
+ }