UNPKG

@softvision/webpdf-wsclient-typescript

Version:

A simplified and optimized API client library for the webPDF server

101 lines 4.94 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Recipient = void 0; const index_1 = require("./../index"); class Recipient { constructor(data) { let canAssembleDefault = false; this.canAssemble = typeof (data === null || data === void 0 ? void 0 : data.canAssemble) !== "undefined" ? data === null || data === void 0 ? void 0 : data.canAssemble : canAssembleDefault; let canExtractContentDefault = false; this.canExtractContent = typeof (data === null || data === void 0 ? void 0 : data.canExtractContent) !== "undefined" ? data === null || data === void 0 ? void 0 : data.canExtractContent : canExtractContentDefault; let canExtractForAccessibilityDefault = false; this.canExtractForAccessibility = typeof (data === null || data === void 0 ? void 0 : data.canExtractForAccessibility) !== "undefined" ? data === null || data === void 0 ? void 0 : data.canExtractForAccessibility : canExtractForAccessibilityDefault; let canFillInFormDefault = false; this.canFillInForm = typeof (data === null || data === void 0 ? void 0 : data.canFillInForm) !== "undefined" ? data === null || data === void 0 ? void 0 : data.canFillInForm : canFillInFormDefault; let canModifyDefault = false; this.canModify = typeof (data === null || data === void 0 ? void 0 : data.canModify) !== "undefined" ? data === null || data === void 0 ? void 0 : data.canModify : canModifyDefault; let canModifyAnnotationsDefault = false; this.canModifyAnnotations = typeof (data === null || data === void 0 ? void 0 : data.canModifyAnnotations) !== "undefined" ? data === null || data === void 0 ? void 0 : data.canModifyAnnotations : canModifyAnnotationsDefault; let canPrintDefault = false; this.canPrint = typeof (data === null || data === void 0 ? void 0 : data.canPrint) !== "undefined" ? data === null || data === void 0 ? void 0 : data.canPrint : canPrintDefault; let canPrintHighResDefault = false; this.canPrintHighRes = typeof (data === null || data === void 0 ? void 0 : data.canPrintHighRes) !== "undefined" ? data === null || data === void 0 ? void 0 : data.canPrintHighRes : canPrintHighResDefault; this.certificate = index_1.CertificateFileData.fromJson(data.certificate); } static getCanAssembleDefault() { return false; } static getCanAssembleDescription() { return "If \"true,\" the document can be rearranged (e.g., pages can be deleted, inserted, and rotated)."; } static getCanExtractContentDefault() { return false; } static getCanExtractContentDescription() { return "If \"true,\" content can be extracted (copied) from the document."; } static getCanExtractForAccessibilityDefault() { return false; } static getCanExtractForAccessibilityDescription() { return "If \"true,\" content can be extracted (copied) for accessibility purposes."; } static getCanFillInFormDefault() { return false; } static getCanFillInFormDescription() { return "If \"true,\" form fields can be filled out and the document can be signed."; } static getCanModifyDefault() { return false; } static getCanModifyDescription() { return "If \"true,\" changes to the document are permitted."; } static getCanModifyAnnotationsDefault() { return false; } static getCanModifyAnnotationsDescription() { return "If \"true,\" comments can be added to the document and deleted from the document."; } static getCanPrintDefault() { return false; } static getCanPrintDescription() { return "If \"true,\" the document can be printed."; } static getCanPrintHighResDefault() { return false; } static getCanPrintHighResDescription() { return "If \"true,\" the document can be printed at high resolution levels."; } static getCertificateDescription() { return ""; } static fromJson(data) { if (data === undefined || data === null) { return data; } return new Recipient(data); } toJson() { var _a; return { 'canAssemble': this.canAssemble, 'canExtractContent': this.canExtractContent, 'canExtractForAccessibility': this.canExtractForAccessibility, 'canFillInForm': this.canFillInForm, 'canModify': this.canModify, 'canModifyAnnotations': this.canModifyAnnotations, 'canPrint': this.canPrint, 'canPrintHighRes': this.canPrintHighRes, 'certificate': (_a = this.certificate) === null || _a === void 0 ? void 0 : _a.toJson(), }; } clone() { return Recipient.fromJson(this.toJson()); } } exports.Recipient = Recipient; //# sourceMappingURL=Recipient.js.map