notebooklm-kit 0.0.1 → 2.1.1
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/LICENSE +22 -0
- package/README.md +4102 -0
- package/dist/src/auth/auth.d.ts +46 -0
- package/dist/src/auth/auth.d.ts.map +1 -0
- package/dist/src/auth/auth.js +323 -0
- package/dist/src/auth/auth.js.map +1 -0
- package/dist/src/auth/refresh.d.ts +150 -0
- package/dist/src/auth/refresh.d.ts.map +1 -0
- package/dist/src/auth/refresh.js +433 -0
- package/dist/src/auth/refresh.js.map +1 -0
- package/dist/src/client/notebooklm-client.d.ts +372 -0
- package/dist/src/client/notebooklm-client.d.ts.map +1 -0
- package/dist/src/client/notebooklm-client.js +550 -0
- package/dist/src/client/notebooklm-client.js.map +1 -0
- package/dist/src/index.d.ts +50 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +45 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/rpc/rpc-client.d.ts +48 -0
- package/dist/src/rpc/rpc-client.d.ts.map +1 -0
- package/dist/src/rpc/rpc-client.js +94 -0
- package/dist/src/rpc/rpc-client.js.map +1 -0
- package/dist/src/rpc/rpc-methods.d.ts +127 -0
- package/dist/src/rpc/rpc-methods.d.ts.map +1 -0
- package/dist/src/rpc/rpc-methods.js +169 -0
- package/dist/src/rpc/rpc-methods.js.map +1 -0
- package/dist/src/services/artifacts.d.ts +1017 -0
- package/dist/src/services/artifacts.d.ts.map +1 -0
- package/dist/src/services/artifacts.js +5413 -0
- package/dist/src/services/artifacts.js.map +1 -0
- package/dist/src/services/generation.d.ts +147 -0
- package/dist/src/services/generation.d.ts.map +1 -0
- package/dist/src/services/generation.js +479 -0
- package/dist/src/services/generation.js.map +1 -0
- package/dist/src/services/notebook-language.d.ts +109 -0
- package/dist/src/services/notebook-language.d.ts.map +1 -0
- package/dist/src/services/notebook-language.js +204 -0
- package/dist/src/services/notebook-language.js.map +1 -0
- package/dist/src/services/notebooks.d.ts +26 -0
- package/dist/src/services/notebooks.d.ts.map +1 -0
- package/dist/src/services/notebooks.js +539 -0
- package/dist/src/services/notebooks.js.map +1 -0
- package/dist/src/services/notes.d.ts +72 -0
- package/dist/src/services/notes.d.ts.map +1 -0
- package/dist/src/services/notes.js +340 -0
- package/dist/src/services/notes.js.map +1 -0
- package/dist/src/services/sources.d.ts +1085 -0
- package/dist/src/services/sources.d.ts.map +1 -0
- package/dist/src/services/sources.js +2675 -0
- package/dist/src/services/sources.js.map +1 -0
- package/dist/src/types/artifact.d.ts +258 -0
- package/dist/src/types/artifact.d.ts.map +1 -0
- package/dist/src/types/artifact.js +42 -0
- package/dist/src/types/artifact.js.map +1 -0
- package/dist/src/types/common.d.ts +226 -0
- package/dist/src/types/common.d.ts.map +1 -0
- package/dist/src/types/common.js +80 -0
- package/dist/src/types/common.js.map +1 -0
- package/dist/src/types/languages.d.ts +179 -0
- package/dist/src/types/languages.d.ts.map +1 -0
- package/dist/src/types/languages.js +254 -0
- package/dist/src/types/languages.js.map +1 -0
- package/dist/src/types/note.d.ts +41 -0
- package/dist/src/types/note.d.ts.map +1 -0
- package/dist/src/types/note.js +12 -0
- package/dist/src/types/note.js.map +1 -0
- package/dist/src/types/notebook.d.ts +81 -0
- package/dist/src/types/notebook.d.ts.map +1 -0
- package/dist/src/types/notebook.js +5 -0
- package/dist/src/types/notebook.js.map +1 -0
- package/dist/src/types/source.d.ts +241 -0
- package/dist/src/types/source.d.ts.map +1 -0
- package/dist/src/types/source.js +60 -0
- package/dist/src/types/source.js.map +1 -0
- package/dist/src/utils/batch-execute.d.ts +58 -0
- package/dist/src/utils/batch-execute.d.ts.map +1 -0
- package/dist/src/utils/batch-execute.js +398 -0
- package/dist/src/utils/batch-execute.js.map +1 -0
- package/dist/src/utils/chunked-decoder.d.ts +11 -0
- package/dist/src/utils/chunked-decoder.d.ts.map +1 -0
- package/dist/src/utils/chunked-decoder.js +326 -0
- package/dist/src/utils/chunked-decoder.js.map +1 -0
- package/dist/src/utils/chunked-parser.d.ts +61 -0
- package/dist/src/utils/chunked-parser.d.ts.map +1 -0
- package/dist/src/utils/chunked-parser.js +609 -0
- package/dist/src/utils/chunked-parser.js.map +1 -0
- package/dist/src/utils/errors.d.ts +58 -0
- package/dist/src/utils/errors.d.ts.map +1 -0
- package/dist/src/utils/errors.js +357 -0
- package/dist/src/utils/errors.js.map +1 -0
- package/dist/src/utils/quota.d.ts +213 -0
- package/dist/src/utils/quota.d.ts.map +1 -0
- package/dist/src/utils/quota.js +518 -0
- package/dist/src/utils/quota.js.map +1 -0
- package/dist/src/utils/streaming-client.d.ts +129 -0
- package/dist/src/utils/streaming-client.d.ts.map +1 -0
- package/dist/src/utils/streaming-client.js +559 -0
- package/dist/src/utils/streaming-client.js.map +1 -0
- package/package.json +85 -7
- package/index.js +0 -2
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Main NotebookLM Client
|
|
3
|
+
* Provides high-level interface for NotebookLM operations
|
|
4
|
+
*/
|
|
5
|
+
import { RPCClient } from '../rpc/rpc-client.js';
|
|
6
|
+
import { NotebooksService } from '../services/notebooks.js';
|
|
7
|
+
import { SourcesService } from '../services/sources.js';
|
|
8
|
+
import { NotesService } from '../services/notes.js';
|
|
9
|
+
import { ArtifactsService } from '../services/artifacts.js';
|
|
10
|
+
import { GenerationService } from '../services/generation.js';
|
|
11
|
+
import { NotebookLanguageService } from '../services/notebook-language.js';
|
|
12
|
+
import { AutoRefreshManager } from '../auth/refresh.js';
|
|
13
|
+
import { QuotaManager } from '../utils/quota.js';
|
|
14
|
+
import type { NotebookLMConfig } from '../types/common.js';
|
|
15
|
+
/**
|
|
16
|
+
* NotebookLM Client
|
|
17
|
+
*
|
|
18
|
+
* Main entry point for interacting with Google NotebookLM API.
|
|
19
|
+
* Provides a simple, organized interface to all NotebookLM features.
|
|
20
|
+
*
|
|
21
|
+
* **Features:**
|
|
22
|
+
* - **Notebooks:** Create, list, update, delete notebooks
|
|
23
|
+
* - **Sources:** Add URLs, text, files, YouTube videos, Google Drive files, web search
|
|
24
|
+
* - **Notes:** Create and manage notes within notebooks
|
|
25
|
+
* - **Artifacts:** Generate quizzes, flashcards, study guides, mind maps, infographics, slides, reports, audio, video
|
|
26
|
+
* - **Generation:** Chat with notebooks, generate guides, outlines, and reports
|
|
27
|
+
* - **Auto-Refresh:** Automatically keeps sessions alive (enabled by default)
|
|
28
|
+
* - **Quota Management:** Tracks and enforces NotebookLM usage limits
|
|
29
|
+
*
|
|
30
|
+
* **Usage:**
|
|
31
|
+
* ```typescript
|
|
32
|
+
* const sdk = new NotebookLMClient({
|
|
33
|
+
* authToken: process.env.NOTEBOOKLM_AUTH_TOKEN!,
|
|
34
|
+
* cookies: process.env.NOTEBOOKLM_COOKIES!,
|
|
35
|
+
* });
|
|
36
|
+
*
|
|
37
|
+
* // Access services
|
|
38
|
+
* const notebooks = await sdk.notebooks.list();
|
|
39
|
+
* const notebook = await sdk.notebooks.create({ title: 'My Research' });
|
|
40
|
+
* await sdk.sources.addFromURL(notebook.projectId, { url: 'https://example.com' });
|
|
41
|
+
* const response = await sdk.generation.chat(notebook.projectId, 'Summarize this');
|
|
42
|
+
* ```
|
|
43
|
+
*
|
|
44
|
+
* **Service Organization:**
|
|
45
|
+
* - `sdk.notebooks` - Notebook/project operations
|
|
46
|
+
* - `sdk.sources` - Source management (URLs, files, YouTube, Drive, web search)
|
|
47
|
+
* - `sdk.notes` - Note operations
|
|
48
|
+
* - `sdk.artifacts` - Artifact creation and management
|
|
49
|
+
* - `sdk.generation` - Chat and content generation
|
|
50
|
+
*
|
|
51
|
+
* **Auto-Refresh:**
|
|
52
|
+
* Credentials are automatically refreshed every 10 minutes (configurable) to keep sessions alive.
|
|
53
|
+
* Set `autoRefresh: false` to disable, or customize with `autoRefresh: { interval: 5 * 60 * 1000 }`.
|
|
54
|
+
*
|
|
55
|
+
* **Quota Management:**
|
|
56
|
+
* The SDK automatically tracks and enforces NotebookLM limits (100 notebooks, 50 chats/day, etc.).
|
|
57
|
+
* Use `sdk.getUsage()` to check current usage and `sdk.getRemaining('chats')` for remaining quota.
|
|
58
|
+
*
|
|
59
|
+
* **Cleanup:**
|
|
60
|
+
* Always call `sdk.dispose()` when done to stop auto-refresh and clean up resources.
|
|
61
|
+
*/
|
|
62
|
+
export declare class NotebookLMClient {
|
|
63
|
+
private rpcClient?;
|
|
64
|
+
private refreshManager?;
|
|
65
|
+
private quotaManager;
|
|
66
|
+
private config;
|
|
67
|
+
private credentials?;
|
|
68
|
+
private initialized;
|
|
69
|
+
private _notebooks?;
|
|
70
|
+
private _sources?;
|
|
71
|
+
private _notes?;
|
|
72
|
+
private _artifacts?;
|
|
73
|
+
private _generation?;
|
|
74
|
+
private _notebookLanguage?;
|
|
75
|
+
/**
|
|
76
|
+
* Notebook operations
|
|
77
|
+
* Create, list, get, update, delete notebooks
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* ```typescript
|
|
81
|
+
* const notebooks = await sdk.notebooks.list();
|
|
82
|
+
* const notebook = await sdk.notebooks.create({ title: 'Research', emoji: '📚' });
|
|
83
|
+
* await sdk.notebooks.update(notebook.projectId, { title: 'Updated Title' });
|
|
84
|
+
* ```
|
|
85
|
+
*/
|
|
86
|
+
get notebooks(): NotebooksService;
|
|
87
|
+
/**
|
|
88
|
+
* Source operations
|
|
89
|
+
* Add sources from URLs, text, files, YouTube, Google Drive, web search
|
|
90
|
+
*
|
|
91
|
+
* @example
|
|
92
|
+
* ```typescript
|
|
93
|
+
* await sdk.sources.addFromURL('notebook-id', { url: 'https://example.com' });
|
|
94
|
+
* await sdk.sources.addFromText('notebook-id', { title: 'Notes', content: '...' });
|
|
95
|
+
* await sdk.sources.addYouTube('notebook-id', { urlOrId: 'video-id' });
|
|
96
|
+
* ```
|
|
97
|
+
*/
|
|
98
|
+
get sources(): SourcesService;
|
|
99
|
+
/**
|
|
100
|
+
* Note operations
|
|
101
|
+
* Create, list, update, delete notes within notebooks
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* ```typescript
|
|
105
|
+
* const notes = await sdk.notes.list('notebook-id');
|
|
106
|
+
* const note = await sdk.notes.create('notebook-id', { title: 'Note', content: '...' });
|
|
107
|
+
* ```
|
|
108
|
+
*/
|
|
109
|
+
get notes(): NotesService;
|
|
110
|
+
/**
|
|
111
|
+
* Artifact operations
|
|
112
|
+
* Create and manage artifacts: quizzes, flashcards, study guides, mind maps,
|
|
113
|
+
* infographics, slide decks, reports, audio overviews, video overviews
|
|
114
|
+
*
|
|
115
|
+
* @example
|
|
116
|
+
* ```typescript
|
|
117
|
+
* const quiz = await sdk.artifacts.create('notebook-id', ArtifactType.QUIZ, {
|
|
118
|
+
* instructions: 'Create 10 questions',
|
|
119
|
+
* });
|
|
120
|
+
* const audio = await sdk.artifacts.create('notebook-id', ArtifactType.AUDIO, {
|
|
121
|
+
* instructions: 'Focus on key findings',
|
|
122
|
+
* });
|
|
123
|
+
* ```
|
|
124
|
+
*/
|
|
125
|
+
get artifacts(): ArtifactsService;
|
|
126
|
+
/**
|
|
127
|
+
* Generation operations
|
|
128
|
+
* Chat with notebooks, generate guides, outlines, reports
|
|
129
|
+
*
|
|
130
|
+
* @example
|
|
131
|
+
* ```typescript
|
|
132
|
+
* const response = await sdk.generation.chat('notebook-id', 'What are the key findings?');
|
|
133
|
+
* const guide = await sdk.generation.generateNotebookGuide('notebook-id');
|
|
134
|
+
* ```
|
|
135
|
+
*/
|
|
136
|
+
get generation(): GenerationService;
|
|
137
|
+
/**
|
|
138
|
+
* Notebook language operations
|
|
139
|
+
* Get and set the notebook's default output language
|
|
140
|
+
*
|
|
141
|
+
* The notebook's default output language is used as the default for:
|
|
142
|
+
* - Artifact creation (audio, video, report, infographics, slide decks)
|
|
143
|
+
* - Chat responses
|
|
144
|
+
* - All other notebook operations
|
|
145
|
+
*
|
|
146
|
+
* @example
|
|
147
|
+
* ```typescript
|
|
148
|
+
* import { NotebookLMLanguage } from 'notebooklm-kit';
|
|
149
|
+
*
|
|
150
|
+
* // Get current default language
|
|
151
|
+
* const language = await sdk.notebookLanguage.get('notebook-id');
|
|
152
|
+
*
|
|
153
|
+
* // Set default language to German
|
|
154
|
+
* await sdk.notebookLanguage.set('notebook-id', NotebookLMLanguage.GERMAN);
|
|
155
|
+
*
|
|
156
|
+
* // Now all artifacts will default to German unless overridden
|
|
157
|
+
* const quiz = await sdk.artifacts.create('notebook-id', ArtifactType.QUIZ, {
|
|
158
|
+
* // language will default to German
|
|
159
|
+
* });
|
|
160
|
+
* ```
|
|
161
|
+
*/
|
|
162
|
+
get notebookLanguage(): NotebookLanguageService;
|
|
163
|
+
/**
|
|
164
|
+
* Create a new NotebookLM client
|
|
165
|
+
*
|
|
166
|
+
* **Auto-Refresh Configuration:**
|
|
167
|
+
*
|
|
168
|
+
* The SDK automatically keeps your session alive by refreshing credentials periodically.
|
|
169
|
+
* This prevents session expiration during long-running operations.
|
|
170
|
+
*
|
|
171
|
+
* - **Default behavior:** Auto-refresh is enabled by default with a 10-minute interval
|
|
172
|
+
* - **Custom interval:** Set `autoRefresh: { enabled: true, interval: 5 * 60 * 1000 }` for 5 minutes
|
|
173
|
+
* - **Disable:** Set `autoRefresh: false` to disable automatic refresh
|
|
174
|
+
* - **Initial refresh:** Credentials are refreshed immediately when the client is created
|
|
175
|
+
* - **Background refresh:** Subsequent refreshes happen automatically at the configured interval
|
|
176
|
+
*
|
|
177
|
+
* **Refresh Intervals:**
|
|
178
|
+
* - Recommended: 5-10 minutes (300,000 - 600,000 ms)
|
|
179
|
+
* - Minimum: 1 minute (60,000 ms) - not recommended as it may be too frequent
|
|
180
|
+
* - Maximum: 30 minutes (1,800,000 ms) - sessions may expire before refresh
|
|
181
|
+
*
|
|
182
|
+
* **Example configurations:**
|
|
183
|
+
* ```typescript
|
|
184
|
+
* // Default: Auto-refresh enabled, 10-minute interval
|
|
185
|
+
* const client = new NotebookLMClient({
|
|
186
|
+
* authToken: '...',
|
|
187
|
+
* cookies: '...',
|
|
188
|
+
* });
|
|
189
|
+
*
|
|
190
|
+
* // Custom 5-minute interval
|
|
191
|
+
* const client = new NotebookLMClient({
|
|
192
|
+
* authToken: '...',
|
|
193
|
+
* cookies: '...',
|
|
194
|
+
* autoRefresh: {
|
|
195
|
+
* enabled: true,
|
|
196
|
+
* interval: 5 * 60 * 1000, // 5 minutes
|
|
197
|
+
* },
|
|
198
|
+
* });
|
|
199
|
+
*
|
|
200
|
+
* // Disable auto-refresh
|
|
201
|
+
* const client = new NotebookLMClient({
|
|
202
|
+
* authToken: '...',
|
|
203
|
+
* cookies: '...',
|
|
204
|
+
* autoRefresh: false,
|
|
205
|
+
* });
|
|
206
|
+
* ```
|
|
207
|
+
*
|
|
208
|
+
* @param config - Client configuration
|
|
209
|
+
*
|
|
210
|
+
* @example
|
|
211
|
+
* ```typescript
|
|
212
|
+
* const client = new NotebookLMClient({
|
|
213
|
+
* authToken: process.env.NOTEBOOKLM_AUTH_TOKEN!,
|
|
214
|
+
* cookies: process.env.NOTEBOOKLM_COOKIES!,
|
|
215
|
+
* });
|
|
216
|
+
*
|
|
217
|
+
* const notebooks = await client.notebooks.list();
|
|
218
|
+
* ```
|
|
219
|
+
*/
|
|
220
|
+
constructor(config?: NotebookLMConfig);
|
|
221
|
+
/**
|
|
222
|
+
* Connect / Initialize the client
|
|
223
|
+
* Loads credentials (from config, env, saved, or auto-login) and sets up services
|
|
224
|
+
* This must be called before using any services
|
|
225
|
+
*
|
|
226
|
+
* @example
|
|
227
|
+
* ```typescript
|
|
228
|
+
* const sdk = new NotebookLMClient({});
|
|
229
|
+
* await sdk.connect();
|
|
230
|
+
* const notebooks = await sdk.notebooks.list();
|
|
231
|
+
* ```
|
|
232
|
+
*/
|
|
233
|
+
connect(): Promise<void>;
|
|
234
|
+
/**
|
|
235
|
+
* Ensure client is connected (called before operations)
|
|
236
|
+
*/
|
|
237
|
+
private ensureConnected;
|
|
238
|
+
/**
|
|
239
|
+
* Get RPC client (ensures connection)
|
|
240
|
+
*/
|
|
241
|
+
private getRPCClientInternal;
|
|
242
|
+
/**
|
|
243
|
+
* Get the underlying RPC client
|
|
244
|
+
* For advanced use cases where you need direct RPC access
|
|
245
|
+
*
|
|
246
|
+
* @returns The RPC client instance
|
|
247
|
+
*/
|
|
248
|
+
getRPCClient(): Promise<RPCClient>;
|
|
249
|
+
/**
|
|
250
|
+
* Execute a raw RPC call
|
|
251
|
+
* For advanced use cases where you need to call an RPC method directly
|
|
252
|
+
*
|
|
253
|
+
* @param rpcId - The RPC method ID (e.g., from RPCMethods)
|
|
254
|
+
* @param args - Arguments for the RPC call
|
|
255
|
+
* @param notebookId - Optional notebook ID for context
|
|
256
|
+
* @returns The RPC response
|
|
257
|
+
*
|
|
258
|
+
* @example
|
|
259
|
+
* ```typescript
|
|
260
|
+
* import { RPCMethods } from 'notebooklm-kit';
|
|
261
|
+
*
|
|
262
|
+
* const response = await sdk.rpc(
|
|
263
|
+
* RPCMethods.RPC_LIST_PROJECTS,
|
|
264
|
+
* []
|
|
265
|
+
* );
|
|
266
|
+
* ```
|
|
267
|
+
*/
|
|
268
|
+
rpc(rpcId: string, args: any[], notebookId?: string): Promise<any>;
|
|
269
|
+
/**
|
|
270
|
+
* Get the refresh manager (if auto-refresh is enabled)
|
|
271
|
+
*
|
|
272
|
+
* @returns The auto-refresh manager, or undefined if disabled
|
|
273
|
+
*/
|
|
274
|
+
getRefreshManager(): AutoRefreshManager | undefined;
|
|
275
|
+
/**
|
|
276
|
+
* Manually refresh credentials
|
|
277
|
+
* Useful for keeping long-running sessions alive or testing refresh functionality
|
|
278
|
+
*
|
|
279
|
+
* @throws Error if auto-refresh is not enabled
|
|
280
|
+
*
|
|
281
|
+
* @example
|
|
282
|
+
* ```typescript
|
|
283
|
+
* // Manual refresh
|
|
284
|
+
* await sdk.refreshCredentials();
|
|
285
|
+
*
|
|
286
|
+
* // Check if refresh is running
|
|
287
|
+
* const manager = sdk.getRefreshManager();
|
|
288
|
+
* if (manager?.isRunning()) {
|
|
289
|
+
* console.log('Auto-refresh is active');
|
|
290
|
+
* }
|
|
291
|
+
* ```
|
|
292
|
+
*/
|
|
293
|
+
refreshCredentials(): Promise<void>;
|
|
294
|
+
/**
|
|
295
|
+
* Get quota manager
|
|
296
|
+
* For advanced quota management and custom tracking
|
|
297
|
+
*
|
|
298
|
+
* @returns The quota manager instance
|
|
299
|
+
*/
|
|
300
|
+
getQuotaManager(): QuotaManager;
|
|
301
|
+
/**
|
|
302
|
+
* Get current usage statistics
|
|
303
|
+
* Returns daily and monthly usage for all tracked resources
|
|
304
|
+
*
|
|
305
|
+
* @returns Usage data including daily chats, audio, video, artifacts, etc.
|
|
306
|
+
*
|
|
307
|
+
* @example
|
|
308
|
+
* ```typescript
|
|
309
|
+
* const usage = sdk.getUsage();
|
|
310
|
+
* console.log(`Chats: ${usage.daily.chats}/50`);
|
|
311
|
+
* console.log(`Audio: ${usage.daily.audioOverviews}/3`);
|
|
312
|
+
* console.log(`Video: ${usage.daily.videoOverviews}/3`);
|
|
313
|
+
* console.log(`Quizzes: ${usage.daily.quizzes}/10`);
|
|
314
|
+
* console.log(`Flashcards: ${usage.daily.flashcards}/10`);
|
|
315
|
+
* console.log(`Reports: ${usage.daily.reports}/10`);
|
|
316
|
+
* console.log(`Notebooks: ${usage.notebooks.total}/100`);
|
|
317
|
+
* ```
|
|
318
|
+
*/
|
|
319
|
+
getUsage(): import("../utils/quota.js").UsageData;
|
|
320
|
+
/**
|
|
321
|
+
* Get remaining quota for a resource
|
|
322
|
+
*
|
|
323
|
+
* @param resource - Resource name: 'chats', 'audioOverviews', 'videoOverviews',
|
|
324
|
+
* 'quizzes', 'flashcards', 'reports', 'createNotebook', etc.
|
|
325
|
+
* @returns Number of remaining uses for the resource
|
|
326
|
+
*
|
|
327
|
+
* @example
|
|
328
|
+
* ```typescript
|
|
329
|
+
* const remainingChats = sdk.getRemaining('chats');
|
|
330
|
+
* const remainingAudio = sdk.getRemaining('audioOverviews');
|
|
331
|
+
*
|
|
332
|
+
* console.log(`${remainingChats} chats remaining today`);
|
|
333
|
+
* console.log(`${remainingAudio} audio overviews remaining today`);
|
|
334
|
+
*
|
|
335
|
+
* if (remainingChats === 0) {
|
|
336
|
+
* console.log('Daily chat limit reached');
|
|
337
|
+
* }
|
|
338
|
+
* ```
|
|
339
|
+
*/
|
|
340
|
+
getRemaining(resource: string): number;
|
|
341
|
+
/**
|
|
342
|
+
* Dispose of the client and stop auto-refresh
|
|
343
|
+
* Call this when you're done with the client to clean up resources.
|
|
344
|
+
* This stops the background auto-refresh timer.
|
|
345
|
+
*
|
|
346
|
+
* @example
|
|
347
|
+
* ```typescript
|
|
348
|
+
* const sdk = new NotebookLMClient({ ... });
|
|
349
|
+
* await sdk.connect();
|
|
350
|
+
*
|
|
351
|
+
* // Use the client...
|
|
352
|
+
* await sdk.notebooks.list();
|
|
353
|
+
*
|
|
354
|
+
* // Clean up when done
|
|
355
|
+
* sdk.dispose();
|
|
356
|
+
* ```
|
|
357
|
+
*/
|
|
358
|
+
dispose(): void;
|
|
359
|
+
}
|
|
360
|
+
/**
|
|
361
|
+
* Create a NotebookLM client with environment variables
|
|
362
|
+
* Reads NOTEBOOKLM_AUTH_TOKEN and NOTEBOOKLM_COOKIES from environment
|
|
363
|
+
* Note: Only works in Node.js environment
|
|
364
|
+
*
|
|
365
|
+
* @example
|
|
366
|
+
* ```typescript
|
|
367
|
+
* const client = createNotebookLMClient();
|
|
368
|
+
* const notebooks = await client.notebooks.list();
|
|
369
|
+
* ```
|
|
370
|
+
*/
|
|
371
|
+
export declare function createNotebookLMClient(config?: Partial<NotebookLMConfig>): NotebookLMClient;
|
|
372
|
+
//# sourceMappingURL=notebooklm-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notebooklm-client.d.ts","sourceRoot":"","sources":["../../../src/client/notebooklm-client.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;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