mindee 4.9.0 → 4.9.1
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 +8 -0
- package/package.json +1 -1
- package/src/errors/handler.d.ts +4 -2
- package/src/errors/handler.js +5 -1
- package/src/errors/index.d.ts +1 -1
- package/src/errors/index.js +3 -3
- package/src/errors/{MindeeError.d.ts → mindeeError.d.ts} +6 -0
- package/src/errors/{MindeeError.js → mindeeError.js} +6 -0
- package/src/http/apiSettings.js +1 -0
- package/src/http/endpoint.js +11 -16
- package/src/http/error.d.ts +1 -1
- package/src/http/error.js +7 -3
- package/src/http/index.d.ts +1 -0
- package/src/http/index.js +5 -1
- package/src/http/responseValidation.d.ts +23 -0
- package/src/http/responseValidation.js +66 -0
- package/src/input/pageOptions.d.ts +6 -2
- package/src/input/pageOptions.js +3 -1
- package/src/internal.d.ts +5 -3
- package/src/internal.js +6 -4
- package/src/parsing/common/asyncPredictResponse.d.ts +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
## v4.9.1 - 2024-03-05
|
|
4
|
+
### Changes
|
|
5
|
+
* :recycle: update error handling to account for future evolutions
|
|
6
|
+
* :recycle: expose the input, geometry & imageOperations modules in internals for better fine-tuning
|
|
7
|
+
* :recycle: fix inconsistencies with naming conventions
|
|
8
|
+
* :memo: add missing reference documentation
|
|
9
|
+
|
|
10
|
+
|
|
3
11
|
## v4.9.0 - 2024-02-21
|
|
4
12
|
### Changes
|
|
5
13
|
* :sparkles: add support for resume V1
|
package/package.json
CHANGED
package/src/errors/handler.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Custom Error handling class.
|
|
3
|
+
*/
|
|
4
|
+
export declare class ErrorHandler {
|
|
2
5
|
throwOnError: boolean;
|
|
3
6
|
constructor(throwOnError?: boolean);
|
|
4
7
|
throw(error: Error): void;
|
|
5
8
|
}
|
|
6
9
|
export declare const errorHandler: ErrorHandler;
|
|
7
|
-
export {};
|
package/src/errors/handler.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.errorHandler = void 0;
|
|
3
|
+
exports.errorHandler = exports.ErrorHandler = void 0;
|
|
4
4
|
const logger_1 = require("../logger");
|
|
5
|
+
/**
|
|
6
|
+
* Custom Error handling class.
|
|
7
|
+
*/
|
|
5
8
|
class ErrorHandler {
|
|
6
9
|
constructor(throwOnError = true) {
|
|
7
10
|
this.throwOnError = throwOnError;
|
|
@@ -15,4 +18,5 @@ class ErrorHandler {
|
|
|
15
18
|
}
|
|
16
19
|
}
|
|
17
20
|
}
|
|
21
|
+
exports.ErrorHandler = ErrorHandler;
|
|
18
22
|
exports.errorHandler = new ErrorHandler();
|
package/src/errors/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { MindeeError, MindeeMimeTypeError } from "./
|
|
1
|
+
export { MindeeError, MindeeMimeTypeError } from "./mindeeError";
|
package/src/errors/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MindeeMimeTypeError = exports.MindeeError = void 0;
|
|
4
|
-
var
|
|
5
|
-
Object.defineProperty(exports, "MindeeError", { enumerable: true, get: function () { return
|
|
6
|
-
Object.defineProperty(exports, "MindeeMimeTypeError", { enumerable: true, get: function () { return
|
|
4
|
+
var mindeeError_1 = require("./mindeeError");
|
|
5
|
+
Object.defineProperty(exports, "MindeeError", { enumerable: true, get: function () { return mindeeError_1.MindeeError; } });
|
|
6
|
+
Object.defineProperty(exports, "MindeeMimeTypeError", { enumerable: true, get: function () { return mindeeError_1.MindeeMimeTypeError; } });
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Main Mindee Error custom class.
|
|
3
|
+
*/
|
|
1
4
|
export declare class MindeeError extends Error {
|
|
2
5
|
constructor(message: string);
|
|
3
6
|
}
|
|
7
|
+
/**
|
|
8
|
+
* Custom Mindee error relating to improper mimetypes in inputs.
|
|
9
|
+
*/
|
|
4
10
|
export declare class MindeeMimeTypeError extends MindeeError {
|
|
5
11
|
constructor(message: string);
|
|
6
12
|
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MindeeMimeTypeError = exports.MindeeError = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Main Mindee Error custom class.
|
|
6
|
+
*/
|
|
4
7
|
class MindeeError extends Error {
|
|
5
8
|
constructor(message) {
|
|
6
9
|
super(message);
|
|
@@ -8,6 +11,9 @@ class MindeeError extends Error {
|
|
|
8
11
|
}
|
|
9
12
|
}
|
|
10
13
|
exports.MindeeError = MindeeError;
|
|
14
|
+
/**
|
|
15
|
+
* Custom Mindee error relating to improper mimetypes in inputs.
|
|
16
|
+
*/
|
|
11
17
|
class MindeeMimeTypeError extends MindeeError {
|
|
12
18
|
constructor(message) {
|
|
13
19
|
super(message);
|
package/src/http/apiSettings.js
CHANGED
|
@@ -24,6 +24,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.ApiSettings = exports.STANDARD_API_OWNER = exports.API_HOST_ENVVAR_NAME = exports.API_KEY_ENVVAR_NAME = void 0;
|
|
27
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
27
28
|
const logger_1 = require("../logger");
|
|
28
29
|
const package_json_1 = require("../../package.json");
|
|
29
30
|
const os = __importStar(require("os"));
|
package/src/http/endpoint.js
CHANGED
|
@@ -15,6 +15,7 @@ const form_data_1 = __importDefault(require("form-data"));
|
|
|
15
15
|
const base_1 = require("../input/base");
|
|
16
16
|
const error_1 = require("./error");
|
|
17
17
|
const baseEndpoint_1 = require("./baseEndpoint");
|
|
18
|
+
const responseValidation_1 = require("./responseValidation");
|
|
18
19
|
/**
|
|
19
20
|
* Endpoint for a product (OTS or Custom).
|
|
20
21
|
*/
|
|
@@ -40,9 +41,8 @@ class Endpoint extends baseEndpoint_1.BaseEndpoint {
|
|
|
40
41
|
await __classPrivateFieldGet(this, _Endpoint_instances, "m", _Endpoint_cutDocPages).call(this, params.inputDoc, params.pageOptions);
|
|
41
42
|
}
|
|
42
43
|
const response = await __classPrivateFieldGet(this, _Endpoint_instances, "m", _Endpoint_predictReqPost).call(this, params.inputDoc, params.includeWords, params.cropper);
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
(0, error_1.handleError)(this.urlName, response, statusCode, response.messageObj?.statusMessage);
|
|
44
|
+
if (!(0, responseValidation_1.isValidSyncResponse)(response)) {
|
|
45
|
+
(0, error_1.handleError)(this.urlName, response, response.messageObj?.statusMessage);
|
|
46
46
|
}
|
|
47
47
|
return response;
|
|
48
48
|
}
|
|
@@ -59,9 +59,8 @@ class Endpoint extends baseEndpoint_1.BaseEndpoint {
|
|
|
59
59
|
await __classPrivateFieldGet(this, _Endpoint_instances, "m", _Endpoint_cutDocPages).call(this, params.inputDoc, params.pageOptions);
|
|
60
60
|
}
|
|
61
61
|
const response = await __classPrivateFieldGet(this, _Endpoint_instances, "m", _Endpoint_predictAsyncReqPost).call(this, params.inputDoc, params.includeWords, params.cropper);
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
(0, error_1.handleError)(this.urlName, response, statusCode, response.messageObj?.statusMessage);
|
|
62
|
+
if (!(0, responseValidation_1.isValidAsyncResponse)(response)) {
|
|
63
|
+
(0, error_1.handleError)(this.urlName, response, response.messageObj?.statusMessage);
|
|
65
64
|
}
|
|
66
65
|
return response;
|
|
67
66
|
}
|
|
@@ -75,10 +74,8 @@ class Endpoint extends baseEndpoint_1.BaseEndpoint {
|
|
|
75
74
|
async getQueuedDocument(queueId) {
|
|
76
75
|
const queueResponse = await __classPrivateFieldGet(this, _Endpoint_instances, "m", _Endpoint_documentQueueReqGet).call(this, queueId);
|
|
77
76
|
const queueStatusCode = queueResponse.messageObj.statusCode;
|
|
78
|
-
if (
|
|
79
|
-
|
|
80
|
-
queueStatusCode > 400) {
|
|
81
|
-
(0, error_1.handleError)(this.urlName, queueResponse, queueStatusCode, queueResponse.messageObj?.statusMessage);
|
|
77
|
+
if (!(0, responseValidation_1.isValidAsyncResponse)(queueResponse)) {
|
|
78
|
+
(0, error_1.handleError)(this.urlName, queueResponse, queueResponse.messageObj?.statusMessage);
|
|
82
79
|
}
|
|
83
80
|
if (queueStatusCode === 302 &&
|
|
84
81
|
queueResponse.messageObj.headers.location !== undefined) {
|
|
@@ -95,9 +92,8 @@ class Endpoint extends baseEndpoint_1.BaseEndpoint {
|
|
|
95
92
|
*/
|
|
96
93
|
async getDocument(documentId) {
|
|
97
94
|
const response = await __classPrivateFieldGet(this, _Endpoint_instances, "m", _Endpoint_documentGetReq).call(this, documentId);
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
(0, error_1.handleError)("document", response, statusCode, response.messageObj?.statusMessage);
|
|
95
|
+
if (!(0, responseValidation_1.isValidAsyncResponse)(response)) {
|
|
96
|
+
(0, error_1.handleError)("document", response, response.messageObj?.statusMessage);
|
|
101
97
|
}
|
|
102
98
|
return response;
|
|
103
99
|
}
|
|
@@ -108,9 +104,8 @@ class Endpoint extends baseEndpoint_1.BaseEndpoint {
|
|
|
108
104
|
*/
|
|
109
105
|
async sendFeedback(documentId, feedback) {
|
|
110
106
|
const response = await __classPrivateFieldGet(this, _Endpoint_instances, "m", _Endpoint_documentFeedbackPutReq).call(this, documentId, feedback);
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
(0, error_1.handleError)("feedback", response, statusCode, response.messageObj?.statusMessage);
|
|
107
|
+
if (!(0, responseValidation_1.isValidSyncResponse)(response)) {
|
|
108
|
+
(0, error_1.handleError)("feedback", response, response.messageObj?.statusMessage);
|
|
114
109
|
}
|
|
115
110
|
return response;
|
|
116
111
|
}
|
package/src/http/error.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MindeeError } from "../errors";
|
|
2
2
|
import { StringDict } from "../parsing/common";
|
|
3
3
|
import { EndpointResponse } from "./baseEndpoint";
|
|
4
|
-
export declare function handleError(urlName: string, response: EndpointResponse,
|
|
4
|
+
export declare function handleError(urlName: string, response: EndpointResponse, serverError?: string): void;
|
|
5
5
|
/**
|
|
6
6
|
* `Error` wrapper for server (HTTP) errors.
|
|
7
7
|
* Is used when an error is lacking a handled error code.
|
package/src/http/error.js
CHANGED
|
@@ -3,9 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.MindeeHttp504Error = exports.MindeeHttp500Error = exports.MindeeHttp429Error = exports.MindeeHttp413Error = exports.MindeeHttp404Error = exports.MindeeHttp403Error = exports.MindeeHttp401Error = exports.MindeeHttp400Error = exports.MindeeHttpError = exports.handleError = void 0;
|
|
4
4
|
const errors_1 = require("../errors");
|
|
5
5
|
const handler_1 = require("../errors/handler");
|
|
6
|
-
function handleError(urlName, response,
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
function handleError(urlName, response, serverError) {
|
|
7
|
+
let code;
|
|
8
|
+
if (response.messageObj.statusCode && !Number.isNaN(response.data.statusCode)) {
|
|
9
|
+
code = response.messageObj.statusCode;
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
code = 500;
|
|
9
13
|
}
|
|
10
14
|
let errorObj;
|
|
11
15
|
try {
|
package/src/http/index.d.ts
CHANGED
|
@@ -2,3 +2,4 @@ export { Endpoint } from "./endpoint";
|
|
|
2
2
|
export { EndpointResponse } from "./baseEndpoint";
|
|
3
3
|
export { STANDARD_API_OWNER, API_KEY_ENVVAR_NAME, ApiSettings, } from "./apiSettings";
|
|
4
4
|
export { MindeeHttpError, MindeeHttp400Error, MindeeHttp401Error, MindeeHttp403Error, MindeeHttp404Error, MindeeHttp413Error, MindeeHttp429Error, MindeeHttp500Error, MindeeHttp504Error, handleError, } from "./error";
|
|
5
|
+
export { isValidSyncResponse, isValidAsyncResponse, cleanRequestData, } from "./responseValidation";
|
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.MindeeHttp504Error = exports.MindeeHttp500Error = exports.MindeeHttp429Error = exports.MindeeHttp413Error = exports.MindeeHttp404Error = exports.MindeeHttp403Error = exports.MindeeHttp401Error = exports.MindeeHttp400Error = exports.MindeeHttpError = exports.ApiSettings = exports.API_KEY_ENVVAR_NAME = exports.STANDARD_API_OWNER = exports.Endpoint = void 0;
|
|
3
|
+
exports.cleanRequestData = exports.isValidAsyncResponse = exports.isValidSyncResponse = exports.handleError = exports.MindeeHttp504Error = exports.MindeeHttp500Error = exports.MindeeHttp429Error = exports.MindeeHttp413Error = exports.MindeeHttp404Error = exports.MindeeHttp403Error = exports.MindeeHttp401Error = exports.MindeeHttp400Error = exports.MindeeHttpError = exports.ApiSettings = 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 apiSettings_1 = require("./apiSettings");
|
|
@@ -18,3 +18,7 @@ Object.defineProperty(exports, "MindeeHttp429Error", { enumerable: true, get: fu
|
|
|
18
18
|
Object.defineProperty(exports, "MindeeHttp500Error", { enumerable: true, get: function () { return error_1.MindeeHttp500Error; } });
|
|
19
19
|
Object.defineProperty(exports, "MindeeHttp504Error", { enumerable: true, get: function () { return error_1.MindeeHttp504Error; } });
|
|
20
20
|
Object.defineProperty(exports, "handleError", { enumerable: true, get: function () { return error_1.handleError; } });
|
|
21
|
+
var responseValidation_1 = require("./responseValidation");
|
|
22
|
+
Object.defineProperty(exports, "isValidSyncResponse", { enumerable: true, get: function () { return responseValidation_1.isValidSyncResponse; } });
|
|
23
|
+
Object.defineProperty(exports, "isValidAsyncResponse", { enumerable: true, get: function () { return responseValidation_1.isValidAsyncResponse; } });
|
|
24
|
+
Object.defineProperty(exports, "cleanRequestData", { enumerable: true, get: function () { return responseValidation_1.cleanRequestData; } });
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { EndpointResponse } from "./baseEndpoint";
|
|
2
|
+
/**
|
|
3
|
+
* Checks if the synchronous response is valid. Returns True if the response is valid.
|
|
4
|
+
*
|
|
5
|
+
* @param response an endpoint response object.
|
|
6
|
+
* @returns bool
|
|
7
|
+
*/
|
|
8
|
+
export declare function isValidSyncResponse(response: EndpointResponse): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Checks if the asynchronous response is valid. Also checks if it is a valid synchronous response.
|
|
11
|
+
* Returns True if the response is valid.
|
|
12
|
+
*
|
|
13
|
+
* @param response an endpoint response object.
|
|
14
|
+
* @returns bool
|
|
15
|
+
*/
|
|
16
|
+
export declare function isValidAsyncResponse(response: EndpointResponse): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Checks and correct the response object depending on the possible kinds of returns.
|
|
19
|
+
*
|
|
20
|
+
* @param response an endpoint response object.
|
|
21
|
+
* @returns EndpointResponse Returns the job error if the error is due to parsing, returns the http error otherwise.
|
|
22
|
+
*/
|
|
23
|
+
export declare function cleanRequestData(response: EndpointResponse): EndpointResponse;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.cleanRequestData = exports.isValidAsyncResponse = exports.isValidSyncResponse = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Checks if the synchronous response is valid. Returns True if the response is valid.
|
|
6
|
+
*
|
|
7
|
+
* @param response an endpoint response object.
|
|
8
|
+
* @returns bool
|
|
9
|
+
*/
|
|
10
|
+
function isValidSyncResponse(response) {
|
|
11
|
+
if (!response.messageObj || !response.messageObj.statusCode) {
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
14
|
+
return !(isNaN(response.messageObj.statusCode) || parseInt(response.messageObj.statusCode.toString()) < 200 || parseInt(response.messageObj.statusCode.toString()) > 302);
|
|
15
|
+
}
|
|
16
|
+
exports.isValidSyncResponse = isValidSyncResponse;
|
|
17
|
+
/**
|
|
18
|
+
* Checks if the asynchronous response is valid. Also checks if it is a valid synchronous response.
|
|
19
|
+
* Returns True if the response is valid.
|
|
20
|
+
*
|
|
21
|
+
* @param response an endpoint response object.
|
|
22
|
+
* @returns bool
|
|
23
|
+
*/
|
|
24
|
+
function isValidAsyncResponse(response) {
|
|
25
|
+
if (!isValidSyncResponse(response)) {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
if (response.messageObj.statusCode) {
|
|
29
|
+
if (response.messageObj.statusCode >= 300 && response.messageObj.statusCode <= 302) {
|
|
30
|
+
// Skip next check for redirections as the final payload will be checked anyway.
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
else if (response.messageObj.statusCode < 200 || response.messageObj.statusCode > 302) {
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
if (!response.data["job"]) {
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
return !(response.data["job"] && response.data["job"]["error"] && Object.keys(response.data["job"]["error"]).length > 0);
|
|
41
|
+
}
|
|
42
|
+
exports.isValidAsyncResponse = isValidAsyncResponse;
|
|
43
|
+
/**
|
|
44
|
+
* Checks and correct the response object depending on the possible kinds of returns.
|
|
45
|
+
*
|
|
46
|
+
* @param response an endpoint response object.
|
|
47
|
+
* @returns EndpointResponse Returns the job error if the error is due to parsing, returns the http error otherwise.
|
|
48
|
+
*/
|
|
49
|
+
function cleanRequestData(response) {
|
|
50
|
+
if (response.messageObj &&
|
|
51
|
+
response.messageObj.statusCode &&
|
|
52
|
+
(response.messageObj.statusCode < 200 ||
|
|
53
|
+
response.messageObj.statusCode > 302)) {
|
|
54
|
+
return response;
|
|
55
|
+
}
|
|
56
|
+
if (response.data) {
|
|
57
|
+
if (response.data["api_request"] && response.data["api_request"]["status_code"] && parseInt(response.data["api_request"]["status_code"].toString()) > 399) {
|
|
58
|
+
response.messageObj.statusCode = parseInt(response.data["api_request"]["status_code"].toString());
|
|
59
|
+
}
|
|
60
|
+
if (response.data["job"] && response.data["job"]["error"] && Object.keys(response.data["job"]["error"]).length > 0) {
|
|
61
|
+
response.messageObj.statusCode = 500;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return response;
|
|
65
|
+
}
|
|
66
|
+
exports.cleanRequestData = cleanRequestData;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* Options to pass to the `parse` method for cutting multi-page documents.
|
|
3
|
+
*/
|
|
2
4
|
export interface PageOptions {
|
|
3
5
|
/**
|
|
4
6
|
* Zero-based list of page indexes.
|
|
@@ -15,7 +17,9 @@ export interface PageOptions {
|
|
|
15
17
|
*/
|
|
16
18
|
onMinPages: number;
|
|
17
19
|
}
|
|
18
|
-
/**
|
|
20
|
+
/**
|
|
21
|
+
* Operation to apply on the document, given the page indexes specified.
|
|
22
|
+
*/
|
|
19
23
|
export declare enum PageOptionsOperation {
|
|
20
24
|
/** Only keep pages matching the provided indexes. */
|
|
21
25
|
KeepOnly = "KEEP_ONLY",
|
package/src/input/pageOptions.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PageOptionsOperation = void 0;
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* Operation to apply on the document, given the page indexes specified.
|
|
6
|
+
*/
|
|
5
7
|
var PageOptionsOperation;
|
|
6
8
|
(function (PageOptionsOperation) {
|
|
7
9
|
/** Only keep pages matching the provided indexes. */
|
package/src/internal.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
export * as
|
|
2
|
-
export * as parsing from "./parsing";
|
|
3
|
-
export * as pdf from "./pdf";
|
|
1
|
+
export * as input from "./input";
|
|
4
2
|
export * as geometry from "./geometry";
|
|
5
3
|
export * as http from "./http";
|
|
4
|
+
export * as imageOperations from "./imageOperations/internal";
|
|
5
|
+
export * as parsing from "./parsing";
|
|
6
|
+
export * as pdf from "./pdf";
|
|
7
|
+
export * as product from "./product/internal";
|
package/src/internal.js
CHANGED
|
@@ -23,9 +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.
|
|
27
|
-
exports.
|
|
28
|
-
exports.parsing = __importStar(require("./parsing"));
|
|
29
|
-
exports.pdf = __importStar(require("./pdf"));
|
|
26
|
+
exports.product = exports.pdf = exports.parsing = exports.imageOperations = exports.http = exports.geometry = exports.input = void 0;
|
|
27
|
+
exports.input = __importStar(require("./input"));
|
|
30
28
|
exports.geometry = __importStar(require("./geometry"));
|
|
31
29
|
exports.http = __importStar(require("./http"));
|
|
30
|
+
exports.imageOperations = __importStar(require("./imageOperations/internal"));
|
|
31
|
+
exports.parsing = __importStar(require("./parsing"));
|
|
32
|
+
exports.pdf = __importStar(require("./pdf"));
|
|
33
|
+
exports.product = __importStar(require("./product/internal"));
|
|
@@ -12,6 +12,8 @@ export declare class Job {
|
|
|
12
12
|
issuedAt: Date;
|
|
13
13
|
/** Timestamp noting the availability of a prediction for an enqueued document. */
|
|
14
14
|
availableAt?: Date;
|
|
15
|
+
/** Information about an error that occurred during the job processing. */
|
|
16
|
+
error?: StringDict;
|
|
15
17
|
/** ID of the job. */
|
|
16
18
|
id: string;
|
|
17
19
|
/** Status of the job. */
|