"""Pydantic models for sFetch's API.""" from __future__ import annotations from pydantic import BaseModel, Field class SearchResult(BaseModel): id: int url: str title: str snippet: str indexed_at: str class ImageResult(BaseModel): id: int url: str page_url: str alt_text: str indexed_at: str class VideoResult(BaseModel): id: int url: str page_url: str title: str indexed_at: str class SearchResponse(BaseModel): query: str type: str = "web" total: int results: list[SearchResult] | list[ImageResult] | list[VideoResult] class CrawlRequest(BaseModel): seed_urls: list[str] = Field(min_length=1) max_depth: int = Field(default=2, ge=0, le=5) max_pages_per_domain: int = Field(default=50, ge=1, le=500) same_domain_only: bool = True