UNPKG

@softvision/webpdf-wsclient-typescript

Version:

A simplified and optimized API client library for the webPDF server

39 lines 1.52 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.InfoForm = void 0; const index_1 = require("./../index"); class InfoForm extends index_1.Info { constructor(data) { super(data); this.acroFormFields = (data.acroFormFields || []).map(index_1.InfoFormField.fromJson); this.error = index_1.WebserviceException.fromJson(data === null || data === void 0 ? void 0 : data.error); this.value = data === null || data === void 0 ? void 0 : data.value; } static getAcroFormFieldsDefault() { return []; } static getAcroFormFieldsDescription() { return "All AcroForms fields with fully qualified name and, if XFA form, mapping to XFA template and XFA data."; } static getErrorDescription() { return ""; } static getValueDescription() { return "Requested content (BASE64 encoded)"; } static fromJson(data) { if (data === undefined || data === null) { return data; } return new InfoForm(data); } toJson() { var _a, _b; return Object.assign(Object.assign({}, (super.toJson())), { 'acroFormFields': (_a = this.acroFormFields) === null || _a === void 0 ? void 0 : _a.map((data) => data.toJson()), 'error': (_b = this.error) === null || _b === void 0 ? void 0 : _b.toJson(), 'value': this.value }); } clone() { return InfoForm.fromJson(this.toJson()); } } exports.InfoForm = InfoForm; //# sourceMappingURL=InfoForm.js.map