// SPDX-License-Identifier: Apache-2.0
// Copyright 2024-2026 Vorion LLC
/**
 * FedRAMP Continuous Monitoring (ConMon) Module
 *
 * Comprehensive FedRAMP compliance capabilities including:
 * - Continuous Monitoring (ConMon) service
 * - NIST 800-53 Rev 5 control implementation
 * - POA&M (Plan of Action & Milestones) management
 * - System boundary documentation
 * - Incident reporting (US-CERT compliant)
 * - 3PAO assessment support
 * - FedRAMP metrics and dashboards
 * - SSP (System Security Plan) generation
 *
 * @packageDocumentation
 */
// =============================================================================
// CONTINUOUS MONITORING
// =============================================================================
export { ContinuousMonitoringService, 
// Constants
VULNERABILITY_SEVERITIES, SCAN_TYPES, ASSESSMENT_TYPES, FEDRAMP_REMEDIATION_TIMEFRAMES, 
// Schemas
vulnerabilityFindingSchema, scanResultSchema, scheduledAssessmentSchema, } from './continuous-monitoring.js';
// =============================================================================
// CONTROLS
// =============================================================================
export { 
// Framework
fedrampModerateFramework, fedrampModerateControls, 
// Utility Functions
getControlsByFamily, getControlById, getControlsByResponsibility, getControlsByStatus, getAutomatedControls, calculateImplementationPercentage, getControlFamiliesSummary, 
// Constants
CONTROL_RESPONSIBILITIES, CONTROL_ORIGINATIONS, IMPACT_LEVELS, } from './controls.js';
// =============================================================================
// POA&M
// =============================================================================
export { POAMService, 
// Constants
POAM_STATUSES, WEAKNESS_SOURCES, RISK_LEVELS, DEVIATION_TYPES, DEVIATION_STATUSES, 
// Schemas
milestoneSchema, poamItemSchema, deviationRequestSchema, } from './poam.js';
// =============================================================================
// BOUNDARY
// =============================================================================
export { BoundaryService, 
// Constants
COMPONENT_TYPES, COMPONENT_STATUSES, DATA_CLASSIFICATIONS, CONNECTION_TYPES, INTERCONNECTION_TYPES, EXTERNAL_SERVICE_TYPES, 
// Schemas
systemComponentSchema, dataFlowSchema, networkZoneSchema, systemInterconnectionSchema, externalServiceSchema, diagramMetadataSchema, } from './boundary.js';
// =============================================================================
// INCIDENT REPORTING
// =============================================================================
export { IncidentReportingService, 
// Constants
INCIDENT_CATEGORIES, INCIDENT_CATEGORY_DEFINITIONS, INCIDENT_STATUSES, NOTIFICATION_RECIPIENTS, EVIDENCE_TYPES, 
// Schemas
preservedEvidenceSchema, incidentNotificationSchema, securityIncidentSchema, } from './incident-reporting.js';
// =============================================================================
// ASSESSMENT
// =============================================================================
export { AssessmentService, 
// Constants
ASSESSMENT_TYPES as ASSESSMENT_SERVICE_TYPES, ASSESSMENT_STATUSES, FINDING_STATUSES, FINDING_RISK_LEVELS, PACKAGE_DOCUMENT_TYPES, 
// Schemas
assessmentFindingSchema, controlTestResultSchema, packageDocumentSchema, } from './assessment.js';
// =============================================================================
// METRICS
// =============================================================================
export { MetricsService, 
// Constants
TIME_PERIODS, TREND_DIRECTIONS, } from './metrics.js';
// =============================================================================
// SSP GENERATOR
// =============================================================================
export { SSPGeneratorService, 
// Constants
SSP_SECTIONS, EXPORT_FORMATS, } from './ssp-generator.js';
// =============================================================================
// CONVENIENCE FACTORY FUNCTIONS
// =============================================================================
import { ContinuousMonitoringService } from './continuous-monitoring.js';
import { POAMService } from './poam.js';
import { BoundaryService } from './boundary.js';
import { IncidentReportingService } from './incident-reporting.js';
import { AssessmentService } from './assessment.js';
import { MetricsService } from './metrics.js';
import { SSPGeneratorService } from './ssp-generator.js';
/**
 * Create a complete FedRAMP compliance module
 */
export function createFedRAMPModule(config) {
    const conmonConfig = {
        organizationName: config.organizationName,
        systemName: config.systemName,
        authorizationLevel: config.authorizationLevel,
        atoDate: config.atoDate,
        atoExpirationDate: config.atoExpirationDate,
        remediationTimeframes: {
            critical: config.authorizationLevel === 'high' ? 15 : 30,
            high: 30,
            moderate: 90,
            low: 180,
        },
        scanners: [],
        notifications: {
            enabled: true,
            emailRecipients: [config.isso.email],
            scanCompletionNotify: true,
            overdueNotify: true,
            overdueDaysThreshold: 7,
        },
    };
    const poamConfig = {
        organizationName: config.organizationName,
        systemName: config.systemName,
        isso: config.isso,
        systemOwner: config.systemOwner,
        authorizingOfficial: config.authorizingOfficial || config.systemOwner,
        idPrefix: 'POAM',
        autoCalculateOverdue: true,
        upcomingDeadlineThreshold: 14,
    };
    const boundaryConfig = {
        systemName: config.systemName,
        organizationName: config.organizationName,
        boundaryDescription: `Authorization boundary for ${config.systemName}`,
        authorizationLevel: config.authorizationLevel,
        primaryDataCenter: 'Primary Data Center',
    };
    const incidentConfig = {
        organizationName: config.organizationName,
        systemName: config.systemName,
        fedrampPackageId: config.fedrampPackageId || 'PENDING',
        isso: { ...config.isso, phone: config.isso.phone || '' },
        ciso: { ...config.isso, phone: config.isso.phone || '' },
        usCertPoc: { name: 'US-CERT', email: 'soc@cisa.gov', phone: '888-282-0870' },
        fedrampPmoPoc: { name: 'FedRAMP PMO', email: 'info@fedramp.gov' },
        evidenceRetentionDays: 365,
        autoEscalation: true,
    };
    const assessmentConfig = {
        systemName: config.systemName,
        organizationName: config.organizationName,
        fedrampPackageId: config.fedrampPackageId,
        authorizationLevel: config.authorizationLevel,
        isso: config.isso,
        systemOwner: config.systemOwner,
    };
    const metricsConfig = {
        systemName: config.systemName,
        atoDate: config.atoDate,
        atoExpirationDate: config.atoExpirationDate,
        authorizationLevel: config.authorizationLevel,
        remediationSLAs: {
            critical: config.authorizationLevel === 'high' ? 15 : 30,
            high: 30,
            moderate: 90,
            low: 180,
        },
        monthlyScanRequirementDay: 15,
        trackHistory: true,
    };
    const sspConfig = {
        templateVersion: 'Rev 5',
        includeAppendices: true,
        includeDiagrams: true,
        defaultExportFormat: 'json',
    };
    return {
        conmon: new ContinuousMonitoringService(conmonConfig),
        poam: new POAMService(poamConfig),
        boundary: new BoundaryService(boundaryConfig),
        incidents: new IncidentReportingService(incidentConfig),
        assessment: new AssessmentService(assessmentConfig),
        metrics: new MetricsService(metricsConfig),
        sspGenerator: new SSPGeneratorService(sspConfig),
    };
}
// =============================================================================
// DEFAULT EXPORT
// =============================================================================
export default {
    ContinuousMonitoringService,
    POAMService,
    BoundaryService,
    IncidentReportingService,
    AssessmentService,
    MetricsService,
    SSPGeneratorService,
    createFedRAMPModule,
};
//# sourceMappingURL=index.js.map