@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
|
@@ -91,44 +91,6 @@ declare class TokenStorage implements TokenStorageAdapter {
|
|
|
91
91
|
private getWebEncryptionKey;
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
interface MCPClientConfig extends Partial<OAuthConfig> {
|
|
95
|
-
mcpEndpoint?: string;
|
|
96
|
-
autoRefresh?: boolean;
|
|
97
|
-
apiKey?: string;
|
|
98
|
-
tokenStorage?: TokenStorageAdapter;
|
|
99
|
-
}
|
|
100
|
-
declare class MCPClient {
|
|
101
|
-
private tokenStorage;
|
|
102
|
-
private authFlow;
|
|
103
|
-
private config;
|
|
104
|
-
private authMode;
|
|
105
|
-
private ws;
|
|
106
|
-
private eventSource;
|
|
107
|
-
private accessToken;
|
|
108
|
-
private refreshTimer;
|
|
109
|
-
constructor(config?: MCPClientConfig);
|
|
110
|
-
connect(): Promise<void>;
|
|
111
|
-
private authenticate;
|
|
112
|
-
private ensureAccessToken;
|
|
113
|
-
private scheduleTokenRefresh;
|
|
114
|
-
private establishConnection;
|
|
115
|
-
private connectWebSocket;
|
|
116
|
-
private connectSSE;
|
|
117
|
-
private handleMessage;
|
|
118
|
-
private reconnect;
|
|
119
|
-
request<T = unknown>(method: string, params?: unknown): Promise<T>;
|
|
120
|
-
disconnect(): void;
|
|
121
|
-
logout(): Promise<void>;
|
|
122
|
-
private isTerminal;
|
|
123
|
-
private isElectron;
|
|
124
|
-
private generateId;
|
|
125
|
-
createMemory<T = unknown>(title: string, content: string, options?: unknown): Promise<T>;
|
|
126
|
-
searchMemories<T = unknown>(query: string, options?: unknown): Promise<T[]>;
|
|
127
|
-
getMemory<T = unknown>(id: string): Promise<T>;
|
|
128
|
-
updateMemory<T = unknown>(id: string, updates: Partial<T>): Promise<T>;
|
|
129
|
-
deleteMemory(id: string): Promise<void>;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
94
|
/**
|
|
133
95
|
* Browser-only token storage that avoids Node/Electron dependencies.
|
|
134
96
|
* Tokens are encrypted with Web Crypto and stored in localStorage.
|
|
@@ -243,4 +205,4 @@ declare class ApiKeyStorageWeb {
|
|
|
243
205
|
private base64Decode;
|
|
244
206
|
}
|
|
245
207
|
|
|
246
|
-
export {
|
|
208
|
+
export { ApiKeyStorageWeb as A, BaseOAuthFlow as B, DesktopOAuthFlow as D, type GrantType as G, type OAuthConfig as O, type PKCEChallenge as P, type TokenStorageAdapter as T, TokenStorageWeb as a, type TokenResponse as b, type DeviceCodeResponse as c, type AuthError as d, TokenStorage as e, type ApiKeyData as f, ApiKeyStorage as g };
|
|
@@ -91,44 +91,6 @@ declare class TokenStorage implements TokenStorageAdapter {
|
|
|
91
91
|
private getWebEncryptionKey;
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
interface MCPClientConfig extends Partial<OAuthConfig> {
|
|
95
|
-
mcpEndpoint?: string;
|
|
96
|
-
autoRefresh?: boolean;
|
|
97
|
-
apiKey?: string;
|
|
98
|
-
tokenStorage?: TokenStorageAdapter;
|
|
99
|
-
}
|
|
100
|
-
declare class MCPClient {
|
|
101
|
-
private tokenStorage;
|
|
102
|
-
private authFlow;
|
|
103
|
-
private config;
|
|
104
|
-
private authMode;
|
|
105
|
-
private ws;
|
|
106
|
-
private eventSource;
|
|
107
|
-
private accessToken;
|
|
108
|
-
private refreshTimer;
|
|
109
|
-
constructor(config?: MCPClientConfig);
|
|
110
|
-
connect(): Promise<void>;
|
|
111
|
-
private authenticate;
|
|
112
|
-
private ensureAccessToken;
|
|
113
|
-
private scheduleTokenRefresh;
|
|
114
|
-
private establishConnection;
|
|
115
|
-
private connectWebSocket;
|
|
116
|
-
private connectSSE;
|
|
117
|
-
private handleMessage;
|
|
118
|
-
private reconnect;
|
|
119
|
-
request<T = unknown>(method: string, params?: unknown): Promise<T>;
|
|
120
|
-
disconnect(): void;
|
|
121
|
-
logout(): Promise<void>;
|
|
122
|
-
private isTerminal;
|
|
123
|
-
private isElectron;
|
|
124
|
-
private generateId;
|
|
125
|
-
createMemory<T = unknown>(title: string, content: string, options?: unknown): Promise<T>;
|
|
126
|
-
searchMemories<T = unknown>(query: string, options?: unknown): Promise<T[]>;
|
|
127
|
-
getMemory<T = unknown>(id: string): Promise<T>;
|
|
128
|
-
updateMemory<T = unknown>(id: string, updates: Partial<T>): Promise<T>;
|
|
129
|
-
deleteMemory(id: string): Promise<void>;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
94
|
/**
|
|
133
95
|
* Browser-only token storage that avoids Node/Electron dependencies.
|
|
134
96
|
* Tokens are encrypted with Web Crypto and stored in localStorage.
|
|
@@ -243,4 +205,4 @@ declare class ApiKeyStorageWeb {
|
|
|
243
205
|
private base64Decode;
|
|
244
206
|
}
|
|
245
207
|
|
|
246
|
-
export {
|
|
208
|
+
export { ApiKeyStorageWeb as A, BaseOAuthFlow as B, DesktopOAuthFlow as D, type GrantType as G, type OAuthConfig as O, type PKCEChallenge as P, type TokenStorageAdapter as T, TokenStorageWeb as a, type TokenResponse as b, type DeviceCodeResponse as c, type AuthError as d, TokenStorage as e, type ApiKeyData as f, ApiKeyStorage as g };
|