UNPKG

@softvision/webpdf-wsclient-typescript

Version:

A simplified and optimized API client library for the webPDF server

86 lines 3.72 kB
"use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.RestWebServiceDocument = void 0; const documents_1 = require("../../documents"); class RestWebServiceDocument extends documents_1.AbstractDocument { constructor(documentState) { super(); this.documentState = documentState; } accessInternalState() { return this.documentState; } getDocumentId() { return this.accessInternalState().getDocumentId(); } getDocumentFile() { return this.accessInternalState().getDocumentFile(); } getHistory() { return this.accessInternalState().getHistory(); } getHistoryEntry(historyId) { return this.accessInternalState().getHistoryEntry(historyId); } activeHistory() { return this.accessInternalState().activeHistory(); } updateHistoryEntry(historyEntry) { this.accessInternalState().updateHistoryEntry(historyEntry); } lastHistory() { return this.accessInternalState().lastHistory(); } getHistorySize() { return this.accessInternalState().getHistorySize(); } downloadDocument(options) { return this.accessInternalState().getDocumentManager().downloadDocument(this.getDocumentId(), options); } deleteDocument() { return __awaiter(this, void 0, void 0, function* () { yield this.accessInternalState().getDocumentManager().deleteDocument(this.getDocumentId()); }); } renameDocument(fileName) { return __awaiter(this, void 0, void 0, function* () { return yield this.accessInternalState().getDocumentManager().renameDocument(this.getDocumentId(), fileName); }); } updateDocumentSecurity(passwordType) { return __awaiter(this, void 0, void 0, function* () { return yield this.accessInternalState().getDocumentManager().updateDocumentSecurity(this.getDocumentId(), passwordType); }); } getDocumentInfo(infoType) { return __awaiter(this, void 0, void 0, function* () { return yield this.accessInternalState().getDocumentManager().getDocumentInfo(this.getDocumentId(), infoType); }); } extractDocument(fileExtract) { return __awaiter(this, void 0, void 0, function* () { return yield this.accessInternalState().getDocumentManager().extractDocument(this.getDocumentId(), fileExtract); }); } extractArchiveFile(archivePath) { return __awaiter(this, void 0, void 0, function* () { return yield this.accessInternalState().getDocumentManager().extractArchiveFile(this.getDocumentId(), archivePath); }); } updateDocument(data) { return __awaiter(this, void 0, void 0, function* () { return yield this.accessInternalState().getDocumentManager().updateDocument(this.getDocumentId(), data); }); } } exports.RestWebServiceDocument = RestWebServiceDocument; //# sourceMappingURL=RestWebServiceDocument.js.map