@lanonasis/oauth-client 1.2.2 → 1.2.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/{browser-CUJNgghM.d.cts → api-key-storage-web-DannE11B.d.cts} +1 -39
- package/dist/{browser-CUJNgghM.d.ts → api-key-storage-web-DannE11B.d.ts} +1 -39
- package/dist/browser.cjs +80 -599
- package/dist/browser.d.cts +45 -1
- package/dist/browser.d.ts +45 -1
- package/dist/browser.mjs +80 -599
- package/dist/index.d.cts +41 -3
- package/dist/index.d.ts +41 -3
- package/package.json +3 -2
package/dist/browser.d.cts
CHANGED
|
@@ -1 +1,45 @@
|
|
|
1
|
-
|
|
1
|
+
import { O as OAuthConfig, T as TokenStorageAdapter } from './api-key-storage-web-DannE11B.cjs';
|
|
2
|
+
export { A as ApiKeyStorageWeb, d as AuthError, B as BaseOAuthFlow, D as DesktopOAuthFlow, c as DeviceCodeResponse, G as GrantType, P as PKCEChallenge, b as TokenResponse, a as TokenStorageWeb } from './api-key-storage-web-DannE11B.cjs';
|
|
3
|
+
|
|
4
|
+
interface MCPClientConfig extends Partial<OAuthConfig> {
|
|
5
|
+
mcpEndpoint?: string;
|
|
6
|
+
autoRefresh?: boolean;
|
|
7
|
+
apiKey?: string;
|
|
8
|
+
tokenStorage?: TokenStorageAdapter;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Browser-optimized MCP Client
|
|
12
|
+
* Only includes Desktop OAuth flow (for Electron/browser popups)
|
|
13
|
+
* Does NOT include Terminal flow to avoid Node.js dependencies (open package, etc.)
|
|
14
|
+
*/
|
|
15
|
+
declare class MCPClient {
|
|
16
|
+
private tokenStorage;
|
|
17
|
+
private authFlow;
|
|
18
|
+
private config;
|
|
19
|
+
private authMode;
|
|
20
|
+
private ws;
|
|
21
|
+
private eventSource;
|
|
22
|
+
private accessToken;
|
|
23
|
+
private refreshTimer;
|
|
24
|
+
constructor(config?: MCPClientConfig);
|
|
25
|
+
connect(): Promise<void>;
|
|
26
|
+
private authenticate;
|
|
27
|
+
private ensureAccessToken;
|
|
28
|
+
private scheduleTokenRefresh;
|
|
29
|
+
private establishConnection;
|
|
30
|
+
private connectWebSocket;
|
|
31
|
+
private connectSSE;
|
|
32
|
+
private handleMessage;
|
|
33
|
+
private reconnect;
|
|
34
|
+
request<T = unknown>(method: string, params?: unknown): Promise<T>;
|
|
35
|
+
disconnect(): void;
|
|
36
|
+
logout(): Promise<void>;
|
|
37
|
+
private generateId;
|
|
38
|
+
createMemory<T = unknown>(title: string, content: string, options?: Record<string, unknown>): Promise<T>;
|
|
39
|
+
searchMemories<T = unknown>(query: string, options?: Record<string, unknown>): Promise<T[]>;
|
|
40
|
+
getMemory<T = unknown>(id: string): Promise<T>;
|
|
41
|
+
updateMemory<T = unknown>(id: string, updates: Partial<T>): Promise<T>;
|
|
42
|
+
deleteMemory(id: string): Promise<void>;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export { MCPClient, type MCPClientConfig, OAuthConfig };
|
package/dist/browser.d.ts
CHANGED
|
@@ -1 +1,45 @@
|
|
|
1
|
-
|
|
1
|
+
import { O as OAuthConfig, T as TokenStorageAdapter } from './api-key-storage-web-DannE11B.js';
|
|
2
|
+
export { A as ApiKeyStorageWeb, d as AuthError, B as BaseOAuthFlow, D as DesktopOAuthFlow, c as DeviceCodeResponse, G as GrantType, P as PKCEChallenge, b as TokenResponse, a as TokenStorageWeb } from './api-key-storage-web-DannE11B.js';
|
|
3
|
+
|
|
4
|
+
interface MCPClientConfig extends Partial<OAuthConfig> {
|
|
5
|
+
mcpEndpoint?: string;
|
|
6
|
+
autoRefresh?: boolean;
|
|
7
|
+
apiKey?: string;
|
|
8
|
+
tokenStorage?: TokenStorageAdapter;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Browser-optimized MCP Client
|
|
12
|
+
* Only includes Desktop OAuth flow (for Electron/browser popups)
|
|
13
|
+
* Does NOT include Terminal flow to avoid Node.js dependencies (open package, etc.)
|
|
14
|
+
*/
|
|
15
|
+
declare class MCPClient {
|
|
16
|
+
private tokenStorage;
|
|
17
|
+
private authFlow;
|
|
18
|
+
private config;
|
|
19
|
+
private authMode;
|
|
20
|
+
private ws;
|
|
21
|
+
private eventSource;
|
|
22
|
+
private accessToken;
|
|
23
|
+
private refreshTimer;
|
|
24
|
+
constructor(config?: MCPClientConfig);
|
|
25
|
+
connect(): Promise<void>;
|
|
26
|
+
private authenticate;
|
|
27
|
+
private ensureAccessToken;
|
|
28
|
+
private scheduleTokenRefresh;
|
|
29
|
+
private establishConnection;
|
|
30
|
+
private connectWebSocket;
|
|
31
|
+
private connectSSE;
|
|
32
|
+
private handleMessage;
|
|
33
|
+
private reconnect;
|
|
34
|
+
request<T = unknown>(method: string, params?: unknown): Promise<T>;
|
|
35
|
+
disconnect(): void;
|
|
36
|
+
logout(): Promise<void>;
|
|
37
|
+
private generateId;
|
|
38
|
+
createMemory<T = unknown>(title: string, content: string, options?: Record<string, unknown>): Promise<T>;
|
|
39
|
+
searchMemories<T = unknown>(query: string, options?: Record<string, unknown>): Promise<T[]>;
|
|
40
|
+
getMemory<T = unknown>(id: string): Promise<T>;
|
|
41
|
+
updateMemory<T = unknown>(id: string, updates: Partial<T>): Promise<T>;
|
|
42
|
+
deleteMemory(id: string): Promise<void>;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export { MCPClient, type MCPClientConfig, OAuthConfig };
|