UNPKG

@softvision/webpdf-wsclient-typescript

Version:

A simplified and optimized API client library for the webPDF server

56 lines 2.38 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.FileCompress = void 0; const index_1 = require("./../index"); class FileCompress { constructor(data) { let archiveFileNameDefault = "archive.zip"; this.archiveFileName = typeof (data === null || data === void 0 ? void 0 : data.archiveFileName) !== "undefined" ? data === null || data === void 0 ? void 0 : data.archiveFileName : archiveFileNameDefault; let documentIdListDefault = []; this.documentIdList = typeof (data === null || data === void 0 ? void 0 : data.documentIdList) !== "undefined" ? data === null || data === void 0 ? void 0 : data.documentIdList : documentIdListDefault; this.fileFilter = index_1.FileFilter.fromJson(data === null || data === void 0 ? void 0 : data.fileFilter); let storeArchiveDefault = false; this.storeArchive = typeof (data === null || data === void 0 ? void 0 : data.storeArchive) !== "undefined" ? data === null || data === void 0 ? void 0 : data.storeArchive : storeArchiveDefault; } static getArchiveFileNameDefault() { return "archive.zip"; } static getArchiveFileNameDescription() { return "Sets the file name for the archive document."; } static getDocumentIdListDefault() { return []; } static getDocumentIdListDescription() { return "Sets the list of `documentId`s to be added to the archive document."; } static getFileFilterDescription() { return ""; } static getStoreArchiveDefault() { return false; } static getStoreArchiveDescription() { return "Defines whether the archive is saved in the document storage or only created temporarily."; } static fromJson(data) { if (data === undefined || data === null) { return data; } return new FileCompress(data); } toJson() { var _a; return { 'archiveFileName': this.archiveFileName, 'documentIdList': this.documentIdList, 'fileFilter': (_a = this.fileFilter) === null || _a === void 0 ? void 0 : _a.toJson(), 'storeArchive': this.storeArchive, }; } clone() { return FileCompress.fromJson(this.toJson()); } } exports.FileCompress = FileCompress; //# sourceMappingURL=FileCompress.js.map