← Files Willy SEOARCHIVED FILE
src/types.ts
2.33 KB · Oct 2, 2026 · 00:34 UTC
export type Severity = 'critical' | 'warning' | 'info' | 'good';
export interface AuditCheck {
id: string;
category: 'technical' | 'onpage' | 'semantics' | 'schema' | 'performance';
name: string;
status: Severity;
score: number; // 0 a 100
weight: number; // peso en la categoría
message: string;
recommendation?: string;
snippet?: string;
}
export interface ExtractedPageData {
url: string;
statusCode: number;
responseTimeMs: number;
contentType: string;
headers: Record<string, string>;
title?: string;
metaDescription?: string;
metaRobots?: string;
canonical?: string;
h1: string[];
h2: string[];
h3: string[];
h4: string[];
images: Array<{
src: string;
alt: string;
hasAlt: boolean;
isLazy: boolean;
}>;
links: Array<{
href: string;
text: string;
isInternal: boolean;
isNofollow: boolean;
}>;
schemas: any[];
openGraph: Record<string, string>;
twitterCard: Record<string, string>;
wordCount: number;
rawText: string;
language?: string;
charset?: string;
viewport?: string;
}
export interface PillarScore {
name: string;
score: number; // 0 - 100
weight: number;
status: Severity;
checks: AuditCheck[];
}
export interface QuickWin {
title: string;
impact: 'high' | 'medium' | 'low';
effort: 'low' | 'medium' | 'high';
description: string;
solutionCode?: string;
}
export interface SerpPreviewData {
desktop: {
title: string;
pixelWidth: number;
isTruncated: boolean;
url: string;
description: string;
};
mobile: {
title: string;
pixelWidth: number;
isTruncated: boolean;
url: string;
description: string;
};
}
export interface SeoAuditReport {
brand: 'Willy SEO';
url: string;
targetKeyword?: string;
analyzedAt: string;
overallScore: number; // 0 - 100
overallStatus: 'Óptimo' | 'Mejorable' | 'Crítico';
summary: string;
quickWins: QuickWin[];
pillars: {
technical: PillarScore;
onpage: PillarScore;
semantics: PillarScore;
schema: PillarScore;
};
serpPreview: SerpPreviewData;
proposedSolutions: {
optimizedTitle?: string;
optimizedMetaDescription?: string;
recommendedHeadings?: string[];
schemaJsonLd?: string;
};
actionPlan: Array<{
step: number;
priority: 'Alta' | 'Media' | 'Baja';
task: string;
details: string;
}>;
}
SHA-256: 79eaeafb0548cbc5487768718127914ae9f4180bb42b20bab4dd2518d86fa3f6