@simonecoelhosfo/optimizely-mcp-server
Version:
Optimizely MCP Server for AI assistants with integrated CLI tools
59 lines • 2.21 kB
TypeScript
/**
* Environment Filter for Per-Project Environment Syncing
* @description Manages which environments should be synced for each project
* based on environment variable configuration.
*
* Supports format: PROJECT_ID:env1,env2,env3|PROJECT_ID2:env1,env2
* Example: 20224828075:production,development|8923080126:production
*/
export interface ProjectEnvironmentConfig {
[projectId: string]: string[];
}
export declare class EnvironmentFilter {
private config;
private isConfigured;
constructor(configString?: string);
/**
* Parse environment configuration from string
* Format: PROJECT_ID:env1,env2,env3|PROJECT_ID2:env1,env2
*/
private parseConfig;
/**
* Filter environments for a specific project
* @param projectId - Project ID to filter environments for
* @param allEnvironments - All available environments for the project
* @returns Filtered environments or all environments if no filter configured
*/
filterEnvironments(projectId: string | number, allEnvironments: any[]): any[];
/**
* Get the configured environments for a specific project
* @param projectId - Project ID to get configuration for
* @returns Array of environment names or null if not configured
*/
getProjectConfig(projectId: string | number): string[] | null;
/**
* Check if environment filtering is configured
* @returns True if any environment filters are configured
*/
isFilteringEnabled(): boolean;
/**
* Get all configured project IDs
* @returns Array of project IDs that have environment filtering configured
*/
getConfiguredProjects(): string[];
/**
* Get summary of current configuration
* @returns Configuration summary for logging/debugging
*/
getConfigSummary(): {
isConfigured: boolean;
projectCount: number;
config: ProjectEnvironmentConfig;
};
}
/**
* Create EnvironmentFilter from environment variables
* @returns EnvironmentFilter instance configured from SYNC_ENVIRONMENTS_PER_PROJECT
*/
export declare function createEnvironmentFilterFromEnv(): EnvironmentFilter;
//# sourceMappingURL=EnvironmentFilter.d.ts.map