mindee 4.0.0 → 4.0.2

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 (124) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/package.json +3 -4
  3. package/src/client.d.ts +58 -32
  4. package/src/client.js +50 -19
  5. package/src/http/endpoint.js +9 -11
  6. package/src/index.d.ts +1 -1
  7. package/src/input/base.d.ts +1 -0
  8. package/src/input/base.js +3 -0
  9. package/src/input/pageOptions.d.ts +4 -0
  10. package/src/input/pageOptions.js +3 -0
  11. package/src/input/sources.d.ts +2 -3
  12. package/src/input/sources.js +2 -1
  13. package/src/parsing/common/apiRequest.d.ts +9 -0
  14. package/src/parsing/common/apiRequest.js +5 -0
  15. package/src/parsing/common/apiResponse.d.ts +9 -0
  16. package/src/parsing/common/apiResponse.js +8 -0
  17. package/src/parsing/common/asyncPredictResponse.d.ts +24 -3
  18. package/src/parsing/common/asyncPredictResponse.js +15 -0
  19. package/src/parsing/common/document.d.ts +17 -0
  20. package/src/parsing/common/document.js +16 -4
  21. package/src/parsing/common/extras/cropperExtra.d.ts +3 -0
  22. package/src/parsing/common/extras/cropperExtra.js +3 -0
  23. package/src/parsing/common/extras/extras.d.ts +3 -0
  24. package/src/parsing/common/extras/extras.js +3 -0
  25. package/src/parsing/common/inference.d.ts +26 -0
  26. package/src/parsing/common/inference.js +23 -2
  27. package/src/parsing/common/mvisionV1.d.ts +3 -0
  28. package/src/parsing/common/mvisionV1.js +3 -0
  29. package/src/parsing/common/ocr.d.ts +3 -0
  30. package/src/parsing/common/ocr.js +3 -0
  31. package/src/parsing/common/ocrPage.d.ts +3 -0
  32. package/src/parsing/common/ocrPage.js +3 -0
  33. package/src/parsing/common/orientation.d.ts +3 -0
  34. package/src/parsing/common/orientation.js +3 -0
  35. package/src/parsing/common/page.d.ts +19 -0
  36. package/src/parsing/common/page.js +15 -0
  37. package/src/parsing/common/predictResponse.d.ts +11 -0
  38. package/src/parsing/common/predictResponse.js +10 -0
  39. package/src/parsing/custom/classificationField.d.ts +3 -0
  40. package/src/parsing/custom/classificationField.js +3 -0
  41. package/src/parsing/custom/listField.d.ts +6 -0
  42. package/src/parsing/custom/listField.js +6 -0
  43. package/src/parsing/standard/amount.d.ts +3 -0
  44. package/src/parsing/standard/amount.js +3 -0
  45. package/src/parsing/standard/base.d.ts +3 -0
  46. package/src/parsing/standard/base.js +3 -0
  47. package/src/parsing/standard/locale.d.ts +3 -0
  48. package/src/parsing/standard/locale.js +3 -0
  49. package/src/parsing/standard/paymentDetails.d.ts +3 -0
  50. package/src/parsing/standard/paymentDetails.js +3 -0
  51. package/src/parsing/standard/position.d.ts +3 -0
  52. package/src/parsing/standard/position.js +3 -0
  53. package/src/parsing/standard/tax.d.ts +3 -0
  54. package/src/parsing/standard/tax.js +3 -0
  55. package/src/product/cropper/cropperV1.d.ts +7 -0
  56. package/src/product/cropper/cropperV1.js +6 -0
  57. package/src/product/cropper/cropperV1Document.d.ts +6 -0
  58. package/src/product/cropper/cropperV1Document.js +6 -0
  59. package/src/product/custom/customV1.d.ts +7 -0
  60. package/src/product/custom/customV1.js +6 -0
  61. package/src/product/custom/customV1Document.d.ts +16 -0
  62. package/src/product/custom/customV1Document.js +16 -2
  63. package/src/product/custom/customV1Page.d.ts +7 -0
  64. package/src/product/custom/customV1Page.js +7 -0
  65. package/src/product/eu/licensePlate/licensePlateV1.d.ts +7 -0
  66. package/src/product/eu/licensePlate/licensePlateV1.js +6 -0
  67. package/src/product/eu/licensePlate/licensePlateV1Document.d.ts +3 -0
  68. package/src/product/eu/licensePlate/licensePlateV1Document.js +3 -0
  69. package/src/product/financialDocument/financialDocumentV1.d.ts +7 -0
  70. package/src/product/financialDocument/financialDocumentV1.js +6 -0
  71. package/src/product/financialDocument/financialDocumentV1Document.d.ts +3 -0
  72. package/src/product/financialDocument/financialDocumentV1Document.js +3 -0
  73. package/src/product/fr/bankAccountDetails/bankAccountDetailsV1.d.ts +7 -0
  74. package/src/product/fr/bankAccountDetails/bankAccountDetailsV1.js +6 -0
  75. package/src/product/fr/bankAccountDetails/bankAccountDetailsV1Document.d.ts +3 -0
  76. package/src/product/fr/bankAccountDetails/bankAccountDetailsV1Document.js +3 -0
  77. package/src/product/fr/bankAccountDetails/bankAccountDetailsV2.d.ts +7 -0
  78. package/src/product/fr/bankAccountDetails/bankAccountDetailsV2.js +6 -0
  79. package/src/product/fr/bankAccountDetails/bankAccountDetailsV2Document.d.ts +3 -0
  80. package/src/product/fr/bankAccountDetails/bankAccountDetailsV2Document.js +3 -0
  81. package/src/product/fr/carteVitale/carteVitaleV1.d.ts +7 -0
  82. package/src/product/fr/carteVitale/carteVitaleV1.js +6 -0
  83. package/src/product/fr/carteVitale/carteVitaleV1Document.d.ts +3 -0
  84. package/src/product/fr/carteVitale/carteVitaleV1Document.js +3 -0
  85. package/src/product/fr/idCard/idCardV1.d.ts +7 -0
  86. package/src/product/fr/idCard/idCardV1.js +6 -0
  87. package/src/product/fr/idCard/idCardV1Document.d.ts +3 -0
  88. package/src/product/fr/idCard/idCardV1Document.js +3 -0
  89. package/src/product/invoice/invoiceV4.d.ts +7 -0
  90. package/src/product/invoice/invoiceV4.js +6 -0
  91. package/src/product/invoice/invoiceV4Document.d.ts +3 -1
  92. package/src/product/invoice/invoiceV4Document.js +3 -1
  93. package/src/product/invoice/invoiceV4LineItem.d.ts +9 -0
  94. package/src/product/invoice/invoiceV4LineItem.js +9 -0
  95. package/src/product/invoiceSplitter/invoiceSplitterV1.d.ts +7 -0
  96. package/src/product/invoiceSplitter/invoiceSplitterV1.js +6 -0
  97. package/src/product/invoiceSplitter/invoiceSplitterV1Document.d.ts +6 -0
  98. package/src/product/invoiceSplitter/invoiceSplitterV1Document.js +6 -0
  99. package/src/product/invoiceSplitter/invoiceSplitterV1PageGroup.d.ts +8 -0
  100. package/src/product/invoiceSplitter/invoiceSplitterV1PageGroup.js +7 -0
  101. package/src/product/passport/passportV1.d.ts +7 -0
  102. package/src/product/passport/passportV1.js +6 -0
  103. package/src/product/passport/passportV1Document.d.ts +3 -0
  104. package/src/product/passport/passportV1Document.js +3 -0
  105. package/src/product/proofOfAddress/proofOfAddressV1.d.ts +7 -0
  106. package/src/product/proofOfAddress/proofOfAddressV1.js +6 -0
  107. package/src/product/proofOfAddress/proofOfAddressV1Document.d.ts +3 -0
  108. package/src/product/proofOfAddress/proofOfAddressV1Document.js +3 -0
  109. package/src/product/receipt/receiptV4.d.ts +7 -0
  110. package/src/product/receipt/receiptV4.js +5 -0
  111. package/src/product/receipt/receiptV4Document.d.ts +6 -0
  112. package/src/product/receipt/receiptV4Document.js +6 -0
  113. package/src/product/receipt/receiptV5.d.ts +7 -0
  114. package/src/product/receipt/receiptV5.js +6 -0
  115. package/src/product/receipt/receiptV5Document.d.ts +3 -0
  116. package/src/product/receipt/receiptV5Document.js +3 -0
  117. package/src/product/us/bankCheck/bankCheckV1.d.ts +7 -0
  118. package/src/product/us/bankCheck/bankCheckV1.js +6 -0
  119. package/src/product/us/bankCheck/bankCheckV1Document.d.ts +3 -0
  120. package/src/product/us/bankCheck/bankCheckV1Document.js +3 -0
  121. package/src/product/us/driverLicense/driverLicenseV1.d.ts +7 -0
  122. package/src/product/us/driverLicense/driverLicenseV1.js +6 -0
  123. package/src/product/us/driverLicense/driverLicenseV1Document.d.ts +3 -0
  124. package/src/product/us/driverLicense/driverLicenseV1Document.js +3 -0
@@ -3,6 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.InvoiceSplitterV1Document = void 0;
4
4
  const common_1 = require("../../parsing/common");
5
5
  const invoiceSplitterV1PageGroup_1 = require("./invoiceSplitterV1PageGroup");
6
+ /**
7
+ * Document data for Invoice Splitter, API version 1.
8
+ */
6
9
  class InvoiceSplitterV1Document extends common_1.Inference {
7
10
  constructor(rawPrediction) {
8
11
  super(rawPrediction);
@@ -11,6 +14,9 @@ class InvoiceSplitterV1Document extends common_1.Inference {
11
14
  rawPrediction["invoice_page_groups"] &&
12
15
  rawPrediction["invoice_page_groups"].forEach((prediction) => this.invoicePageGroups.push(new invoiceSplitterV1PageGroup_1.PageGroup(prediction)));
13
16
  }
17
+ /**
18
+ * Default string representation.
19
+ */
14
20
  toString() {
15
21
  const invoicePageGroups = this.invoicePageGroups
16
22
  .map((item) => "\n " + item.toString())
@@ -1,7 +1,15 @@
1
1
  import { StringDict } from "../../parsing/common";
2
+ /**
3
+ * Pages indexes in a group.
4
+ */
2
5
  export declare class PageGroup {
6
+ /** List of page indexes. */
3
7
  pageIndexes: number[];
8
+ /** Confidence score. */
4
9
  confidence: number;
5
10
  constructor(prediction: StringDict);
11
+ /**
12
+ * Default string representation.
13
+ */
6
14
  toString(): string;
7
15
  }
@@ -1,12 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PageGroup = void 0;
4
+ /**
5
+ * Pages indexes in a group.
6
+ */
4
7
  class PageGroup {
5
8
  constructor(prediction) {
9
+ /** List of page indexes. */
6
10
  this.pageIndexes = [];
7
11
  this.pageIndexes = prediction.page_indexes;
8
12
  this.confidence = prediction["confidence"];
9
13
  }
14
+ /**
15
+ * Default string representation.
16
+ */
10
17
  toString() {
11
18
  return `:Page indexes: ${this.pageIndexes.join(", ")}`;
12
19
  }
@@ -1,9 +1,16 @@
1
1
  import { Inference, StringDict, Page } from "../../parsing/common";
2
2
  import { PassportV1Document } from "./passportV1Document";
3
+ /**
4
+ * Inference prediction for Passport, API version 1.
5
+ */
3
6
  export declare class PassportV1 extends Inference {
7
+ /** The endpoint's name. */
4
8
  endpointName: string;
9
+ /** The endpoint's version. */
5
10
  endpointVersion: string;
11
+ /** The document-level prediction. */
6
12
  prediction: PassportV1Document;
13
+ /** The document's pages. */
7
14
  pages: Page<PassportV1Document>[];
8
15
  constructor(rawPrediction: StringDict);
9
16
  }
@@ -3,11 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PassportV1 = void 0;
4
4
  const common_1 = require("../../parsing/common");
5
5
  const passportV1Document_1 = require("./passportV1Document");
6
+ /**
7
+ * Inference prediction for Passport, API version 1.
8
+ */
6
9
  class PassportV1 extends common_1.Inference {
7
10
  constructor(rawPrediction) {
8
11
  super(rawPrediction);
12
+ /** The endpoint's name. */
9
13
  this.endpointName = "passport";
14
+ /** The endpoint's version. */
10
15
  this.endpointVersion = "1";
16
+ /** The document's pages. */
11
17
  this.pages = [];
12
18
  this.prediction = new passportV1Document_1.PassportV1Document(rawPrediction["prediction"]);
13
19
  this.pages = rawPrediction["pages"].map((page) => new common_1.Page(passportV1Document_1.PassportV1Document, page, page["id"], page["orientation"]));
@@ -27,5 +27,8 @@ export declare class PassportV1Document implements Prediction {
27
27
  /** The surname of the passport holder. */
28
28
  surname: StringField;
29
29
  constructor(rawPrediction: StringDict, pageId?: number);
30
+ /**
31
+ * Default string representation.
32
+ */
30
33
  toString(): string;
31
34
  }
@@ -56,6 +56,9 @@ class PassportV1Document {
56
56
  pageId: pageId,
57
57
  });
58
58
  }
59
+ /**
60
+ * Default string representation.
61
+ */
59
62
  toString() {
60
63
  const givenNames = this.givenNames.join("\n ");
61
64
  const outStr = `:Country Code: ${this.country}
@@ -1,9 +1,16 @@
1
1
  import { Inference, StringDict, Page } from "../../parsing/common";
2
2
  import { ProofOfAddressV1Document } from "./proofOfAddressV1Document";
3
+ /**
4
+ * Inference prediction for Proof of Address, API version 1.
5
+ */
3
6
  export declare class ProofOfAddressV1 extends Inference {
7
+ /** The endpoint's name. */
4
8
  endpointName: string;
9
+ /** The endpoint's version. */
5
10
  endpointVersion: string;
11
+ /** The document-level prediction. */
6
12
  prediction: ProofOfAddressV1Document;
13
+ /** The document's pages. */
7
14
  pages: Page<ProofOfAddressV1Document>[];
8
15
  constructor(rawPrediction: StringDict);
9
16
  }
@@ -3,11 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ProofOfAddressV1 = void 0;
4
4
  const common_1 = require("../../parsing/common");
5
5
  const proofOfAddressV1Document_1 = require("./proofOfAddressV1Document");
6
+ /**
7
+ * Inference prediction for Proof of Address, API version 1.
8
+ */
6
9
  class ProofOfAddressV1 extends common_1.Inference {
7
10
  constructor(rawPrediction) {
8
11
  super(rawPrediction);
12
+ /** The endpoint's name. */
9
13
  this.endpointName = "proof_of_address";
14
+ /** The endpoint's version. */
10
15
  this.endpointVersion = "1";
16
+ /** The document's pages. */
11
17
  this.pages = [];
12
18
  this.prediction = new proofOfAddressV1Document_1.ProofOfAddressV1Document(rawPrediction["prediction"]);
13
19
  this.pages = rawPrediction["pages"].map((page) => new common_1.Page(proofOfAddressV1Document_1.ProofOfAddressV1Document, page, page["id"], page["orientation"]));
@@ -23,5 +23,8 @@ export declare class ProofOfAddressV1Document implements Prediction {
23
23
  /** The name of the person or company receiving the document. */
24
24
  recipientName: StringField;
25
25
  constructor(rawPrediction: StringDict, pageId?: number);
26
+ /**
27
+ * Default string representation.
28
+ */
26
29
  toString(): string;
27
30
  }
@@ -53,6 +53,9 @@ class ProofOfAddressV1Document {
53
53
  pageId: pageId,
54
54
  });
55
55
  }
56
+ /**
57
+ * Default string representation.
58
+ */
56
59
  toString() {
57
60
  const issuerCompanyRegistration = this.issuerCompanyRegistration.join("\n ");
58
61
  const recipientCompanyRegistration = this.recipientCompanyRegistration.join("\n ");
@@ -1,9 +1,16 @@
1
1
  import { Inference, StringDict, Page } from "../../parsing/common";
2
2
  import { ReceiptV4Document } from "./receiptV4Document";
3
+ /**
4
+ * Inference prediction for Receipt, API version 4.
5
+ */
3
6
  export declare class ReceiptV4 extends Inference {
7
+ /** The endpoint's name. */
4
8
  endpointName: string;
9
+ /** The endpoint's version. */
5
10
  endpointVersion: string;
11
+ /** The document-level prediction. */
6
12
  prediction: ReceiptV4Document;
13
+ /** The document's pages. */
7
14
  pages: Page<ReceiptV4Document>[];
8
15
  constructor(rawPrediction: StringDict);
9
16
  }
@@ -3,10 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ReceiptV4 = void 0;
4
4
  const common_1 = require("../../parsing/common");
5
5
  const receiptV4Document_1 = require("./receiptV4Document");
6
+ /**
7
+ * Inference prediction for Receipt, API version 4.
8
+ */
6
9
  class ReceiptV4 extends common_1.Inference {
7
10
  constructor(rawPrediction) {
8
11
  super(rawPrediction);
12
+ /** The endpoint's name. */
9
13
  this.endpointName = "expense_receipts";
14
+ /** The endpoint's version. */
10
15
  this.endpointVersion = "4";
11
16
  this.prediction = new receiptV4Document_1.ReceiptV4Document(rawPrediction["prediction"]);
12
17
  this.pages = rawPrediction["pages"].map((page) => new common_1.Page(receiptV4Document_1.ReceiptV4Document, page, page["id"], page["orientation"]));
@@ -1,5 +1,8 @@
1
1
  import { Prediction, StringDict } from "../../parsing/common";
2
2
  import { ClassificationField, AmountField, DateField, StringField, LocaleField, TaxField } from "../../parsing/standard";
3
+ /**
4
+ * Document data for Receipt, API version 5.
5
+ */
3
6
  export declare class ReceiptV4Document implements Prediction {
4
7
  /** Where the purchase was made, the language, and the currency. */
5
8
  locale: LocaleField;
@@ -26,5 +29,8 @@ export declare class ReceiptV4Document implements Prediction {
26
29
  /** Total tax amount of the purchase. */
27
30
  totalTax: AmountField;
28
31
  constructor(rawPrediction: StringDict, pageId?: number);
32
+ /**
33
+ * Default string representation.
34
+ */
29
35
  toString(): string;
30
36
  }
@@ -3,6 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ReceiptV4Document = void 0;
4
4
  const common_1 = require("../../parsing/common");
5
5
  const standard_1 = require("../../parsing/standard");
6
+ /**
7
+ * Document data for Receipt, API version 5.
8
+ */
6
9
  class ReceiptV4Document {
7
10
  constructor(rawPrediction, pageId) {
8
11
  this.locale = new standard_1.LocaleField({
@@ -48,6 +51,9 @@ class ReceiptV4Document {
48
51
  });
49
52
  this.taxes = new standard_1.Taxes().init(rawPrediction["taxes"], pageId);
50
53
  }
54
+ /**
55
+ * Default string representation.
56
+ */
51
57
  toString() {
52
58
  const outStr = `:Locale: ${this.locale}
53
59
  :Date: ${this.date}
@@ -1,9 +1,16 @@
1
1
  import { Inference, StringDict, Page } from "../../parsing/common";
2
2
  import { ReceiptV5Document } from "./receiptV5Document";
3
+ /**
4
+ * Inference prediction for Receipt, API version 5.
5
+ */
3
6
  export declare class ReceiptV5 extends Inference {
7
+ /** The endpoint's name. */
4
8
  endpointName: string;
9
+ /** The endpoint's version. */
5
10
  endpointVersion: string;
11
+ /** The document-level prediction. */
6
12
  prediction: ReceiptV5Document;
13
+ /** The document's pages. */
7
14
  pages: Page<ReceiptV5Document>[];
8
15
  constructor(rawPrediction: StringDict);
9
16
  }
@@ -3,11 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ReceiptV5 = void 0;
4
4
  const common_1 = require("../../parsing/common");
5
5
  const receiptV5Document_1 = require("./receiptV5Document");
6
+ /**
7
+ * Inference prediction for Receipt, API version 5.
8
+ */
6
9
  class ReceiptV5 extends common_1.Inference {
7
10
  constructor(rawPrediction) {
8
11
  super(rawPrediction);
12
+ /** The endpoint's name. */
9
13
  this.endpointName = "expense_receipts";
14
+ /** The endpoint's version. */
10
15
  this.endpointVersion = "5";
16
+ /** The document's pages. */
11
17
  this.pages = [];
12
18
  this.prediction = new receiptV5Document_1.ReceiptV5Document(rawPrediction["prediction"]);
13
19
  this.pages = rawPrediction["pages"].map((page) => new common_1.Page(receiptV5Document_1.ReceiptV5Document, page, page["id"], page["orientation"]));
@@ -38,5 +38,8 @@ export declare class ReceiptV5Document implements Prediction {
38
38
  /** The total amount of taxes. */
39
39
  totalTax: AmountField;
40
40
  constructor(rawPrediction: StringDict, pageId?: number);
41
+ /**
42
+ * Default string representation.
43
+ */
41
44
  toString(): string;
42
45
  }
@@ -73,6 +73,9 @@ class ReceiptV5Document {
73
73
  pageId: pageId,
74
74
  });
75
75
  }
76
+ /**
77
+ * Default string representation.
78
+ */
76
79
  toString() {
77
80
  const supplierCompanyRegistrations = this.supplierCompanyRegistrations.join("\n ");
78
81
  let lineItemsSummary = "";
@@ -1,10 +1,17 @@
1
1
  import { Inference, StringDict, Page } from "../../../parsing/common";
2
2
  import { BankCheckV1Document } from "./bankCheckV1Document";
3
3
  import { BankCheckV1Page } from "./bankCheckV1Page";
4
+ /**
5
+ * Inference prediction for Bank Check, API version 1.
6
+ */
4
7
  export declare class BankCheckV1 extends Inference {
8
+ /** The endpoint's name. */
5
9
  endpointName: string;
10
+ /** The endpoint's version. */
6
11
  endpointVersion: string;
12
+ /** The document-level prediction. */
7
13
  prediction: BankCheckV1Document;
14
+ /** The document's pages. */
8
15
  pages: Page<BankCheckV1Page>[];
9
16
  constructor(rawPrediction: StringDict);
10
17
  }
@@ -4,11 +4,17 @@ exports.BankCheckV1 = void 0;
4
4
  const common_1 = require("../../../parsing/common");
5
5
  const bankCheckV1Document_1 = require("./bankCheckV1Document");
6
6
  const bankCheckV1Page_1 = require("./bankCheckV1Page");
7
+ /**
8
+ * Inference prediction for Bank Check, API version 1.
9
+ */
7
10
  class BankCheckV1 extends common_1.Inference {
8
11
  constructor(rawPrediction) {
9
12
  super(rawPrediction);
13
+ /** The endpoint's name. */
10
14
  this.endpointName = "bank_check";
15
+ /** The endpoint's version. */
11
16
  this.endpointVersion = "1";
17
+ /** The document's pages. */
12
18
  this.pages = [];
13
19
  this.prediction = new bankCheckV1Document_1.BankCheckV1Document(rawPrediction["prediction"]);
14
20
  this.pages = rawPrediction["pages"].map((page) => new common_1.Page(bankCheckV1Page_1.BankCheckV1Page, page, page["id"], page["orientation"]));
@@ -17,5 +17,8 @@ export declare class BankCheckV1Document implements Prediction {
17
17
  /** The check issuer's routing number. */
18
18
  routingNumber: StringField;
19
19
  constructor(rawPrediction: StringDict, pageId?: number);
20
+ /**
21
+ * Default string representation.
22
+ */
20
23
  toString(): string;
21
24
  }
@@ -36,6 +36,9 @@ class BankCheckV1Document {
36
36
  pageId: pageId,
37
37
  });
38
38
  }
39
+ /**
40
+ * Default string representation.
41
+ */
39
42
  toString() {
40
43
  const payees = this.payees.join("\n ");
41
44
  const outStr = `:Check Issue Date: ${this.date}
@@ -1,10 +1,17 @@
1
1
  import { Inference, StringDict, Page } from "../../../parsing/common";
2
2
  import { DriverLicenseV1Document } from "./driverLicenseV1Document";
3
3
  import { DriverLicenseV1Page } from "./driverLicenseV1Page";
4
+ /**
5
+ * Inference prediction for Driver License, API version 1.
6
+ */
4
7
  export declare class DriverLicenseV1 extends Inference {
8
+ /** The endpoint's name. */
5
9
  endpointName: string;
10
+ /** The endpoint's version. */
6
11
  endpointVersion: string;
12
+ /** The document-level prediction. */
7
13
  prediction: DriverLicenseV1Document;
14
+ /** The document's pages. */
8
15
  pages: Page<DriverLicenseV1Page>[];
9
16
  constructor(rawPrediction: StringDict);
10
17
  }
@@ -4,11 +4,17 @@ exports.DriverLicenseV1 = void 0;
4
4
  const common_1 = require("../../../parsing/common");
5
5
  const driverLicenseV1Document_1 = require("./driverLicenseV1Document");
6
6
  const driverLicenseV1Page_1 = require("./driverLicenseV1Page");
7
+ /**
8
+ * Inference prediction for Driver License, API version 1.
9
+ */
7
10
  class DriverLicenseV1 extends common_1.Inference {
8
11
  constructor(rawPrediction) {
9
12
  super(rawPrediction);
13
+ /** The endpoint's name. */
10
14
  this.endpointName = "us_driver_license";
15
+ /** The endpoint's version. */
11
16
  this.endpointVersion = "1";
17
+ /** The document's pages. */
12
18
  this.pages = [];
13
19
  this.prediction = new driverLicenseV1Document_1.DriverLicenseV1Document(rawPrediction["prediction"]);
14
20
  this.pages = rawPrediction["pages"].map((page) => new common_1.Page(driverLicenseV1Page_1.DriverLicenseV1Page, page, page["id"], page["orientation"]));
@@ -39,5 +39,8 @@ export declare class DriverLicenseV1Document implements Prediction {
39
39
  /** US driver license holders weight */
40
40
  weight: StringField;
41
41
  constructor(rawPrediction: StringDict, pageId?: number);
42
+ /**
43
+ * Default string representation.
44
+ */
42
45
  toString(): string;
43
46
  }
@@ -77,6 +77,9 @@ class DriverLicenseV1Document {
77
77
  pageId: pageId,
78
78
  });
79
79
  }
80
+ /**
81
+ * Default string representation.
82
+ */
80
83
  toString() {
81
84
  const outStr = `:State: ${this.state}
82
85
  :Driver License ID: ${this.driverLicenseId}