/**
 * Risk Scoring Engine
 * Multi-factor risk calculation with historical incident weighting and industry benchmarks
 */
import { TrustScore, RiskAssessment, VendorInfo, ComplianceCertification, SecurityRating, BreachRecord, HealthEvent } from './types';
export interface RiskScorerConfig {
    factorWeights: FactorWeights;
    industryBenchmarks: IndustryBenchmarks;
    incidentDecayRate: number;
    minimumDataQuality: number;
    gradeThresholds: GradeThresholds;
    riskThresholds: RiskThresholds;
}
export interface FactorWeights {
    security_posture: number;
    compliance: number;
    financial_stability: number;
    operational_resilience: number;
    data_protection: number;
    incident_history: number;
    reputation: number;
    contractual_compliance: number;
}
export interface IndustryBenchmarks {
    [industry: string]: {
        averageScore: number;
        percentiles: {
            p25: number;
            p50: number;
            p75: number;
            p90: number;
        };
        requiredCertifications: string[];
    };
}
export interface GradeThresholds {
    A: number;
    B: number;
    C: number;
    D: number;
}
export interface RiskThresholds {
    low: number;
    medium: number;
    high: number;
}
export declare class RiskScorer {
    private readonly config;
    private readonly scoreHistory;
    constructor(config?: Partial<RiskScorerConfig>);
    calculateTrustScore(input: TrustScoreInput): Promise<TrustScore>;
    private calculateFactors;
    private calculateSecurityPostureFactor;
    private calculateComplianceFactor;
    private calculateFinancialStabilityFactor;
    private calculateOperationalResilienceFactor;
    private calculateDataProtectionFactor;
    private calculateIncidentHistoryFactor;
    private calculateReputationFactor;
    private calculateContractualComplianceFactor;
    assessRisk(input: RiskAssessmentInput): Promise<RiskAssessment>;
    private categorizeRisks;
    private generateRecommendations;
    private generateRequiredActions;
    private getCategoryRecommendations;
    private applyBenchmarkAdjustment;
    private calculateDataQuality;
    private countUniqueSources;
    private calculateGrade;
    private calculateTrend;
    private calculateConfidence;
    private storeScoreHistory;
    private getValidityDuration;
    private calculateBreachSeverity;
    private creditRatingToScore;
    private scoreToRiskLevel;
    private calculateOverallRisk;
    private formatCategoryName;
    private getCategoryDescription;
    private getSuggestedMitigations;
    private getControlStatus;
    private generateAssessmentId;
    private getDefaultFactorWeights;
    private getDefaultBenchmarks;
}
export interface TrustScoreInput extends RiskAssessmentInput {
    vendorId: string;
}
export interface RiskAssessmentInput {
    vendorId: string;
    vendor: VendorInfo;
    securityRatings?: SecurityRating[];
    certifications?: ComplianceCertification[];
    breachRecords?: BreachRecord[];
    securityIncidents?: HealthEvent[];
    financialData?: FinancialData;
    securityQuestionnaire?: SecurityQuestionnaireResult;
    complianceGaps?: ComplianceGap[];
    slaPerformance?: SLAPerformance[];
    uptimeHistory?: UptimeHistory;
    disasterRecovery?: DisasterRecoveryInfo;
    dataProcessingTerms?: DataProcessingTermsInput;
    encryptionPractices?: EncryptionPractices;
    accessControls?: AccessControlsInfo;
    darkWebMentions?: DarkWebMention[];
    sanctionsMatches?: SanctionMatch[];
    newsSentiment?: NewsSentiment;
    industryRanking?: IndustryRanking;
    securityRequirements?: SecurityRequirementInput[];
    contractualAuditRights?: AuditRightsInfo;
    responseTimeMetrics?: ResponseTimeMetrics;
    securityControls?: SecurityControl[];
}
export interface FinancialData {
    source: string;
    creditRating?: string;
    revenueGrowth?: number;
    profitMargin?: number;
    debtToEquityRatio?: number;
    recentEvents?: FinancialEvent[];
}
export interface FinancialEvent {
    type: 'bankruptcy' | 'layoffs' | 'acquisition' | 'ipo' | 'funding';
    date: Date;
    description: string;
}
export interface SecurityQuestionnaireResult {
    score: number;
    completedAt: Date;
    responses: Record<string, unknown>;
}
export interface ComplianceGap {
    framework: string;
    control: string;
    description: string;
    severity: 'critical' | 'high' | 'medium' | 'low';
}
export interface SLAPerformance {
    name: string;
    target: number;
    actual: number;
    breachCount: number;
}
export interface UptimeHistory {
    averageUptime: number;
    majorOutages: number;
    minorIncidents: number;
}
export interface DisasterRecoveryInfo {
    planExists: boolean;
    testedRecently: boolean;
    rto?: number;
    rpo?: number;
}
export interface DataProcessingTermsInput {
    dataSubjectRights: boolean;
    breachNotificationHours: number;
    transferMechanisms: string[];
}
export interface EncryptionPractices {
    atRest: boolean;
    inTransit: boolean;
    keyManagement: 'strong' | 'adequate' | 'poor';
}
export interface AccessControlsInfo {
    mfaRequired: boolean;
    roleBasedAccess: boolean;
    privilegedAccessReviewFrequency: 'monthly' | 'quarterly' | 'annually' | 'never';
}
export interface DarkWebMention {
    mentionType: 'credential_dump' | 'data_sale' | 'discussion' | 'exploit';
    discoveredAt: Date;
    confidence: number;
}
export interface SanctionMatch {
    source: string;
    matchScore: number;
}
export interface NewsSentiment {
    negativeArticles: number;
    sentimentScore: number;
}
export interface IndustryRanking {
    percentile: number;
}
export interface SecurityRequirementInput {
    priority: 'mandatory' | 'recommended';
    verified: boolean;
}
export interface AuditRightsInfo {
    exists: boolean;
    exercised: boolean;
}
export interface ResponseTimeMetrics {
    averageResponseTime: number;
    targetResponseTime: number;
    escalationDelays: number;
}
export interface SecurityControl {
    id: string;
    name: string;
    implemented: boolean;
    effectiveness: 'strong' | 'adequate' | 'weak' | 'missing';
    lastVerified: Date;
}
export declare function createRiskScorer(config?: Partial<RiskScorerConfig>): RiskScorer;
//# sourceMappingURL=risk-scorer.d.ts.map