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.
Files changed (67) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/package.json +12 -15
  3. package/src/cli.js +5 -6
  4. package/src/client.d.ts +0 -3
  5. package/src/client.js +8 -8
  6. package/src/geometry/boundingBoxUtils.js +5 -6
  7. package/src/geometry/polygonUtils.js +13 -14
  8. package/src/http/baseEndpoint.d.ts +0 -2
  9. package/src/http/baseEndpoint.js +1 -1
  10. package/src/http/error.js +4 -4
  11. package/src/http/responseValidation.js +3 -4
  12. package/src/imageOperations/common/extractedImage.d.ts +0 -1
  13. package/src/imageOperations/common/imageExtractor.js +1 -2
  14. package/src/imageOperations/invoiceSplitterExtractor/invoiceSplitterExtractor.js +1 -2
  15. package/src/imageOperations/multiReceiptsExtractor/multiReceiptsExtractor.js +1 -2
  16. package/src/input/base.d.ts +0 -1
  17. package/src/input/localResponse.d.ts +0 -1
  18. package/src/input/localResponse.js +2 -2
  19. package/src/input/pageOptions.js +1 -1
  20. package/src/input/sources.d.ts +0 -2
  21. package/src/parsing/common/page.js +1 -1
  22. package/src/parsing/common/summaryHelper.js +4 -5
  23. package/src/parsing/custom/lineItems.js +2 -2
  24. package/src/parsing/generated/generatedObject.js +2 -2
  25. package/src/parsing/standard/paymentDetails.js +4 -4
  26. package/src/pdf/pdfOperation.d.ts +0 -1
  27. package/src/pdf/pdfOperation.js +2 -3
  28. package/src/product/businessCard/businessCardV1.d.ts +16 -0
  29. package/src/product/businessCard/businessCardV1.js +27 -0
  30. package/src/product/businessCard/businessCardV1Document.d.ts +34 -0
  31. package/src/product/businessCard/businessCardV1Document.js +78 -0
  32. package/src/product/businessCard/index.d.ts +1 -0
  33. package/src/product/businessCard/index.js +5 -0
  34. package/src/product/businessCard/internal.d.ts +2 -0
  35. package/src/product/businessCard/internal.js +7 -0
  36. package/src/product/deliveryNote/deliveryNoteV1.d.ts +16 -0
  37. package/src/product/deliveryNote/deliveryNoteV1.js +27 -0
  38. package/src/product/deliveryNote/deliveryNoteV1Document.d.ts +26 -0
  39. package/src/product/deliveryNote/deliveryNoteV1Document.js +54 -0
  40. package/src/product/deliveryNote/index.d.ts +1 -0
  41. package/src/product/deliveryNote/index.js +5 -0
  42. package/src/product/deliveryNote/internal.d.ts +2 -0
  43. package/src/product/deliveryNote/internal.js +7 -0
  44. package/src/product/financialDocument/financialDocumentV1Document.d.ts +1 -1
  45. package/src/product/financialDocument/financialDocumentV1Document.js +1 -1
  46. package/src/product/ind/index.d.ts +1 -0
  47. package/src/product/ind/index.js +5 -0
  48. package/src/product/ind/indianPassport/index.d.ts +1 -0
  49. package/src/product/ind/indianPassport/index.js +5 -0
  50. package/src/product/ind/indianPassport/indianPassportV1.d.ts +16 -0
  51. package/src/product/ind/indianPassport/indianPassportV1.js +27 -0
  52. package/src/product/ind/indianPassport/indianPassportV1Document.d.ts +58 -0
  53. package/src/product/ind/indianPassport/indianPassportV1Document.js +132 -0
  54. package/src/product/ind/indianPassport/internal.d.ts +2 -0
  55. package/src/product/ind/indianPassport/internal.js +7 -0
  56. package/src/product/ind/internal.d.ts +1 -0
  57. package/src/product/ind/internal.js +27 -0
  58. package/src/product/index.d.ts +3 -0
  59. package/src/product/index.js +6 -1
  60. package/src/product/internal.d.ts +2 -0
  61. package/src/product/internal.js +3 -1
  62. package/src/product/invoice/invoiceV4Document.d.ts +1 -1
  63. package/src/product/invoice/invoiceV4Document.js +1 -1
  64. package/src/product/resume/resumeV1Document.d.ts +1 -1
  65. package/src/product/resume/resumeV1Document.js +3 -2
  66. package/src/product/resume/resumeV1ProfessionalExperience.d.ts +2 -0
  67. package/src/product/resume/resumeV1ProfessionalExperience.js +10 -0
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BusinessCardV1 = void 0;
4
+ const common_1 = require("../../parsing/common");
5
+ const businessCardV1Document_1 = require("./businessCardV1Document");
6
+ /**
7
+ * Business Card API version 1 inference prediction.
8
+ */
9
+ class BusinessCardV1 extends common_1.Inference {
10
+ constructor(rawPrediction) {
11
+ super(rawPrediction);
12
+ /** The endpoint's name. */
13
+ this.endpointName = "business_card";
14
+ /** The endpoint's version. */
15
+ this.endpointVersion = "1";
16
+ /** The document's pages. */
17
+ this.pages = [];
18
+ this.prediction = new businessCardV1Document_1.BusinessCardV1Document(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(businessCardV1Document_1.BusinessCardV1Document, page, page["id"], page["orientation"]));
23
+ }
24
+ });
25
+ }
26
+ }
27
+ exports.BusinessCardV1 = BusinessCardV1;
@@ -0,0 +1,34 @@
1
+ import { Prediction, StringDict } from "../../parsing/common";
2
+ import { StringField } from "../../parsing/standard";
3
+ /**
4
+ * Business Card API version 1.0 document data.
5
+ */
6
+ export declare class BusinessCardV1Document implements Prediction {
7
+ /** The address of the person. */
8
+ address: StringField;
9
+ /** The company the person works for. */
10
+ company: StringField;
11
+ /** The email address of the person. */
12
+ email: StringField;
13
+ /** The Fax number of the person. */
14
+ faxNumber: StringField;
15
+ /** The given name of the person. */
16
+ firstname: StringField;
17
+ /** The job title of the person. */
18
+ jobTitle: StringField;
19
+ /** The lastname of the person. */
20
+ lastname: StringField;
21
+ /** The mobile number of the person. */
22
+ mobileNumber: StringField;
23
+ /** The phone number of the person. */
24
+ phoneNumber: StringField;
25
+ /** The social media profiles of the person or company. */
26
+ socialMedia: StringField[];
27
+ /** The website of the person or company. */
28
+ website: StringField;
29
+ constructor(rawPrediction: StringDict, pageId?: number);
30
+ /**
31
+ * Default string representation.
32
+ */
33
+ toString(): string;
34
+ }
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BusinessCardV1Document = void 0;
4
+ const common_1 = require("../../parsing/common");
5
+ const standard_1 = require("../../parsing/standard");
6
+ /**
7
+ * Business Card API version 1.0 document data.
8
+ */
9
+ class BusinessCardV1Document {
10
+ constructor(rawPrediction, pageId) {
11
+ /** The social media profiles of the person or company. */
12
+ this.socialMedia = [];
13
+ this.address = new standard_1.StringField({
14
+ prediction: rawPrediction["address"],
15
+ pageId: pageId,
16
+ });
17
+ this.company = new standard_1.StringField({
18
+ prediction: rawPrediction["company"],
19
+ pageId: pageId,
20
+ });
21
+ this.email = new standard_1.StringField({
22
+ prediction: rawPrediction["email"],
23
+ pageId: pageId,
24
+ });
25
+ this.faxNumber = new standard_1.StringField({
26
+ prediction: rawPrediction["fax_number"],
27
+ pageId: pageId,
28
+ });
29
+ this.firstname = new standard_1.StringField({
30
+ prediction: rawPrediction["firstname"],
31
+ pageId: pageId,
32
+ });
33
+ this.jobTitle = new standard_1.StringField({
34
+ prediction: rawPrediction["job_title"],
35
+ pageId: pageId,
36
+ });
37
+ this.lastname = new standard_1.StringField({
38
+ prediction: rawPrediction["lastname"],
39
+ pageId: pageId,
40
+ });
41
+ this.mobileNumber = new standard_1.StringField({
42
+ prediction: rawPrediction["mobile_number"],
43
+ pageId: pageId,
44
+ });
45
+ this.phoneNumber = new standard_1.StringField({
46
+ prediction: rawPrediction["phone_number"],
47
+ pageId: pageId,
48
+ });
49
+ rawPrediction["social_media"] &&
50
+ rawPrediction["social_media"].map((itemPrediction) => this.socialMedia.push(new standard_1.StringField({
51
+ prediction: itemPrediction,
52
+ pageId: pageId,
53
+ })));
54
+ this.website = new standard_1.StringField({
55
+ prediction: rawPrediction["website"],
56
+ pageId: pageId,
57
+ });
58
+ }
59
+ /**
60
+ * Default string representation.
61
+ */
62
+ toString() {
63
+ const socialMedia = this.socialMedia.join("\n ");
64
+ const outStr = `:Firstname: ${this.firstname}
65
+ :Lastname: ${this.lastname}
66
+ :Job Title: ${this.jobTitle}
67
+ :Company: ${this.company}
68
+ :Email: ${this.email}
69
+ :Phone Number: ${this.phoneNumber}
70
+ :Mobile Number: ${this.mobileNumber}
71
+ :Fax Number: ${this.faxNumber}
72
+ :Address: ${this.address}
73
+ :Website: ${this.website}
74
+ :Social Media: ${socialMedia}`.trimEnd();
75
+ return (0, common_1.cleanOutString)(outStr);
76
+ }
77
+ }
78
+ exports.BusinessCardV1Document = BusinessCardV1Document;
@@ -0,0 +1 @@
1
+ export { BusinessCardV1 } from "./businessCardV1";
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BusinessCardV1 = void 0;
4
+ var businessCardV1_1 = require("./businessCardV1");
5
+ Object.defineProperty(exports, "BusinessCardV1", { enumerable: true, get: function () { return businessCardV1_1.BusinessCardV1; } });
@@ -0,0 +1,2 @@
1
+ export { BusinessCardV1 } from "./businessCardV1";
2
+ export { BusinessCardV1Document } from "./businessCardV1Document";
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BusinessCardV1Document = exports.BusinessCardV1 = void 0;
4
+ var businessCardV1_1 = require("./businessCardV1");
5
+ Object.defineProperty(exports, "BusinessCardV1", { enumerable: true, get: function () { return businessCardV1_1.BusinessCardV1; } });
6
+ var businessCardV1Document_1 = require("./businessCardV1Document");
7
+ Object.defineProperty(exports, "BusinessCardV1Document", { enumerable: true, get: function () { return businessCardV1Document_1.BusinessCardV1Document; } });
@@ -0,0 +1,16 @@
1
+ import { Inference, StringDict, Page } from "../../parsing/common";
2
+ import { DeliveryNoteV1Document } from "./deliveryNoteV1Document";
3
+ /**
4
+ * Delivery note API version 1 inference prediction.
5
+ */
6
+ export declare class DeliveryNoteV1 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: DeliveryNoteV1Document;
13
+ /** The document's pages. */
14
+ pages: Page<DeliveryNoteV1Document>[];
15
+ constructor(rawPrediction: StringDict);
16
+ }
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DeliveryNoteV1 = void 0;
4
+ const common_1 = require("../../parsing/common");
5
+ const deliveryNoteV1Document_1 = require("./deliveryNoteV1Document");
6
+ /**
7
+ * Delivery note API version 1 inference prediction.
8
+ */
9
+ class DeliveryNoteV1 extends common_1.Inference {
10
+ constructor(rawPrediction) {
11
+ super(rawPrediction);
12
+ /** The endpoint's name. */
13
+ this.endpointName = "delivery_notes";
14
+ /** The endpoint's version. */
15
+ this.endpointVersion = "1";
16
+ /** The document's pages. */
17
+ this.pages = [];
18
+ this.prediction = new deliveryNoteV1Document_1.DeliveryNoteV1Document(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(deliveryNoteV1Document_1.DeliveryNoteV1Document, page, page["id"], page["orientation"]));
23
+ }
24
+ });
25
+ }
26
+ }
27
+ exports.DeliveryNoteV1 = DeliveryNoteV1;
@@ -0,0 +1,26 @@
1
+ import { Prediction, StringDict } from "../../parsing/common";
2
+ import { AmountField, DateField, StringField } from "../../parsing/standard";
3
+ /**
4
+ * Delivery note API version 1.1 document data.
5
+ */
6
+ export declare class DeliveryNoteV1Document implements Prediction {
7
+ /** The address of the customer receiving the goods. */
8
+ customerAddress: StringField;
9
+ /** The name of the customer receiving the goods. */
10
+ customerName: StringField;
11
+ /** The date on which the delivery is scheduled to arrive. */
12
+ deliveryDate: DateField;
13
+ /** A unique identifier for the delivery note. */
14
+ deliveryNumber: StringField;
15
+ /** The address of the supplier providing the goods. */
16
+ supplierAddress: StringField;
17
+ /** The name of the supplier providing the goods. */
18
+ supplierName: StringField;
19
+ /** The total monetary value of the goods being delivered. */
20
+ totalAmount: AmountField;
21
+ constructor(rawPrediction: StringDict, pageId?: number);
22
+ /**
23
+ * Default string representation.
24
+ */
25
+ toString(): string;
26
+ }
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DeliveryNoteV1Document = void 0;
4
+ const common_1 = require("../../parsing/common");
5
+ const standard_1 = require("../../parsing/standard");
6
+ /**
7
+ * Delivery note API version 1.1 document data.
8
+ */
9
+ class DeliveryNoteV1Document {
10
+ constructor(rawPrediction, pageId) {
11
+ this.customerAddress = new standard_1.StringField({
12
+ prediction: rawPrediction["customer_address"],
13
+ pageId: pageId,
14
+ });
15
+ this.customerName = new standard_1.StringField({
16
+ prediction: rawPrediction["customer_name"],
17
+ pageId: pageId,
18
+ });
19
+ this.deliveryDate = new standard_1.DateField({
20
+ prediction: rawPrediction["delivery_date"],
21
+ pageId: pageId,
22
+ });
23
+ this.deliveryNumber = new standard_1.StringField({
24
+ prediction: rawPrediction["delivery_number"],
25
+ pageId: pageId,
26
+ });
27
+ this.supplierAddress = new standard_1.StringField({
28
+ prediction: rawPrediction["supplier_address"],
29
+ pageId: pageId,
30
+ });
31
+ this.supplierName = new standard_1.StringField({
32
+ prediction: rawPrediction["supplier_name"],
33
+ pageId: pageId,
34
+ });
35
+ this.totalAmount = new standard_1.AmountField({
36
+ prediction: rawPrediction["total_amount"],
37
+ pageId: pageId,
38
+ });
39
+ }
40
+ /**
41
+ * Default string representation.
42
+ */
43
+ toString() {
44
+ const outStr = `:Delivery Date: ${this.deliveryDate}
45
+ :Delivery Number: ${this.deliveryNumber}
46
+ :Supplier Name: ${this.supplierName}
47
+ :Supplier Address: ${this.supplierAddress}
48
+ :Customer Name: ${this.customerName}
49
+ :Customer Address: ${this.customerAddress}
50
+ :Total Amount: ${this.totalAmount}`.trimEnd();
51
+ return (0, common_1.cleanOutString)(outStr);
52
+ }
53
+ }
54
+ exports.DeliveryNoteV1Document = DeliveryNoteV1Document;
@@ -0,0 +1 @@
1
+ export { DeliveryNoteV1 } from "./deliveryNoteV1";
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DeliveryNoteV1 = void 0;
4
+ var deliveryNoteV1_1 = require("./deliveryNoteV1");
5
+ Object.defineProperty(exports, "DeliveryNoteV1", { enumerable: true, get: function () { return deliveryNoteV1_1.DeliveryNoteV1; } });
@@ -0,0 +1,2 @@
1
+ export { DeliveryNoteV1 } from "./deliveryNoteV1";
2
+ export { DeliveryNoteV1Document } from "./deliveryNoteV1Document";
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DeliveryNoteV1Document = exports.DeliveryNoteV1 = void 0;
4
+ var deliveryNoteV1_1 = require("./deliveryNoteV1");
5
+ Object.defineProperty(exports, "DeliveryNoteV1", { enumerable: true, get: function () { return deliveryNoteV1_1.DeliveryNoteV1; } });
6
+ var deliveryNoteV1Document_1 = require("./deliveryNoteV1Document");
7
+ Object.defineProperty(exports, "DeliveryNoteV1Document", { enumerable: true, get: function () { return deliveryNoteV1Document_1.DeliveryNoteV1Document; } });
@@ -2,7 +2,7 @@ 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
- * Financial Document API version 1.10 document data.
5
+ * Financial Document API version 1.11 document data.
6
6
  */
7
7
  export declare class FinancialDocumentV1Document implements Prediction {
8
8
  /** The customer's address used for billing. */
@@ -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
- * Financial Document API version 1.10 document data.
8
+ * Financial Document API version 1.11 document data.
9
9
  */
10
10
  class FinancialDocumentV1Document {
11
11
  constructor(rawPrediction, pageId) {
@@ -0,0 +1 @@
1
+ export { IndianPassportV1 } from "./indianPassport/indianPassportV1";
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IndianPassportV1 = void 0;
4
+ var indianPassportV1_1 = require("./indianPassport/indianPassportV1");
5
+ Object.defineProperty(exports, "IndianPassportV1", { enumerable: true, get: function () { return indianPassportV1_1.IndianPassportV1; } });
@@ -0,0 +1 @@
1
+ export { IndianPassportV1 } from "./indianPassportV1";
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IndianPassportV1 = void 0;
4
+ var indianPassportV1_1 = require("./indianPassportV1");
5
+ Object.defineProperty(exports, "IndianPassportV1", { enumerable: true, get: function () { return indianPassportV1_1.IndianPassportV1; } });
@@ -0,0 +1,16 @@
1
+ import { Inference, StringDict, Page } from "../../../parsing/common";
2
+ import { IndianPassportV1Document } from "./indianPassportV1Document";
3
+ /**
4
+ * Passport - India API version 1 inference prediction.
5
+ */
6
+ export declare class IndianPassportV1 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: IndianPassportV1Document;
13
+ /** The document's pages. */
14
+ pages: Page<IndianPassportV1Document>[];
15
+ constructor(rawPrediction: StringDict);
16
+ }
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IndianPassportV1 = void 0;
4
+ const common_1 = require("../../../parsing/common");
5
+ const indianPassportV1Document_1 = require("./indianPassportV1Document");
6
+ /**
7
+ * Passport - India API version 1 inference prediction.
8
+ */
9
+ class IndianPassportV1 extends common_1.Inference {
10
+ constructor(rawPrediction) {
11
+ super(rawPrediction);
12
+ /** The endpoint's name. */
13
+ this.endpointName = "ind_passport";
14
+ /** The endpoint's version. */
15
+ this.endpointVersion = "1";
16
+ /** The document's pages. */
17
+ this.pages = [];
18
+ this.prediction = new indianPassportV1Document_1.IndianPassportV1Document(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(indianPassportV1Document_1.IndianPassportV1Document, page, page["id"], page["orientation"]));
23
+ }
24
+ });
25
+ }
26
+ }
27
+ exports.IndianPassportV1 = IndianPassportV1;
@@ -0,0 +1,58 @@
1
+ import { Prediction, StringDict } from "../../../parsing/common";
2
+ import { ClassificationField, DateField, StringField } from "../../../parsing/standard";
3
+ /**
4
+ * Passport - India API version 1.0 document data.
5
+ */
6
+ export declare class IndianPassportV1Document implements Prediction {
7
+ /** The first line of the address of the passport holder. */
8
+ address1: StringField;
9
+ /** The second line of the address of the passport holder. */
10
+ address2: StringField;
11
+ /** The third line of the address of the passport holder. */
12
+ address3: StringField;
13
+ /** The birth date of the passport holder, ISO format: YYYY-MM-DD. */
14
+ birthDate: DateField;
15
+ /** The birth place of the passport holder. */
16
+ birthPlace: StringField;
17
+ /** ISO 3166-1 alpha-3 country code (3 letters format). */
18
+ country: StringField;
19
+ /** The date when the passport will expire, ISO format: YYYY-MM-DD. */
20
+ expiryDate: DateField;
21
+ /** The file number of the passport document. */
22
+ fileNumber: StringField;
23
+ /** The gender of the passport holder. */
24
+ gender: ClassificationField;
25
+ /** The given names of the passport holder. */
26
+ givenNames: StringField;
27
+ /** The identification number of the passport document. */
28
+ idNumber: StringField;
29
+ /** The date when the passport was issued, ISO format: YYYY-MM-DD. */
30
+ issuanceDate: DateField;
31
+ /** The place where the passport was issued. */
32
+ issuancePlace: StringField;
33
+ /** The name of the legal guardian of the passport holder (if applicable). */
34
+ legalGuardian: StringField;
35
+ /** The first line of the machine-readable zone (MRZ) of the passport document. */
36
+ mrz1: StringField;
37
+ /** The second line of the machine-readable zone (MRZ) of the passport document. */
38
+ mrz2: StringField;
39
+ /** The name of the mother of the passport holder. */
40
+ nameOfMother: StringField;
41
+ /** The name of the spouse of the passport holder (if applicable). */
42
+ nameOfSpouse: StringField;
43
+ /** The date of issue of the old passport (if applicable), ISO format: YYYY-MM-DD. */
44
+ oldPassportDateOfIssue: DateField;
45
+ /** The number of the old passport (if applicable). */
46
+ oldPassportNumber: StringField;
47
+ /** The place of issue of the old passport (if applicable). */
48
+ oldPassportPlaceOfIssue: StringField;
49
+ /** The page number of the passport document. */
50
+ pageNumber: ClassificationField;
51
+ /** The surname of the passport holder. */
52
+ surname: StringField;
53
+ constructor(rawPrediction: StringDict, pageId?: number);
54
+ /**
55
+ * Default string representation.
56
+ */
57
+ toString(): string;
58
+ }
@@ -0,0 +1,132 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IndianPassportV1Document = void 0;
4
+ const common_1 = require("../../../parsing/common");
5
+ const standard_1 = require("../../../parsing/standard");
6
+ /**
7
+ * Passport - India API version 1.0 document data.
8
+ */
9
+ class IndianPassportV1Document {
10
+ constructor(rawPrediction, pageId) {
11
+ this.address1 = new standard_1.StringField({
12
+ prediction: rawPrediction["address1"],
13
+ pageId: pageId,
14
+ });
15
+ this.address2 = new standard_1.StringField({
16
+ prediction: rawPrediction["address2"],
17
+ pageId: pageId,
18
+ });
19
+ this.address3 = new standard_1.StringField({
20
+ prediction: rawPrediction["address3"],
21
+ pageId: pageId,
22
+ });
23
+ this.birthDate = new standard_1.DateField({
24
+ prediction: rawPrediction["birth_date"],
25
+ pageId: pageId,
26
+ });
27
+ this.birthPlace = new standard_1.StringField({
28
+ prediction: rawPrediction["birth_place"],
29
+ pageId: pageId,
30
+ });
31
+ this.country = new standard_1.StringField({
32
+ prediction: rawPrediction["country"],
33
+ pageId: pageId,
34
+ });
35
+ this.expiryDate = new standard_1.DateField({
36
+ prediction: rawPrediction["expiry_date"],
37
+ pageId: pageId,
38
+ });
39
+ this.fileNumber = new standard_1.StringField({
40
+ prediction: rawPrediction["file_number"],
41
+ pageId: pageId,
42
+ });
43
+ this.gender = new standard_1.ClassificationField({
44
+ prediction: rawPrediction["gender"],
45
+ });
46
+ this.givenNames = new standard_1.StringField({
47
+ prediction: rawPrediction["given_names"],
48
+ pageId: pageId,
49
+ });
50
+ this.idNumber = new standard_1.StringField({
51
+ prediction: rawPrediction["id_number"],
52
+ pageId: pageId,
53
+ });
54
+ this.issuanceDate = new standard_1.DateField({
55
+ prediction: rawPrediction["issuance_date"],
56
+ pageId: pageId,
57
+ });
58
+ this.issuancePlace = new standard_1.StringField({
59
+ prediction: rawPrediction["issuance_place"],
60
+ pageId: pageId,
61
+ });
62
+ this.legalGuardian = new standard_1.StringField({
63
+ prediction: rawPrediction["legal_guardian"],
64
+ pageId: pageId,
65
+ });
66
+ this.mrz1 = new standard_1.StringField({
67
+ prediction: rawPrediction["mrz1"],
68
+ pageId: pageId,
69
+ });
70
+ this.mrz2 = new standard_1.StringField({
71
+ prediction: rawPrediction["mrz2"],
72
+ pageId: pageId,
73
+ });
74
+ this.nameOfMother = new standard_1.StringField({
75
+ prediction: rawPrediction["name_of_mother"],
76
+ pageId: pageId,
77
+ });
78
+ this.nameOfSpouse = new standard_1.StringField({
79
+ prediction: rawPrediction["name_of_spouse"],
80
+ pageId: pageId,
81
+ });
82
+ this.oldPassportDateOfIssue = new standard_1.DateField({
83
+ prediction: rawPrediction["old_passport_date_of_issue"],
84
+ pageId: pageId,
85
+ });
86
+ this.oldPassportNumber = new standard_1.StringField({
87
+ prediction: rawPrediction["old_passport_number"],
88
+ pageId: pageId,
89
+ });
90
+ this.oldPassportPlaceOfIssue = new standard_1.StringField({
91
+ prediction: rawPrediction["old_passport_place_of_issue"],
92
+ pageId: pageId,
93
+ });
94
+ this.pageNumber = new standard_1.ClassificationField({
95
+ prediction: rawPrediction["page_number"],
96
+ });
97
+ this.surname = new standard_1.StringField({
98
+ prediction: rawPrediction["surname"],
99
+ pageId: pageId,
100
+ });
101
+ }
102
+ /**
103
+ * Default string representation.
104
+ */
105
+ toString() {
106
+ const outStr = `:Page Number: ${this.pageNumber}
107
+ :Country: ${this.country}
108
+ :ID Number: ${this.idNumber}
109
+ :Given Names: ${this.givenNames}
110
+ :Surname: ${this.surname}
111
+ :Birth Date: ${this.birthDate}
112
+ :Birth Place: ${this.birthPlace}
113
+ :Issuance Place: ${this.issuancePlace}
114
+ :Gender: ${this.gender}
115
+ :Issuance Date: ${this.issuanceDate}
116
+ :Expiry Date: ${this.expiryDate}
117
+ :MRZ Line 1: ${this.mrz1}
118
+ :MRZ Line 2: ${this.mrz2}
119
+ :Legal Guardian: ${this.legalGuardian}
120
+ :Name of Spouse: ${this.nameOfSpouse}
121
+ :Name of Mother: ${this.nameOfMother}
122
+ :Old Passport Date of Issue: ${this.oldPassportDateOfIssue}
123
+ :Old Passport Number: ${this.oldPassportNumber}
124
+ :Address Line 1: ${this.address1}
125
+ :Address Line 2: ${this.address2}
126
+ :Address Line 3: ${this.address3}
127
+ :Old Passport Place of Issue: ${this.oldPassportPlaceOfIssue}
128
+ :File Number: ${this.fileNumber}`.trimEnd();
129
+ return (0, common_1.cleanOutString)(outStr);
130
+ }
131
+ }
132
+ exports.IndianPassportV1Document = IndianPassportV1Document;
@@ -0,0 +1,2 @@
1
+ export { IndianPassportV1 } from "./indianPassportV1";
2
+ export { IndianPassportV1Document } from "./indianPassportV1Document";
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IndianPassportV1Document = exports.IndianPassportV1 = void 0;
4
+ var indianPassportV1_1 = require("./indianPassportV1");
5
+ Object.defineProperty(exports, "IndianPassportV1", { enumerable: true, get: function () { return indianPassportV1_1.IndianPassportV1; } });
6
+ var indianPassportV1Document_1 = require("./indianPassportV1Document");
7
+ Object.defineProperty(exports, "IndianPassportV1Document", { enumerable: true, get: function () { return indianPassportV1Document_1.IndianPassportV1Document; } });
@@ -0,0 +1 @@
1
+ export * as ind from "./indianPassport/internal";
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.ind = void 0;
27
+ exports.ind = __importStar(require("./indianPassport/internal"));
@@ -1,7 +1,9 @@
1
1
  export { BarcodeReaderV1 } from "./barcodeReader/barcodeReaderV1";
2
2
  export { BillOfLadingV1 } from "./billOfLading/billOfLadingV1";
3
+ export { BusinessCardV1 } from "./businessCard/businessCardV1";
3
4
  export { CropperV1 } from "./cropper/cropperV1";
4
5
  export { CustomV1 } from "./custom/customV1";
6
+ export { DeliveryNoteV1 } from "./deliveryNote/deliveryNoteV1";
5
7
  export { FinancialDocumentV1 } from "./financialDocument/financialDocumentV1";
6
8
  export { GeneratedV1 } from "./generated/generatedV1";
7
9
  export { InternationalIdV1 } from "./internationalId/internationalIdV1";
@@ -17,4 +19,5 @@ export { ReceiptV5 } from "./receipt/receiptV5";
17
19
  export { ResumeV1 } from "./resume/resumeV1";
18
20
  export * as eu from "./eu";
19
21
  export * as fr from "./fr";
22
+ export * as ind from "./ind";
20
23
  export * as us from "./us";