Skip to main content

finance_query/models/filings/
sections.rs

1//! Sectioned filing text and risk-factor models.
2//!
3//! Served through the [`Capability::FILINGS`](crate::Capability::FILINGS)
4//! route by EDGAR (best-effort HTML section extraction, keyless) or Polygon.
5
6use serde::{Deserialize, Serialize};
7
8/// Which filing form to fetch sectioned text for.
9#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
10#[non_exhaustive]
11pub enum FilingSectionForm {
12    /// Annual report (10-K) sections.
13    TenK,
14    /// Current report (8-K) text.
15    EightK,
16}
17
18/// One section of an SEC filing's text.
19#[derive(Debug, Clone, Default, Serialize, Deserialize)]
20#[non_exhaustive]
21pub struct FilingSection {
22    /// Section key/name (e.g. `"risk_factors"`, `"mdna"`).
23    pub section: Option<String>,
24    /// Section text content.
25    pub content: Option<String>,
26}
27
28/// A risk factor extracted from SEC filings.
29#[derive(Debug, Clone, Default, Serialize, Deserialize)]
30#[non_exhaustive]
31pub struct RiskFactor {
32    /// Risk factor title.
33    pub title: Option<String>,
34    /// Risk factor text.
35    pub text: Option<String>,
36    /// Risk category.
37    pub category: Option<String>,
38    /// Date of the filing the factor was extracted from (`YYYY-MM-DD`).
39    pub filing_date: Option<String>,
40}