import { SecurityLevel } from "../types/cia"; import { CIAComponentType, CIADataProvider } from "../types/cia-services"; import { ComplianceGapAnalysis, ComplianceStatusDetails } from "../types/compliance"; import { IComplianceService } from "../types/services"; import { BaseService } from "./BaseService"; /** * Framework coverage information */ export interface FrameworkCoverage { framework: string; coverage: number; status: string; required: { availability: SecurityLevel; integrity: SecurityLevel; confidentiality: SecurityLevel; }; } /** * Control mapping for compliance frameworks */ export interface ControlMapping { id: string; title: string; description: string; securityLevel: SecurityLevel; controlFamily?: string; requirements?: string[]; } /** * Adapter for compliance service functionality * * ## Business Perspective * Provides a simplified interface to compliance checking and framework mapping, * adapting the ComplianceService for easier consumption by components and services. * Enables organizations to understand their compliance posture and identify gaps. 📋 * * @implements {IComplianceService} */ export declare class ComplianceServiceAdapter extends BaseService implements IComplianceService { /** * Service name for identification */ readonly name: string; /** * Underlying compliance service */ private complianceService; /** * Framework requirements mapping * Maps compliance frameworks to their minimum security requirements */ frameworkRequirements: Record; /** * Create a new ComplianceServiceAdapter instance * * @param dataProvider - Data provider for CIA options and compliance data * @throws {ServiceError} If dataProvider is not provided */ constructor(dataProvider: CIADataProvider); /** * Get compliance status based on security levels * * Evaluates compliance with all supported frameworks based on the provided * security levels for availability, integrity, and confidentiality. * * @param availabilityLevel - Availability security level * @param integrityLevel - Integrity security level * @param confidentialityLevel - Confidentiality security level * @returns Compliance status details including compliant, partially compliant, and non-compliant frameworks * @throws {ServiceError} If any security level is invalid * * @example * ```typescript * const status = adapter.getComplianceStatus('High', 'High', 'Very High'); * console.log(`Compliant with ${status.compliantFrameworks.length} frameworks`); * ``` */ getComplianceStatus(availabilityLevel: SecurityLevel, integrityLevel: SecurityLevel, confidentialityLevel: SecurityLevel): ComplianceStatusDetails; /** * Get compliance status text based on security levels * * Returns a human-readable text description of the overall compliance status. * * @param availabilityLevel - Availability security level * @param integrityLevel - Integrity security level (defaults to availabilityLevel if not provided) * @param confidentialityLevel - Confidentiality security level (defaults to availabilityLevel if not provided) * @returns Compliance status text description * @throws {ServiceError} If any security level is invalid * * @example * ```typescript * const statusText = adapter.getComplianceStatusText('High', 'High', 'Very High'); * console.log(statusText); // "Compliant with all major frameworks" * ``` */ getComplianceStatusText(availabilityLevel: SecurityLevel, integrityLevel?: SecurityLevel, confidentialityLevel?: SecurityLevel): string; /** * Get compliant frameworks for given security levels * * Returns a list of all compliance frameworks that are fully satisfied * by the provided security levels. * * @param availabilityLevel - Availability security level * @param integrityLevel - Integrity security level (defaults to availabilityLevel if not provided) * @param confidentialityLevel - Confidentiality security level (defaults to availabilityLevel if not provided) * @returns Array of compliant framework names * @throws {ServiceError} If any security level is invalid * * @example * ```typescript * const frameworks = adapter.getCompliantFrameworks('High', 'High', 'Very High'); * console.log(`Compliant with: ${frameworks.join(', ')}`); * ``` */ getCompliantFrameworks(availabilityLevel: SecurityLevel, integrityLevel?: SecurityLevel, confidentialityLevel?: SecurityLevel): string[]; /** * Get description of a compliance framework * * @param framework - Framework name * @returns Framework description */ /** * Get description of a compliance framework * * Returns a detailed description of the specified compliance framework, * explaining its purpose and scope. * * @param framework - Framework name (e.g., 'NIST 800-53', 'ISO 27001', 'GDPR') * @returns Framework description or "No description available" if framework is unknown * * @example * ```typescript * const desc = adapter.getFrameworkDescription('GDPR'); * console.log(desc); // "General Data Protection Regulation for protecting personal data in the EU" * ``` */ getFrameworkDescription(framework: string): string; /** * Get framework compliance status * * Evaluates whether a specific framework's requirements are met by the given * security levels. * * @param framework - Framework name to evaluate * @param availabilityLevel - Availability security level * @param integrityLevel - Integrity security level * @param confidentialityLevel - Confidentiality security level * @returns Object containing status string (Compliant, Partially Compliant, or Non-Compliant) * @throws {ServiceError} If any security level is invalid * * @example * ```typescript * const status = adapter.getFrameworkStatus('HIPAA', 'High', 'High', 'Very High'); * console.log(status.status); // "Compliant" * ``` */ getFrameworkStatus(framework: string, availabilityLevel: SecurityLevel, integrityLevel: SecurityLevel, confidentialityLevel: SecurityLevel): { status: string; }; /** * Check if a framework is applicable to an industry/region * * @param framework - Framework name * @param industry - Industry (optional) * @param region - Region (optional) * @returns True if the framework is applicable */ isFrameworkApplicable(_framework: string, _industry?: string, _region?: string): boolean; /** * Get required security level for a specific framework and component * * @param framework - Framework name * @param component - CIA component * @returns Required security level */ getFrameworkRequiredLevel(framework: string, component: CIAComponentType): SecurityLevel; /** * Get compliance gap analysis between current and required security levels * * Performs a comprehensive gap analysis, identifying where the current security * posture falls short of compliance framework requirements and providing * actionable remediation steps. * * @param availabilityLevel - Current availability security level * @param integrityLevel - Current integrity security level * @param confidentialityLevel - Current confidentiality security level * @param framework - Optional specific framework to analyze (analyzes all if not provided) * @returns Detailed gap analysis including gaps, recommendations, and compliance score * @throws {ServiceError} If any security level is invalid * * @example * ```typescript * const gapAnalysis = adapter.getComplianceGapAnalysis('Moderate', 'Moderate', 'High', 'HIPAA'); * console.log(`Compliance score: ${gapAnalysis.complianceScore}%`); * console.log(`Number of gaps: ${gapAnalysis.gaps.length}`); * ``` */ getComplianceGapAnalysis(availabilityLevel: SecurityLevel, integrityLevel: SecurityLevel, confidentialityLevel: SecurityLevel, framework?: string): ComplianceGapAnalysis; } /** * Get framework coverage analysis based on security levels * * @param levels - Object containing security levels for availability, integrity, and confidentiality * @returns Array of framework coverage information */ export declare function getFrameworkCoverage(levels: { availability: SecurityLevel; integrity: SecurityLevel; confidentiality: SecurityLevel; }): FrameworkCoverage[]; /** * Get HIPAA control mappings * @returns Array of HIPAA control mappings */ export declare function getHipaaControlMappings(): ControlMapping[]; /** * Get NIST 800-53 control mappings * @returns Array of NIST control mappings */ export declare function getNistControlMappings(): ControlMapping[]; //# sourceMappingURL=ComplianceServiceAdapter.d.ts.map