UNPKG

@simonecoelhosfo/optimizely-mcp-server

Version:

Optimizely MCP Server for AI assistants with integrated CLI tools

51 lines 1.79 kB
/** * Project Entity Validator * @description Validates entity operations against project capabilities * * Prevents common errors like: * - Creating flags in Web Experimentation projects * - Creating experiments in Feature Experimentation projects * - Missing project type specification * * @author Optimizely MCP Server * @version 1.0.0 */ export interface ProjectInfo { id: string; name?: string; platform?: string; is_flags_enabled?: boolean; } export type EntityType = 'flag' | 'ruleset' | 'rule' | 'experiment' | 'campaign' | 'page' | 'audience' | 'event' | 'attribute' | 'extension' | 'webhook' | 'group' | 'collaborator' | 'environment' | 'project' | 'variation'; export declare class ProjectEntityValidator { /** * Feature Experimentation entities */ private static readonly FEATURE_ENTITIES; /** * Web Experimentation entities */ private static readonly WEB_ENTITIES; /** * Shared entities (available in both project types) */ private static readonly SHARED_ENTITIES; /** * Validate if an entity type is supported by the project * @throws HardStopError if entity is not supported */ static validateEntityForProject(entityType: EntityType, projectInfo: ProjectInfo | null, operation?: string): void; /** * Get a helpful message when project type is ambiguous */ static getProjectTypeGuidance(): string; /** * Determine if an entity type requires a specific project type */ static getRequiredProjectType(entityType: EntityType): 'feature' | 'web' | 'any'; /** * Get supported entities for a project */ static getSupportedEntities(projectInfo: ProjectInfo): EntityType[]; } //# sourceMappingURL=ProjectEntityValidator.d.ts.map