@softvision/webpdf-wsclient-typescript
Version:
A simplified and optimized API client library for the webPDF server
56 lines • 3.48 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ToolboxTranscribeTranscribe = void 0;
const index_1 = require("./../index");
class ToolboxTranscribeTranscribe {
constructor(data) {
let errorReportDefault = "none";
this.errorReport = typeof (data === null || data === void 0 ? void 0 : data.errorReport) !== "undefined" ? data === null || data === void 0 ? void 0 : data.errorReport : errorReportDefault;
let failureLevelDefault = "error";
this.failureLevel = typeof (data === null || data === void 0 ? void 0 : data.failureLevel) !== "undefined" ? data === null || data === void 0 ? void 0 : data.failureLevel : failureLevelDefault;
this.html = index_1.HtmlTranscribe.fromJson(data === null || data === void 0 ? void 0 : data.html);
let successReportDefault = "none";
this.successReport = typeof (data === null || data === void 0 ? void 0 : data.successReport) !== "undefined" ? data === null || data === void 0 ? void 0 : data.successReport : successReportDefault;
}
static getErrorReportDefault() {
return "none";
}
static getErrorReportDescription() {
return "This parameter determines if and in which form the XML report for a failed conversion is returned.\n\n* none = XML report is not returned\n* message = XML report will be delivered as part of the error message\n* file = XML report is saved to file";
}
static getFailureLevelDefault() {
return "error";
}
static getFailureLevelDescription() {
return "This parameter determines at which error level the conversion should fail, you can use this parameter to automatically reject also results with lower precision as failure\n\n* warning = Documents for which warnings occur will also cause the conversion to fail.\n* missingContent = Documents for which not all content could be converted correctly will also be considered as failures.\n* error = Only if a conversion of the document did not lead to any meaningful result document, this is evaluated as failure, even if contents should be missing.";
}
static getHtmlDescription() {
return "";
}
static getSuccessReportDefault() {
return "none";
}
static getSuccessReportDescription() {
return "This parameter determines if and in which form the XML report for a successful conversion is returned.\n\n* none = XML report is not returned\n* linked = XML report is appended to the end of the target document.\n* zip = target document and XML report are packed together in a ZIP archive.\n\n**Important:** The format of the document created at \"errorReport\" and \"successReport\" is described via the http:\/\/schema.webpdf.de\/1.0\/report\/transcribe.xsd schema.";
}
static fromJson(data) {
if (data === undefined || data === null) {
return data;
}
return new ToolboxTranscribeTranscribe(data);
}
toJson() {
var _a;
return {
'errorReport': this.errorReport,
'failureLevel': this.failureLevel,
'html': (_a = this.html) === null || _a === void 0 ? void 0 : _a.toJson(),
'successReport': this.successReport,
};
}
clone() {
return ToolboxTranscribeTranscribe.fromJson(this.toJson());
}
}
exports.ToolboxTranscribeTranscribe = ToolboxTranscribeTranscribe;
//# sourceMappingURL=ToolboxTranscribeTranscribe.js.map