//! Typed Rust client for the fin-proxy financial-data API.
//!
//! ```no_run
//! # async fn run() -> Result<(), fin_proxy_client::SdkError> {
//! use fin_proxy_client::{FinProxy, fmp::{StatementParams, Period}};
//! let client = FinProxy::new("https://api.example.com")?.with_api_key("unkey_xxx");
//! let inc = client.fmp()
//!     .income_statement(&StatementParams::new("AAPL").period(Period::Annual).limit(8))
//!     .await?;
//! println!("{} rows", inc.results.unwrap_or_default().len());
//! # Ok(()) }
//! ```

pub mod client;
pub mod envelope;
pub mod equity;
pub mod error;
pub mod finmind;
pub mod fmp;
pub mod fred;
pub mod galaxyark;
pub mod polygon;
pub mod sec;
pub mod twse;

pub use client::FinProxy;
pub use error::SdkError;

/// Re-exported upstream response types so consumers don't depend on motosan directly.
pub mod types {
    pub use motosan_finance::{
        EconomyFredData, EconomyFredSeriesInfo, EquityHistoricalData, EquityProfileData,
        EquityQuoteData, FinanceResult,
    };
    pub use motosan_finance_fmp::{AnalystConsensus, BalanceSheetStatement, CashFlowStatement, EarningsData, IncomeStatement};
    pub use motosan_finance_twse::{
        ForeignOwnership, InstitutionalFlow, MarginTrading, ShareholderDistribution,
        ShareholderTier, StockDayRecord,
    };
    pub use motosan_finance_sec::{EpsHistory, InsiderTransaction, InsiderTransactionType, SecFiling};
    pub use motosan_finance_polygon::NewsArticle;
}
