feat: Enhance security metrics handling with new thresholds and improved messaging
This commit is contained in:
@@ -14,26 +14,25 @@ export interface SecurityStatus {
|
||||
projectId: string;
|
||||
isHealthy: boolean;
|
||||
shouldDisable: boolean;
|
||||
twentyFourHour: SecurityRateData;
|
||||
sevenDay: SecurityRateData;
|
||||
allTime: SecurityRateData;
|
||||
isNewProject: boolean;
|
||||
violations: string[];
|
||||
warnings: string[];
|
||||
}
|
||||
|
||||
export interface SecurityThresholds {
|
||||
MIN_EMAILS_FOR_ENFORCEMENT: number;
|
||||
BOUNCE_7DAY_WARNING: number;
|
||||
BOUNCE_7DAY_CRITICAL: number;
|
||||
BOUNCE_ALLTIME_WARNING: number;
|
||||
BOUNCE_ALLTIME_CRITICAL: number;
|
||||
COMPLAINT_7DAY_WARNING: number;
|
||||
COMPLAINT_7DAY_CRITICAL: number;
|
||||
COMPLAINT_ALLTIME_WARNING: number;
|
||||
COMPLAINT_ALLTIME_CRITICAL: number;
|
||||
export type SecurityLevel = 'healthy' | 'warning' | 'critical';
|
||||
|
||||
export interface SecurityMetricLevels {
|
||||
bounce7Day: SecurityLevel;
|
||||
bounceAllTime: SecurityLevel;
|
||||
complaint7Day: SecurityLevel;
|
||||
complaintAllTime: SecurityLevel;
|
||||
}
|
||||
|
||||
export interface ProjectSecurityMetrics {
|
||||
status: SecurityStatus;
|
||||
thresholds: SecurityThresholds;
|
||||
levels: SecurityMetricLevels;
|
||||
isDisabled: boolean;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user