mindee 4.29.0-rc5 → 4.29.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 (110) hide show
  1. package/CHANGELOG.md +17 -24
  2. package/package.json +5 -5
  3. package/src/client.js +4 -3
  4. package/src/clientV2.d.ts +3 -38
  5. package/src/clientV2.js +6 -66
  6. package/src/geometry/boundingBox.d.ts +4 -1
  7. package/src/geometry/boundingBox.js +9 -1
  8. package/src/geometry/boundingBoxUtils.js +1 -6
  9. package/src/geometry/index.js +2 -1
  10. package/src/geometry/polygon.d.ts +22 -0
  11. package/src/geometry/polygon.js +36 -0
  12. package/src/geometry/polygonUtils.d.ts +8 -9
  13. package/src/index.d.ts +2 -1
  14. package/src/index.js +6 -1
  15. package/src/input/localResponse.d.ts +5 -5
  16. package/src/input/localResponse.js +17 -7
  17. package/src/input/sources/base64Input.js +1 -0
  18. package/src/input/sources/bufferInput.js +1 -0
  19. package/src/input/sources/bytesInput.js +1 -0
  20. package/src/input/sources/inputSource.d.ts +2 -0
  21. package/src/input/sources/inputSource.js +4 -0
  22. package/src/input/sources/localInputSource.d.ts +2 -2
  23. package/src/input/sources/localInputSource.js +16 -4
  24. package/src/input/sources/pathInput.js +1 -0
  25. package/src/input/sources/streamInput.js +1 -0
  26. package/src/input/sources/urlInput.js +1 -0
  27. package/src/parsing/custom/listField.d.ts +2 -2
  28. package/src/parsing/custom/listField.js +1 -6
  29. package/src/parsing/standard/field.js +1 -1
  30. package/src/parsing/v2/field/baseField.d.ts +2 -0
  31. package/src/parsing/v2/field/baseField.js +7 -1
  32. package/src/parsing/v2/field/fieldConfidence.d.ts +4 -4
  33. package/src/parsing/v2/field/fieldConfidence.js +5 -4
  34. package/src/parsing/v2/field/fieldFactory.d.ts +1 -1
  35. package/src/parsing/v2/field/fieldLocation.js +2 -4
  36. package/src/parsing/v2/field/inferenceFields.d.ts +3 -0
  37. package/src/parsing/v2/field/inferenceFields.js +30 -0
  38. package/src/parsing/v2/field/listField.d.ts +8 -0
  39. package/src/parsing/v2/field/listField.js +31 -0
  40. package/src/parsing/v2/field/objectField.d.ts +4 -2
  41. package/src/parsing/v2/field/objectField.js +14 -2
  42. package/src/parsing/v2/field/simpleField.d.ts +14 -2
  43. package/src/parsing/v2/field/simpleField.js +29 -2
  44. package/src/parsing/v2/index.d.ts +0 -1
  45. package/src/parsing/v2/index.js +1 -3
  46. package/src/parsing/v2/inferenceResult.d.ts +4 -4
  47. package/src/parsing/v2/inferenceResult.js +5 -8
  48. package/src/parsing/v2/rawText.d.ts +3 -9
  49. package/src/parsing/v2/rawText.js +2 -5
  50. package/src/parsing/v2/rawTextPage.d.ts +11 -0
  51. package/src/parsing/v2/rawTextPage.js +12 -0
  52. package/src/product/billOfLading/billOfLadingV1Carrier.js +2 -1
  53. package/src/product/billOfLading/billOfLadingV1CarrierItem.js +2 -1
  54. package/src/product/billOfLading/billOfLadingV1Consignee.js +2 -1
  55. package/src/product/billOfLading/billOfLadingV1NotifyParty.js +2 -1
  56. package/src/product/billOfLading/billOfLadingV1Shipper.js +2 -1
  57. package/src/product/financialDocument/financialDocumentV1LineItem.js +2 -1
  58. package/src/product/fr/bankAccountDetails/bankAccountDetailsV2Bban.js +2 -1
  59. package/src/product/fr/energyBill/energyBillV1EnergyConsumer.js +2 -1
  60. package/src/product/fr/energyBill/energyBillV1EnergySupplier.js +2 -1
  61. package/src/product/fr/energyBill/energyBillV1EnergyUsage.js +2 -1
  62. package/src/product/fr/energyBill/energyBillV1MeterDetail.js +2 -1
  63. package/src/product/fr/energyBill/energyBillV1Subscription.js +2 -1
  64. package/src/product/fr/energyBill/energyBillV1TaxesAndContribution.js +2 -1
  65. package/src/product/fr/payslip/payslipV2BankAccountDetail.js +2 -1
  66. package/src/product/fr/payslip/payslipV2Employee.js +2 -1
  67. package/src/product/fr/payslip/payslipV2Employer.js +2 -1
  68. package/src/product/fr/payslip/payslipV2Employment.js +2 -1
  69. package/src/product/fr/payslip/payslipV2PayDetail.js +2 -1
  70. package/src/product/fr/payslip/payslipV2PayPeriod.js +2 -1
  71. package/src/product/fr/payslip/payslipV2Pto.js +2 -1
  72. package/src/product/fr/payslip/payslipV2SalaryDetail.js +2 -1
  73. package/src/product/fr/payslip/payslipV3BankAccountDetail.js +2 -1
  74. package/src/product/fr/payslip/payslipV3Employee.js +2 -1
  75. package/src/product/fr/payslip/payslipV3Employer.js +2 -1
  76. package/src/product/fr/payslip/payslipV3Employment.js +2 -1
  77. package/src/product/fr/payslip/payslipV3PaidTimeOff.js +2 -1
  78. package/src/product/fr/payslip/payslipV3PayDetail.js +2 -1
  79. package/src/product/fr/payslip/payslipV3PayPeriod.js +2 -1
  80. package/src/product/fr/payslip/payslipV3SalaryDetail.js +2 -1
  81. package/src/product/invoice/invoiceV4LineItem.js +2 -1
  82. package/src/product/invoiceSplitter/invoiceSplitterV1InvoicePageGroup.js +2 -1
  83. package/src/product/nutritionFactsLabel/nutritionFactsLabelV1AddedSugar.js +2 -1
  84. package/src/product/nutritionFactsLabel/nutritionFactsLabelV1Calorie.js +2 -1
  85. package/src/product/nutritionFactsLabel/nutritionFactsLabelV1Cholesterol.js +2 -1
  86. package/src/product/nutritionFactsLabel/nutritionFactsLabelV1DietaryFiber.js +2 -1
  87. package/src/product/nutritionFactsLabel/nutritionFactsLabelV1Nutrient.js +2 -1
  88. package/src/product/nutritionFactsLabel/nutritionFactsLabelV1Protein.js +2 -1
  89. package/src/product/nutritionFactsLabel/nutritionFactsLabelV1SaturatedFat.js +2 -1
  90. package/src/product/nutritionFactsLabel/nutritionFactsLabelV1ServingSize.js +2 -1
  91. package/src/product/nutritionFactsLabel/nutritionFactsLabelV1Sodium.js +2 -1
  92. package/src/product/nutritionFactsLabel/nutritionFactsLabelV1TotalCarbohydrate.js +2 -1
  93. package/src/product/nutritionFactsLabel/nutritionFactsLabelV1TotalFat.js +2 -1
  94. package/src/product/nutritionFactsLabel/nutritionFactsLabelV1TotalSugar.js +2 -1
  95. package/src/product/nutritionFactsLabel/nutritionFactsLabelV1TransFat.js +2 -1
  96. package/src/product/receipt/receiptV5LineItem.js +2 -1
  97. package/src/product/resume/resumeV1Certificate.js +2 -1
  98. package/src/product/resume/resumeV1Education.js +2 -1
  99. package/src/product/resume/resumeV1Language.js +2 -1
  100. package/src/product/resume/resumeV1ProfessionalExperience.js +2 -1
  101. package/src/product/resume/resumeV1SocialNetworksUrl.js +2 -1
  102. package/src/product/us/healthcareCard/healthcareCardV1Copay.js +2 -1
  103. package/src/product/us/usMail/usMailV2RecipientAddress.js +2 -1
  104. package/src/product/us/usMail/usMailV2SenderAddress.js +2 -1
  105. package/src/product/us/usMail/usMailV3RecipientAddress.js +2 -1
  106. package/src/product/us/usMail/usMailV3SenderAddress.js +2 -1
  107. package/src/parsing/v2/field/dynamicField.d.ts +0 -7
  108. package/src/parsing/v2/field/dynamicField.js +0 -16
  109. package/src/parsing/v2/inferenceResultOptions.d.ts +0 -9
  110. package/src/parsing/v2/inferenceResultOptions.js +0 -10
@@ -8,6 +8,7 @@ var _NutritionFactsLabelV1Calorie_instances, _NutritionFactsLabelV1Calorie_print
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.NutritionFactsLabelV1Calorie = void 0;
10
10
  const common_1 = require("../../parsing/common");
11
+ const geometry_1 = require("../../geometry");
11
12
  /**
12
13
  * The amount of calories in the product.
13
14
  */
@@ -20,7 +21,7 @@ class NutritionFactsLabelV1Calorie {
20
21
  * Contains the relative vertices coordinates (points) of a polygon containing
21
22
  * the field in the document.
22
23
  */
23
- this.polygon = [];
24
+ this.polygon = new geometry_1.Polygon();
24
25
  if (prediction["daily_value"] !== undefined &&
25
26
  prediction["daily_value"] !== null &&
26
27
  !isNaN(prediction["daily_value"])) {
@@ -8,6 +8,7 @@ var _NutritionFactsLabelV1Cholesterol_instances, _NutritionFactsLabelV1Cholester
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.NutritionFactsLabelV1Cholesterol = void 0;
10
10
  const common_1 = require("../../parsing/common");
11
+ const geometry_1 = require("../../geometry");
11
12
  /**
12
13
  * The amount of cholesterol in the product.
13
14
  */
@@ -20,7 +21,7 @@ class NutritionFactsLabelV1Cholesterol {
20
21
  * Contains the relative vertices coordinates (points) of a polygon containing
21
22
  * the field in the document.
22
23
  */
23
- this.polygon = [];
24
+ this.polygon = new geometry_1.Polygon();
24
25
  if (prediction["daily_value"] !== undefined &&
25
26
  prediction["daily_value"] !== null &&
26
27
  !isNaN(prediction["daily_value"])) {
@@ -8,6 +8,7 @@ var _NutritionFactsLabelV1DietaryFiber_instances, _NutritionFactsLabelV1DietaryF
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.NutritionFactsLabelV1DietaryFiber = void 0;
10
10
  const common_1 = require("../../parsing/common");
11
+ const geometry_1 = require("../../geometry");
11
12
  /**
12
13
  * The amount of dietary fiber in the product.
13
14
  */
@@ -20,7 +21,7 @@ class NutritionFactsLabelV1DietaryFiber {
20
21
  * Contains the relative vertices coordinates (points) of a polygon containing
21
22
  * the field in the document.
22
23
  */
23
- this.polygon = [];
24
+ this.polygon = new geometry_1.Polygon();
24
25
  if (prediction["daily_value"] !== undefined &&
25
26
  prediction["daily_value"] !== null &&
26
27
  !isNaN(prediction["daily_value"])) {
@@ -8,6 +8,7 @@ var _NutritionFactsLabelV1Nutrient_instances, _NutritionFactsLabelV1Nutrient_pri
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.NutritionFactsLabelV1Nutrient = void 0;
10
10
  const common_1 = require("../../parsing/common");
11
+ const geometry_1 = require("../../geometry");
11
12
  /**
12
13
  * The amount of nutrients in the product.
13
14
  */
@@ -20,7 +21,7 @@ class NutritionFactsLabelV1Nutrient {
20
21
  * Contains the relative vertices coordinates (points) of a polygon containing
21
22
  * the field in the document.
22
23
  */
23
- this.polygon = [];
24
+ this.polygon = new geometry_1.Polygon();
24
25
  if (prediction["daily_value"] !== undefined &&
25
26
  prediction["daily_value"] !== null &&
26
27
  !isNaN(prediction["daily_value"])) {
@@ -8,6 +8,7 @@ var _NutritionFactsLabelV1Protein_instances, _NutritionFactsLabelV1Protein_print
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.NutritionFactsLabelV1Protein = void 0;
10
10
  const common_1 = require("../../parsing/common");
11
+ const geometry_1 = require("../../geometry");
11
12
  /**
12
13
  * The amount of protein in the product.
13
14
  */
@@ -20,7 +21,7 @@ class NutritionFactsLabelV1Protein {
20
21
  * Contains the relative vertices coordinates (points) of a polygon containing
21
22
  * the field in the document.
22
23
  */
23
- this.polygon = [];
24
+ this.polygon = new geometry_1.Polygon();
24
25
  if (prediction["daily_value"] !== undefined &&
25
26
  prediction["daily_value"] !== null &&
26
27
  !isNaN(prediction["daily_value"])) {
@@ -8,6 +8,7 @@ var _NutritionFactsLabelV1SaturatedFat_instances, _NutritionFactsLabelV1Saturate
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.NutritionFactsLabelV1SaturatedFat = void 0;
10
10
  const common_1 = require("../../parsing/common");
11
+ const geometry_1 = require("../../geometry");
11
12
  /**
12
13
  * The amount of saturated fat in the product.
13
14
  */
@@ -20,7 +21,7 @@ class NutritionFactsLabelV1SaturatedFat {
20
21
  * Contains the relative vertices coordinates (points) of a polygon containing
21
22
  * the field in the document.
22
23
  */
23
- this.polygon = [];
24
+ this.polygon = new geometry_1.Polygon();
24
25
  if (prediction["daily_value"] !== undefined &&
25
26
  prediction["daily_value"] !== null &&
26
27
  !isNaN(prediction["daily_value"])) {
@@ -8,6 +8,7 @@ var _NutritionFactsLabelV1ServingSize_instances, _NutritionFactsLabelV1ServingSi
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.NutritionFactsLabelV1ServingSize = void 0;
10
10
  const common_1 = require("../../parsing/common");
11
+ const geometry_1 = require("../../geometry");
11
12
  /**
12
13
  * The size of a single serving of the product.
13
14
  */
@@ -20,7 +21,7 @@ class NutritionFactsLabelV1ServingSize {
20
21
  * Contains the relative vertices coordinates (points) of a polygon containing
21
22
  * the field in the document.
22
23
  */
23
- this.polygon = [];
24
+ this.polygon = new geometry_1.Polygon();
24
25
  if (prediction["amount"] !== undefined &&
25
26
  prediction["amount"] !== null &&
26
27
  !isNaN(prediction["amount"])) {
@@ -8,6 +8,7 @@ var _NutritionFactsLabelV1Sodium_instances, _NutritionFactsLabelV1Sodium_printab
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.NutritionFactsLabelV1Sodium = void 0;
10
10
  const common_1 = require("../../parsing/common");
11
+ const geometry_1 = require("../../geometry");
11
12
  /**
12
13
  * The amount of sodium in the product.
13
14
  */
@@ -20,7 +21,7 @@ class NutritionFactsLabelV1Sodium {
20
21
  * Contains the relative vertices coordinates (points) of a polygon containing
21
22
  * the field in the document.
22
23
  */
23
- this.polygon = [];
24
+ this.polygon = new geometry_1.Polygon();
24
25
  if (prediction["daily_value"] !== undefined &&
25
26
  prediction["daily_value"] !== null &&
26
27
  !isNaN(prediction["daily_value"])) {
@@ -8,6 +8,7 @@ var _NutritionFactsLabelV1TotalCarbohydrate_instances, _NutritionFactsLabelV1Tot
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.NutritionFactsLabelV1TotalCarbohydrate = void 0;
10
10
  const common_1 = require("../../parsing/common");
11
+ const geometry_1 = require("../../geometry");
11
12
  /**
12
13
  * The total amount of carbohydrates in the product.
13
14
  */
@@ -20,7 +21,7 @@ class NutritionFactsLabelV1TotalCarbohydrate {
20
21
  * Contains the relative vertices coordinates (points) of a polygon containing
21
22
  * the field in the document.
22
23
  */
23
- this.polygon = [];
24
+ this.polygon = new geometry_1.Polygon();
24
25
  if (prediction["daily_value"] !== undefined &&
25
26
  prediction["daily_value"] !== null &&
26
27
  !isNaN(prediction["daily_value"])) {
@@ -8,6 +8,7 @@ var _NutritionFactsLabelV1TotalFat_instances, _NutritionFactsLabelV1TotalFat_pri
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.NutritionFactsLabelV1TotalFat = void 0;
10
10
  const common_1 = require("../../parsing/common");
11
+ const geometry_1 = require("../../geometry");
11
12
  /**
12
13
  * The total amount of fat in the product.
13
14
  */
@@ -20,7 +21,7 @@ class NutritionFactsLabelV1TotalFat {
20
21
  * Contains the relative vertices coordinates (points) of a polygon containing
21
22
  * the field in the document.
22
23
  */
23
- this.polygon = [];
24
+ this.polygon = new geometry_1.Polygon();
24
25
  if (prediction["daily_value"] !== undefined &&
25
26
  prediction["daily_value"] !== null &&
26
27
  !isNaN(prediction["daily_value"])) {
@@ -8,6 +8,7 @@ var _NutritionFactsLabelV1TotalSugar_instances, _NutritionFactsLabelV1TotalSugar
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.NutritionFactsLabelV1TotalSugar = void 0;
10
10
  const common_1 = require("../../parsing/common");
11
+ const geometry_1 = require("../../geometry");
11
12
  /**
12
13
  * The total amount of sugars in the product.
13
14
  */
@@ -20,7 +21,7 @@ class NutritionFactsLabelV1TotalSugar {
20
21
  * Contains the relative vertices coordinates (points) of a polygon containing
21
22
  * the field in the document.
22
23
  */
23
- this.polygon = [];
24
+ this.polygon = new geometry_1.Polygon();
24
25
  if (prediction["daily_value"] !== undefined &&
25
26
  prediction["daily_value"] !== null &&
26
27
  !isNaN(prediction["daily_value"])) {
@@ -8,6 +8,7 @@ var _NutritionFactsLabelV1TransFat_instances, _NutritionFactsLabelV1TransFat_pri
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.NutritionFactsLabelV1TransFat = void 0;
10
10
  const common_1 = require("../../parsing/common");
11
+ const geometry_1 = require("../../geometry");
11
12
  /**
12
13
  * The amount of trans fat in the product.
13
14
  */
@@ -20,7 +21,7 @@ class NutritionFactsLabelV1TransFat {
20
21
  * Contains the relative vertices coordinates (points) of a polygon containing
21
22
  * the field in the document.
22
23
  */
23
- this.polygon = [];
24
+ this.polygon = new geometry_1.Polygon();
24
25
  if (prediction["daily_value"] !== undefined &&
25
26
  prediction["daily_value"] !== null &&
26
27
  !isNaN(prediction["daily_value"])) {
@@ -8,6 +8,7 @@ var _ReceiptV5LineItem_instances, _ReceiptV5LineItem_printableValues;
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.ReceiptV5LineItem = void 0;
10
10
  const common_1 = require("../../parsing/common");
11
+ const geometry_1 = require("../../geometry");
11
12
  /**
12
13
  * List of all line items on the receipt.
13
14
  */
@@ -20,7 +21,7 @@ class ReceiptV5LineItem {
20
21
  * Contains the relative vertices coordinates (points) of a polygon containing
21
22
  * the field in the document.
22
23
  */
23
- this.polygon = [];
24
+ this.polygon = new geometry_1.Polygon();
24
25
  this.description = prediction["description"];
25
26
  if (prediction["quantity"] !== undefined &&
26
27
  prediction["quantity"] !== null &&
@@ -8,6 +8,7 @@ var _ResumeV1Certificate_instances, _ResumeV1Certificate_printableValues;
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.ResumeV1Certificate = void 0;
10
10
  const common_1 = require("../../parsing/common");
11
+ const geometry_1 = require("../../geometry");
11
12
  /**
12
13
  * The list of certificates obtained by the candidate.
13
14
  */
@@ -20,7 +21,7 @@ class ResumeV1Certificate {
20
21
  * Contains the relative vertices coordinates (points) of a polygon containing
21
22
  * the field in the document.
22
23
  */
23
- this.polygon = [];
24
+ this.polygon = new geometry_1.Polygon();
24
25
  this.grade = prediction["grade"];
25
26
  this.name = prediction["name"];
26
27
  this.provider = prediction["provider"];
@@ -8,6 +8,7 @@ var _ResumeV1Education_instances, _ResumeV1Education_printableValues;
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.ResumeV1Education = void 0;
10
10
  const common_1 = require("../../parsing/common");
11
+ const geometry_1 = require("../../geometry");
11
12
  /**
12
13
  * The list of the candidate's educational background.
13
14
  */
@@ -20,7 +21,7 @@ class ResumeV1Education {
20
21
  * Contains the relative vertices coordinates (points) of a polygon containing
21
22
  * the field in the document.
22
23
  */
23
- this.polygon = [];
24
+ this.polygon = new geometry_1.Polygon();
24
25
  this.degreeDomain = prediction["degree_domain"];
25
26
  this.degreeType = prediction["degree_type"];
26
27
  this.endMonth = prediction["end_month"];
@@ -8,6 +8,7 @@ var _ResumeV1Language_instances, _ResumeV1Language_printableValues;
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.ResumeV1Language = void 0;
10
10
  const common_1 = require("../../parsing/common");
11
+ const geometry_1 = require("../../geometry");
11
12
  /**
12
13
  * The list of languages that the candidate is proficient in.
13
14
  */
@@ -20,7 +21,7 @@ class ResumeV1Language {
20
21
  * Contains the relative vertices coordinates (points) of a polygon containing
21
22
  * the field in the document.
22
23
  */
23
- this.polygon = [];
24
+ this.polygon = new geometry_1.Polygon();
24
25
  this.language = prediction["language"];
25
26
  this.level = prediction["level"];
26
27
  this.pageId = prediction["page_id"];
@@ -8,6 +8,7 @@ var _ResumeV1ProfessionalExperience_instances, _ResumeV1ProfessionalExperience_p
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.ResumeV1ProfessionalExperience = void 0;
10
10
  const common_1 = require("../../parsing/common");
11
+ const geometry_1 = require("../../geometry");
11
12
  /**
12
13
  * The list of the candidate's professional experiences.
13
14
  */
@@ -20,7 +21,7 @@ class ResumeV1ProfessionalExperience {
20
21
  * Contains the relative vertices coordinates (points) of a polygon containing
21
22
  * the field in the document.
22
23
  */
23
- this.polygon = [];
24
+ this.polygon = new geometry_1.Polygon();
24
25
  this.contractType = prediction["contract_type"];
25
26
  this.department = prediction["department"];
26
27
  this.description = prediction["description"];
@@ -8,6 +8,7 @@ var _ResumeV1SocialNetworksUrl_instances, _ResumeV1SocialNetworksUrl_printableVa
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.ResumeV1SocialNetworksUrl = void 0;
10
10
  const common_1 = require("../../parsing/common");
11
+ const geometry_1 = require("../../geometry");
11
12
  /**
12
13
  * The list of social network profiles of the candidate.
13
14
  */
@@ -20,7 +21,7 @@ class ResumeV1SocialNetworksUrl {
20
21
  * Contains the relative vertices coordinates (points) of a polygon containing
21
22
  * the field in the document.
22
23
  */
23
- this.polygon = [];
24
+ this.polygon = new geometry_1.Polygon();
24
25
  this.name = prediction["name"];
25
26
  this.url = prediction["url"];
26
27
  this.pageId = prediction["page_id"];
@@ -8,6 +8,7 @@ var _HealthcareCardV1Copay_instances, _HealthcareCardV1Copay_printableValues;
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.HealthcareCardV1Copay = void 0;
10
10
  const common_1 = require("../../../parsing/common");
11
+ const geometry_1 = require("../../../geometry");
11
12
  /**
12
13
  * Copayments for covered services.
13
14
  */
@@ -20,7 +21,7 @@ class HealthcareCardV1Copay {
20
21
  * Contains the relative vertices coordinates (points) of a polygon containing
21
22
  * the field in the document.
22
23
  */
23
- this.polygon = [];
24
+ this.polygon = new geometry_1.Polygon();
24
25
  if (prediction["service_fees"] !== undefined &&
25
26
  prediction["service_fees"] !== null &&
26
27
  !isNaN(prediction["service_fees"])) {
@@ -8,6 +8,7 @@ var _UsMailV2RecipientAddress_instances, _UsMailV2RecipientAddress_printableValu
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.UsMailV2RecipientAddress = void 0;
10
10
  const common_1 = require("../../../parsing/common");
11
+ const geometry_1 = require("../../../geometry");
11
12
  /**
12
13
  * The addresses of the recipients.
13
14
  */
@@ -20,7 +21,7 @@ class UsMailV2RecipientAddress {
20
21
  * Contains the relative vertices coordinates (points) of a polygon containing
21
22
  * the field in the document.
22
23
  */
23
- this.polygon = [];
24
+ this.polygon = new geometry_1.Polygon();
24
25
  this.city = prediction["city"];
25
26
  this.complete = prediction["complete"];
26
27
  this.isAddressChange = prediction["is_address_change"];
@@ -7,6 +7,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
7
7
  var _UsMailV2SenderAddress_instances, _UsMailV2SenderAddress_printableValues;
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.UsMailV2SenderAddress = void 0;
10
+ const geometry_1 = require("../../../geometry");
10
11
  /**
11
12
  * The address of the sender.
12
13
  */
@@ -19,7 +20,7 @@ class UsMailV2SenderAddress {
19
20
  * Contains the relative vertices coordinates (points) of a polygon containing
20
21
  * the field in the document.
21
22
  */
22
- this.polygon = [];
23
+ this.polygon = new geometry_1.Polygon();
23
24
  this.city = prediction["city"];
24
25
  this.complete = prediction["complete"];
25
26
  this.postalCode = prediction["postal_code"];
@@ -8,6 +8,7 @@ var _UsMailV3RecipientAddress_instances, _UsMailV3RecipientAddress_printableValu
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.UsMailV3RecipientAddress = void 0;
10
10
  const common_1 = require("../../../parsing/common");
11
+ const geometry_1 = require("../../../geometry");
11
12
  /**
12
13
  * The addresses of the recipients.
13
14
  */
@@ -20,7 +21,7 @@ class UsMailV3RecipientAddress {
20
21
  * Contains the relative vertices coordinates (points) of a polygon containing
21
22
  * the field in the document.
22
23
  */
23
- this.polygon = [];
24
+ this.polygon = new geometry_1.Polygon();
24
25
  this.city = prediction["city"];
25
26
  this.complete = prediction["complete"];
26
27
  this.isAddressChange = prediction["is_address_change"];
@@ -7,6 +7,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
7
7
  var _UsMailV3SenderAddress_instances, _UsMailV3SenderAddress_printableValues;
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.UsMailV3SenderAddress = void 0;
10
+ const geometry_1 = require("../../../geometry");
10
11
  /**
11
12
  * The address of the sender.
12
13
  */
@@ -19,7 +20,7 @@ class UsMailV3SenderAddress {
19
20
  * Contains the relative vertices coordinates (points) of a polygon containing
20
21
  * the field in the document.
21
22
  */
22
- this.polygon = [];
23
+ this.polygon = new geometry_1.Polygon();
23
24
  this.city = prediction["city"];
24
25
  this.complete = prediction["complete"];
25
26
  this.postalCode = prediction["postal_code"];
@@ -1,7 +0,0 @@
1
- import { BaseField } from "./baseField";
2
- import { FieldLocation } from "./fieldLocation";
3
- import { StringDict } from "../../common";
4
- export declare class DynamicField extends BaseField {
5
- locations: Array<FieldLocation> | undefined;
6
- constructor(rawResponse: StringDict, indentLevel?: number);
7
- }
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DynamicField = void 0;
4
- const baseField_1 = require("./baseField");
5
- const fieldLocation_1 = require("./fieldLocation");
6
- class DynamicField extends baseField_1.BaseField {
7
- constructor(rawResponse, indentLevel = 0) {
8
- super(rawResponse, indentLevel);
9
- if (rawResponse["locations"]) {
10
- this.locations = rawResponse["locations"].map((location) => {
11
- return location ? new fieldLocation_1.FieldLocation(location) : "";
12
- });
13
- }
14
- }
15
- }
16
- exports.DynamicField = DynamicField;
@@ -1,9 +0,0 @@
1
- import { StringDict } from "../common";
2
- import { RawText } from "./rawText";
3
- export declare class InferenceResultOptions {
4
- /**
5
- * List of texts found per page.
6
- */
7
- rawTexts: Array<RawText>;
8
- constructor(serverResponse: StringDict);
9
- }
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.InferenceResultOptions = void 0;
4
- const rawText_1 = require("./rawText");
5
- class InferenceResultOptions {
6
- constructor(serverResponse) {
7
- this.rawTexts = serverResponse["raw_texts"] ? serverResponse["raw_texts"].map((rawText) => new rawText_1.RawText(rawText)) : [];
8
- }
9
- }
10
- exports.InferenceResultOptions = InferenceResultOptions;