Files
obsidian-mcp-server/src/types/settings-types.ts
Bill 5ce7488597 refactor: remove CORS settings, make auth mandatory in types
- Remove enableCORS and allowedOrigins from MCPServerSettings
- Make apiKey required (string, not optional)
- Set enableAuth to true by default
- Add comprehensive test coverage for settings types
2025-10-25 22:14:29 -04:00

30 lines
781 B
TypeScript

// Settings Types
export interface MCPServerSettings {
port: number;
apiKey: string; // Now required, not optional
enableAuth: boolean; // Will be removed in future, kept for migration
}
export interface NotificationSettings {
notificationsEnabled: boolean;
showParameters: boolean;
notificationDuration: number; // milliseconds
logToConsole: boolean;
}
export interface MCPPluginSettings extends MCPServerSettings, NotificationSettings {
autoStart: boolean;
}
export const DEFAULT_SETTINGS: MCPPluginSettings = {
port: 3000,
apiKey: '', // Will be auto-generated on first load
enableAuth: true, // Always true now
autoStart: false,
// Notification defaults
notificationsEnabled: false,
showParameters: false,
notificationDuration: 3000,
logToConsole: false
};