From 67b7ea74b7c8f45483f7e93a207bc7521ba93a24 Mon Sep 17 00:00:00 2001 From: Tyler Hoang Date: Sun, 14 Jun 2026 02:27:21 -0700 Subject: feat: add FilingsResponse schema --- backend/app/schemas.py | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/backend/app/schemas.py b/backend/app/schemas.py index b1d934a..aafe45d 100644 --- a/backend/app/schemas.py +++ b/backend/app/schemas.py @@ -234,5 +234,42 @@ class InsidersResponse(BaseModel): transactions: list[InsiderTransaction] = Field(default_factory=list) +class FilingItem(BaseModel): + date: str + form: str + title: str + url: str | None = None + + +class FilingKpis(BaseModel): + total: int + count_10k: int + count_10q: int + count_8k: int + distinct_forms: int + + +class FormMixRow(BaseModel): + form: str + count: int + pct: float + + +class CadencePoint(BaseModel): + month: str # "YYYY-MM" + count_10k: int + count_10q: int + count_8k: int + count_other: int + + +class FilingsResponse(BaseModel): + kpis: FilingKpis + cadence: list[CadencePoint] = Field(default_factory=list) + form_mix: list[FormMixRow] = Field(default_factory=list) + readout: str + filings: list[FilingItem] = Field(default_factory=list) + + class ErrorResponse(BaseModel): detail: str -- cgit v1.3-2-g0d8e