notebooklm-sdk 0.1.4 → 0.1.6
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 +157 -156
- package/dist/auth-Ba2hsZW_.d.cts +55 -0
- package/dist/auth-Ba2hsZW_.d.ts +55 -0
- package/dist/auth.cjs +231 -0
- package/dist/auth.cjs.map +1 -0
- package/dist/auth.d.cts +35 -0
- package/dist/auth.d.ts +35 -0
- package/dist/auth.js +221 -0
- package/dist/auth.js.map +1 -0
- package/dist/bin.cjs +139 -0
- package/dist/bin.cjs.map +1 -0
- package/dist/bin.d.cts +1 -0
- package/dist/bin.d.ts +1 -0
- package/dist/bin.js +137 -0
- package/dist/bin.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -29
- package/dist/index.d.ts +4 -29
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +24 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,32 +1,7 @@
|
|
|
1
|
+
import { A as AuthTokens, a as ConnectOptions } from './auth-Ba2hsZW_.cjs';
|
|
2
|
+
export { C as CookieMap, d as connect } from './auth-Ba2hsZW_.cjs';
|
|
1
3
|
export { ArtifactDownloadError, ArtifactError, ArtifactNotFoundError, ArtifactNotReadyError, ArtifactParseError, AuthError, ChatError, ClientError, NetworkError, NotebookError, NotebookLMError, NotebookNotFoundError, RPCError, RPCTimeoutError, RateLimitError, ServerError, SourceAddError, SourceError, SourceNotFoundError, SourceProcessingError, SourceTimeoutError } from './errors.cjs';
|
|
2
4
|
|
|
3
|
-
interface CookieMap {
|
|
4
|
-
[key: string]: string;
|
|
5
|
-
}
|
|
6
|
-
interface AuthTokens {
|
|
7
|
-
cookies: CookieMap;
|
|
8
|
-
csrfToken: string;
|
|
9
|
-
sessionId: string;
|
|
10
|
-
cookieHeader: string;
|
|
11
|
-
/** Cookie header containing only .google.com domain cookies — for media downloads */
|
|
12
|
-
googleCookieHeader: string;
|
|
13
|
-
}
|
|
14
|
-
interface ConnectOptions {
|
|
15
|
-
/** "; "-separated cookie string (e.g. "SID=abc; HSID=xyz") */
|
|
16
|
-
cookies?: string;
|
|
17
|
-
/** Path to Playwright storage_state.json */
|
|
18
|
-
cookiesFile?: string;
|
|
19
|
-
/** Pre-parsed cookie map */
|
|
20
|
-
cookiesObject?: CookieMap | {
|
|
21
|
-
cookies?: Array<{
|
|
22
|
-
name: string;
|
|
23
|
-
value: string;
|
|
24
|
-
domain: string;
|
|
25
|
-
}>;
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
declare function connect(opts: ConnectOptions): Promise<AuthTokens>;
|
|
29
|
-
|
|
30
5
|
/** RPC method IDs for NotebookLM batchexecute API. */
|
|
31
6
|
declare const RPCMethod: {
|
|
32
7
|
readonly LIST_NOTEBOOKS: "wXbhsf";
|
|
@@ -531,7 +506,7 @@ declare class SourcesAPI {
|
|
|
531
506
|
addUrl(notebookId: string, url: string, opts?: AddSourceOptions): Promise<Source>;
|
|
532
507
|
addText(notebookId: string, text: string, title?: string, opts?: AddSourceOptions): Promise<Source>;
|
|
533
508
|
addFile(notebookId: string, filePath: string, mimeType: string, opts?: AddSourceOptions): Promise<Source>;
|
|
534
|
-
addFileBuffer(notebookId: string, data: Buffer | Uint8Array, fileName: string,
|
|
509
|
+
addFileBuffer(notebookId: string, data: Buffer | Uint8Array, fileName: string, _mimeType: string, opts?: AddSourceOptions): Promise<Source>;
|
|
535
510
|
private startResumableUpload;
|
|
536
511
|
private uploadFile;
|
|
537
512
|
delete(notebookId: string, sourceId: string): Promise<boolean>;
|
|
@@ -576,4 +551,4 @@ declare class NotebookLMClient {
|
|
|
576
551
|
refreshTokens(): Promise<void>;
|
|
577
552
|
}
|
|
578
553
|
|
|
579
|
-
export { type AddSourceOptions, type Artifact, type ArtifactStatus, type ArtifactType, ArtifactTypeCode, ArtifactsAPI, type AskOptions, type AskResult, AudioFormat, type AudioFormatValue, AudioLength, type AudioLengthValue,
|
|
554
|
+
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 MindMap, type Note, type Notebook, type NotebookDescription, NotebookLMClient, type NotebookMetadata, NotebooksAPI, NotesAPI, QuizDifficulty, type QuizDifficultyValue, QuizQuantity, type QuizQuantityValue, RPCMethod, type RPCMethodId, 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 SourceStatus, type SourceSummary, type SourceType, SourcesAPI, type SuggestedTopic, VideoFormat, type VideoFormatValue, VideoStyle, type VideoStyleValue };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,32 +1,7 @@
|
|
|
1
|
+
import { A as AuthTokens, a as ConnectOptions } from './auth-Ba2hsZW_.js';
|
|
2
|
+
export { C as CookieMap, d as connect } from './auth-Ba2hsZW_.js';
|
|
1
3
|
export { ArtifactDownloadError, ArtifactError, ArtifactNotFoundError, ArtifactNotReadyError, ArtifactParseError, AuthError, ChatError, ClientError, NetworkError, NotebookError, NotebookLMError, NotebookNotFoundError, RPCError, RPCTimeoutError, RateLimitError, ServerError, SourceAddError, SourceError, SourceNotFoundError, SourceProcessingError, SourceTimeoutError } from './errors.js';
|
|
2
4
|
|
|
3
|
-
interface CookieMap {
|
|
4
|
-
[key: string]: string;
|
|
5
|
-
}
|
|
6
|
-
interface AuthTokens {
|
|
7
|
-
cookies: CookieMap;
|
|
8
|
-
csrfToken: string;
|
|
9
|
-
sessionId: string;
|
|
10
|
-
cookieHeader: string;
|
|
11
|
-
/** Cookie header containing only .google.com domain cookies — for media downloads */
|
|
12
|
-
googleCookieHeader: string;
|
|
13
|
-
}
|
|
14
|
-
interface ConnectOptions {
|
|
15
|
-
/** "; "-separated cookie string (e.g. "SID=abc; HSID=xyz") */
|
|
16
|
-
cookies?: string;
|
|
17
|
-
/** Path to Playwright storage_state.json */
|
|
18
|
-
cookiesFile?: string;
|
|
19
|
-
/** Pre-parsed cookie map */
|
|
20
|
-
cookiesObject?: CookieMap | {
|
|
21
|
-
cookies?: Array<{
|
|
22
|
-
name: string;
|
|
23
|
-
value: string;
|
|
24
|
-
domain: string;
|
|
25
|
-
}>;
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
declare function connect(opts: ConnectOptions): Promise<AuthTokens>;
|
|
29
|
-
|
|
30
5
|
/** RPC method IDs for NotebookLM batchexecute API. */
|
|
31
6
|
declare const RPCMethod: {
|
|
32
7
|
readonly LIST_NOTEBOOKS: "wXbhsf";
|
|
@@ -531,7 +506,7 @@ declare class SourcesAPI {
|
|
|
531
506
|
addUrl(notebookId: string, url: string, opts?: AddSourceOptions): Promise<Source>;
|
|
532
507
|
addText(notebookId: string, text: string, title?: string, opts?: AddSourceOptions): Promise<Source>;
|
|
533
508
|
addFile(notebookId: string, filePath: string, mimeType: string, opts?: AddSourceOptions): Promise<Source>;
|
|
534
|
-
addFileBuffer(notebookId: string, data: Buffer | Uint8Array, fileName: string,
|
|
509
|
+
addFileBuffer(notebookId: string, data: Buffer | Uint8Array, fileName: string, _mimeType: string, opts?: AddSourceOptions): Promise<Source>;
|
|
535
510
|
private startResumableUpload;
|
|
536
511
|
private uploadFile;
|
|
537
512
|
delete(notebookId: string, sourceId: string): Promise<boolean>;
|
|
@@ -576,4 +551,4 @@ declare class NotebookLMClient {
|
|
|
576
551
|
refreshTokens(): Promise<void>;
|
|
577
552
|
}
|
|
578
553
|
|
|
579
|
-
export { type AddSourceOptions, type Artifact, type ArtifactStatus, type ArtifactType, ArtifactTypeCode, ArtifactsAPI, type AskOptions, type AskResult, AudioFormat, type AudioFormatValue, AudioLength, type AudioLengthValue,
|
|
554
|
+
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 MindMap, type Note, type Notebook, type NotebookDescription, NotebookLMClient, type NotebookMetadata, NotebooksAPI, NotesAPI, QuizDifficulty, type QuizDifficultyValue, QuizQuantity, type QuizQuantityValue, RPCMethod, type RPCMethodId, 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 SourceStatus, type SourceSummary, type SourceType, SourcesAPI, type SuggestedTopic, VideoFormat, type VideoFormatValue, VideoStyle, type VideoStyleValue };
|
package/dist/index.js
CHANGED
|
@@ -1941,7 +1941,7 @@ var SourcesAPI = class {
|
|
|
1941
1941
|
const fileName = filePath.split("/").pop() ?? "file";
|
|
1942
1942
|
return this.addFileBuffer(notebookId, fileData, fileName, mimeType, opts);
|
|
1943
1943
|
}
|
|
1944
|
-
async addFileBuffer(notebookId, data, fileName,
|
|
1944
|
+
async addFileBuffer(notebookId, data, fileName, _mimeType, opts = {}) {
|
|
1945
1945
|
const params = [
|
|
1946
1946
|
[[fileName]],
|
|
1947
1947
|
notebookId,
|