UNPKG

@neuroequality/neuroadapt-ai

Version:

AI-powered accessibility personalization for neurodivergent users

238 lines (237 loc) 6.59 kB
import { EventEmitter } from 'eventemitter3'; import { Preferences } from '@neuroadapt/core'; export interface DeploymentEnvironment { name: string; type: 'development' | 'staging' | 'production' | 'testing'; region: string; domain: string; features: string[]; scalingConfig: ScalingConfig; securityConfig: SecurityConfig; complianceRequirements: ComplianceRequirement[]; } export interface ScalingConfig { autoScaling: boolean; minInstances: number; maxInstances: number; targetCPU: number; targetMemory: number; loadBalancer: { type: 'round_robin' | 'least_connections' | 'ip_hash'; healthCheck: { path: string; interval: number; timeout: number; retries: number; }; }; } export interface SecurityConfig { encryption: { atRest: boolean; inTransit: boolean; algorithm: string; }; authentication: { required: boolean; methods: string[]; sessionTimeout: number; }; authorization: { rbac: boolean; policies: string[]; }; audit: { enabled: boolean; retention: number; storage: string; }; } export interface ComplianceRequirement { standard: 'SOC2' | 'HIPAA' | 'GDPR' | 'WCAG' | 'Section508' | 'ISO27001'; level: string; requirements: string[]; monitoring: boolean; reporting: boolean; } export interface ConfigurationTemplate { id: string; name: string; description: string; version: string; targetEnvironment: string[]; config: { accessibility: { features: string[]; defaults: Partial<Preferences>; enforcement: 'strict' | 'permissive' | 'advisory'; }; integration: { sso: boolean; analytics: boolean; monitoring: boolean; }; performance: { caching: boolean; cdn: boolean; compression: boolean; }; }; } export interface DeploymentPlan { id: string; name: string; environments: string[]; strategy: 'blue_green' | 'rolling' | 'canary' | 'recreate'; rollbackStrategy: 'automatic' | 'manual'; healthChecks: HealthCheck[]; notifications: NotificationConfig[]; } export interface HealthCheck { name: string; type: 'http' | 'tcp' | 'custom'; endpoint?: string; expectedStatus?: number; timeout: number; interval: number; retries: number; } export interface NotificationConfig { channel: 'email' | 'slack' | 'webhook' | 'sms'; recipients: string[]; events: string[]; template?: string; } export interface MonitoringConfig { metrics: { accessibility: string[]; performance: string[]; business: string[]; }; alerting: { rules: AlertRule[]; channels: string[]; }; logging: { level: 'debug' | 'info' | 'warn' | 'error'; format: 'json' | 'text'; destinations: string[]; }; } export interface AlertRule { name: string; metric: string; condition: string; threshold: number; duration: number; severity: 'low' | 'medium' | 'high' | 'critical'; } /** * Enterprise Deployment Manager */ export declare class DeploymentManager extends EventEmitter { private config; private environments; private templates; private deploymentPlans; private activeDeployments; constructor(config: { region: string; provider: 'aws' | 'azure' | 'gcp' | 'kubernetes' | 'docker'; monitoring: MonitoringConfig; backup: { enabled: boolean; retention: number; schedule: string; }; }); /** * Create deployment environment */ createEnvironment(environment: DeploymentEnvironment): void; /** * Deploy to environment */ deploy(planId: string, targetEnvironment: string, configTemplate?: string): Promise<{ deploymentId: string; status: string; }>; /** * Scale environment resources */ scaleEnvironment(environmentName: string, targetInstances: number): Promise<void>; /** * Rollback deployment */ rollback(deploymentId: string): Promise<void>; /** * Create configuration template */ createConfigurationTemplate(template: ConfigurationTemplate): void; /** * Apply configuration template to environment */ applyConfigurationTemplate(templateId: string, environment: DeploymentEnvironment): Promise<void>; /** * Generate deployment plan */ createDeploymentPlan(plan: DeploymentPlan): void; /** * Get deployment status */ getDeploymentStatus(deploymentId: string): { status: 'pending' | 'in_progress' | 'completed' | 'failed' | 'rolled_back'; progress: number; steps: any[]; health: 'healthy' | 'degraded' | 'unhealthy'; } | undefined; /** * Get environment health status */ getEnvironmentHealth(environmentName: string): Promise<{ overall: 'healthy' | 'degraded' | 'unhealthy'; services: Record<string, string>; metrics: Record<string, number>; compliance: Record<string, boolean>; }>; /** * Backup environment configuration */ backupEnvironment(environmentName: string): Promise<string>; /** * Restore environment from backup */ restoreEnvironment(environmentName: string, backupId: string): Promise<void>; /** * Generate compliance report */ generateComplianceReport(environmentName: string): Promise<{ environment: string; timestamp: Date; compliance: Record<string, { status: 'compliant' | 'non_compliant' | 'partial'; score: number; issues: string[]; recommendations: string[]; }>; overall: { score: number; status: string; }; }>; private initializeDefaultTemplates; private initializeDefaultEnvironments; private generateDeploymentId; private validateDeployment; private isStrategySupported; private executeDeploymentStrategy; private monitorDeployment; private runHealthCheck; private performScaling; private performRollback; private applyAccessibilityConfig; private applyIntegrationConfig; private applyPerformanceConfig; } export default DeploymentManager; //# sourceMappingURL=deployment-tools.d.ts.map