@gitbook/api 0.96.0 → 0.97.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.
package/dist/index.d.ts CHANGED
@@ -3,6 +3,9 @@ import { GitBookAPIError } from './GitBookAPIError';
3
3
  export * from './client';
4
4
  export { GitBookAPIError };
5
5
  export declare const GITBOOK_DEFAULT_ENDPOINT = "https://api.gitbook.com";
6
+ export interface GitBookAPIServiceBinding {
7
+ fetch: typeof fetch;
8
+ }
6
9
  export declare class GitBookAPI extends Api<{
7
10
  authToken?: string;
8
11
  }> {
@@ -18,6 +21,10 @@ export declare class GitBookAPI extends Api<{
18
21
  * User agent used by the API client.
19
22
  */
20
23
  readonly userAgent: string;
24
+ /**
25
+ * Service binding used to request the API.
26
+ */
27
+ readonly serviceBinding: GitBookAPIServiceBinding;
21
28
  constructor(options?: {
22
29
  /**
23
30
  * API endpoint to use.
@@ -26,13 +33,18 @@ export declare class GitBookAPI extends Api<{
26
33
  endpoint?: string;
27
34
  /**
28
35
  * User agent to use.
29
- * It'll default to the package name and version.
36
+ * It defaults to the package name and version.
30
37
  */
31
38
  userAgent?: string;
32
39
  /**
33
40
  * Authentication token to use.
34
41
  */
35
42
  authToken?: string;
43
+ /**
44
+ * Service binding used to request the API.
45
+ * It defaults to the HTTP fetch.
46
+ */
47
+ serviceBinding?: GitBookAPIServiceBinding;
36
48
  });
37
49
  /**
38
50
  * Create a new API client, authenticated as an installation.