summaryrefslogtreecommitdiff
path: root/lib/epub.js/types/archive.d.ts
blob: c705aa43d3637ec4a859955790b4effc77379219 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import JSZip = require('jszip');

export default class Archive {
  constructor();

  open(input: BinaryType, isBase64?: boolean): Promise<JSZip>;

  openUrl(zipUrl: string, isBase64?: boolean): Promise<JSZip>;

	request(url: string, type?: string): Promise<Blob | string | JSON | Document | XMLDocument>;

  getBlob(url: string, mimeType?: string): Promise<Blob>;

  getText(url: string): Promise<string>;

  getBase64(url: string, mimeType?: string): Promise<string>;

  createUrl(url: string, options: { base64: boolean }): Promise<string>;

  revokeUrl(url: string): void;

  destroy(): void;

  private checkRequirements(): void;

  private handleResponse(response: any, type?: string): Blob | string | JSON | Document | XMLDocument;
}