"""Composer API models organized by endpoint sections."""

# Common models (shared across all sections)
# Accounts section
from .accounts import (
    Account,
    AccountInfo,
    AccountsListResponse,
    AccountType,
    Address,
    AssetClass,
    AvailableAccountType,
    BuyingPower,
    Contact,
    DirectTradableAssetClasses,
    FootprintPlaybook,
    Holding,
    Identity,
    IncomeRange,
    InvestorDocument,
    InvestorDocumentCategory,
    InvestorProfile,
    OptionsDetails,
    SupportedRegionsResponse,
    SupportedRegionStates,
    Trade,
    TradeHistoryItem,
    TradeVolumeResponse,
    TrustedContact,
)

# Backtest section
from .backtest import (
    AISymphonyDescription,
    ApplySubscription,
    AssetClass as BacktestAssetClass,
    BacktestExistingSymphonyRequest,
    # Request models
    BacktestRequest,
    BacktestResult,
    # Enums
    BacktestVersion,
    Broker,
    # Response models
    Costs,
    DataWarning,
    DraftSymphoniesResponse,
    DraftSymphony,
    Indicator,
    IndicatorParameter,
    LegendEntry,
    ParameterType,
    Quote,
    RebalanceRequest,
    RebalanceResult,
    # Symphony models
    SymphonyDetail,
    SymphonyMeta,
    SymphonyMetaResponse,
    SymphonyRebalanceState,
    SymphonyRunResult,
    SymphonyTickersResponse,
    SymphonyVersionInfo,
    TickersResponse,
    UserSymphoniesResponse,
    UserSymphony,
    WatchlistResponse,
    WatchlistSymphony,
)

# Cash section
from .cash import (
    ACHLimits,
    ACHRelationship,
    ACHRelationshipsResponse,
    ACHTransfer,
    Frequency,
    RecurringDeposit,
    RecurringDepositMeta,
    RecurringDepositProjection,
    RecurringDepositProjectionReason,
    RecurringDepositsMeta,
    RecurringDepositsResponse,
    RecurringDepositStatus,
    TaxWithholding,
    TransferConstraints,
)
from .common import (
    Asset,
    BaseNode,
    BenchmarkStats,
    Empty,
    Filter,
    # Symphony types
    Function,
    Group,
    If,
    IfChildFalse,
    IfChildTrue,
    RebalanceFrequency,
    RegressionMetrics,
    Stats,
    SymphonyDefinition,
    SymphonyScore,
    WeightCashEqual,
    WeightCashSpecified,
    WeightInverseVol,
    WeightMap,
    validate_symphony_score,
)

# Dry Run section
from .dry_run import (
    AccountDryRunResult,
    DryRunRequest,
    DryRunResult,
    PreviewRecommendedTrade,
    RecommendedTrade,
    TradePreviewRequest,
    TradePreviewResult,
    TradeSide,
)

# Market Data section
from .market_data import (
    ContractType,
    OptionContract,
    OptionContractDetails,
    OptionDayData,
    OptionGreeks,
    OptionsChainResponse,
    OptionsContractResponse,
    OptionSortBy,
    OptionsOverview,
    PayoffStatus,
    QuotePrice,
    SortOrder,
)

# Portfolio section
from .portfolio import (
    ActivityHistoryItem,
    ActivityHistoryResponse,
    DeployHistoryItem,
    DeployHistoryResponse,
    HoldingAllocation,
    HoldingStats,
    HoldingStatsResponse,
    PortfolioHistory,
    PositionDirection,
    SymphonyAllocation,
    SymphonyHolding,
    SymphonyHoldingAllocation,
    SymphonyHoldings,
    SymphonyStats,
    SymphonyStatsMeta,
    SymphonyStatsMetaResponse,
    SymphonyStatsResponse,
    TimeSeries,
    TotalStats,
)

# Reports section
from .reports import ReportType

# Search section
from .search import (
    SearchSymphoniesRequest,
    SearchSymphonyResult,
    SymphonyAIDescription,
)

# Symphony section
from .symphony import (
    AssetClass as SymphonyAssetClass,
    Benchmark,
    BenchmarkType,
    CopySymphonyRequest,
    CopySymphonyResponse,
    CreateSymphonyRequest,
    CreateSymphonyResponse,
    SymphonyVersion,
    UpdateSymphonyNodesResponse,
    UpdateSymphonyResponse,
)

# Trading section
from .trading import (
    AssetClass as TradingAssetClass,
    CreateOrderRequest,
    CreateOrderResponse,
    ListOrdersResponse,
    OrderRequest,
    OrderSide,
    OrderSource,
    OrderStatus,
    OrderType,
    PositionIntent,
    TimeInForce,
)

# User section
from .user import (
    AgreementStatusResponse,
    JWTResponse,
    UserOnboardingExtraInfo,
    UserOnboardingState,
    UserOnboardingStateAccount,
    UserPreferences,
    UserPreferencesBanners,
    UserPreferencesOnboarding,
    UserPreferencesPortfolioGraph,
    UserPreferencesSymphonyTable,
    UserProfile,
)

# For backward compatibility, also export old model names
# These are deprecated and will be removed in a future version
BacktestResponse = BacktestResult

__all__ = [
    # Common stats
    "Stats",
    "BenchmarkStats",
    "RegressionMetrics",
    # Symphony types
    "Function",
    "RebalanceFrequency",
    "WeightMap",
    "BaseNode",
    "Asset",
    "Empty",
    "If",
    "IfChildTrue",
    "IfChildFalse",
    "Filter",
    "WeightInverseVol",
    "Group",
    "WeightCashEqual",
    "WeightCashSpecified",
    "SymphonyScore",
    "SymphonyDefinition",
    "validate_symphony_score",
    # Accounts
    "AssetClass",
    "DirectTradableAssetClasses",
    "Account",
    "Holding",
    "InvestorDocument",
    "InvestorDocumentCategory",
    "AccountsListResponse",
    "AccountType",
    "AvailableAccountType",
    "SupportedRegionsResponse",
    "SupportedRegionStates",
    "FootprintPlaybook",
    "Trade",
    "TradeVolumeResponse",
    "TradeHistoryItem",
    "Identity",
    "Address",
    "Contact",
    "IncomeRange",
    "InvestorProfile",
    "TrustedContact",
    "AccountInfo",
    "BuyingPower",
    # Portfolio
    "PositionDirection",
    "HoldingAllocation",
    "SymphonyAllocation",
    "SymphonyHoldingAllocation",
    "HoldingStats",
    "HoldingStatsResponse",
    "TotalStats",
    "SymphonyHolding",
    "SymphonyStats",
    "SymphonyStatsMeta",
    "SymphonyStatsMetaResponse",
    "SymphonyStatsResponse",
    "TimeSeries",
    "PortfolioHistory",
    "SymphonyHoldings",
    "ActivityHistoryItem",
    "ActivityHistoryResponse",
    "DeployHistoryItem",
    "DeployHistoryResponse",
    # Cash
    "TransferConstraints",
    "ACHRelationship",
    "ACHRelationshipsResponse",
    "ACHLimits",
    "TaxWithholding",
    "ACHTransfer",
    "Frequency",
    "RecurringDepositStatus",
    "RecurringDeposit",
    "RecurringDepositsResponse",
    "RecurringDepositMeta",
    "RecurringDepositsMeta",
    "RecurringDepositProjectionReason",
    "RecurringDepositProjection",
    # User
    "JWTResponse",
    "UserPreferences",
    "UserPreferencesOnboarding",
    "UserPreferencesPortfolioGraph",
    "UserPreferencesSymphonyTable",
    "UserPreferencesBanners",
    "UserOnboardingStateAccount",
    "UserOnboardingState",
    "UserOnboardingExtraInfo",
    "UserProfile",
    "AgreementStatusResponse",
    # Reports
    "ReportType",
    # Search
    "SymphonyAIDescription",
    "SearchSymphonyResult",
    "SearchSymphoniesRequest",
    # Symphony
    "SymphonyAssetClass",
    "BenchmarkType",
    "Benchmark",
    "CreateSymphonyRequest",
    "CreateSymphonyResponse",
    "CopySymphonyRequest",
    "CopySymphonyResponse",
    "UpdateSymphonyResponse",
    "UpdateSymphonyNodesResponse",
    "SymphonyVersion",
    # Trading
    "OrderStatus",
    "OrderSide",
    "OrderType",
    "TimeInForce",
    "PositionIntent",
    "TradingAssetClass",
    "OrderSource",
    "OptionsDetails",
    "OrderRequest",
    "CreateOrderRequest",
    "CreateOrderResponse",
    "ListOrdersResponse",
    # Market Data
    "ContractType",
    "PayoffStatus",
    "OptionSortBy",
    "SortOrder",
    "OptionGreeks",
    "QuotePrice",
    "OptionDayData",
    "OptionContractDetails",
    "OptionContract",
    "OptionsChainResponse",
    "OptionsContractResponse",
    "OptionsOverview",
    # Dry Run
    "TradeSide",
    "RecommendedTrade",
    "PreviewRecommendedTrade",
    "DryRunResult",
    "TradePreviewResult",
    "AccountDryRunResult",
    "DryRunRequest",
    "TradePreviewRequest",
    # Backtest enums
    "BacktestVersion",
    "Broker",
    "ApplySubscription",
    "ParameterType",
    "BacktestAssetClass",
    # Backtest symphony models
    "IndicatorParameter",
    "Indicator",
    "SymphonyMeta",
    "SymphonyMetaResponse",
    "SymphonyDetail",
    "SymphonyVersionInfo",
    "TickersResponse",
    "AISymphonyDescription",
    "UserSymphony",
    "DraftSymphony",
    "WatchlistSymphony",
    "UserSymphoniesResponse",
    "DraftSymphoniesResponse",
    "WatchlistResponse",
    "SymphonyTickersResponse",
    # Backtest models
    "BacktestRequest",
    "BacktestExistingSymphonyRequest",
    "Quote",
    "SymphonyRebalanceState",
    "RebalanceRequest",
    "Costs",
    "DataWarning",
    "LegendEntry",
    "BacktestResult",
    "SymphonyRunResult",
    "RebalanceResult",
    # Backward compatibility
    "BacktestResponse",
]
