UNPKG

@softvision/webpdf-wsclient-typescript

Version:

A simplified and optimized API client library for the webPDF server

25 lines (24 loc) 1.15 kB
import { Document } from "../../documents"; import { DocumentFile, FileExtract, HistoryEntry, Info, InfoType, PdfPassword } from "../../../generated-sources"; import { AxiosProgressEvent } from "axios"; export interface RestDocument extends Document { getDocumentId(): string; getDocumentFile(): DocumentFile; getHistory(): Array<HistoryEntry>; getHistoryEntry(historyId: number): HistoryEntry; activeHistory(): HistoryEntry; updateHistoryEntry(historyEntry: HistoryEntry): void; lastHistory(): HistoryEntry; getHistorySize(): number; downloadDocument(options?: { onProgress?: (event: AxiosProgressEvent) => void; abortSignal?: AbortSignal; }): Promise<Buffer>; deleteDocument(): Promise<void>; renameDocument(fileName: string): Promise<RestDocument>; updateDocumentSecurity(passwordType: PdfPassword): Promise<RestDocument>; getDocumentInfo(infoType: InfoType): Promise<Info>; extractDocument(fileExtract: FileExtract): Promise<Array<RestDocument>>; extractArchiveFile(archivePath: string): Promise<Buffer>; updateDocument(data: Blob): Promise<RestDocument>; }