from typing import List, Optional from pydantic import BaseModel class BulletAnalysis(BaseModel): """Analysis of a single resume bullet point against job requirements.""" location: str # e.g., "experience[0].bullets[2]" original_text: str relevance_score: int # 0-100 matched_keywords: List[str] = [] missing_keywords: List[str] = [] suggestion: str = "" # After customization (populated if bullet was modified) customized_text: Optional[str] = None new_relevance_score: Optional[int] = None keywords_added: List[str] = [] class LayoutWarning(BaseModel): """A single layout compatibility warning.""" type: str # "multi_column", "complex_table", "graphics" message: str recommendation: str class SafetyScan(BaseModel): """Results of layout safety analysis for ATS compatibility.""" has_issues: bool = False warnings: List[LayoutWarning] = [] class KeywordPlacement(BaseModel): """Analysis of where a keyword appears and if it's naturally integrated.""" keyword: str locations: List[str] = [] # Where the keyword appears is_natural: bool = True flag: Optional[str] = None # Warning message if unnatural