mindee 4.0.1 → 4.1.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 (171) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/package.json +4 -3
  3. package/src/cli.js +36 -66
  4. package/src/client.d.ts +76 -32
  5. package/src/client.js +108 -21
  6. package/src/http/endpoint.d.ts +36 -0
  7. package/src/http/endpoint.js +54 -16
  8. package/src/http/error.d.ts +66 -1
  9. package/src/http/error.js +196 -4
  10. package/src/http/index.d.ts +1 -1
  11. package/src/http/index.js +10 -1
  12. package/src/index.d.ts +2 -1
  13. package/src/index.js +2 -1
  14. package/src/input/base.d.ts +1 -0
  15. package/src/input/base.js +3 -0
  16. package/src/input/pageOptions.d.ts +4 -0
  17. package/src/input/pageOptions.js +3 -0
  18. package/src/input/sources.d.ts +2 -3
  19. package/src/input/sources.js +2 -1
  20. package/src/internal.d.ts +5 -0
  21. package/src/internal.js +31 -0
  22. package/src/parsing/common/apiRequest.d.ts +9 -0
  23. package/src/parsing/common/apiRequest.js +5 -0
  24. package/src/parsing/common/apiResponse.d.ts +15 -0
  25. package/src/parsing/common/apiResponse.js +15 -0
  26. package/src/parsing/common/asyncPredictResponse.d.ts +24 -3
  27. package/src/parsing/common/asyncPredictResponse.js +15 -0
  28. package/src/parsing/common/document.d.ts +17 -0
  29. package/src/parsing/common/document.js +16 -4
  30. package/src/parsing/common/extras/cropperExtra.d.ts +3 -0
  31. package/src/parsing/common/extras/cropperExtra.js +3 -0
  32. package/src/parsing/common/extras/extras.d.ts +3 -0
  33. package/src/parsing/common/extras/extras.js +3 -0
  34. package/src/parsing/common/inference.d.ts +26 -0
  35. package/src/parsing/common/inference.js +23 -2
  36. package/src/parsing/common/mvisionV1.d.ts +3 -0
  37. package/src/parsing/common/mvisionV1.js +3 -0
  38. package/src/parsing/common/ocr.d.ts +3 -0
  39. package/src/parsing/common/ocr.js +3 -0
  40. package/src/parsing/common/ocrPage.d.ts +3 -0
  41. package/src/parsing/common/ocrPage.js +3 -0
  42. package/src/parsing/common/orientation.d.ts +3 -0
  43. package/src/parsing/common/orientation.js +3 -0
  44. package/src/parsing/common/page.d.ts +19 -0
  45. package/src/parsing/common/page.js +15 -0
  46. package/src/parsing/common/predictResponse.d.ts +11 -0
  47. package/src/parsing/common/predictResponse.js +10 -0
  48. package/src/parsing/custom/classificationField.d.ts +3 -0
  49. package/src/parsing/custom/classificationField.js +3 -0
  50. package/src/parsing/custom/listField.d.ts +6 -0
  51. package/src/parsing/custom/listField.js +6 -0
  52. package/src/parsing/standard/amount.d.ts +3 -0
  53. package/src/parsing/standard/amount.js +3 -0
  54. package/src/parsing/standard/base.d.ts +3 -0
  55. package/src/parsing/standard/base.js +3 -0
  56. package/src/parsing/standard/locale.d.ts +3 -0
  57. package/src/parsing/standard/locale.js +3 -0
  58. package/src/parsing/standard/paymentDetails.d.ts +3 -0
  59. package/src/parsing/standard/paymentDetails.js +3 -0
  60. package/src/parsing/standard/position.d.ts +3 -0
  61. package/src/parsing/standard/position.js +3 -0
  62. package/src/parsing/standard/tax.d.ts +3 -0
  63. package/src/parsing/standard/tax.js +3 -0
  64. package/src/product/cropper/cropperV1.d.ts +7 -0
  65. package/src/product/cropper/cropperV1.js +6 -0
  66. package/src/product/cropper/cropperV1Document.d.ts +6 -0
  67. package/src/product/cropper/cropperV1Document.js +6 -0
  68. package/src/product/cropper/internal.d.ts +2 -0
  69. package/src/product/cropper/internal.js +7 -0
  70. package/src/product/custom/customV1.d.ts +7 -0
  71. package/src/product/custom/customV1.js +6 -0
  72. package/src/product/custom/customV1Document.d.ts +16 -0
  73. package/src/product/custom/customV1Document.js +16 -2
  74. package/src/product/custom/customV1Page.d.ts +7 -0
  75. package/src/product/custom/customV1Page.js +7 -0
  76. package/src/product/custom/internal.d.ts +3 -0
  77. package/src/product/custom/internal.js +9 -0
  78. package/src/product/eu/internal.d.ts +1 -0
  79. package/src/product/eu/internal.js +27 -0
  80. package/src/product/eu/licensePlate/internal.d.ts +2 -0
  81. package/src/product/eu/licensePlate/internal.js +7 -0
  82. package/src/product/eu/licensePlate/licensePlateV1.d.ts +7 -0
  83. package/src/product/eu/licensePlate/licensePlateV1.js +6 -0
  84. package/src/product/eu/licensePlate/licensePlateV1Document.d.ts +3 -0
  85. package/src/product/eu/licensePlate/licensePlateV1Document.js +3 -0
  86. package/src/product/financialDocument/financialDocumentV1.d.ts +7 -0
  87. package/src/product/financialDocument/financialDocumentV1.js +6 -0
  88. package/src/product/financialDocument/financialDocumentV1Document.d.ts +3 -0
  89. package/src/product/financialDocument/financialDocumentV1Document.js +3 -0
  90. package/src/product/financialDocument/internal.d.ts +3 -0
  91. package/src/product/financialDocument/internal.js +9 -0
  92. package/src/product/fr/bankAccountDetails/bankAccountDetailsV1.d.ts +7 -0
  93. package/src/product/fr/bankAccountDetails/bankAccountDetailsV1.js +6 -0
  94. package/src/product/fr/bankAccountDetails/bankAccountDetailsV1Document.d.ts +3 -0
  95. package/src/product/fr/bankAccountDetails/bankAccountDetailsV1Document.js +3 -0
  96. package/src/product/fr/bankAccountDetails/bankAccountDetailsV2.d.ts +7 -0
  97. package/src/product/fr/bankAccountDetails/bankAccountDetailsV2.js +6 -0
  98. package/src/product/fr/bankAccountDetails/bankAccountDetailsV2Document.d.ts +3 -0
  99. package/src/product/fr/bankAccountDetails/bankAccountDetailsV2Document.js +3 -0
  100. package/src/product/fr/bankAccountDetails/internal.d.ts +5 -0
  101. package/src/product/fr/bankAccountDetails/internal.js +13 -0
  102. package/src/product/fr/carteVitale/carteVitaleV1.d.ts +7 -0
  103. package/src/product/fr/carteVitale/carteVitaleV1.js +6 -0
  104. package/src/product/fr/carteVitale/carteVitaleV1Document.d.ts +3 -0
  105. package/src/product/fr/carteVitale/carteVitaleV1Document.js +3 -0
  106. package/src/product/fr/carteVitale/internal.d.ts +2 -0
  107. package/src/product/fr/carteVitale/internal.js +7 -0
  108. package/src/product/fr/idCard/idCardV1.d.ts +7 -0
  109. package/src/product/fr/idCard/idCardV1.js +6 -0
  110. package/src/product/fr/idCard/idCardV1Document.d.ts +3 -0
  111. package/src/product/fr/idCard/idCardV1Document.js +3 -0
  112. package/src/product/fr/idCard/internal.d.ts +3 -0
  113. package/src/product/fr/idCard/internal.js +9 -0
  114. package/src/product/fr/internal.d.ts +3 -0
  115. package/src/product/fr/internal.js +29 -0
  116. package/src/product/index.d.ts +0 -1
  117. package/src/product/index.js +1 -3
  118. package/src/product/internal.d.ts +11 -0
  119. package/src/product/internal.js +37 -0
  120. package/src/product/invoice/internal.d.ts +3 -0
  121. package/src/product/invoice/internal.js +9 -0
  122. package/src/product/invoice/invoiceV4.d.ts +7 -0
  123. package/src/product/invoice/invoiceV4.js +6 -0
  124. package/src/product/invoice/invoiceV4Document.d.ts +3 -1
  125. package/src/product/invoice/invoiceV4Document.js +3 -1
  126. package/src/product/invoice/invoiceV4LineItem.d.ts +9 -0
  127. package/src/product/invoice/invoiceV4LineItem.js +9 -0
  128. package/src/product/invoiceSplitter/internal.d.ts +3 -0
  129. package/src/product/invoiceSplitter/internal.js +9 -0
  130. package/src/product/invoiceSplitter/invoiceSplitterV1.d.ts +7 -0
  131. package/src/product/invoiceSplitter/invoiceSplitterV1.js +6 -0
  132. package/src/product/invoiceSplitter/invoiceSplitterV1Document.d.ts +8 -2
  133. package/src/product/invoiceSplitter/invoiceSplitterV1Document.js +7 -1
  134. package/src/product/invoiceSplitter/invoiceSplitterV1PageGroup.d.ts +9 -1
  135. package/src/product/invoiceSplitter/invoiceSplitterV1PageGroup.js +10 -3
  136. package/src/product/passport/internal.d.ts +2 -0
  137. package/src/product/passport/internal.js +7 -0
  138. package/src/product/passport/passportV1.d.ts +7 -0
  139. package/src/product/passport/passportV1.js +6 -0
  140. package/src/product/passport/passportV1Document.d.ts +3 -0
  141. package/src/product/passport/passportV1Document.js +3 -0
  142. package/src/product/proofOfAddress/internal.d.ts +2 -0
  143. package/src/product/proofOfAddress/internal.js +7 -0
  144. package/src/product/proofOfAddress/proofOfAddressV1.d.ts +7 -0
  145. package/src/product/proofOfAddress/proofOfAddressV1.js +6 -0
  146. package/src/product/proofOfAddress/proofOfAddressV1Document.d.ts +3 -0
  147. package/src/product/proofOfAddress/proofOfAddressV1Document.js +3 -0
  148. package/src/product/receipt/internal.d.ts +5 -0
  149. package/src/product/receipt/internal.js +13 -0
  150. package/src/product/receipt/receiptV4.d.ts +7 -0
  151. package/src/product/receipt/receiptV4.js +5 -0
  152. package/src/product/receipt/receiptV4Document.d.ts +6 -0
  153. package/src/product/receipt/receiptV4Document.js +6 -0
  154. package/src/product/receipt/receiptV5.d.ts +7 -0
  155. package/src/product/receipt/receiptV5.js +6 -0
  156. package/src/product/receipt/receiptV5Document.d.ts +3 -0
  157. package/src/product/receipt/receiptV5Document.js +3 -0
  158. package/src/product/us/bankCheck/bankCheckV1.d.ts +7 -0
  159. package/src/product/us/bankCheck/bankCheckV1.js +6 -0
  160. package/src/product/us/bankCheck/bankCheckV1Document.d.ts +3 -0
  161. package/src/product/us/bankCheck/bankCheckV1Document.js +3 -0
  162. package/src/product/us/bankCheck/internal.d.ts +3 -0
  163. package/src/product/us/bankCheck/internal.js +9 -0
  164. package/src/product/us/driverLicense/driverLicenseV1.d.ts +7 -0
  165. package/src/product/us/driverLicense/driverLicenseV1.js +6 -0
  166. package/src/product/us/driverLicense/driverLicenseV1Document.d.ts +3 -0
  167. package/src/product/us/driverLicense/driverLicenseV1Document.js +3 -0
  168. package/src/product/us/driverLicense/internal.d.ts +3 -0
  169. package/src/product/us/driverLicense/internal.js +9 -0
  170. package/src/product/us/internal.d.ts +2 -0
  171. package/src/product/us/internal.js +28 -0
@@ -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 ");
@@ -0,0 +1,5 @@
1
+ export { ReceiptV4 } from "./receiptV4";
2
+ export { ReceiptV4Document } from "./receiptV4Document";
3
+ export { ReceiptV5 } from "./receiptV5";
4
+ export { ReceiptV5Document } from "./receiptV5Document";
5
+ export { ReceiptV5LineItem } from "./receiptV5LineItem";
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ReceiptV5LineItem = exports.ReceiptV5Document = exports.ReceiptV5 = exports.ReceiptV4Document = exports.ReceiptV4 = void 0;
4
+ var receiptV4_1 = require("./receiptV4");
5
+ Object.defineProperty(exports, "ReceiptV4", { enumerable: true, get: function () { return receiptV4_1.ReceiptV4; } });
6
+ var receiptV4Document_1 = require("./receiptV4Document");
7
+ Object.defineProperty(exports, "ReceiptV4Document", { enumerable: true, get: function () { return receiptV4Document_1.ReceiptV4Document; } });
8
+ var receiptV5_1 = require("./receiptV5");
9
+ Object.defineProperty(exports, "ReceiptV5", { enumerable: true, get: function () { return receiptV5_1.ReceiptV5; } });
10
+ var receiptV5Document_1 = require("./receiptV5Document");
11
+ Object.defineProperty(exports, "ReceiptV5Document", { enumerable: true, get: function () { return receiptV5Document_1.ReceiptV5Document; } });
12
+ var receiptV5LineItem_1 = require("./receiptV5LineItem");
13
+ Object.defineProperty(exports, "ReceiptV5LineItem", { enumerable: true, get: function () { return receiptV5LineItem_1.ReceiptV5LineItem; } });
@@ -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}
@@ -0,0 +1,3 @@
1
+ export { BankCheckV1 } from "./bankCheckV1";
2
+ export { BankCheckV1Document } from "./bankCheckV1Document";
3
+ export { BankCheckV1Page } from "./bankCheckV1Page";
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BankCheckV1Page = exports.BankCheckV1Document = exports.BankCheckV1 = void 0;
4
+ var bankCheckV1_1 = require("./bankCheckV1");
5
+ Object.defineProperty(exports, "BankCheckV1", { enumerable: true, get: function () { return bankCheckV1_1.BankCheckV1; } });
6
+ var bankCheckV1Document_1 = require("./bankCheckV1Document");
7
+ Object.defineProperty(exports, "BankCheckV1Document", { enumerable: true, get: function () { return bankCheckV1Document_1.BankCheckV1Document; } });
8
+ var bankCheckV1Page_1 = require("./bankCheckV1Page");
9
+ Object.defineProperty(exports, "BankCheckV1Page", { enumerable: true, get: function () { return bankCheckV1Page_1.BankCheckV1Page; } });
@@ -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}
@@ -0,0 +1,3 @@
1
+ export { DriverLicenseV1 } from "./driverLicenseV1";
2
+ export { DriverLicenseV1Document } from "./driverLicenseV1Document";
3
+ export { DriverLicenseV1Page } from "./driverLicenseV1Page";
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DriverLicenseV1Page = 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; } });
8
+ var driverLicenseV1Page_1 = require("./driverLicenseV1Page");
9
+ Object.defineProperty(exports, "DriverLicenseV1Page", { enumerable: true, get: function () { return driverLicenseV1Page_1.DriverLicenseV1Page; } });
@@ -0,0 +1,2 @@
1
+ export * as bankCheck from "./bankCheck/internal";
2
+ export * as driverLicense from "./driverLicense/internal";
@@ -0,0 +1,28 @@
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.driverLicense = exports.bankCheck = void 0;
27
+ exports.bankCheck = __importStar(require("./bankCheck/internal"));
28
+ exports.driverLicense = __importStar(require("./driverLicense/internal"));