mindee 4.0.2 → 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 (59) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/package.json +4 -3
  3. package/src/cli.js +36 -66
  4. package/src/client.d.ts +21 -3
  5. package/src/client.js +61 -5
  6. package/src/http/endpoint.d.ts +36 -0
  7. package/src/http/endpoint.js +45 -5
  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 +1 -0
  13. package/src/index.js +2 -1
  14. package/src/internal.d.ts +5 -0
  15. package/src/internal.js +31 -0
  16. package/src/parsing/common/apiResponse.d.ts +7 -1
  17. package/src/parsing/common/apiResponse.js +8 -1
  18. package/src/product/cropper/internal.d.ts +2 -0
  19. package/src/product/cropper/internal.js +7 -0
  20. package/src/product/custom/internal.d.ts +3 -0
  21. package/src/product/custom/internal.js +9 -0
  22. package/src/product/eu/internal.d.ts +1 -0
  23. package/src/product/eu/internal.js +27 -0
  24. package/src/product/eu/licensePlate/internal.d.ts +2 -0
  25. package/src/product/eu/licensePlate/internal.js +7 -0
  26. package/src/product/financialDocument/internal.d.ts +3 -0
  27. package/src/product/financialDocument/internal.js +9 -0
  28. package/src/product/fr/bankAccountDetails/internal.d.ts +5 -0
  29. package/src/product/fr/bankAccountDetails/internal.js +13 -0
  30. package/src/product/fr/carteVitale/internal.d.ts +2 -0
  31. package/src/product/fr/carteVitale/internal.js +7 -0
  32. package/src/product/fr/idCard/internal.d.ts +3 -0
  33. package/src/product/fr/idCard/internal.js +9 -0
  34. package/src/product/fr/internal.d.ts +3 -0
  35. package/src/product/fr/internal.js +29 -0
  36. package/src/product/index.d.ts +0 -1
  37. package/src/product/index.js +1 -3
  38. package/src/product/internal.d.ts +11 -0
  39. package/src/product/internal.js +37 -0
  40. package/src/product/invoice/internal.d.ts +3 -0
  41. package/src/product/invoice/internal.js +9 -0
  42. package/src/product/invoiceSplitter/internal.d.ts +3 -0
  43. package/src/product/invoiceSplitter/internal.js +9 -0
  44. package/src/product/invoiceSplitter/invoiceSplitterV1Document.d.ts +2 -2
  45. package/src/product/invoiceSplitter/invoiceSplitterV1Document.js +1 -1
  46. package/src/product/invoiceSplitter/invoiceSplitterV1PageGroup.d.ts +1 -1
  47. package/src/product/invoiceSplitter/invoiceSplitterV1PageGroup.js +3 -3
  48. package/src/product/passport/internal.d.ts +2 -0
  49. package/src/product/passport/internal.js +7 -0
  50. package/src/product/proofOfAddress/internal.d.ts +2 -0
  51. package/src/product/proofOfAddress/internal.js +7 -0
  52. package/src/product/receipt/internal.d.ts +5 -0
  53. package/src/product/receipt/internal.js +13 -0
  54. package/src/product/us/bankCheck/internal.d.ts +3 -0
  55. package/src/product/us/bankCheck/internal.js +9 -0
  56. package/src/product/us/driverLicense/internal.d.ts +3 -0
  57. package/src/product/us/driverLicense/internal.js +9 -0
  58. package/src/product/us/internal.d.ts +2 -0
  59. package/src/product/us/internal.js +28 -0
package/src/http/error.js CHANGED
@@ -1,9 +1,201 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.handleError = void 0;
3
+ exports.MindeeHttp504Error = exports.MindeeHttp500Error = exports.MindeeHttp429Error = exports.MindeeHttp413Error = exports.MindeeHttp404Error = exports.MindeeHttp403Error = exports.MindeeHttp401Error = exports.MindeeHttp400Error = exports.MindeeHttpError = exports.handleError = void 0;
4
+ const errors_1 = require("../errors");
4
5
  const handler_1 = require("../errors/handler");
5
- function handleError(url, response, statusCode) {
6
- const errorMessage = JSON.stringify(response.data, null, 2);
7
- handler_1.errorHandler.throw(new Error(`${url} API ${statusCode} HTTP error: ${errorMessage}`));
6
+ function handleError(url, response, code, serverError) {
7
+ if (code === undefined) {
8
+ throw new MindeeHttpError({ message: "Missing HTTP Error code.", details: response.data, undefined }, url);
9
+ }
10
+ let errorObj;
11
+ try {
12
+ //Regular instances where the returned error is in JSON format.
13
+ errorObj = response.data.api_request.error;
14
+ }
15
+ catch (err) {
16
+ //Rare instances where errors are returned as HTML instead of JSON.
17
+ if (!("reconstructedResponse" in response.data)) {
18
+ response.data.reconstructedResponse = "";
19
+ }
20
+ if (response.data.reconstructedResponse.includes("Maximum pdf pages")) {
21
+ errorObj = {
22
+ message: "TooManyPages",
23
+ details: "Maximum amount of pdf pages reached.",
24
+ };
25
+ }
26
+ else if (response.data.reconstructedResponse.includes("Max file size is")) {
27
+ errorObj = {
28
+ message: "FileTooLarge",
29
+ details: "Maximum file size reached.",
30
+ };
31
+ }
32
+ else if (response.data.reconstructedResponse.includes("Invalid file type")) {
33
+ errorObj = {
34
+ message: "InvalidFiletype",
35
+ details: "Invalid file type.",
36
+ };
37
+ }
38
+ else if (response.data.reconstructedResponse.includes("Gateway timeout")) {
39
+ errorObj = {
40
+ message: "RequestTimeout",
41
+ details: "Request timed out.",
42
+ };
43
+ }
44
+ else if (response.data.reconstructedResponse.includes("Bad gateway")) {
45
+ errorObj = {
46
+ message: "BadRequest",
47
+ details: "Bad Gateway",
48
+ };
49
+ }
50
+ else if (response.data.reconstructedResponse.includes("Too Many Requests")) {
51
+ errorObj = {
52
+ message: "TooManyRequests",
53
+ details: "Too Many Requests.",
54
+ };
55
+ }
56
+ else {
57
+ errorObj = {
58
+ message: "Unknown Server Error.",
59
+ details: response.data.reconstructedResponse,
60
+ };
61
+ }
62
+ }
63
+ if (serverError !== undefined &&
64
+ (!("message" in errorObj) ||
65
+ !errorObj.message ||
66
+ errorObj.message.length === 0)) {
67
+ errorObj.message = serverError;
68
+ }
69
+ let errorToThrow;
70
+ switch (code) {
71
+ case 400:
72
+ errorToThrow = new MindeeHttp400Error(errorObj, url, code);
73
+ break;
74
+ case 401:
75
+ errorToThrow = new MindeeHttp401Error(errorObj, url, code);
76
+ break;
77
+ case 403:
78
+ errorToThrow = new MindeeHttp403Error(errorObj, url, code);
79
+ break;
80
+ case 404:
81
+ errorToThrow = new MindeeHttp404Error(errorObj, url, code);
82
+ break;
83
+ case 413:
84
+ errorToThrow = new MindeeHttp413Error(errorObj, url, code);
85
+ break;
86
+ case 429:
87
+ errorToThrow = new MindeeHttp429Error(errorObj, url, code);
88
+ break;
89
+ case 500:
90
+ errorToThrow = new MindeeHttp500Error(errorObj, url, code);
91
+ break;
92
+ case 504:
93
+ errorToThrow = new MindeeHttp504Error(errorObj, url, code);
94
+ break;
95
+ default:
96
+ errorToThrow = new MindeeHttpError(errorObj, url, code);
97
+ break;
98
+ }
99
+ handler_1.errorHandler.throw(errorToThrow);
8
100
  }
9
101
  exports.handleError = handleError;
102
+ /**
103
+ * `Error` wrapper for server (HTTP) errors.
104
+ * Is used when an error is lacking a handled error code.
105
+ */
106
+ class MindeeHttpError extends errors_1.MindeeError {
107
+ constructor(httpError, url, code) {
108
+ super(`${url} API ${code} HTTP error: ${httpError.message}`);
109
+ /** Description of the error. */
110
+ this.message = "";
111
+ /** Additional details on the error. */
112
+ this.details = "";
113
+ this.details = httpError.details;
114
+ this.message = httpError.message;
115
+ this.code = code;
116
+ this.name = "MindeeHttpError";
117
+ }
118
+ }
119
+ exports.MindeeHttpError = MindeeHttpError;
120
+ /**
121
+ * Generic client errors.
122
+ * Can include errors like InvalidQuery.
123
+ */
124
+ class MindeeHttp400Error extends MindeeHttpError {
125
+ constructor(httpError, url, code) {
126
+ super(httpError, url, code);
127
+ this.name = "MindeeHttp400Error";
128
+ }
129
+ }
130
+ exports.MindeeHttp400Error = MindeeHttp400Error;
131
+ /**
132
+ * Can include errors like NoTokenSet or InvalidToken.
133
+ */
134
+ class MindeeHttp401Error extends MindeeHttpError {
135
+ constructor(httpError, url, code) {
136
+ super(httpError, url, code);
137
+ this.name = "MindeeHttp401Error";
138
+ }
139
+ }
140
+ exports.MindeeHttp401Error = MindeeHttp401Error;
141
+ /**
142
+ * Regular AccessForbidden error.
143
+ * Can also include errors like PlanLimitReached, AsyncRequestDisallowed or SyncRequestDisallowed.
144
+ */
145
+ class MindeeHttp403Error extends MindeeHttpError {
146
+ constructor(httpError, url, code) {
147
+ super(httpError, url, code);
148
+ this.name = "MindeeHttp403Error";
149
+ }
150
+ }
151
+ exports.MindeeHttp403Error = MindeeHttp403Error;
152
+ class MindeeHttp404Error extends MindeeHttpError {
153
+ constructor(httpError, url, code) {
154
+ super(httpError, url, code);
155
+ this.name = "MindeeHttp404Error";
156
+ }
157
+ }
158
+ exports.MindeeHttp404Error = MindeeHttp404Error;
159
+ /**
160
+ * Rare error.
161
+ * Can occasionally happen when unusually large documents are passed.
162
+ */
163
+ class MindeeHttp413Error extends MindeeHttpError {
164
+ constructor(httpError, url, code) {
165
+ super(httpError, url, code);
166
+ this.name = "MindeeHttp413Error";
167
+ }
168
+ }
169
+ exports.MindeeHttp413Error = MindeeHttp413Error;
170
+ /**
171
+ * Usually contains TooManyRequests errors.
172
+ * Arises whenever too many calls to the API are made in quick succession.
173
+ */
174
+ class MindeeHttp429Error extends MindeeHttpError {
175
+ constructor(httpError, url, code) {
176
+ super(httpError, url, code);
177
+ this.name = "MindeeHttp429Error";
178
+ }
179
+ }
180
+ exports.MindeeHttp429Error = MindeeHttp429Error;
181
+ /**
182
+ * Generic server errors.
183
+ */
184
+ class MindeeHttp500Error extends MindeeHttpError {
185
+ constructor(httpError, url, code) {
186
+ super(httpError, url, code);
187
+ this.name = "MindeeHttp500Error";
188
+ }
189
+ }
190
+ exports.MindeeHttp500Error = MindeeHttp500Error;
191
+ /**
192
+ * Miscellaneous server errors.
193
+ * Can include errors like RequestTimeout or GatewayTimeout.
194
+ */
195
+ class MindeeHttp504Error extends MindeeHttpError {
196
+ constructor(httpError, url, code) {
197
+ super(httpError, url, code);
198
+ this.name = "MindeeHttp500Error";
199
+ }
200
+ }
201
+ exports.MindeeHttp504Error = MindeeHttp504Error;
@@ -1,3 +1,3 @@
1
1
  export { Endpoint, EndpointResponse } from "./endpoint";
2
2
  export { STANDARD_API_OWNER, API_KEY_ENVVAR_NAME, MindeeApi, } from "./mindeeApi";
3
- export { handleError } from "./error";
3
+ export { MindeeHttpError, MindeeHttp400Error, MindeeHttp401Error, MindeeHttp403Error, MindeeHttp404Error, MindeeHttp413Error, MindeeHttp429Error, MindeeHttp500Error, MindeeHttp504Error, handleError, } from "./error";
package/src/http/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.handleError = exports.MindeeApi = exports.API_KEY_ENVVAR_NAME = exports.STANDARD_API_OWNER = exports.Endpoint = void 0;
3
+ exports.handleError = exports.MindeeHttp504Error = exports.MindeeHttp500Error = exports.MindeeHttp429Error = exports.MindeeHttp413Error = exports.MindeeHttp404Error = exports.MindeeHttp403Error = exports.MindeeHttp401Error = exports.MindeeHttp400Error = exports.MindeeHttpError = exports.MindeeApi = exports.API_KEY_ENVVAR_NAME = exports.STANDARD_API_OWNER = exports.Endpoint = void 0;
4
4
  var endpoint_1 = require("./endpoint");
5
5
  Object.defineProperty(exports, "Endpoint", { enumerable: true, get: function () { return endpoint_1.Endpoint; } });
6
6
  var mindeeApi_1 = require("./mindeeApi");
@@ -8,4 +8,13 @@ Object.defineProperty(exports, "STANDARD_API_OWNER", { enumerable: true, get: fu
8
8
  Object.defineProperty(exports, "API_KEY_ENVVAR_NAME", { enumerable: true, get: function () { return mindeeApi_1.API_KEY_ENVVAR_NAME; } });
9
9
  Object.defineProperty(exports, "MindeeApi", { enumerable: true, get: function () { return mindeeApi_1.MindeeApi; } });
10
10
  var error_1 = require("./error");
11
+ Object.defineProperty(exports, "MindeeHttpError", { enumerable: true, get: function () { return error_1.MindeeHttpError; } });
12
+ Object.defineProperty(exports, "MindeeHttp400Error", { enumerable: true, get: function () { return error_1.MindeeHttp400Error; } });
13
+ Object.defineProperty(exports, "MindeeHttp401Error", { enumerable: true, get: function () { return error_1.MindeeHttp401Error; } });
14
+ Object.defineProperty(exports, "MindeeHttp403Error", { enumerable: true, get: function () { return error_1.MindeeHttp403Error; } });
15
+ Object.defineProperty(exports, "MindeeHttp404Error", { enumerable: true, get: function () { return error_1.MindeeHttp404Error; } });
16
+ Object.defineProperty(exports, "MindeeHttp413Error", { enumerable: true, get: function () { return error_1.MindeeHttp413Error; } });
17
+ Object.defineProperty(exports, "MindeeHttp429Error", { enumerable: true, get: function () { return error_1.MindeeHttp429Error; } });
18
+ Object.defineProperty(exports, "MindeeHttp500Error", { enumerable: true, get: function () { return error_1.MindeeHttp500Error; } });
19
+ Object.defineProperty(exports, "MindeeHttp504Error", { enumerable: true, get: function () { return error_1.MindeeHttp504Error; } });
11
20
  Object.defineProperty(exports, "handleError", { enumerable: true, get: function () { return error_1.handleError; } });
package/src/index.d.ts CHANGED
@@ -2,3 +2,4 @@ export * as product from "./product";
2
2
  export { Client, PredictOptions } from "./client";
3
3
  export { AsyncPredictResponse, PredictResponse, Document, Page, } from "./parsing/common";
4
4
  export { InputSource, PageOptionsOperation } from "./input";
5
+ export * as internal from "./internal";
package/src/index.js CHANGED
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.PageOptionsOperation = exports.InputSource = exports.Page = exports.Document = exports.PredictResponse = exports.AsyncPredictResponse = exports.Client = exports.product = void 0;
26
+ exports.internal = exports.PageOptionsOperation = exports.InputSource = exports.Page = exports.Document = exports.PredictResponse = exports.AsyncPredictResponse = exports.Client = exports.product = void 0;
27
27
  exports.product = __importStar(require("./product"));
28
28
  var client_1 = require("./client");
29
29
  Object.defineProperty(exports, "Client", { enumerable: true, get: function () { return client_1.Client; } });
@@ -35,3 +35,4 @@ Object.defineProperty(exports, "Page", { enumerable: true, get: function () { re
35
35
  var input_1 = require("./input");
36
36
  Object.defineProperty(exports, "InputSource", { enumerable: true, get: function () { return input_1.InputSource; } });
37
37
  Object.defineProperty(exports, "PageOptionsOperation", { enumerable: true, get: function () { return input_1.PageOptionsOperation; } });
38
+ exports.internal = __importStar(require("./internal"));
@@ -0,0 +1,5 @@
1
+ export * as product from "./product/internal";
2
+ export * as parsing from "./parsing";
3
+ export * as pdf from "./pdf";
4
+ export * as geometry from "./geometry";
5
+ export * as http from "./http";
@@ -0,0 +1,31 @@
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.http = exports.geometry = exports.pdf = exports.parsing = exports.product = void 0;
27
+ exports.product = __importStar(require("./product/internal"));
28
+ exports.parsing = __importStar(require("./parsing"));
29
+ exports.pdf = __importStar(require("./pdf"));
30
+ exports.geometry = __importStar(require("./geometry"));
31
+ exports.http = __importStar(require("./http"));
@@ -7,9 +7,15 @@ import { StringDict } from "./stringDict";
7
7
  export declare abstract class ApiResponse {
8
8
  /** Initial request sent to the API. */
9
9
  apiRequest: ApiRequest;
10
+ /** Raw text representation of the API's response. */
11
+ private readonly rawHttp;
10
12
  /**
11
- *
12
13
  * @param serverResponse JSON response from the server.
13
14
  */
14
15
  constructor(serverResponse: StringDict);
16
+ /**
17
+ * Raw HTTP request sent from server, as a JSON-like structure
18
+ * @returns The HTTP request
19
+ */
20
+ getRawHttp(): StringDict;
15
21
  }
@@ -8,11 +8,18 @@ const apiRequest_1 = require("./apiRequest");
8
8
  */
9
9
  class ApiResponse {
10
10
  /**
11
- *
12
11
  * @param serverResponse JSON response from the server.
13
12
  */
14
13
  constructor(serverResponse) {
15
14
  this.apiRequest = new apiRequest_1.ApiRequest(serverResponse["api_request"]);
15
+ this.rawHttp = serverResponse;
16
+ }
17
+ /**
18
+ * Raw HTTP request sent from server, as a JSON-like structure
19
+ * @returns The HTTP request
20
+ */
21
+ getRawHttp() {
22
+ return this.rawHttp;
16
23
  }
17
24
  }
18
25
  exports.ApiResponse = ApiResponse;
@@ -0,0 +1,2 @@
1
+ export { CropperV1 } from "./cropperV1";
2
+ export { CropperV1Document } from "./cropperV1Document";
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CropperV1Document = exports.CropperV1 = void 0;
4
+ var cropperV1_1 = require("./cropperV1");
5
+ Object.defineProperty(exports, "CropperV1", { enumerable: true, get: function () { return cropperV1_1.CropperV1; } });
6
+ var cropperV1Document_1 = require("./cropperV1Document");
7
+ Object.defineProperty(exports, "CropperV1Document", { enumerable: true, get: function () { return cropperV1Document_1.CropperV1Document; } });
@@ -0,0 +1,3 @@
1
+ export { CustomV1 } from "./customV1";
2
+ export { CustomV1Document } from "./customV1Document";
3
+ export { CustomV1Page } from "./customV1Page";
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CustomV1Page = exports.CustomV1Document = exports.CustomV1 = void 0;
4
+ var customV1_1 = require("./customV1");
5
+ Object.defineProperty(exports, "CustomV1", { enumerable: true, get: function () { return customV1_1.CustomV1; } });
6
+ var customV1Document_1 = require("./customV1Document");
7
+ Object.defineProperty(exports, "CustomV1Document", { enumerable: true, get: function () { return customV1Document_1.CustomV1Document; } });
8
+ var customV1Page_1 = require("./customV1Page");
9
+ Object.defineProperty(exports, "CustomV1Page", { enumerable: true, get: function () { return customV1Page_1.CustomV1Page; } });
@@ -0,0 +1 @@
1
+ export * as licensePlate from "./licensePlate/internal";
@@ -0,0 +1,27 @@
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.licensePlate = void 0;
27
+ exports.licensePlate = __importStar(require("./licensePlate/internal"));
@@ -0,0 +1,2 @@
1
+ export { LicensePlateV1 } from "./licensePlateV1";
2
+ export { LicensePlateV1Document } from "./licensePlateV1Document";
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LicensePlateV1Document = exports.LicensePlateV1 = void 0;
4
+ var licensePlateV1_1 = require("./licensePlateV1");
5
+ Object.defineProperty(exports, "LicensePlateV1", { enumerable: true, get: function () { return licensePlateV1_1.LicensePlateV1; } });
6
+ var licensePlateV1Document_1 = require("./licensePlateV1Document");
7
+ Object.defineProperty(exports, "LicensePlateV1Document", { enumerable: true, get: function () { return licensePlateV1Document_1.LicensePlateV1Document; } });
@@ -0,0 +1,3 @@
1
+ export { FinancialDocumentV1 } from "./financialDocumentV1";
2
+ export { FinancialDocumentV1Document } from "./financialDocumentV1Document";
3
+ export { FinancialDocumentV1LineItem } from "./financialDocumentV1LineItem";
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FinancialDocumentV1LineItem = exports.FinancialDocumentV1Document = exports.FinancialDocumentV1 = void 0;
4
+ var financialDocumentV1_1 = require("./financialDocumentV1");
5
+ Object.defineProperty(exports, "FinancialDocumentV1", { enumerable: true, get: function () { return financialDocumentV1_1.FinancialDocumentV1; } });
6
+ var financialDocumentV1Document_1 = require("./financialDocumentV1Document");
7
+ Object.defineProperty(exports, "FinancialDocumentV1Document", { enumerable: true, get: function () { return financialDocumentV1Document_1.FinancialDocumentV1Document; } });
8
+ var financialDocumentV1LineItem_1 = require("./financialDocumentV1LineItem");
9
+ Object.defineProperty(exports, "FinancialDocumentV1LineItem", { enumerable: true, get: function () { return financialDocumentV1LineItem_1.FinancialDocumentV1LineItem; } });
@@ -0,0 +1,5 @@
1
+ export { BankAccountDetailsV1 } from "./bankAccountDetailsV1";
2
+ export { BankAccountDetailsV1Document } from "./bankAccountDetailsV1Document";
3
+ export { BankAccountDetailsV2 } from "./bankAccountDetailsV2";
4
+ export { BankAccountDetailsV2Document } from "./bankAccountDetailsV2Document";
5
+ export { BankAccountDetailsV2Bban } from "./bankAccountDetailsV2Bban";
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BankAccountDetailsV2Bban = exports.BankAccountDetailsV2Document = exports.BankAccountDetailsV2 = exports.BankAccountDetailsV1Document = exports.BankAccountDetailsV1 = void 0;
4
+ var bankAccountDetailsV1_1 = require("./bankAccountDetailsV1");
5
+ Object.defineProperty(exports, "BankAccountDetailsV1", { enumerable: true, get: function () { return bankAccountDetailsV1_1.BankAccountDetailsV1; } });
6
+ var bankAccountDetailsV1Document_1 = require("./bankAccountDetailsV1Document");
7
+ Object.defineProperty(exports, "BankAccountDetailsV1Document", { enumerable: true, get: function () { return bankAccountDetailsV1Document_1.BankAccountDetailsV1Document; } });
8
+ var bankAccountDetailsV2_1 = require("./bankAccountDetailsV2");
9
+ Object.defineProperty(exports, "BankAccountDetailsV2", { enumerable: true, get: function () { return bankAccountDetailsV2_1.BankAccountDetailsV2; } });
10
+ var bankAccountDetailsV2Document_1 = require("./bankAccountDetailsV2Document");
11
+ Object.defineProperty(exports, "BankAccountDetailsV2Document", { enumerable: true, get: function () { return bankAccountDetailsV2Document_1.BankAccountDetailsV2Document; } });
12
+ var bankAccountDetailsV2Bban_1 = require("./bankAccountDetailsV2Bban");
13
+ Object.defineProperty(exports, "BankAccountDetailsV2Bban", { enumerable: true, get: function () { return bankAccountDetailsV2Bban_1.BankAccountDetailsV2Bban; } });
@@ -0,0 +1,2 @@
1
+ export { CarteVitaleV1 } from "./carteVitaleV1";
2
+ export { CarteVitaleV1Document } from "./carteVitaleV1Document";
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CarteVitaleV1Document = exports.CarteVitaleV1 = void 0;
4
+ var carteVitaleV1_1 = require("./carteVitaleV1");
5
+ Object.defineProperty(exports, "CarteVitaleV1", { enumerable: true, get: function () { return carteVitaleV1_1.CarteVitaleV1; } });
6
+ var carteVitaleV1Document_1 = require("./carteVitaleV1Document");
7
+ Object.defineProperty(exports, "CarteVitaleV1Document", { enumerable: true, get: function () { return carteVitaleV1Document_1.CarteVitaleV1Document; } });
@@ -0,0 +1,3 @@
1
+ export { IdCardV1 } from "./idCardV1";
2
+ export { IdCardV1Document } from "./idCardV1Document";
3
+ export { IdCardV1Page } from "./idCardV1Page";
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IdCardV1Page = exports.IdCardV1Document = exports.IdCardV1 = void 0;
4
+ var idCardV1_1 = require("./idCardV1");
5
+ Object.defineProperty(exports, "IdCardV1", { enumerable: true, get: function () { return idCardV1_1.IdCardV1; } });
6
+ var idCardV1Document_1 = require("./idCardV1Document");
7
+ Object.defineProperty(exports, "IdCardV1Document", { enumerable: true, get: function () { return idCardV1Document_1.IdCardV1Document; } });
8
+ var idCardV1Page_1 = require("./idCardV1Page");
9
+ Object.defineProperty(exports, "IdCardV1Page", { enumerable: true, get: function () { return idCardV1Page_1.IdCardV1Page; } });
@@ -0,0 +1,3 @@
1
+ export * as bankAccountDetails from "./bankAccountDetails/internal";
2
+ export * as carteVitale from "./carteVitale/internal";
3
+ export * as idCard from "./idCard/internal";
@@ -0,0 +1,29 @@
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.idCard = exports.carteVitale = exports.bankAccountDetails = void 0;
27
+ exports.bankAccountDetails = __importStar(require("./bankAccountDetails/internal"));
28
+ exports.carteVitale = __importStar(require("./carteVitale/internal"));
29
+ exports.idCard = __importStar(require("./idCard/internal"));
@@ -1,6 +1,5 @@
1
1
  export { InvoiceV4 } from "./invoice/invoiceV4";
2
2
  export { InvoiceSplitterV1 } from "./invoiceSplitter/invoiceSplitterV1";
3
- export { PageGroup } from "./invoiceSplitter/invoiceSplitterV1PageGroup";
4
3
  export { ReceiptV4 } from "./receipt/receiptV4";
5
4
  export { ReceiptV5 } from "./receipt/receiptV5";
6
5
  export { PassportV1 } from "./passport/passportV1";
@@ -23,13 +23,11 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.eu = exports.us = exports.fr = exports.ProofOfAddressV1 = exports.CropperV1 = exports.CustomV1 = exports.FinancialDocumentV1 = exports.PassportV1 = exports.ReceiptV5 = exports.ReceiptV4 = exports.PageGroup = exports.InvoiceSplitterV1 = exports.InvoiceV4 = void 0;
26
+ exports.eu = exports.us = exports.fr = exports.ProofOfAddressV1 = exports.CropperV1 = exports.CustomV1 = exports.FinancialDocumentV1 = exports.PassportV1 = exports.ReceiptV5 = exports.ReceiptV4 = exports.InvoiceSplitterV1 = exports.InvoiceV4 = void 0;
27
27
  var invoiceV4_1 = require("./invoice/invoiceV4");
28
28
  Object.defineProperty(exports, "InvoiceV4", { enumerable: true, get: function () { return invoiceV4_1.InvoiceV4; } });
29
29
  var invoiceSplitterV1_1 = require("./invoiceSplitter/invoiceSplitterV1");
30
30
  Object.defineProperty(exports, "InvoiceSplitterV1", { enumerable: true, get: function () { return invoiceSplitterV1_1.InvoiceSplitterV1; } });
31
- var invoiceSplitterV1PageGroup_1 = require("./invoiceSplitter/invoiceSplitterV1PageGroup");
32
- Object.defineProperty(exports, "PageGroup", { enumerable: true, get: function () { return invoiceSplitterV1PageGroup_1.PageGroup; } });
33
31
  var receiptV4_1 = require("./receipt/receiptV4");
34
32
  Object.defineProperty(exports, "ReceiptV4", { enumerable: true, get: function () { return receiptV4_1.ReceiptV4; } });
35
33
  var receiptV5_1 = require("./receipt/receiptV5");
@@ -0,0 +1,11 @@
1
+ export * as cropper from "./cropper/internal";
2
+ export * as custom from "./custom/internal";
3
+ export * as eu from "./eu/internal";
4
+ export * as financialDocument from "./financialDocument/internal";
5
+ export * as fr from "./fr/internal";
6
+ export * as invoice from "./invoice/internal";
7
+ export * as invoiceSplitter from "./invoiceSplitter/internal";
8
+ export * as passport from "./passport/internal";
9
+ export * as proofOfAddress from "./proofOfAddress/internal";
10
+ export * as receipt from "./receipt/internal";
11
+ export * as us from "./us/internal";
@@ -0,0 +1,37 @@
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.us = exports.receipt = exports.proofOfAddress = exports.passport = exports.invoiceSplitter = exports.invoice = exports.fr = exports.financialDocument = exports.eu = exports.custom = exports.cropper = void 0;
27
+ exports.cropper = __importStar(require("./cropper/internal"));
28
+ exports.custom = __importStar(require("./custom/internal"));
29
+ exports.eu = __importStar(require("./eu/internal"));
30
+ exports.financialDocument = __importStar(require("./financialDocument/internal"));
31
+ exports.fr = __importStar(require("./fr/internal"));
32
+ exports.invoice = __importStar(require("./invoice/internal"));
33
+ exports.invoiceSplitter = __importStar(require("./invoiceSplitter/internal"));
34
+ exports.passport = __importStar(require("./passport/internal"));
35
+ exports.proofOfAddress = __importStar(require("./proofOfAddress/internal"));
36
+ exports.receipt = __importStar(require("./receipt/internal"));
37
+ exports.us = __importStar(require("./us/internal"));
@@ -0,0 +1,3 @@
1
+ export { InvoiceV4 } from "./invoiceV4";
2
+ export { InvoiceV4Document } from "./invoiceV4Document";
3
+ export { InvoiceV4LineItem } from "./invoiceV4LineItem";
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InvoiceV4LineItem = exports.InvoiceV4Document = exports.InvoiceV4 = void 0;
4
+ var invoiceV4_1 = require("./invoiceV4");
5
+ Object.defineProperty(exports, "InvoiceV4", { enumerable: true, get: function () { return invoiceV4_1.InvoiceV4; } });
6
+ var invoiceV4Document_1 = require("./invoiceV4Document");
7
+ Object.defineProperty(exports, "InvoiceV4Document", { enumerable: true, get: function () { return invoiceV4Document_1.InvoiceV4Document; } });
8
+ var invoiceV4LineItem_1 = require("./invoiceV4LineItem");
9
+ Object.defineProperty(exports, "InvoiceV4LineItem", { enumerable: true, get: function () { return invoiceV4LineItem_1.InvoiceV4LineItem; } });
@@ -0,0 +1,3 @@
1
+ export { InvoiceSplitterV1 } from "./invoiceSplitterV1";
2
+ export { InvoiceSplitterV1Document } from "./invoiceSplitterV1Document";
3
+ export { InvoiceSplitterV1PageGroup } from "./invoiceSplitterV1PageGroup";
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InvoiceSplitterV1PageGroup = exports.InvoiceSplitterV1Document = exports.InvoiceSplitterV1 = void 0;
4
+ var invoiceSplitterV1_1 = require("./invoiceSplitterV1");
5
+ Object.defineProperty(exports, "InvoiceSplitterV1", { enumerable: true, get: function () { return invoiceSplitterV1_1.InvoiceSplitterV1; } });
6
+ var invoiceSplitterV1Document_1 = require("./invoiceSplitterV1Document");
7
+ Object.defineProperty(exports, "InvoiceSplitterV1Document", { enumerable: true, get: function () { return invoiceSplitterV1Document_1.InvoiceSplitterV1Document; } });
8
+ var invoiceSplitterV1PageGroup_1 = require("./invoiceSplitterV1PageGroup");
9
+ Object.defineProperty(exports, "InvoiceSplitterV1PageGroup", { enumerable: true, get: function () { return invoiceSplitterV1PageGroup_1.InvoiceSplitterV1PageGroup; } });
@@ -1,11 +1,11 @@
1
1
  import { Inference, StringDict } from "../../parsing/common";
2
- import { PageGroup } from "./invoiceSplitterV1PageGroup";
2
+ import { InvoiceSplitterV1PageGroup } from "./invoiceSplitterV1PageGroup";
3
3
  /**
4
4
  * Document data for Invoice Splitter, API version 1.
5
5
  */
6
6
  export declare class InvoiceSplitterV1Document extends Inference {
7
7
  /** List of page indexes that belong to the same invoice in the PDF. */
8
- invoicePageGroups: PageGroup[];
8
+ invoicePageGroups: InvoiceSplitterV1PageGroup[];
9
9
  constructor(rawPrediction: StringDict);
10
10
  /**
11
11
  * Default string representation.