"""Data collection module for Tushare.

Provides simplified interfaces for fetching and storing Tushare data.
"""

from src.config.settings import Settings, get_settings, settings
from src.data.client import TushareClient
from src.data.storage import Storage, ThreadSafeStorage, DEFAULT_TYPE_MAPPING
from src.data.api_wrappers import get_stock_basic, sync_all_stocks
from src.data.db_manager import (
    TableManager,
    IncrementalSync,
    SyncManager,
    ensure_table,
    get_table_info,
    sync_table,
)
from src.data.catalog import (
    DatabaseCatalog,
    SQLQueryBuilder,
    build_context_lazyframe,
    TableMetadata,
    FieldMapping,
    TableFrequency,
)

__all__ = [
    # Configuration
    "Config",
    "get_config",
    # Core clients
    "TushareClient",
    # Storage
    "Storage",
    "ThreadSafeStorage",
    "DEFAULT_TYPE_MAPPING",
    # API wrappers
    "get_stock_basic",
    "sync_all_stocks",
    # Database management (new)
    "TableManager",
    "IncrementalSync",
    "SyncManager",
    "ensure_table",
    "get_table_info",
    "sync_table",
    # Data catalog
    "DatabaseCatalog",
    "SQLQueryBuilder",
    "build_context_lazyframe",
    "TableMetadata",
    "FieldMapping",
    "TableFrequency",
]
