File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,14 @@ import { ApiClient } from "./common/atlas/apiClient.js";
33import defaultConfig from "./config.js" ;
44import { Implementation } from "@modelcontextprotocol/sdk/types.js" ;
55
6+ // Define the type for configuration used by Session
7+ interface SessionConfig {
8+ apiBaseUrl ?: string ;
9+ apiClientId ?: string ;
10+ apiClientSecret ?: string ;
11+ [ key : string ] : unknown ;
12+ }
13+
614export class Session {
715 sessionId ?: string ;
816 serviceProvider ?: NodeDriverServiceProvider ;
@@ -13,9 +21,9 @@ export class Session {
1321 } ;
1422 private credentials ?: { clientId : string ; clientSecret : string } ;
1523 private baseUrl : string ;
16- private readonly config : any ;
24+ private readonly config : SessionConfig ;
1725
18- constructor ( config = defaultConfig ) {
26+ constructor ( config : SessionConfig = defaultConfig as SessionConfig ) {
1927 this . config = config ;
2028 this . baseUrl = this . config . apiBaseUrl ?? "https://cloud.mongodb.com/" ;
2129
Original file line number Diff line number Diff line change 11import { Session } from "../session.js" ;
2- import { BaseEvent , type ToolEvent } from "./types.js" ;
2+ import { BaseEvent } from "./types.js" ;
33import config from "../config.js" ;
44import logger from "../logger.js" ;
55import { mongoLogId } from "mongodb-log-writer" ;
You can’t perform that action at this time.
0 commit comments