diff options
| author | Tyler Hoang <tyler@tylerhoang.xyz> | 2026-06-14 02:27:21 -0700 |
|---|---|---|
| committer | Tyler Hoang <tyler@tylerhoang.xyz> | 2026-06-14 02:27:21 -0700 |
| commit | 67b7ea74b7c8f45483f7e93a207bc7521ba93a24 (patch) | |
| tree | 03fb428db56115cd528f536146033319c10aae5b /backend/app/schemas.py | |
| parent | 983efae815130f77ebdded15c4584e062e1f5eab (diff) | |
feat: add FilingsResponse schema
Diffstat (limited to 'backend/app/schemas.py')
| -rw-r--r-- | backend/app/schemas.py | 37 |
1 files changed, 37 insertions, 0 deletions
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 |
