mindee 4.3.1 → 4.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## v4.3.2 - 2023-10-04
4
+ ### Changes
5
+ * :arrow_up: dependency upgrade
6
+ * :recycle: minor refactoring
7
+
8
+
3
9
  ## v4.3.1 - 2023-09-20
4
10
  ### Fixes
5
11
  * :bug: take line height tolerance into account when evaluating fields
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mindee",
3
- "version": "4.3.1",
3
+ "version": "4.3.2",
4
4
  "description": "Mindee Client Library for Node.js",
5
5
  "main": "src/index.js",
6
6
  "bin": "bin/mindee.js",
@@ -45,7 +45,7 @@
45
45
  "@types/node": "^18.15.11",
46
46
  "@typescript-eslint/eslint-plugin": "^5.57.1",
47
47
  "@typescript-eslint/parser": "^5.57.1",
48
- "chai": "^4.3.7",
48
+ "chai": "^4.3.10",
49
49
  "eslint": "^8.47.0",
50
50
  "lint-staged": "^13.2.3",
51
51
  "mocha": "^10.1.0",
@@ -22,7 +22,7 @@ class CropperExtra extends extras_1.ExtraField {
22
22
  toString() {
23
23
  const cropping = this.cropping
24
24
  .map((crop) => crop.toString())
25
- .join("\n ");
25
+ .join("\n ");
26
26
  return (0, summaryHelper_1.cleanOutString)(cropping);
27
27
  }
28
28
  }
@@ -3,7 +3,7 @@ import { Polygon } from "../../geometry";
3
3
  import { StringDict } from "../common";
4
4
  export declare class ListFieldValue {
5
5
  /** Extracted content of the prediction */
6
- content: string | number;
6
+ content: string;
7
7
  /**
8
8
  * The confidence score of the prediction.
9
9
  * Note: Score is calculated on **word selection**, not its textual content (OCR).
@@ -1,9 +1,9 @@
1
- import { Inference, StringDict } from "../../parsing/common";
1
+ import { Prediction, StringDict } from "../../parsing/common";
2
2
  import { InvoiceSplitterV1PageGroup } from "./invoiceSplitterV1PageGroup";
3
3
  /**
4
4
  * Document data for Invoice Splitter, API version 1.
5
5
  */
6
- export declare class InvoiceSplitterV1Document extends Inference {
6
+ export declare class InvoiceSplitterV1Document implements Prediction {
7
7
  /** List of page indexes that belong to the same invoice in the PDF. */
8
8
  invoicePageGroups: InvoiceSplitterV1PageGroup[];
9
9
  constructor(rawPrediction: StringDict);
@@ -6,9 +6,8 @@ const invoiceSplitterV1PageGroup_1 = require("./invoiceSplitterV1PageGroup");
6
6
  /**
7
7
  * Document data for Invoice Splitter, API version 1.
8
8
  */
9
- class InvoiceSplitterV1Document extends common_1.Inference {
9
+ class InvoiceSplitterV1Document {
10
10
  constructor(rawPrediction) {
11
- super(rawPrediction);
12
11
  /** List of page indexes that belong to the same invoice in the PDF. */
13
12
  this.invoicePageGroups = [];
14
13
  rawPrediction["invoice_page_groups"] &&
@@ -1,6 +1,6 @@
1
1
  import { StringDict } from "../../parsing/common";
2
2
  /**
3
- * Pages indexes in a group.
3
+ * Pages indexes in a group for Invoice Splitter V1.
4
4
  */
5
5
  export declare class InvoiceSplitterV1PageGroup {
6
6
  /** List of page indexes. */
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.InvoiceSplitterV1PageGroup = void 0;
4
4
  /**
5
- * Pages indexes in a group.
5
+ * Pages indexes in a group for Invoice Splitter V1.
6
6
  */
7
7
  class InvoiceSplitterV1PageGroup {
8
8
  constructor(prediction) {