/** * Content Moderator * Provides content moderation, PII detection, and toxicity filtering */ import { ModerationResult, ModerationConfig, ModerationStats } from './types'; export declare class ContentModerator { private config; private stats; private piiPatterns; private toxicKeywords; constructor(config: ModerationConfig); /** * Moderate content */ moderate(content: string): Promise; /** * Check for harmful content categories */ private checkHarmfulContent; /** * Check specific category */ private checkCategory; /** * Calculate severity based on category and match count */ private calculateSeverity; /** * Detect PII in content */ private detectPII; /** * Get PII confidence score */ private getPIIConfidence; /** * Redact PII from content */ private redactPII; /** * Check toxicity (simplified - real implementation would use ML models like Perspective API) */ private checkToxicity; /** * Convert toxicity scores to flags */ private toxicityToFlags; /** * Apply custom moderation rules */ private applyCustomRules; /** * Determine overall action based on flags */ private determineAction; /** * Get moderation statistics */ getStats(): ModerationStats; /** * Reset statistics */ resetStats(): void; /** * Add custom PII pattern */ addCustomPIIPattern(name: string, pattern: RegExp): void; /** * Add toxic keyword */ addToxicKeyword(keyword: string): void; } //# sourceMappingURL=moderator.d.ts.map