@prose-reader/streamer 1.282.0 → 1.284.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,6 +7,7 @@ type OnManifestSuccess = (params: {
7
7
  manifest: Manifest;
8
8
  archive: Archive;
9
9
  }) => Observable<Manifest> | Promise<Manifest>;
10
+ type WithArchiveResponse = (archive: Archive) => Observable<Response> | Promise<Response>;
10
11
  export declare class Streamer {
11
12
  protected epubLoader: ReturnType<typeof createArchiveLoader>;
12
13
  protected onError: OnError;
@@ -22,13 +23,18 @@ export declare class Streamer {
22
23
  release: () => void;
23
24
  }>;
24
25
  accessArchiveWithoutLock(key: string): Observable<Archive>;
26
+ protected withArchiveResponse({ key, getResponse, }: {
27
+ key: string;
28
+ getResponse: WithArchiveResponse;
29
+ }): Promise<Response>;
25
30
  fetchManifest({ key, baseUrl }: {
26
31
  key: string;
27
32
  baseUrl?: string;
28
33
  }): Promise<Response>;
29
- fetchResource({ key, resourcePath, }: {
34
+ fetchResource({ key, resourcePath, request, }: {
30
35
  key: string;
31
36
  resourcePath: string;
37
+ request?: Request;
32
38
  }): Promise<Response>;
33
39
  }
34
40
  export {};
@@ -0,0 +1,6 @@
1
+ import { Manifest } from '@prose-reader/shared';
2
+ import { Archive } from '../../../archives/types';
3
+ type Toc = NonNullable<Manifest["nav"]>["toc"];
4
+ export declare const normalizeFilenameAsTitle: (filename: string) => string;
5
+ export declare const buildAudiobookToc: (manifest: Manifest, archive: Archive) => Toc | undefined;
6
+ export {};