mindee 4.14.1 → 4.16.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 (163) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/package.json +2 -1
  3. package/src/client.d.ts +5 -3
  4. package/src/client.js +7 -1
  5. package/src/http/endpoint.d.ts +3 -1
  6. package/src/http/endpoint.js +12 -8
  7. package/src/http/responseValidation.js +11 -4
  8. package/src/imageOperations/invoiceSplitterExtractor/invoiceSplitterExtractor.d.ts +2 -1
  9. package/src/imageOperations/invoiceSplitterExtractor/invoiceSplitterExtractor.js +2 -1
  10. package/src/imageOperations/multiReceiptsExtractor/multiReceiptsExtractor.js +3 -1
  11. package/src/input/localResponse.d.ts +1 -0
  12. package/src/input/localResponse.js +1 -0
  13. package/src/parsing/common/document.d.ts +1 -0
  14. package/src/parsing/common/document.js +27 -6
  15. package/src/parsing/common/extras/fullTextOcrExtra.d.ts +11 -0
  16. package/src/parsing/common/extras/fullTextOcrExtra.js +20 -0
  17. package/src/parsing/common/extras/index.d.ts +3 -0
  18. package/src/parsing/common/extras/index.js +9 -0
  19. package/src/parsing/common/index.d.ts +2 -0
  20. package/src/parsing/common/index.js +28 -1
  21. package/src/parsing/common/page.d.ts +1 -0
  22. package/src/parsing/common/page.js +30 -7
  23. package/src/parsing/common/summaryHelper.d.ts +10 -0
  24. package/src/parsing/common/summaryHelper.js +27 -1
  25. package/src/parsing/generated/generatedObject.d.ts +3 -3
  26. package/src/parsing/generated/generatedObject.js +14 -5
  27. package/src/parsing/standard/amount.d.ts +0 -1
  28. package/src/parsing/standard/amount.js +4 -11
  29. package/src/parsing/standard/index.d.ts +1 -1
  30. package/src/parsing/standard/index.js +1 -2
  31. package/src/parsing/standard/tax.js +4 -4
  32. package/src/pdf/pdfOperation.d.ts +1 -1
  33. package/src/pdf/pdfOperation.js +12 -7
  34. package/src/product/billOfLading/billOfLadingV1.d.ts +16 -0
  35. package/src/product/billOfLading/billOfLadingV1.js +27 -0
  36. package/src/product/billOfLading/billOfLadingV1Carrier.d.ts +32 -0
  37. package/src/product/billOfLading/billOfLadingV1Carrier.js +62 -0
  38. package/src/product/billOfLading/billOfLadingV1CarrierItem.d.ts +38 -0
  39. package/src/product/billOfLading/billOfLadingV1CarrierItem.js +117 -0
  40. package/src/product/billOfLading/billOfLadingV1Consignee.d.ts +34 -0
  41. package/src/product/billOfLading/billOfLadingV1Consignee.js +67 -0
  42. package/src/product/billOfLading/billOfLadingV1Document.d.ts +39 -0
  43. package/src/product/billOfLading/billOfLadingV1Document.js +95 -0
  44. package/src/product/billOfLading/billOfLadingV1NotifyParty.d.ts +34 -0
  45. package/src/product/billOfLading/billOfLadingV1NotifyParty.js +67 -0
  46. package/src/product/billOfLading/billOfLadingV1Shipper.d.ts +34 -0
  47. package/src/product/billOfLading/billOfLadingV1Shipper.js +67 -0
  48. package/src/product/billOfLading/index.d.ts +1 -0
  49. package/src/product/billOfLading/index.js +5 -0
  50. package/src/product/billOfLading/internal.d.ts +7 -0
  51. package/src/product/billOfLading/internal.js +17 -0
  52. package/src/product/financialDocument/financialDocumentV1LineItem.d.ts +8 -8
  53. package/src/product/financialDocument/financialDocumentV1LineItem.js +47 -22
  54. package/src/product/fr/bankAccountDetails/bankAccountDetailsV2Bban.d.ts +4 -4
  55. package/src/product/fr/energyBill/energyBillV1.d.ts +16 -0
  56. package/src/product/fr/energyBill/energyBillV1.js +27 -0
  57. package/src/product/fr/energyBill/energyBillV1Document.d.ts +49 -0
  58. package/src/product/fr/energyBill/energyBillV1Document.js +143 -0
  59. package/src/product/fr/energyBill/energyBillV1EnergyConsumer.d.ts +30 -0
  60. package/src/product/fr/energyBill/energyBillV1EnergyConsumer.js +57 -0
  61. package/src/product/fr/energyBill/energyBillV1EnergySupplier.d.ts +30 -0
  62. package/src/product/fr/energyBill/energyBillV1EnergySupplier.js +57 -0
  63. package/src/product/fr/energyBill/energyBillV1EnergyUsage.d.ts +38 -0
  64. package/src/product/fr/energyBill/energyBillV1EnergyUsage.js +117 -0
  65. package/src/product/fr/energyBill/energyBillV1MeterDetail.d.ts +32 -0
  66. package/src/product/fr/energyBill/energyBillV1MeterDetail.js +62 -0
  67. package/src/product/fr/energyBill/energyBillV1Subscription.d.ts +38 -0
  68. package/src/product/fr/energyBill/energyBillV1Subscription.js +117 -0
  69. package/src/product/fr/energyBill/energyBillV1TaxesAndContribution.d.ts +38 -0
  70. package/src/product/fr/energyBill/energyBillV1TaxesAndContribution.js +117 -0
  71. package/src/product/fr/energyBill/index.d.ts +1 -0
  72. package/src/product/fr/energyBill/index.js +5 -0
  73. package/src/product/fr/energyBill/internal.d.ts +8 -0
  74. package/src/product/fr/energyBill/internal.js +19 -0
  75. package/src/product/fr/index.d.ts +2 -0
  76. package/src/product/fr/index.js +5 -1
  77. package/src/product/fr/internal.d.ts +2 -0
  78. package/src/product/fr/internal.js +3 -1
  79. package/src/product/fr/payslip/index.d.ts +1 -0
  80. package/src/product/fr/payslip/index.js +5 -0
  81. package/src/product/fr/payslip/internal.d.ts +10 -0
  82. package/src/product/fr/payslip/internal.js +23 -0
  83. package/src/product/fr/payslip/payslipV2.d.ts +16 -0
  84. package/src/product/fr/payslip/payslipV2.js +27 -0
  85. package/src/product/fr/payslip/payslipV2BankAccountDetail.d.ts +32 -0
  86. package/src/product/fr/payslip/payslipV2BankAccountDetail.js +62 -0
  87. package/src/product/fr/payslip/payslipV2Document.d.ts +35 -0
  88. package/src/product/fr/payslip/payslipV2Document.js +80 -0
  89. package/src/product/fr/payslip/payslipV2Employee.d.ts +40 -0
  90. package/src/product/fr/payslip/payslipV2Employee.js +82 -0
  91. package/src/product/fr/payslip/payslipV2Employer.d.ts +40 -0
  92. package/src/product/fr/payslip/payslipV2Employer.js +82 -0
  93. package/src/product/fr/payslip/payslipV2Employment.d.ts +38 -0
  94. package/src/product/fr/payslip/payslipV2Employment.js +85 -0
  95. package/src/product/fr/payslip/payslipV2PayDetail.d.ts +46 -0
  96. package/src/product/fr/payslip/payslipV2PayDetail.js +168 -0
  97. package/src/product/fr/payslip/payslipV2PayPeriod.d.ts +36 -0
  98. package/src/product/fr/payslip/payslipV2PayPeriod.js +72 -0
  99. package/src/product/fr/payslip/payslipV2Pto.d.ts +32 -0
  100. package/src/product/fr/payslip/payslipV2Pto.js +84 -0
  101. package/src/product/fr/payslip/payslipV2SalaryDetail.d.ts +34 -0
  102. package/src/product/fr/payslip/payslipV2SalaryDetail.js +97 -0
  103. package/src/product/generated/generatedV1.js +2 -1
  104. package/src/product/index.d.ts +2 -0
  105. package/src/product/index.js +5 -1
  106. package/src/product/internal.d.ts +2 -0
  107. package/src/product/internal.js +3 -1
  108. package/src/product/invoice/invoiceV4LineItem.d.ts +8 -8
  109. package/src/product/invoice/invoiceV4LineItem.js +47 -22
  110. package/src/product/nutritionFactsLabel/index.d.ts +1 -0
  111. package/src/product/nutritionFactsLabel/index.js +5 -0
  112. package/src/product/nutritionFactsLabel/internal.d.ts +15 -0
  113. package/src/product/nutritionFactsLabel/internal.js +33 -0
  114. package/src/product/nutritionFactsLabel/nutritionFactsLabelV1.d.ts +16 -0
  115. package/src/product/nutritionFactsLabel/nutritionFactsLabelV1.js +27 -0
  116. package/src/product/nutritionFactsLabel/nutritionFactsLabelV1AddedSugar.d.ts +32 -0
  117. package/src/product/nutritionFactsLabel/nutritionFactsLabelV1AddedSugar.js +84 -0
  118. package/src/product/nutritionFactsLabel/nutritionFactsLabelV1Calorie.d.ts +32 -0
  119. package/src/product/nutritionFactsLabel/nutritionFactsLabelV1Calorie.js +84 -0
  120. package/src/product/nutritionFactsLabel/nutritionFactsLabelV1Cholesterol.d.ts +32 -0
  121. package/src/product/nutritionFactsLabel/nutritionFactsLabelV1Cholesterol.js +84 -0
  122. package/src/product/nutritionFactsLabel/nutritionFactsLabelV1DietaryFiber.d.ts +32 -0
  123. package/src/product/nutritionFactsLabel/nutritionFactsLabelV1DietaryFiber.js +84 -0
  124. package/src/product/nutritionFactsLabel/nutritionFactsLabelV1Document.d.ts +53 -0
  125. package/src/product/nutritionFactsLabel/nutritionFactsLabelV1Document.js +117 -0
  126. package/src/product/nutritionFactsLabel/nutritionFactsLabelV1Nutrient.d.ts +36 -0
  127. package/src/product/nutritionFactsLabel/nutritionFactsLabelV1Nutrient.js +107 -0
  128. package/src/product/nutritionFactsLabel/nutritionFactsLabelV1Protein.d.ts +32 -0
  129. package/src/product/nutritionFactsLabel/nutritionFactsLabelV1Protein.js +84 -0
  130. package/src/product/nutritionFactsLabel/nutritionFactsLabelV1SaturatedFat.d.ts +32 -0
  131. package/src/product/nutritionFactsLabel/nutritionFactsLabelV1SaturatedFat.js +84 -0
  132. package/src/product/nutritionFactsLabel/nutritionFactsLabelV1ServingSize.d.ts +30 -0
  133. package/src/product/nutritionFactsLabel/nutritionFactsLabelV1ServingSize.js +65 -0
  134. package/src/product/nutritionFactsLabel/nutritionFactsLabelV1Sodium.d.ts +34 -0
  135. package/src/product/nutritionFactsLabel/nutritionFactsLabelV1Sodium.js +89 -0
  136. package/src/product/nutritionFactsLabel/nutritionFactsLabelV1TotalCarbohydrate.d.ts +32 -0
  137. package/src/product/nutritionFactsLabel/nutritionFactsLabelV1TotalCarbohydrate.js +84 -0
  138. package/src/product/nutritionFactsLabel/nutritionFactsLabelV1TotalFat.d.ts +32 -0
  139. package/src/product/nutritionFactsLabel/nutritionFactsLabelV1TotalFat.js +84 -0
  140. package/src/product/nutritionFactsLabel/nutritionFactsLabelV1TotalSugar.d.ts +32 -0
  141. package/src/product/nutritionFactsLabel/nutritionFactsLabelV1TotalSugar.js +84 -0
  142. package/src/product/nutritionFactsLabel/nutritionFactsLabelV1TransFat.d.ts +32 -0
  143. package/src/product/nutritionFactsLabel/nutritionFactsLabelV1TransFat.js +84 -0
  144. package/src/product/receipt/receiptV5LineItem.d.ts +4 -4
  145. package/src/product/receipt/receiptV5LineItem.js +27 -12
  146. package/src/product/resume/resumeV1Certificate.d.ts +4 -4
  147. package/src/product/resume/resumeV1Certificate.js +9 -8
  148. package/src/product/resume/resumeV1Education.d.ts +7 -7
  149. package/src/product/resume/resumeV1Education.js +15 -14
  150. package/src/product/resume/resumeV1Language.d.ts +2 -2
  151. package/src/product/resume/resumeV1Language.js +5 -4
  152. package/src/product/resume/resumeV1ProfessionalExperience.d.ts +8 -8
  153. package/src/product/resume/resumeV1ProfessionalExperience.js +17 -16
  154. package/src/product/resume/resumeV1SocialNetworksUrl.d.ts +2 -2
  155. package/src/product/resume/resumeV1SocialNetworksUrl.js +5 -4
  156. package/src/product/us/healthcareCard/healthcareCardV1Copay.d.ts +2 -2
  157. package/src/product/us/healthcareCard/healthcareCardV1Copay.js +11 -6
  158. package/src/product/us/usMail/index.d.ts +1 -0
  159. package/src/product/us/usMail/index.js +5 -0
  160. package/src/product/us/usMail/usMailV2RecipientAddress.d.ts +7 -7
  161. package/src/product/us/usMail/usMailV2RecipientAddress.js +17 -15
  162. package/src/product/us/usMail/usMailV2SenderAddress.d.ts +5 -5
  163. package/src/product/us/usMail/usMailV2SenderAddress.js +5 -25
@@ -7,6 +7,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
7
7
  var _ResumeV1Certificate_instances, _ResumeV1Certificate_printableValues;
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.ResumeV1Certificate = void 0;
10
+ const common_1 = require("../../parsing/common");
10
11
  /**
11
12
  * The list of certificates obtained by the candidate.
12
13
  */
@@ -65,23 +66,23 @@ _ResumeV1Certificate_instances = new WeakSet(), _ResumeV1Certificate_printableVa
65
66
  return {
66
67
  grade: this.grade ?
67
68
  this.grade.length <= 10 ?
68
- this.grade :
69
- this.grade.slice(0, 7) + "..." :
69
+ (0, common_1.cleanSpecialChars)(this.grade) :
70
+ (0, common_1.cleanSpecialChars)(this.grade).slice(0, 7) + "..." :
70
71
  "",
71
72
  name: this.name ?
72
73
  this.name.length <= 30 ?
73
- this.name :
74
- this.name.slice(0, 27) + "..." :
74
+ (0, common_1.cleanSpecialChars)(this.name) :
75
+ (0, common_1.cleanSpecialChars)(this.name).slice(0, 27) + "..." :
75
76
  "",
76
77
  provider: this.provider ?
77
78
  this.provider.length <= 25 ?
78
- this.provider :
79
- this.provider.slice(0, 22) + "..." :
79
+ (0, common_1.cleanSpecialChars)(this.provider) :
80
+ (0, common_1.cleanSpecialChars)(this.provider).slice(0, 22) + "..." :
80
81
  "",
81
82
  year: this.year ?
82
83
  this.year.length <= 4 ?
83
- this.year :
84
- this.year.slice(0, 1) + "..." :
84
+ (0, common_1.cleanSpecialChars)(this.year) :
85
+ (0, common_1.cleanSpecialChars)(this.year).slice(0, 1) + "..." :
85
86
  "",
86
87
  };
87
88
  };
@@ -6,19 +6,19 @@ import { Polygon } from "../../geometry";
6
6
  export declare class ResumeV1Education {
7
7
  #private;
8
8
  /** The area of study or specialization. */
9
- degreeDomain: string | undefined;
9
+ degreeDomain: string | null;
10
10
  /** The type of degree obtained, such as Bachelor's, Master's, or Doctorate. */
11
- degreeType: string | undefined;
11
+ degreeType: string | null;
12
12
  /** The month when the education program or course was completed. */
13
- endMonth: string | undefined;
13
+ endMonth: string | null;
14
14
  /** The year when the education program or course was completed. */
15
- endYear: string | undefined;
15
+ endYear: string | null;
16
16
  /** The name of the school. */
17
- school: string | undefined;
17
+ school: string | null;
18
18
  /** The month when the education program or course began. */
19
- startMonth: string | undefined;
19
+ startMonth: string | null;
20
20
  /** The year when the education program or course began. */
21
- startYear: string | undefined;
21
+ startYear: string | null;
22
22
  /** Confidence score */
23
23
  confidence: number;
24
24
  /** The document page on which the information was found. */
@@ -7,6 +7,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
7
7
  var _ResumeV1Education_instances, _ResumeV1Education_printableValues;
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.ResumeV1Education = void 0;
10
+ const common_1 = require("../../parsing/common");
10
11
  /**
11
12
  * The list of the candidate's educational background.
12
13
  */
@@ -80,38 +81,38 @@ _ResumeV1Education_instances = new WeakSet(), _ResumeV1Education_printableValues
80
81
  return {
81
82
  degreeDomain: this.degreeDomain ?
82
83
  this.degreeDomain.length <= 15 ?
83
- this.degreeDomain :
84
- this.degreeDomain.slice(0, 12) + "..." :
84
+ (0, common_1.cleanSpecialChars)(this.degreeDomain) :
85
+ (0, common_1.cleanSpecialChars)(this.degreeDomain).slice(0, 12) + "..." :
85
86
  "",
86
87
  degreeType: this.degreeType ?
87
88
  this.degreeType.length <= 25 ?
88
- this.degreeType :
89
- this.degreeType.slice(0, 22) + "..." :
89
+ (0, common_1.cleanSpecialChars)(this.degreeType) :
90
+ (0, common_1.cleanSpecialChars)(this.degreeType).slice(0, 22) + "..." :
90
91
  "",
91
92
  endMonth: this.endMonth ?
92
93
  this.endMonth.length <= 9 ?
93
- this.endMonth :
94
- this.endMonth.slice(0, 6) + "..." :
94
+ (0, common_1.cleanSpecialChars)(this.endMonth) :
95
+ (0, common_1.cleanSpecialChars)(this.endMonth).slice(0, 6) + "..." :
95
96
  "",
96
97
  endYear: this.endYear ?
97
98
  this.endYear.length <= 8 ?
98
- this.endYear :
99
- this.endYear.slice(0, 5) + "..." :
99
+ (0, common_1.cleanSpecialChars)(this.endYear) :
100
+ (0, common_1.cleanSpecialChars)(this.endYear).slice(0, 5) + "..." :
100
101
  "",
101
102
  school: this.school ?
102
103
  this.school.length <= 25 ?
103
- this.school :
104
- this.school.slice(0, 22) + "..." :
104
+ (0, common_1.cleanSpecialChars)(this.school) :
105
+ (0, common_1.cleanSpecialChars)(this.school).slice(0, 22) + "..." :
105
106
  "",
106
107
  startMonth: this.startMonth ?
107
108
  this.startMonth.length <= 11 ?
108
- this.startMonth :
109
- this.startMonth.slice(0, 8) + "..." :
109
+ (0, common_1.cleanSpecialChars)(this.startMonth) :
110
+ (0, common_1.cleanSpecialChars)(this.startMonth).slice(0, 8) + "..." :
110
111
  "",
111
112
  startYear: this.startYear ?
112
113
  this.startYear.length <= 10 ?
113
- this.startYear :
114
- this.startYear.slice(0, 7) + "..." :
114
+ (0, common_1.cleanSpecialChars)(this.startYear) :
115
+ (0, common_1.cleanSpecialChars)(this.startYear).slice(0, 7) + "..." :
115
116
  "",
116
117
  };
117
118
  };
@@ -6,9 +6,9 @@ import { Polygon } from "../../geometry";
6
6
  export declare class ResumeV1Language {
7
7
  #private;
8
8
  /** The language's ISO 639 code. */
9
- language: string | undefined;
9
+ language: string | null;
10
10
  /** The candidate's level for the language. */
11
- level: string | undefined;
11
+ level: string | null;
12
12
  /** Confidence score */
13
13
  confidence: number;
14
14
  /** The document page on which the information was found. */
@@ -7,6 +7,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
7
7
  var _ResumeV1Language_instances, _ResumeV1Language_printableValues;
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.ResumeV1Language = void 0;
10
+ const common_1 = require("../../parsing/common");
10
11
  /**
11
12
  * The list of languages that the candidate is proficient in.
12
13
  */
@@ -55,13 +56,13 @@ _ResumeV1Language_instances = new WeakSet(), _ResumeV1Language_printableValues =
55
56
  return {
56
57
  language: this.language ?
57
58
  this.language.length <= 8 ?
58
- this.language :
59
- this.language.slice(0, 5) + "..." :
59
+ (0, common_1.cleanSpecialChars)(this.language) :
60
+ (0, common_1.cleanSpecialChars)(this.language).slice(0, 5) + "..." :
60
61
  "",
61
62
  level: this.level ?
62
63
  this.level.length <= 20 ?
63
- this.level :
64
- this.level.slice(0, 17) + "..." :
64
+ (0, common_1.cleanSpecialChars)(this.level) :
65
+ (0, common_1.cleanSpecialChars)(this.level).slice(0, 17) + "..." :
65
66
  "",
66
67
  };
67
68
  };
@@ -6,21 +6,21 @@ import { Polygon } from "../../geometry";
6
6
  export declare class ResumeV1ProfessionalExperience {
7
7
  #private;
8
8
  /** The type of contract for the professional experience. */
9
- contractType: string | undefined;
9
+ contractType: string | null;
10
10
  /** The specific department or division within the company. */
11
- department: string | undefined;
11
+ department: string | null;
12
12
  /** The name of the company or organization. */
13
- employer: string | undefined;
13
+ employer: string | null;
14
14
  /** The month when the professional experience ended. */
15
- endMonth: string | undefined;
15
+ endMonth: string | null;
16
16
  /** The year when the professional experience ended. */
17
- endYear: string | undefined;
17
+ endYear: string | null;
18
18
  /** The position or job title held by the candidate. */
19
- role: string | undefined;
19
+ role: string | null;
20
20
  /** The month when the professional experience began. */
21
- startMonth: string | undefined;
21
+ startMonth: string | null;
22
22
  /** The year when the professional experience began. */
23
- startYear: string | undefined;
23
+ startYear: string | null;
24
24
  /** Confidence score */
25
25
  confidence: number;
26
26
  /** The document page on which the information was found. */
@@ -7,6 +7,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
7
7
  var _ResumeV1ProfessionalExperience_instances, _ResumeV1ProfessionalExperience_printableValues;
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.ResumeV1ProfessionalExperience = void 0;
10
+ const common_1 = require("../../parsing/common");
10
11
  /**
11
12
  * The list of the candidate's professional experiences.
12
13
  */
@@ -85,43 +86,43 @@ _ResumeV1ProfessionalExperience_instances = new WeakSet(), _ResumeV1Professional
85
86
  return {
86
87
  contractType: this.contractType ?
87
88
  this.contractType.length <= 15 ?
88
- this.contractType :
89
- this.contractType.slice(0, 12) + "..." :
89
+ (0, common_1.cleanSpecialChars)(this.contractType) :
90
+ (0, common_1.cleanSpecialChars)(this.contractType).slice(0, 12) + "..." :
90
91
  "",
91
92
  department: this.department ?
92
93
  this.department.length <= 10 ?
93
- this.department :
94
- this.department.slice(0, 7) + "..." :
94
+ (0, common_1.cleanSpecialChars)(this.department) :
95
+ (0, common_1.cleanSpecialChars)(this.department).slice(0, 7) + "..." :
95
96
  "",
96
97
  employer: this.employer ?
97
98
  this.employer.length <= 25 ?
98
- this.employer :
99
- this.employer.slice(0, 22) + "..." :
99
+ (0, common_1.cleanSpecialChars)(this.employer) :
100
+ (0, common_1.cleanSpecialChars)(this.employer).slice(0, 22) + "..." :
100
101
  "",
101
102
  endMonth: this.endMonth ?
102
103
  this.endMonth.length <= 9 ?
103
- this.endMonth :
104
- this.endMonth.slice(0, 6) + "..." :
104
+ (0, common_1.cleanSpecialChars)(this.endMonth) :
105
+ (0, common_1.cleanSpecialChars)(this.endMonth).slice(0, 6) + "..." :
105
106
  "",
106
107
  endYear: this.endYear ?
107
108
  this.endYear.length <= 8 ?
108
- this.endYear :
109
- this.endYear.slice(0, 5) + "..." :
109
+ (0, common_1.cleanSpecialChars)(this.endYear) :
110
+ (0, common_1.cleanSpecialChars)(this.endYear).slice(0, 5) + "..." :
110
111
  "",
111
112
  role: this.role ?
112
113
  this.role.length <= 20 ?
113
- this.role :
114
- this.role.slice(0, 17) + "..." :
114
+ (0, common_1.cleanSpecialChars)(this.role) :
115
+ (0, common_1.cleanSpecialChars)(this.role).slice(0, 17) + "..." :
115
116
  "",
116
117
  startMonth: this.startMonth ?
117
118
  this.startMonth.length <= 11 ?
118
- this.startMonth :
119
- this.startMonth.slice(0, 8) + "..." :
119
+ (0, common_1.cleanSpecialChars)(this.startMonth) :
120
+ (0, common_1.cleanSpecialChars)(this.startMonth).slice(0, 8) + "..." :
120
121
  "",
121
122
  startYear: this.startYear ?
122
123
  this.startYear.length <= 10 ?
123
- this.startYear :
124
- this.startYear.slice(0, 7) + "..." :
124
+ (0, common_1.cleanSpecialChars)(this.startYear) :
125
+ (0, common_1.cleanSpecialChars)(this.startYear).slice(0, 7) + "..." :
125
126
  "",
126
127
  };
127
128
  };
@@ -6,9 +6,9 @@ import { Polygon } from "../../geometry";
6
6
  export declare class ResumeV1SocialNetworksUrl {
7
7
  #private;
8
8
  /** The name of the social network. */
9
- name: string | undefined;
9
+ name: string | null;
10
10
  /** The URL of the social network. */
11
- url: string | undefined;
11
+ url: string | null;
12
12
  /** Confidence score */
13
13
  confidence: number;
14
14
  /** The document page on which the information was found. */
@@ -7,6 +7,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
7
7
  var _ResumeV1SocialNetworksUrl_instances, _ResumeV1SocialNetworksUrl_printableValues;
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.ResumeV1SocialNetworksUrl = void 0;
10
+ const common_1 = require("../../parsing/common");
10
11
  /**
11
12
  * The list of social network profiles of the candidate.
12
13
  */
@@ -55,13 +56,13 @@ _ResumeV1SocialNetworksUrl_instances = new WeakSet(), _ResumeV1SocialNetworksUrl
55
56
  return {
56
57
  name: this.name ?
57
58
  this.name.length <= 20 ?
58
- this.name :
59
- this.name.slice(0, 17) + "..." :
59
+ (0, common_1.cleanSpecialChars)(this.name) :
60
+ (0, common_1.cleanSpecialChars)(this.name).slice(0, 17) + "..." :
60
61
  "",
61
62
  url: this.url ?
62
63
  this.url.length <= 50 ?
63
- this.url :
64
- this.url.slice(0, 47) + "..." :
64
+ (0, common_1.cleanSpecialChars)(this.url) :
65
+ (0, common_1.cleanSpecialChars)(this.url).slice(0, 47) + "..." :
65
66
  "",
66
67
  };
67
68
  };
@@ -6,9 +6,9 @@ import { Polygon } from "../../../geometry";
6
6
  export declare class HealthcareCardV1Copay {
7
7
  #private;
8
8
  /** The price of service. */
9
- serviceFees: number | undefined;
9
+ serviceFees: number | null;
10
10
  /** The name of service of the copay. */
11
- serviceName: string | undefined;
11
+ serviceName: string | null;
12
12
  /** Confidence score */
13
13
  confidence: number;
14
14
  /** The document page on which the information was found. */
@@ -7,7 +7,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
7
7
  var _HealthcareCardV1Copay_instances, _HealthcareCardV1Copay_printableValues;
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.HealthcareCardV1Copay = void 0;
10
- const standard_1 = require("../../../parsing/standard");
10
+ const common_1 = require("../../../parsing/common");
11
11
  /**
12
12
  * Is a fixed amount for a covered service.
13
13
  */
@@ -21,8 +21,13 @@ class HealthcareCardV1Copay {
21
21
  * the field in the document.
22
22
  */
23
23
  this.polygon = [];
24
- if (prediction["service_fees"] && !isNaN(prediction["service_fees"])) {
25
- this.serviceFees = +parseFloat(prediction["service_fees"]).toFixed(3);
24
+ if (prediction["service_fees"] !== undefined &&
25
+ prediction["service_fees"] !== null &&
26
+ !isNaN(prediction["service_fees"])) {
27
+ this.serviceFees = +parseFloat(prediction["service_fees"]);
28
+ }
29
+ else {
30
+ this.serviceFees = null;
26
31
  }
27
32
  this.serviceName = prediction["service_name"];
28
33
  this.pageId = prediction["page_id"];
@@ -56,11 +61,11 @@ class HealthcareCardV1Copay {
56
61
  exports.HealthcareCardV1Copay = HealthcareCardV1Copay;
57
62
  _HealthcareCardV1Copay_instances = new WeakSet(), _HealthcareCardV1Copay_printableValues = function _HealthcareCardV1Copay_printableValues() {
58
63
  return {
59
- serviceFees: this.serviceFees !== undefined ? (0, standard_1.floatToString)(this.serviceFees) : "",
64
+ serviceFees: this.serviceFees !== undefined ? (0, common_1.floatToString)(this.serviceFees) : "",
60
65
  serviceName: this.serviceName ?
61
66
  this.serviceName.length <= 12 ?
62
- this.serviceName :
63
- this.serviceName.slice(0, 9) + "..." :
67
+ (0, common_1.cleanSpecialChars)(this.serviceName) :
68
+ (0, common_1.cleanSpecialChars)(this.serviceName).slice(0, 9) + "..." :
64
69
  "",
65
70
  };
66
71
  };
@@ -0,0 +1 @@
1
+ export { UsMailV2 } from "./usMailV2";
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UsMailV2 = void 0;
4
+ var usMailV2_1 = require("./usMailV2");
5
+ Object.defineProperty(exports, "UsMailV2", { enumerable: true, get: function () { return usMailV2_1.UsMailV2; } });
@@ -6,19 +6,19 @@ import { Polygon } from "../../../geometry";
6
6
  export declare class UsMailV2RecipientAddress {
7
7
  #private;
8
8
  /** The city of the recipient's address. */
9
- city: string | undefined;
9
+ city: string | null;
10
10
  /** The complete address of the recipient. */
11
- complete: string | undefined;
11
+ complete: string | null;
12
12
  /** Indicates if the recipient's address is a change of address. */
13
- isAddressChange: boolean | undefined;
13
+ isAddressChange: boolean | null;
14
14
  /** The postal code of the recipient's address. */
15
- postalCode: string | undefined;
15
+ postalCode: string | null;
16
16
  /** The private mailbox number of the recipient's address. */
17
- privateMailboxNumber: string | undefined;
17
+ privateMailboxNumber: string | null;
18
18
  /** Second part of the ISO 3166-2 code, consisting of two letters indicating the US State. */
19
- state: string | undefined;
19
+ state: string | null;
20
20
  /** The street of the recipient's address. */
21
- street: string | undefined;
21
+ street: string | null;
22
22
  /** Confidence score */
23
23
  confidence: number;
24
24
  /** The document page on which the information was found. */
@@ -7,6 +7,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
7
7
  var _UsMailV2RecipientAddress_instances, _UsMailV2RecipientAddress_printableValues;
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.UsMailV2RecipientAddress = void 0;
10
+ const common_1 = require("../../../parsing/common");
10
11
  /**
11
12
  * The addresses of the recipients.
12
13
  */
@@ -80,37 +81,38 @@ _UsMailV2RecipientAddress_instances = new WeakSet(), _UsMailV2RecipientAddress_p
80
81
  return {
81
82
  city: this.city ?
82
83
  this.city.length <= 15 ?
83
- this.city :
84
- this.city.slice(0, 12) + "..." :
84
+ (0, common_1.cleanSpecialChars)(this.city) :
85
+ (0, common_1.cleanSpecialChars)(this.city).slice(0, 12) + "..." :
85
86
  "",
86
87
  complete: this.complete ?
87
88
  this.complete.length <= 35 ?
88
- this.complete :
89
- this.complete.slice(0, 32) + "..." :
89
+ (0, common_1.cleanSpecialChars)(this.complete) :
90
+ (0, common_1.cleanSpecialChars)(this.complete).slice(0, 32) + "..." :
90
91
  "",
91
92
  isAddressChange: this.isAddressChange === true ?
92
- "True" : this.isAddressChange === false ?
93
- "False" :
94
- "",
93
+ "True" :
94
+ this.isAddressChange === false ?
95
+ "False" :
96
+ "",
95
97
  postalCode: this.postalCode ?
96
98
  this.postalCode.length <= 11 ?
97
- this.postalCode :
98
- this.postalCode.slice(0, 8) + "..." :
99
+ (0, common_1.cleanSpecialChars)(this.postalCode) :
100
+ (0, common_1.cleanSpecialChars)(this.postalCode).slice(0, 8) + "..." :
99
101
  "",
100
102
  privateMailboxNumber: this.privateMailboxNumber ?
101
103
  this.privateMailboxNumber.length <= 22 ?
102
- this.privateMailboxNumber :
103
- this.privateMailboxNumber.slice(0, 19) + "..." :
104
+ (0, common_1.cleanSpecialChars)(this.privateMailboxNumber) :
105
+ (0, common_1.cleanSpecialChars)(this.privateMailboxNumber).slice(0, 19) + "..." :
104
106
  "",
105
107
  state: this.state ?
106
108
  this.state.length <= 5 ?
107
- this.state :
108
- this.state.slice(0, 2) + "..." :
109
+ (0, common_1.cleanSpecialChars)(this.state) :
110
+ (0, common_1.cleanSpecialChars)(this.state).slice(0, 2) + "..." :
109
111
  "",
110
112
  street: this.street ?
111
113
  this.street.length <= 25 ?
112
- this.street :
113
- this.street.slice(0, 22) + "..." :
114
+ (0, common_1.cleanSpecialChars)(this.street) :
115
+ (0, common_1.cleanSpecialChars)(this.street).slice(0, 22) + "..." :
114
116
  "",
115
117
  };
116
118
  };
@@ -6,15 +6,15 @@ import { Polygon } from "../../../geometry";
6
6
  export declare class UsMailV2SenderAddress {
7
7
  #private;
8
8
  /** The city of the sender's address. */
9
- city: string | undefined;
9
+ city: string | null;
10
10
  /** The complete address of the sender. */
11
- complete: string | undefined;
11
+ complete: string | null;
12
12
  /** The postal code of the sender's address. */
13
- postalCode: string | undefined;
13
+ postalCode: string | null;
14
14
  /** Second part of the ISO 3166-2 code, consisting of two letters indicating the US State. */
15
- state: string | undefined;
15
+ state: string | null;
16
16
  /** The street of the sender's address. */
17
- street: string | undefined;
17
+ street: string | null;
18
18
  /** Confidence score */
19
19
  confidence: number;
20
20
  /** The document page on which the information was found. */
@@ -63,30 +63,10 @@ class UsMailV2SenderAddress {
63
63
  exports.UsMailV2SenderAddress = UsMailV2SenderAddress;
64
64
  _UsMailV2SenderAddress_instances = new WeakSet(), _UsMailV2SenderAddress_printableValues = function _UsMailV2SenderAddress_printableValues() {
65
65
  return {
66
- city: this.city ?
67
- this.city.length <= 15 ?
68
- this.city :
69
- this.city.slice(0, 12) + "..." :
70
- "",
71
- complete: this.complete ?
72
- this.complete.length <= 35 ?
73
- this.complete :
74
- this.complete.slice(0, 32) + "..." :
75
- "",
76
- postalCode: this.postalCode ?
77
- this.postalCode.length <= 11 ?
78
- this.postalCode :
79
- this.postalCode.slice(0, 8) + "..." :
80
- "",
81
- state: this.state ?
82
- this.state.length <= 5 ?
83
- this.state :
84
- this.state.slice(0, 2) + "..." :
85
- "",
86
- street: this.street ?
87
- this.street.length <= 25 ?
88
- this.street :
89
- this.street.slice(0, 22) + "..." :
90
- "",
66
+ city: this.city ?? "",
67
+ complete: this.complete ?? "",
68
+ postalCode: this.postalCode ?? "",
69
+ state: this.state ?? "",
70
+ street: this.street ?? "",
91
71
  };
92
72
  };