notebooklm-sdk 0.1.2 → 0.1.4

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.cts CHANGED
@@ -196,6 +196,20 @@ declare const SharePermission: {
196
196
  };
197
197
  type SharePermissionValue = (typeof SharePermission)[keyof typeof SharePermission];
198
198
 
199
+ interface RPCCallOptions {
200
+ sourcePath?: string;
201
+ allowNull?: boolean;
202
+ timeoutMs?: number;
203
+ }
204
+ declare class RPCCore {
205
+ private readonly auth;
206
+ private readonly timeoutMs;
207
+ constructor(auth: AuthTokens, timeoutMs?: number);
208
+ call(methodId: RPCMethodId, params: unknown[], opts?: RPCCallOptions): Promise<unknown>;
209
+ /** Extract source IDs from a notebook (used by chat/artifact APIs). */
210
+ getSourceIds(notebookId: string): Promise<string[]>;
211
+ }
212
+
199
213
  interface Notebook {
200
214
  id: string;
201
215
  title: string;
@@ -298,52 +312,6 @@ interface MindMap {
298
312
  createdAt: Date | null;
299
313
  }
300
314
 
301
- interface RPCCallOptions {
302
- sourcePath?: string;
303
- allowNull?: boolean;
304
- timeoutMs?: number;
305
- }
306
- declare class RPCCore {
307
- private readonly auth;
308
- private readonly timeoutMs;
309
- constructor(auth: AuthTokens, timeoutMs?: number);
310
- call(methodId: RPCMethodId, params: unknown[], opts?: RPCCallOptions): Promise<unknown>;
311
- /** Extract source IDs from a notebook (used by chat/artifact APIs). */
312
- getSourceIds(notebookId: string): Promise<string[]>;
313
- }
314
-
315
- declare class NotebooksAPI {
316
- private readonly rpc;
317
- constructor(rpc: RPCCore);
318
- list(): Promise<Notebook[]>;
319
- create(title: string): Promise<Notebook>;
320
- get(notebookId: string): Promise<Notebook>;
321
- delete(notebookId: string): Promise<boolean>;
322
- rename(notebookId: string, newTitle: string): Promise<Notebook>;
323
- getSummary(notebookId: string): Promise<string>;
324
- getDescription(notebookId: string): Promise<NotebookDescription>;
325
- }
326
-
327
- interface AddSourceOptions {
328
- waitUntilReady?: boolean;
329
- waitTimeout?: number;
330
- }
331
- declare class SourcesAPI {
332
- private readonly rpc;
333
- private readonly auth;
334
- constructor(rpc: RPCCore, auth: AuthTokens);
335
- list(notebookId: string): Promise<Source[]>;
336
- get(notebookId: string, sourceId: string): Promise<Source | null>;
337
- addUrl(notebookId: string, url: string, opts?: AddSourceOptions): Promise<Source>;
338
- addText(notebookId: string, text: string, title?: string, opts?: AddSourceOptions): Promise<Source>;
339
- addFile(notebookId: string, filePath: string, mimeType: string, opts?: AddSourceOptions): Promise<Source>;
340
- addFileBuffer(notebookId: string, data: Buffer | Uint8Array, fileName: string, mimeType: string, opts?: AddSourceOptions): Promise<Source>;
341
- private uploadFile;
342
- delete(notebookId: string, sourceId: string): Promise<boolean>;
343
- refresh(notebookId: string, sourceId: string): Promise<boolean>;
344
- waitUntilReady(notebookId: string, sourceId: string, timeout?: number, initialInterval?: number, maxInterval?: number, backoffFactor?: number): Promise<Source>;
345
- }
346
-
347
315
  interface CreateAudioOptions {
348
316
  format?: AudioFormatValue;
349
317
  length?: AudioLengthValue;
@@ -440,6 +408,18 @@ declare class ChatAPI {
440
408
  private _buildHistory;
441
409
  }
442
410
 
411
+ declare class NotebooksAPI {
412
+ private readonly rpc;
413
+ constructor(rpc: RPCCore);
414
+ list(): Promise<Notebook[]>;
415
+ create(title: string): Promise<Notebook>;
416
+ get(notebookId: string): Promise<Notebook>;
417
+ delete(notebookId: string): Promise<boolean>;
418
+ rename(notebookId: string, newTitle: string): Promise<Notebook>;
419
+ getSummary(notebookId: string): Promise<string>;
420
+ getDescription(notebookId: string): Promise<NotebookDescription>;
421
+ }
422
+
443
423
  declare class NotesAPI {
444
424
  private readonly rpc;
445
425
  constructor(rpc: RPCCore);
@@ -538,6 +518,27 @@ declare class SharingAPI {
538
518
  removeUser(notebookId: string, email: string): Promise<ShareStatus>;
539
519
  }
540
520
 
521
+ interface AddSourceOptions {
522
+ waitUntilReady?: boolean;
523
+ waitTimeout?: number;
524
+ }
525
+ declare class SourcesAPI {
526
+ private readonly rpc;
527
+ private readonly auth;
528
+ constructor(rpc: RPCCore, auth: AuthTokens);
529
+ list(notebookId: string): Promise<Source[]>;
530
+ get(notebookId: string, sourceId: string): Promise<Source | null>;
531
+ addUrl(notebookId: string, url: string, opts?: AddSourceOptions): Promise<Source>;
532
+ addText(notebookId: string, text: string, title?: string, opts?: AddSourceOptions): Promise<Source>;
533
+ addFile(notebookId: string, filePath: string, mimeType: string, opts?: AddSourceOptions): Promise<Source>;
534
+ addFileBuffer(notebookId: string, data: Buffer | Uint8Array, fileName: string, mimeType: string, opts?: AddSourceOptions): Promise<Source>;
535
+ private startResumableUpload;
536
+ private uploadFile;
537
+ delete(notebookId: string, sourceId: string): Promise<boolean>;
538
+ refresh(notebookId: string, sourceId: string): Promise<boolean>;
539
+ waitUntilReady(notebookId: string, sourceId: string, timeout?: number, initialInterval?: number, maxInterval?: number, backoffFactor?: number): Promise<Source>;
540
+ }
541
+
541
542
  interface ClientOptions {
542
543
  /** HTTP request timeout in milliseconds. Default: 30000 */
543
544
  timeoutMs?: number;
package/dist/index.d.ts CHANGED
@@ -196,6 +196,20 @@ declare const SharePermission: {
196
196
  };
197
197
  type SharePermissionValue = (typeof SharePermission)[keyof typeof SharePermission];
198
198
 
199
+ interface RPCCallOptions {
200
+ sourcePath?: string;
201
+ allowNull?: boolean;
202
+ timeoutMs?: number;
203
+ }
204
+ declare class RPCCore {
205
+ private readonly auth;
206
+ private readonly timeoutMs;
207
+ constructor(auth: AuthTokens, timeoutMs?: number);
208
+ call(methodId: RPCMethodId, params: unknown[], opts?: RPCCallOptions): Promise<unknown>;
209
+ /** Extract source IDs from a notebook (used by chat/artifact APIs). */
210
+ getSourceIds(notebookId: string): Promise<string[]>;
211
+ }
212
+
199
213
  interface Notebook {
200
214
  id: string;
201
215
  title: string;
@@ -298,52 +312,6 @@ interface MindMap {
298
312
  createdAt: Date | null;
299
313
  }
300
314
 
301
- interface RPCCallOptions {
302
- sourcePath?: string;
303
- allowNull?: boolean;
304
- timeoutMs?: number;
305
- }
306
- declare class RPCCore {
307
- private readonly auth;
308
- private readonly timeoutMs;
309
- constructor(auth: AuthTokens, timeoutMs?: number);
310
- call(methodId: RPCMethodId, params: unknown[], opts?: RPCCallOptions): Promise<unknown>;
311
- /** Extract source IDs from a notebook (used by chat/artifact APIs). */
312
- getSourceIds(notebookId: string): Promise<string[]>;
313
- }
314
-
315
- declare class NotebooksAPI {
316
- private readonly rpc;
317
- constructor(rpc: RPCCore);
318
- list(): Promise<Notebook[]>;
319
- create(title: string): Promise<Notebook>;
320
- get(notebookId: string): Promise<Notebook>;
321
- delete(notebookId: string): Promise<boolean>;
322
- rename(notebookId: string, newTitle: string): Promise<Notebook>;
323
- getSummary(notebookId: string): Promise<string>;
324
- getDescription(notebookId: string): Promise<NotebookDescription>;
325
- }
326
-
327
- interface AddSourceOptions {
328
- waitUntilReady?: boolean;
329
- waitTimeout?: number;
330
- }
331
- declare class SourcesAPI {
332
- private readonly rpc;
333
- private readonly auth;
334
- constructor(rpc: RPCCore, auth: AuthTokens);
335
- list(notebookId: string): Promise<Source[]>;
336
- get(notebookId: string, sourceId: string): Promise<Source | null>;
337
- addUrl(notebookId: string, url: string, opts?: AddSourceOptions): Promise<Source>;
338
- addText(notebookId: string, text: string, title?: string, opts?: AddSourceOptions): Promise<Source>;
339
- addFile(notebookId: string, filePath: string, mimeType: string, opts?: AddSourceOptions): Promise<Source>;
340
- addFileBuffer(notebookId: string, data: Buffer | Uint8Array, fileName: string, mimeType: string, opts?: AddSourceOptions): Promise<Source>;
341
- private uploadFile;
342
- delete(notebookId: string, sourceId: string): Promise<boolean>;
343
- refresh(notebookId: string, sourceId: string): Promise<boolean>;
344
- waitUntilReady(notebookId: string, sourceId: string, timeout?: number, initialInterval?: number, maxInterval?: number, backoffFactor?: number): Promise<Source>;
345
- }
346
-
347
315
  interface CreateAudioOptions {
348
316
  format?: AudioFormatValue;
349
317
  length?: AudioLengthValue;
@@ -440,6 +408,18 @@ declare class ChatAPI {
440
408
  private _buildHistory;
441
409
  }
442
410
 
411
+ declare class NotebooksAPI {
412
+ private readonly rpc;
413
+ constructor(rpc: RPCCore);
414
+ list(): Promise<Notebook[]>;
415
+ create(title: string): Promise<Notebook>;
416
+ get(notebookId: string): Promise<Notebook>;
417
+ delete(notebookId: string): Promise<boolean>;
418
+ rename(notebookId: string, newTitle: string): Promise<Notebook>;
419
+ getSummary(notebookId: string): Promise<string>;
420
+ getDescription(notebookId: string): Promise<NotebookDescription>;
421
+ }
422
+
443
423
  declare class NotesAPI {
444
424
  private readonly rpc;
445
425
  constructor(rpc: RPCCore);
@@ -538,6 +518,27 @@ declare class SharingAPI {
538
518
  removeUser(notebookId: string, email: string): Promise<ShareStatus>;
539
519
  }
540
520
 
521
+ interface AddSourceOptions {
522
+ waitUntilReady?: boolean;
523
+ waitTimeout?: number;
524
+ }
525
+ declare class SourcesAPI {
526
+ private readonly rpc;
527
+ private readonly auth;
528
+ constructor(rpc: RPCCore, auth: AuthTokens);
529
+ list(notebookId: string): Promise<Source[]>;
530
+ get(notebookId: string, sourceId: string): Promise<Source | null>;
531
+ addUrl(notebookId: string, url: string, opts?: AddSourceOptions): Promise<Source>;
532
+ addText(notebookId: string, text: string, title?: string, opts?: AddSourceOptions): Promise<Source>;
533
+ addFile(notebookId: string, filePath: string, mimeType: string, opts?: AddSourceOptions): Promise<Source>;
534
+ addFileBuffer(notebookId: string, data: Buffer | Uint8Array, fileName: string, mimeType: string, opts?: AddSourceOptions): Promise<Source>;
535
+ private startResumableUpload;
536
+ private uploadFile;
537
+ delete(notebookId: string, sourceId: string): Promise<boolean>;
538
+ refresh(notebookId: string, sourceId: string): Promise<boolean>;
539
+ waitUntilReady(notebookId: string, sourceId: string, timeout?: number, initialInterval?: number, maxInterval?: number, backoffFactor?: number): Promise<Source>;
540
+ }
541
+
541
542
  interface ClientOptions {
542
543
  /** HTTP request timeout in milliseconds. Default: 30000 */
543
544
  timeoutMs?: number;