We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c316115 commit 9f7a75eCopy full SHA for 9f7a75e
.changeset/four-keys-double.md
@@ -0,0 +1,5 @@
1
+---
2
+'@gitbook/api': minor
3
4
+
5
+Publicly expose type for endpoint / authToken
packages/api/src/index.ts
@@ -17,7 +17,16 @@ interface GitBookAPIErrorResponse {
17
export class GitBookAPI extends Api<{
18
authToken?: string;
19
}> {
20
- private endpoint: string;
21
+ /**
22
+ * Endpoint used by the API client.
23
+ */
24
+ public readonly endpoint: string;
25
26
27
+ * Authentication token used by the API client.
28
29
+ public readonly authToken: string | undefined;
30
31
constructor(
32
options: {
@@ -80,6 +89,7 @@ export class GitBookAPI extends Api<{
80
89
});
81
90
82
91
this.endpoint = endpoint;
92
+ this.authToken = authToken;
83
93
this.setSecurityData({ authToken });
84
94
}
85
95
0 commit comments