UNPKG

@softvision/webpdf-wsclient-typescript

Version:

A simplified and optimized API client library for the webPDF server

101 lines 4.95 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Security = void 0; const index_1 = require("./../index"); class Security { constructor(data) { let canAssembleDefault = true; 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 = true; 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 = true; 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 = true; 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 = true; 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 = true; 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 = true; 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 = true; this.canPrintHighRes = typeof (data === null || data === void 0 ? void 0 : data.canPrintHighRes) !== "undefined" ? data === null || data === void 0 ? void 0 : data.canPrintHighRes : canPrintHighResDefault; this.password = index_1.MetadataPassword.fromJson(data === null || data === void 0 ? void 0 : data.password); } static getCanAssembleDefault() { return true; } static getCanAssembleDescription() { return "If \"true,\" the document can be rearranged (e.g., pages can be deleted, inserted, and rotated)."; } static getCanExtractContentDefault() { return true; } static getCanExtractContentDescription() { return "If \"true,\" content can be extracted (copied) from the document."; } static getCanExtractForAccessibilityDefault() { return true; } static getCanExtractForAccessibilityDescription() { return "If \"true,\" content can be extracted (copied) for accessibility purposes."; } static getCanFillInFormDefault() { return true; } static getCanFillInFormDescription() { return "If \"true,\" form fields can be filled out and the document can be signed."; } static getCanModifyDefault() { return true; } static getCanModifyDescription() { return "If \"true,\" changes to the document are permitted."; } static getCanModifyAnnotationsDefault() { return true; } static getCanModifyAnnotationsDescription() { return "If \"true,\" comments can be added to the document and deleted from the document."; } static getCanPrintDefault() { return true; } static getCanPrintDescription() { return "If \"true,\" the document can be printed."; } static getCanPrintHighResDefault() { return true; } static getCanPrintHighResDescription() { return "If \"true,\" the document can be printed at high resolution levels."; } static getPasswordDescription() { return ""; } static fromJson(data) { if (data === undefined || data === null) { return data; } return new Security(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, 'password': (_a = this.password) === null || _a === void 0 ? void 0 : _a.toJson(), }; } clone() { return Security.fromJson(this.toJson()); } } exports.Security = Security; //# sourceMappingURL=Security.js.map