UNPKG

@simonecoelhosfo/optimizely-mcp-server

Version:

Optimizely MCP Server for AI assistants with integrated CLI tools

132 lines 3.79 kB
/** * Entity Documentation Helper * Provides quick documentation lookups using generated field data * * Note on Environments: * Both Feature Experimentation and Web Experimentation have "environment" entities, * but they use different APIs and have different schemas. In our system: * - "environment" refers to the entity (context-dependent) * - "fx_environment" is used internally for Feature Experimentation environments * The system automatically routes to the correct API based on project type. */ export interface EntityDocumentation { entity_type: string; description: string; operations: { create: boolean; read: boolean; update: boolean; delete: boolean; list: boolean; }; required_fields: readonly string[]; optional_fields: readonly string[]; endpoints: Record<string, string>; examples?: Record<string, any>; validation?: Record<string, any>; platform_availability?: { feature_experimentation: boolean; web_experimentation: boolean; }; template_mode_info?: { supported: boolean; scenarios: string[]; automatic_orchestration: string[]; }; field_documentation?: Record<string, { description: string; type: string; required: boolean; enum_values?: readonly string[]; default_value?: any; example?: any; validation?: any; format?: string; update_format?: string; }>; usage_notes?: string[]; relationships?: { parent?: string; children?: string[]; references?: string[]; }; common_patterns?: { name: string; description: string; example: any; }[]; update_behavior?: { method: string; format?: string; notes?: string[]; }; } export declare class EntityDocumentationHelper { /** * Get documentation for a specific entity type */ static getEntityDocumentation(entityType: string): EntityDocumentation | null; /** * Get a comprehensive description for the entity */ private static getEntityDescription; /** * Determine platform availability based on entity type */ private static getPlatformAvailability; /** * Get field-specific documentation */ static getFieldDocumentation(entityType: string, fieldName: string): { description?: string; type?: string; required: boolean; enum_values?: readonly string[]; example?: any; validation?: any; default_value?: any; format?: string; update_format?: string; } | null; /** * Search for entities by capability */ static findEntitiesByCapability(capability: 'create' | 'update' | 'delete' | 'list'): string[]; /** * Get template mode information for an entity type */ private static getTemplateModeInfo; /** * Get accurate operations based on entity type */ private static getEntityOperations; /** * Build comprehensive field documentation */ private static buildFieldDocumentation; /** * Get swagger defaults for an entity */ private static getSwaggerDefaults; /** * Get safety fallbacks for an entity */ private static getSafetyFallbacks; /** * Get usage notes for an entity */ private static getUsageNotes; /** * Get entity relationships */ private static getEntityRelationships; /** * Get common patterns for an entity */ private static getCommonPatterns; /** * Get update behavior for an entity */ private static getUpdateBehavior; } //# sourceMappingURL=EntityDocumentationHelper.d.ts.map