notebooklm-sdk 0.1.8 → 0.3.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/README.md +85 -242
- package/dist/auth.cjs +4 -10
- package/dist/auth.cjs.map +1 -1
- package/dist/auth.js +4 -10
- package/dist/auth.js.map +1 -1
- package/dist/bin.cjs +4 -10
- package/dist/bin.cjs.map +1 -1
- package/dist/bin.js +4 -10
- package/dist/bin.js.map +1 -1
- package/dist/index.cjs +324 -80
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +85 -20
- package/dist/index.d.ts +85 -20
- package/dist/index.js +325 -81
- package/dist/index.js.map +1 -1
- package/package.json +11 -3
package/dist/index.d.cts
CHANGED
|
@@ -148,6 +148,21 @@ declare const ExportType: {
|
|
|
148
148
|
readonly SHEETS: 2;
|
|
149
149
|
};
|
|
150
150
|
type ExportTypeValue = (typeof ExportType)[keyof typeof ExportType];
|
|
151
|
+
/**
|
|
152
|
+
* Predefined chat modes that control response style and verbosity.
|
|
153
|
+
* Applied per-notebook via `client.chat.setMode()`.
|
|
154
|
+
*/
|
|
155
|
+
declare const ChatMode: {
|
|
156
|
+
/** General purpose — balanced length and style. */
|
|
157
|
+
readonly DEFAULT: "default";
|
|
158
|
+
/** Educational focus with longer, learning-oriented responses. */
|
|
159
|
+
readonly LEARNING_GUIDE: "learning_guide";
|
|
160
|
+
/** Short, concise answers. */
|
|
161
|
+
readonly CONCISE: "concise";
|
|
162
|
+
/** Verbose, detailed answers. */
|
|
163
|
+
readonly DETAILED: "detailed";
|
|
164
|
+
};
|
|
165
|
+
type ChatModeValue = (typeof ChatMode)[keyof typeof ChatMode];
|
|
151
166
|
declare const ShareAccess: {
|
|
152
167
|
/** Only explicitly shared users can access */
|
|
153
168
|
readonly RESTRICTED: 0;
|
|
@@ -222,6 +237,13 @@ interface Source {
|
|
|
222
237
|
/** Raw type code from API (for debugging) */
|
|
223
238
|
_typeCode: number | null;
|
|
224
239
|
}
|
|
240
|
+
interface SourceFulltext {
|
|
241
|
+
sourceId: string;
|
|
242
|
+
title: string;
|
|
243
|
+
content: string;
|
|
244
|
+
url: string | null;
|
|
245
|
+
charCount: number;
|
|
246
|
+
}
|
|
225
247
|
interface Artifact {
|
|
226
248
|
id: string;
|
|
227
249
|
title: string | null;
|
|
@@ -280,11 +302,32 @@ interface Note {
|
|
|
280
302
|
createdAt: Date | null;
|
|
281
303
|
updatedAt: Date | null;
|
|
282
304
|
}
|
|
283
|
-
interface
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
305
|
+
interface SourceGuide {
|
|
306
|
+
/** AI-generated summary with **bold** keywords (markdown). */
|
|
307
|
+
summary: string;
|
|
308
|
+
/** Topic keywords extracted from the source. */
|
|
309
|
+
keywords: string[];
|
|
310
|
+
}
|
|
311
|
+
interface ReportSuggestion {
|
|
312
|
+
title: string;
|
|
313
|
+
description: string;
|
|
314
|
+
prompt: string;
|
|
315
|
+
/** 1 = beginner, 2 = advanced */
|
|
316
|
+
audienceLevel: number;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
declare class NotesAPI {
|
|
320
|
+
private readonly rpc;
|
|
321
|
+
constructor(rpc: RPCCore);
|
|
322
|
+
list(notebookId: string): Promise<Note[]>;
|
|
323
|
+
listMindMaps(notebookId: string): Promise<Note[]>;
|
|
324
|
+
create(notebookId: string, content: string, title?: string): Promise<Note>;
|
|
325
|
+
update(notebookId: string, noteId: string, content: string, title?: string): Promise<Note>;
|
|
326
|
+
delete(notebookId: string, noteId: string): Promise<boolean>;
|
|
327
|
+
private _fetchAll;
|
|
328
|
+
private _isMindMap;
|
|
329
|
+
private _extractContent;
|
|
330
|
+
private _parseItem;
|
|
288
331
|
}
|
|
289
332
|
|
|
290
333
|
interface CreateAudioOptions {
|
|
@@ -322,6 +365,15 @@ interface CreateSlideDeckOptions {
|
|
|
322
365
|
instructions?: string;
|
|
323
366
|
language?: string;
|
|
324
367
|
}
|
|
368
|
+
interface CreateDataTableOptions {
|
|
369
|
+
sourceIds?: string[];
|
|
370
|
+
instructions?: string;
|
|
371
|
+
language?: string;
|
|
372
|
+
}
|
|
373
|
+
interface DataTableContent {
|
|
374
|
+
headers: string[];
|
|
375
|
+
rows: string[][];
|
|
376
|
+
}
|
|
325
377
|
type ReportFormat = "briefing_doc" | "study_guide" | "blog_post" | "custom";
|
|
326
378
|
interface CreateReportOptions {
|
|
327
379
|
format?: ReportFormat;
|
|
@@ -333,8 +385,10 @@ interface CreateReportOptions {
|
|
|
333
385
|
declare class ArtifactsAPI {
|
|
334
386
|
private readonly rpc;
|
|
335
387
|
private readonly auth;
|
|
336
|
-
|
|
388
|
+
private readonly notes;
|
|
389
|
+
constructor(rpc: RPCCore, auth: AuthTokens, notes: NotesAPI);
|
|
337
390
|
list(notebookId: string): Promise<Artifact[]>;
|
|
391
|
+
private _listRaw;
|
|
338
392
|
get(notebookId: string, artifactId: string): Promise<Artifact | null>;
|
|
339
393
|
delete(notebookId: string, artifactId: string): Promise<boolean>;
|
|
340
394
|
rename(notebookId: string, artifactId: string, newTitle: string): Promise<boolean>;
|
|
@@ -344,8 +398,9 @@ declare class ArtifactsAPI {
|
|
|
344
398
|
createFlashcards(notebookId: string, opts?: CreateQuizOptions): Promise<GenerationStatus>;
|
|
345
399
|
createInfographic(notebookId: string, opts?: CreateInfographicOptions): Promise<GenerationStatus>;
|
|
346
400
|
createSlideDeck(notebookId: string, opts?: CreateSlideDeckOptions): Promise<GenerationStatus>;
|
|
401
|
+
createDataTable(notebookId: string, opts?: CreateDataTableOptions): Promise<GenerationStatus>;
|
|
347
402
|
createReport(notebookId: string, opts?: CreateReportOptions): Promise<GenerationStatus>;
|
|
348
|
-
createMindMap(notebookId: string, sourceIds?: string[]): Promise<
|
|
403
|
+
createMindMap(notebookId: string, sourceIds?: string[]): Promise<Note>;
|
|
349
404
|
/** Poll until artifact reaches completed/failed status. */
|
|
350
405
|
waitUntilReady(notebookId: string, artifactId: string, timeout?: number, pollInterval?: number): Promise<Artifact>;
|
|
351
406
|
/** Download audio content as a Buffer. */
|
|
@@ -356,6 +411,16 @@ declare class ArtifactsAPI {
|
|
|
356
411
|
getReportMarkdown(notebookId: string, artifactId: string): Promise<string | null>;
|
|
357
412
|
/** Get interactive HTML for quiz/flashcard artifacts. */
|
|
358
413
|
getInteractiveHtml(notebookId: string, artifactId: string): Promise<string | null>;
|
|
414
|
+
/** Download a completed slide deck as PDF or PPTX. Returns a Buffer. */
|
|
415
|
+
downloadSlideDeck(notebookId: string, artifactId: string, format?: "pdf" | "pptx"): Promise<Buffer>;
|
|
416
|
+
/** Download a completed infographic as PNG. Returns a Buffer. */
|
|
417
|
+
downloadInfographic(notebookId: string, artifactId: string): Promise<Buffer>;
|
|
418
|
+
/** Get AI-suggested report formats based on notebook content. */
|
|
419
|
+
suggestReports(notebookId: string): Promise<ReportSuggestion[]>;
|
|
420
|
+
/** Revise an individual slide in a completed slide deck using a prompt. */
|
|
421
|
+
reviseSlide(notebookId: string, artifactId: string, slideIndex: number, prompt: string): Promise<GenerationStatus>;
|
|
422
|
+
/** Get parsed headers and rows from a completed data table artifact. */
|
|
423
|
+
getDataTableContent(notebookId: string, artifactId: string): Promise<DataTableContent | null>;
|
|
359
424
|
/**
|
|
360
425
|
* Fetch a Google-hosted media URL, manually following redirects to ensure
|
|
361
426
|
* cookies are included on every hop. Node/Bun fetch strips the Cookie header
|
|
@@ -379,6 +444,11 @@ declare class ChatAPI {
|
|
|
379
444
|
ask(notebookId: string, query: string, opts?: AskOptions): Promise<AskResult>;
|
|
380
445
|
getConversationTurns(notebookId: string, conversationId: string): Promise<ConversationTurn[]>;
|
|
381
446
|
getLastConversationId(notebookId: string): Promise<string | null>;
|
|
447
|
+
/**
|
|
448
|
+
* Set the chat mode for a notebook. Persists on the server — affects all
|
|
449
|
+
* subsequent `ask()` calls until changed.
|
|
450
|
+
*/
|
|
451
|
+
setMode(notebookId: string, mode: ChatModeValue): Promise<void>;
|
|
382
452
|
clearCache(conversationId?: string): void;
|
|
383
453
|
private _buildHistory;
|
|
384
454
|
}
|
|
@@ -392,21 +462,10 @@ declare class NotebooksAPI {
|
|
|
392
462
|
delete(notebookId: string): Promise<boolean>;
|
|
393
463
|
rename(notebookId: string, newTitle: string): Promise<Notebook>;
|
|
394
464
|
getSummary(notebookId: string): Promise<string>;
|
|
465
|
+
removeFromRecent(notebookId: string): Promise<void>;
|
|
395
466
|
getDescription(notebookId: string): Promise<NotebookDescription>;
|
|
396
467
|
}
|
|
397
468
|
|
|
398
|
-
declare class NotesAPI {
|
|
399
|
-
private readonly rpc;
|
|
400
|
-
constructor(rpc: RPCCore);
|
|
401
|
-
list(notebookId: string): Promise<{
|
|
402
|
-
notes: Note[];
|
|
403
|
-
mindMaps: MindMap[];
|
|
404
|
-
}>;
|
|
405
|
-
create(notebookId: string, content: string, title?: string): Promise<Note>;
|
|
406
|
-
update(notebookId: string, noteId: string, content: string, title?: string): Promise<Note>;
|
|
407
|
-
delete(notebookId: string, noteId: string): Promise<boolean>;
|
|
408
|
-
}
|
|
409
|
-
|
|
410
469
|
interface ResearchTask {
|
|
411
470
|
taskId: string;
|
|
412
471
|
reportId: string | null;
|
|
@@ -509,6 +568,12 @@ declare class SourcesAPI {
|
|
|
509
568
|
addFileBuffer(notebookId: string, data: Buffer | Uint8Array, fileName: string, _mimeType: string, opts?: AddSourceOptions): Promise<Source>;
|
|
510
569
|
private startResumableUpload;
|
|
511
570
|
private uploadFile;
|
|
571
|
+
/** Get the AI-generated Source Guide (summary + keywords) for a source. */
|
|
572
|
+
getGuide(notebookId: string, sourceId: string): Promise<SourceGuide>;
|
|
573
|
+
/** Get the full indexed text content of a source. */
|
|
574
|
+
getFulltext(notebookId: string, sourceId: string): Promise<SourceFulltext>;
|
|
575
|
+
/** Check if a source has newer content available. Returns true if fresh, false if stale. */
|
|
576
|
+
checkFreshness(notebookId: string, sourceId: string): Promise<boolean>;
|
|
512
577
|
delete(notebookId: string, sourceId: string): Promise<boolean>;
|
|
513
578
|
refresh(notebookId: string, sourceId: string): Promise<boolean>;
|
|
514
579
|
waitUntilReady(notebookId: string, sourceId: string, timeout?: number, initialInterval?: number, maxInterval?: number, backoffFactor?: number): Promise<Source>;
|
|
@@ -553,4 +618,4 @@ declare class NotebookLMClient {
|
|
|
553
618
|
refreshTokens(): Promise<void>;
|
|
554
619
|
}
|
|
555
620
|
|
|
556
|
-
export { type AddSourceOptions, type Artifact, type ArtifactStatus, type ArtifactType, ArtifactTypeCode, ArtifactsAPI, type AskOptions, type AskResult, AudioFormat, type AudioFormatValue, AudioLength, type AudioLengthValue, AuthTokens, ChatAPI, type ChatReference, type ClientOptions, ConnectOptions, type ConversationTurn, type CreateAudioOptions, type CreateInfographicOptions, type CreateQuizOptions, type CreateReportOptions, type CreateSlideDeckOptions, type CreateVideoOptions, ExportType, type ExportTypeValue, type GenerationStatus, type ImportedSource, InfographicDetail, type InfographicDetailValue, InfographicOrientation, type InfographicOrientationValue, InfographicStyle, type InfographicStyleValue, type
|
|
621
|
+
export { type AddSourceOptions, type Artifact, type ArtifactStatus, type ArtifactType, ArtifactTypeCode, ArtifactsAPI, type AskOptions, type AskResult, AudioFormat, type AudioFormatValue, AudioLength, type AudioLengthValue, AuthTokens, ChatAPI, ChatMode, type ChatModeValue, type ChatReference, type ClientOptions, ConnectOptions, type ConversationTurn, type CreateAudioOptions, type CreateDataTableOptions, type CreateInfographicOptions, type CreateQuizOptions, type CreateReportOptions, type CreateSlideDeckOptions, type CreateVideoOptions, type DataTableContent, ExportType, type ExportTypeValue, type GenerationStatus, type ImportedSource, InfographicDetail, type InfographicDetailValue, InfographicOrientation, type InfographicOrientationValue, InfographicStyle, type InfographicStyleValue, type Note, type Notebook, type NotebookDescription, NotebookLMClient, type NotebookMetadata, NotebooksAPI, NotesAPI, QuizDifficulty, type QuizDifficultyValue, QuizQuantity, type QuizQuantityValue, RPCMethod, type RPCMethodId, type ReportSuggestion, ResearchAPI, type ResearchResult, type ResearchSource, type ResearchTask, SettingsAPI, ShareAccess, type ShareAccessValue, SharePermission, type SharePermissionValue, type ShareStatus, ShareViewLevel, type ShareViewLevelValue, type SharedUser, SharingAPI, SlideDeckFormat, type SlideDeckFormatValue, SlideDeckLength, type SlideDeckLengthValue, type Source, type SourceFulltext, type SourceGuide, type SourceStatus, type SourceSummary, type SourceType, SourcesAPI, type SuggestedTopic, VideoFormat, type VideoFormatValue, VideoStyle, type VideoStyleValue };
|
package/dist/index.d.ts
CHANGED
|
@@ -148,6 +148,21 @@ declare const ExportType: {
|
|
|
148
148
|
readonly SHEETS: 2;
|
|
149
149
|
};
|
|
150
150
|
type ExportTypeValue = (typeof ExportType)[keyof typeof ExportType];
|
|
151
|
+
/**
|
|
152
|
+
* Predefined chat modes that control response style and verbosity.
|
|
153
|
+
* Applied per-notebook via `client.chat.setMode()`.
|
|
154
|
+
*/
|
|
155
|
+
declare const ChatMode: {
|
|
156
|
+
/** General purpose — balanced length and style. */
|
|
157
|
+
readonly DEFAULT: "default";
|
|
158
|
+
/** Educational focus with longer, learning-oriented responses. */
|
|
159
|
+
readonly LEARNING_GUIDE: "learning_guide";
|
|
160
|
+
/** Short, concise answers. */
|
|
161
|
+
readonly CONCISE: "concise";
|
|
162
|
+
/** Verbose, detailed answers. */
|
|
163
|
+
readonly DETAILED: "detailed";
|
|
164
|
+
};
|
|
165
|
+
type ChatModeValue = (typeof ChatMode)[keyof typeof ChatMode];
|
|
151
166
|
declare const ShareAccess: {
|
|
152
167
|
/** Only explicitly shared users can access */
|
|
153
168
|
readonly RESTRICTED: 0;
|
|
@@ -222,6 +237,13 @@ interface Source {
|
|
|
222
237
|
/** Raw type code from API (for debugging) */
|
|
223
238
|
_typeCode: number | null;
|
|
224
239
|
}
|
|
240
|
+
interface SourceFulltext {
|
|
241
|
+
sourceId: string;
|
|
242
|
+
title: string;
|
|
243
|
+
content: string;
|
|
244
|
+
url: string | null;
|
|
245
|
+
charCount: number;
|
|
246
|
+
}
|
|
225
247
|
interface Artifact {
|
|
226
248
|
id: string;
|
|
227
249
|
title: string | null;
|
|
@@ -280,11 +302,32 @@ interface Note {
|
|
|
280
302
|
createdAt: Date | null;
|
|
281
303
|
updatedAt: Date | null;
|
|
282
304
|
}
|
|
283
|
-
interface
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
305
|
+
interface SourceGuide {
|
|
306
|
+
/** AI-generated summary with **bold** keywords (markdown). */
|
|
307
|
+
summary: string;
|
|
308
|
+
/** Topic keywords extracted from the source. */
|
|
309
|
+
keywords: string[];
|
|
310
|
+
}
|
|
311
|
+
interface ReportSuggestion {
|
|
312
|
+
title: string;
|
|
313
|
+
description: string;
|
|
314
|
+
prompt: string;
|
|
315
|
+
/** 1 = beginner, 2 = advanced */
|
|
316
|
+
audienceLevel: number;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
declare class NotesAPI {
|
|
320
|
+
private readonly rpc;
|
|
321
|
+
constructor(rpc: RPCCore);
|
|
322
|
+
list(notebookId: string): Promise<Note[]>;
|
|
323
|
+
listMindMaps(notebookId: string): Promise<Note[]>;
|
|
324
|
+
create(notebookId: string, content: string, title?: string): Promise<Note>;
|
|
325
|
+
update(notebookId: string, noteId: string, content: string, title?: string): Promise<Note>;
|
|
326
|
+
delete(notebookId: string, noteId: string): Promise<boolean>;
|
|
327
|
+
private _fetchAll;
|
|
328
|
+
private _isMindMap;
|
|
329
|
+
private _extractContent;
|
|
330
|
+
private _parseItem;
|
|
288
331
|
}
|
|
289
332
|
|
|
290
333
|
interface CreateAudioOptions {
|
|
@@ -322,6 +365,15 @@ interface CreateSlideDeckOptions {
|
|
|
322
365
|
instructions?: string;
|
|
323
366
|
language?: string;
|
|
324
367
|
}
|
|
368
|
+
interface CreateDataTableOptions {
|
|
369
|
+
sourceIds?: string[];
|
|
370
|
+
instructions?: string;
|
|
371
|
+
language?: string;
|
|
372
|
+
}
|
|
373
|
+
interface DataTableContent {
|
|
374
|
+
headers: string[];
|
|
375
|
+
rows: string[][];
|
|
376
|
+
}
|
|
325
377
|
type ReportFormat = "briefing_doc" | "study_guide" | "blog_post" | "custom";
|
|
326
378
|
interface CreateReportOptions {
|
|
327
379
|
format?: ReportFormat;
|
|
@@ -333,8 +385,10 @@ interface CreateReportOptions {
|
|
|
333
385
|
declare class ArtifactsAPI {
|
|
334
386
|
private readonly rpc;
|
|
335
387
|
private readonly auth;
|
|
336
|
-
|
|
388
|
+
private readonly notes;
|
|
389
|
+
constructor(rpc: RPCCore, auth: AuthTokens, notes: NotesAPI);
|
|
337
390
|
list(notebookId: string): Promise<Artifact[]>;
|
|
391
|
+
private _listRaw;
|
|
338
392
|
get(notebookId: string, artifactId: string): Promise<Artifact | null>;
|
|
339
393
|
delete(notebookId: string, artifactId: string): Promise<boolean>;
|
|
340
394
|
rename(notebookId: string, artifactId: string, newTitle: string): Promise<boolean>;
|
|
@@ -344,8 +398,9 @@ declare class ArtifactsAPI {
|
|
|
344
398
|
createFlashcards(notebookId: string, opts?: CreateQuizOptions): Promise<GenerationStatus>;
|
|
345
399
|
createInfographic(notebookId: string, opts?: CreateInfographicOptions): Promise<GenerationStatus>;
|
|
346
400
|
createSlideDeck(notebookId: string, opts?: CreateSlideDeckOptions): Promise<GenerationStatus>;
|
|
401
|
+
createDataTable(notebookId: string, opts?: CreateDataTableOptions): Promise<GenerationStatus>;
|
|
347
402
|
createReport(notebookId: string, opts?: CreateReportOptions): Promise<GenerationStatus>;
|
|
348
|
-
createMindMap(notebookId: string, sourceIds?: string[]): Promise<
|
|
403
|
+
createMindMap(notebookId: string, sourceIds?: string[]): Promise<Note>;
|
|
349
404
|
/** Poll until artifact reaches completed/failed status. */
|
|
350
405
|
waitUntilReady(notebookId: string, artifactId: string, timeout?: number, pollInterval?: number): Promise<Artifact>;
|
|
351
406
|
/** Download audio content as a Buffer. */
|
|
@@ -356,6 +411,16 @@ declare class ArtifactsAPI {
|
|
|
356
411
|
getReportMarkdown(notebookId: string, artifactId: string): Promise<string | null>;
|
|
357
412
|
/** Get interactive HTML for quiz/flashcard artifacts. */
|
|
358
413
|
getInteractiveHtml(notebookId: string, artifactId: string): Promise<string | null>;
|
|
414
|
+
/** Download a completed slide deck as PDF or PPTX. Returns a Buffer. */
|
|
415
|
+
downloadSlideDeck(notebookId: string, artifactId: string, format?: "pdf" | "pptx"): Promise<Buffer>;
|
|
416
|
+
/** Download a completed infographic as PNG. Returns a Buffer. */
|
|
417
|
+
downloadInfographic(notebookId: string, artifactId: string): Promise<Buffer>;
|
|
418
|
+
/** Get AI-suggested report formats based on notebook content. */
|
|
419
|
+
suggestReports(notebookId: string): Promise<ReportSuggestion[]>;
|
|
420
|
+
/** Revise an individual slide in a completed slide deck using a prompt. */
|
|
421
|
+
reviseSlide(notebookId: string, artifactId: string, slideIndex: number, prompt: string): Promise<GenerationStatus>;
|
|
422
|
+
/** Get parsed headers and rows from a completed data table artifact. */
|
|
423
|
+
getDataTableContent(notebookId: string, artifactId: string): Promise<DataTableContent | null>;
|
|
359
424
|
/**
|
|
360
425
|
* Fetch a Google-hosted media URL, manually following redirects to ensure
|
|
361
426
|
* cookies are included on every hop. Node/Bun fetch strips the Cookie header
|
|
@@ -379,6 +444,11 @@ declare class ChatAPI {
|
|
|
379
444
|
ask(notebookId: string, query: string, opts?: AskOptions): Promise<AskResult>;
|
|
380
445
|
getConversationTurns(notebookId: string, conversationId: string): Promise<ConversationTurn[]>;
|
|
381
446
|
getLastConversationId(notebookId: string): Promise<string | null>;
|
|
447
|
+
/**
|
|
448
|
+
* Set the chat mode for a notebook. Persists on the server — affects all
|
|
449
|
+
* subsequent `ask()` calls until changed.
|
|
450
|
+
*/
|
|
451
|
+
setMode(notebookId: string, mode: ChatModeValue): Promise<void>;
|
|
382
452
|
clearCache(conversationId?: string): void;
|
|
383
453
|
private _buildHistory;
|
|
384
454
|
}
|
|
@@ -392,21 +462,10 @@ declare class NotebooksAPI {
|
|
|
392
462
|
delete(notebookId: string): Promise<boolean>;
|
|
393
463
|
rename(notebookId: string, newTitle: string): Promise<Notebook>;
|
|
394
464
|
getSummary(notebookId: string): Promise<string>;
|
|
465
|
+
removeFromRecent(notebookId: string): Promise<void>;
|
|
395
466
|
getDescription(notebookId: string): Promise<NotebookDescription>;
|
|
396
467
|
}
|
|
397
468
|
|
|
398
|
-
declare class NotesAPI {
|
|
399
|
-
private readonly rpc;
|
|
400
|
-
constructor(rpc: RPCCore);
|
|
401
|
-
list(notebookId: string): Promise<{
|
|
402
|
-
notes: Note[];
|
|
403
|
-
mindMaps: MindMap[];
|
|
404
|
-
}>;
|
|
405
|
-
create(notebookId: string, content: string, title?: string): Promise<Note>;
|
|
406
|
-
update(notebookId: string, noteId: string, content: string, title?: string): Promise<Note>;
|
|
407
|
-
delete(notebookId: string, noteId: string): Promise<boolean>;
|
|
408
|
-
}
|
|
409
|
-
|
|
410
469
|
interface ResearchTask {
|
|
411
470
|
taskId: string;
|
|
412
471
|
reportId: string | null;
|
|
@@ -509,6 +568,12 @@ declare class SourcesAPI {
|
|
|
509
568
|
addFileBuffer(notebookId: string, data: Buffer | Uint8Array, fileName: string, _mimeType: string, opts?: AddSourceOptions): Promise<Source>;
|
|
510
569
|
private startResumableUpload;
|
|
511
570
|
private uploadFile;
|
|
571
|
+
/** Get the AI-generated Source Guide (summary + keywords) for a source. */
|
|
572
|
+
getGuide(notebookId: string, sourceId: string): Promise<SourceGuide>;
|
|
573
|
+
/** Get the full indexed text content of a source. */
|
|
574
|
+
getFulltext(notebookId: string, sourceId: string): Promise<SourceFulltext>;
|
|
575
|
+
/** Check if a source has newer content available. Returns true if fresh, false if stale. */
|
|
576
|
+
checkFreshness(notebookId: string, sourceId: string): Promise<boolean>;
|
|
512
577
|
delete(notebookId: string, sourceId: string): Promise<boolean>;
|
|
513
578
|
refresh(notebookId: string, sourceId: string): Promise<boolean>;
|
|
514
579
|
waitUntilReady(notebookId: string, sourceId: string, timeout?: number, initialInterval?: number, maxInterval?: number, backoffFactor?: number): Promise<Source>;
|
|
@@ -553,4 +618,4 @@ declare class NotebookLMClient {
|
|
|
553
618
|
refreshTokens(): Promise<void>;
|
|
554
619
|
}
|
|
555
620
|
|
|
556
|
-
export { type AddSourceOptions, type Artifact, type ArtifactStatus, type ArtifactType, ArtifactTypeCode, ArtifactsAPI, type AskOptions, type AskResult, AudioFormat, type AudioFormatValue, AudioLength, type AudioLengthValue, AuthTokens, ChatAPI, type ChatReference, type ClientOptions, ConnectOptions, type ConversationTurn, type CreateAudioOptions, type CreateInfographicOptions, type CreateQuizOptions, type CreateReportOptions, type CreateSlideDeckOptions, type CreateVideoOptions, ExportType, type ExportTypeValue, type GenerationStatus, type ImportedSource, InfographicDetail, type InfographicDetailValue, InfographicOrientation, type InfographicOrientationValue, InfographicStyle, type InfographicStyleValue, type
|
|
621
|
+
export { type AddSourceOptions, type Artifact, type ArtifactStatus, type ArtifactType, ArtifactTypeCode, ArtifactsAPI, type AskOptions, type AskResult, AudioFormat, type AudioFormatValue, AudioLength, type AudioLengthValue, AuthTokens, ChatAPI, ChatMode, type ChatModeValue, type ChatReference, type ClientOptions, ConnectOptions, type ConversationTurn, type CreateAudioOptions, type CreateDataTableOptions, type CreateInfographicOptions, type CreateQuizOptions, type CreateReportOptions, type CreateSlideDeckOptions, type CreateVideoOptions, type DataTableContent, ExportType, type ExportTypeValue, type GenerationStatus, type ImportedSource, InfographicDetail, type InfographicDetailValue, InfographicOrientation, type InfographicOrientationValue, InfographicStyle, type InfographicStyleValue, type Note, type Notebook, type NotebookDescription, NotebookLMClient, type NotebookMetadata, NotebooksAPI, NotesAPI, QuizDifficulty, type QuizDifficultyValue, QuizQuantity, type QuizQuantityValue, RPCMethod, type RPCMethodId, type ReportSuggestion, ResearchAPI, type ResearchResult, type ResearchSource, type ResearchTask, SettingsAPI, ShareAccess, type ShareAccessValue, SharePermission, type SharePermissionValue, type ShareStatus, ShareViewLevel, type ShareViewLevelValue, type SharedUser, SharingAPI, SlideDeckFormat, type SlideDeckFormatValue, SlideDeckLength, type SlideDeckLengthValue, type Source, type SourceFulltext, type SourceGuide, type SourceStatus, type SourceSummary, type SourceType, SourcesAPI, type SuggestedTopic, VideoFormat, type VideoFormatValue, VideoStyle, type VideoStyleValue };
|