UNPKG

@simonecoelhosfo/optimizely-mcp-server

Version:

Optimizely MCP Server for AI assistants with integrated CLI tools

104 lines 3.02 kB
/** * Configurable Defaults Manager * * This class manages user-configurable defaults for Optimizely entities, * solving the jQuery 1.11.3 problem by allowing users to set modern defaults. */ interface UserDefaults { version: string; description?: string; defaults: Record<string, any>; templates?: Record<string, any>; } type ConfigSource = 'session' | 'user-file' | 'environment' | 'built-in'; export declare class ConfigurableDefaultsManager { private sessionDefaults; private fileDefaults; private environmentDefaults; private builtInDefaults; private configPath?; private configSource; constructor(); /** * Set defaults from chat interface */ setDefaults(configuration: UserDefaults): void; /** * Save session defaults to file */ saveToFile(configuration?: UserDefaults): Promise<string>; /** * Load built-in modern defaults that override legacy Optimizely defaults */ private loadBuiltInDefaults; /** * Load environment variable defaults * Supports patterns: * - OPTIMIZELY_{ENTITY}_{FIELD}={VALUE} (global) * - OPTIMIZELY_PROJECT_{ID}_{ENTITY}_{FIELD}={VALUE} (project-specific) * - OPTIMIZELY_{PLATFORM}_{ENTITY}_{FIELD}={VALUE} (platform-specific) */ private loadEnvironmentDefaults; /** * Parse environment variable value with type inference */ private parseEnvironmentValue; /** * Load user defaults from configuration file */ private loadUserDefaults; /** * Load configuration from a specific file path */ private loadFromPath; /** * Check if file exists */ private fileExists; /** * Get merged defaults for an entity type with context support * Priority: Session > File > Environment (project-specific > platform-specific > global) > Built-in > Swagger */ getDefaults(entityType: string, context?: { platform?: 'web' | 'feature'; projectId?: string; }): any; /** * Backward compatibility method */ getDefaultsLegacy(entityType: string, platform?: 'web' | 'feature'): any; /** * Filter defaults based on platform to prevent cross-platform field pollution */ private filterDefaultsByPlatform; /** * Get current configuration source */ getConfigSource(): ConfigSource; /** * Get configuration file path */ getConfigPath(): string | undefined; /** * Get template by name */ getTemplate(templateName: string): any; /** * Get available template names */ getAvailableTemplates(): string[]; /** * Get environment variable defaults for debugging */ getEnvironmentDefaults(): Record<string, any>; /** * Demonstrate the jQuery problem solution */ demonstrateJQueryFix(): void; /** * Deep merge multiple objects */ private deepMerge; } export {}; //# sourceMappingURL=ConfigurableDefaultsManager.d.ts.map