mindee 4.1.0 → 4.2.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 (63) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +4 -1
  3. package/package.json +1 -1
  4. package/src/client.d.ts +9 -0
  5. package/src/client.js +7 -2
  6. package/src/http/error.d.ts +1 -1
  7. package/src/http/error.js +2 -2
  8. package/src/parsing/common/document.js +2 -1
  9. package/src/parsing/common/inference.js +1 -2
  10. package/src/parsing/standard/base.d.ts +2 -2
  11. package/src/parsing/standard/base.js +2 -2
  12. package/src/parsing/standard/field.d.ts +10 -10
  13. package/src/parsing/standard/field.js +10 -10
  14. package/src/parsing/standard/position.js +12 -1
  15. package/src/product/barcodeReader/barcodeReaderV1.d.ts +16 -0
  16. package/src/product/barcodeReader/barcodeReaderV1.js +22 -0
  17. package/src/product/barcodeReader/barcodeReaderV1Document.d.ts +16 -0
  18. package/src/product/barcodeReader/barcodeReaderV1Document.js +37 -0
  19. package/src/product/barcodeReader/internal.d.ts +2 -0
  20. package/src/product/barcodeReader/internal.js +7 -0
  21. package/src/product/cropper/cropperV1.d.ts +4 -3
  22. package/src/product/cropper/cropperV1.js +4 -3
  23. package/src/product/cropper/cropperV1Document.d.ts +2 -6
  24. package/src/product/cropper/cropperV1Document.js +2 -19
  25. package/src/product/cropper/cropperV1Page.d.ts +12 -0
  26. package/src/product/cropper/cropperV1Page.js +26 -0
  27. package/src/product/cropper/internal.d.ts +1 -0
  28. package/src/product/cropper/internal.js +3 -1
  29. package/src/product/fr/carteVitale/carteVitaleV1Document.js +1 -1
  30. package/src/product/fr/idCard/idCardV1Document.js +1 -1
  31. package/src/product/fr/idCard/idCardV2.d.ts +17 -0
  32. package/src/product/fr/idCard/idCardV2.js +23 -0
  33. package/src/product/fr/idCard/idCardV2Document.d.ts +42 -0
  34. package/src/product/fr/idCard/idCardV2Document.js +98 -0
  35. package/src/product/fr/idCard/idCardV2Page.d.ts +14 -0
  36. package/src/product/fr/idCard/idCardV2Page.js +27 -0
  37. package/src/product/fr/idCard/internal.d.ts +1 -0
  38. package/src/product/fr/idCard/internal.js +3 -1
  39. package/src/product/fr/index.d.ts +1 -0
  40. package/src/product/fr/index.js +3 -1
  41. package/src/product/index.d.ts +8 -6
  42. package/src/product/index.js +16 -12
  43. package/src/product/internal.d.ts +2 -0
  44. package/src/product/internal.js +3 -1
  45. package/src/product/multiReceiptsDetector/internal.d.ts +2 -0
  46. package/src/product/multiReceiptsDetector/internal.js +7 -0
  47. package/src/product/multiReceiptsDetector/multiReceiptsDetectorV1.d.ts +16 -0
  48. package/src/product/multiReceiptsDetector/multiReceiptsDetectorV1.js +22 -0
  49. package/src/product/multiReceiptsDetector/multiReceiptsDetectorV1Document.d.ts +14 -0
  50. package/src/product/multiReceiptsDetector/multiReceiptsDetectorV1Document.js +28 -0
  51. package/src/product/passport/passportV1Document.js +1 -1
  52. package/src/product/proofOfAddress/proofOfAddressV1Document.js +2 -2
  53. package/src/product/us/bankCheck/bankCheckV1Page.js +1 -1
  54. package/src/product/us/index.d.ts +1 -0
  55. package/src/product/us/index.js +3 -1
  56. package/src/product/us/w9/internal.d.ts +3 -0
  57. package/src/product/us/w9/internal.js +9 -0
  58. package/src/product/us/w9/w9V1.d.ts +17 -0
  59. package/src/product/us/w9/w9V1.js +23 -0
  60. package/src/product/us/w9/w9V1Document.d.ts +10 -0
  61. package/src/product/us/w9/w9V1Document.js +15 -0
  62. package/src/product/us/w9/w9V1Page.d.ts +34 -0
  63. package/src/product/us/w9/w9V1Page.js +78 -0
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.W9V1Page = void 0;
4
+ const common_1 = require("../../../parsing/common");
5
+ const standard_1 = require("../../../parsing/standard");
6
+ const w9V1Document_1 = require("./w9V1Document");
7
+ /**
8
+ * Page data for US W9, API version 1.
9
+ */
10
+ class W9V1Page extends w9V1Document_1.W9V1Document {
11
+ constructor(rawPrediction, pageId) {
12
+ super();
13
+ this.address = new standard_1.StringField({
14
+ prediction: rawPrediction["address"],
15
+ pageId: pageId,
16
+ });
17
+ this.businessName = new standard_1.StringField({
18
+ prediction: rawPrediction["business_name"],
19
+ pageId: pageId,
20
+ });
21
+ this.cityStateZip = new standard_1.StringField({
22
+ prediction: rawPrediction["city_state_zip"],
23
+ pageId: pageId,
24
+ });
25
+ this.ein = new standard_1.StringField({
26
+ prediction: rawPrediction["ein"],
27
+ pageId: pageId,
28
+ });
29
+ this.name = new standard_1.StringField({
30
+ prediction: rawPrediction["name"],
31
+ pageId: pageId,
32
+ });
33
+ this.signatureDatePosition = new standard_1.PositionField({
34
+ prediction: rawPrediction["signature_date_position"],
35
+ pageId: pageId,
36
+ });
37
+ this.signaturePosition = new standard_1.PositionField({
38
+ prediction: rawPrediction["signature_position"],
39
+ pageId: pageId,
40
+ });
41
+ this.ssn = new standard_1.StringField({
42
+ prediction: rawPrediction["ssn"],
43
+ pageId: pageId,
44
+ });
45
+ this.taxClassification = new standard_1.StringField({
46
+ prediction: rawPrediction["tax_classification"],
47
+ pageId: pageId,
48
+ });
49
+ this.taxClassificationLlc = new standard_1.StringField({
50
+ prediction: rawPrediction["tax_classification_llc"],
51
+ pageId: pageId,
52
+ });
53
+ this.taxClassificationOtherDetails = new standard_1.StringField({
54
+ prediction: rawPrediction["tax_classification_other_details"],
55
+ pageId: pageId,
56
+ });
57
+ this.w9RevisionDate = new standard_1.StringField({
58
+ prediction: rawPrediction["w9_revision_date"],
59
+ pageId: pageId,
60
+ });
61
+ }
62
+ toString() {
63
+ const outStr = `:Name: ${this.name}
64
+ :SSN: ${this.ssn}
65
+ :Address: ${this.address}
66
+ :City State Zip: ${this.cityStateZip}
67
+ :Business Name: ${this.businessName}
68
+ :EIN: ${this.ein}
69
+ :Tax Classification: ${this.taxClassification}
70
+ :Tax Classification Other Details: ${this.taxClassificationOtherDetails}
71
+ :W9 Revision Date: ${this.w9RevisionDate}
72
+ :Signature Position: ${this.signaturePosition}
73
+ :Signature Date Position: ${this.signatureDatePosition}
74
+ :Tax Classification LLC: ${this.taxClassificationLlc}`.trimEnd();
75
+ return (0, common_1.cleanOutString)(outStr);
76
+ }
77
+ }
78
+ exports.W9V1Page = W9V1Page;