"""Public app_platform exports for the extracted platform package."""

from .db import (
    AuthenticationError,
    ConnectionError,
    DataConsistencyError,
    DatabaseClientBase,
    DatabaseError,
    DatabasePermissionError,
    MigrationError,
    NotFoundError,
    PoolExhaustionError,
    PoolManager,
    SchemaError,
    SessionManager,
    SessionNotFoundError,
    TimeoutError,
    TransactionError,
    ValidationError,
    get_db_session,
    get_pool,
    handle_database_error,
    is_recoverable_error,
    log_database_error,
    run_migration,
    run_migrations_dir,
)
from .logging import (
    APP_LOG_FORMAT,
    DEDUP_WINDOW_S,
    JSON_LOG_FORMAT,
    MAX_DEDUP_KEYS,
    SLOW_OPERATION_THRESHOLD,
    VERY_SLOW_OPERATION_THRESHOLD,
    LoggingManager,
    clear_log_context,
    configure_logging,
    get_logger,
    get_logging_manager,
    log_alert,
    log_error,
    log_errors,
    log_event,
    log_operation,
    log_service_status,
    log_slow_operation,
    log_timing,
    set_log_context,
)
from .middleware import (
    ApiKeyRegistry,
    DEFAULT_HEADERS,
    DEFAULT_METHODS,
    DEFAULT_SESSION_SECRET,
    MiddlewareConfig,
    RateLimitConfig,
    add_rate_limit_handler,
    add_validation_error_handler,
    configure_cors,
    configure_middleware,
    configure_sessions,
    create_limiter,
    resolve_session_secret,
)

__all__ = [
    "APP_LOG_FORMAT",
    "ApiKeyRegistry",
    "AuthenticationError",
    "ConnectionError",
    "DEDUP_WINDOW_S",
    "DEFAULT_HEADERS",
    "DEFAULT_METHODS",
    "DEFAULT_SESSION_SECRET",
    "DataConsistencyError",
    "DatabaseClientBase",
    "DatabaseError",
    "DatabasePermissionError",
    "JSON_LOG_FORMAT",
    "LoggingManager",
    "MAX_DEDUP_KEYS",
    "MigrationError",
    "MiddlewareConfig",
    "NotFoundError",
    "PoolExhaustionError",
    "PoolManager",
    "RateLimitConfig",
    "SLOW_OPERATION_THRESHOLD",
    "SchemaError",
    "SessionManager",
    "SessionNotFoundError",
    "TimeoutError",
    "TransactionError",
    "VERY_SLOW_OPERATION_THRESHOLD",
    "ValidationError",
    "clear_log_context",
    "configure_logging",
    "configure_cors",
    "configure_middleware",
    "configure_sessions",
    "get_db_session",
    "get_logger",
    "get_logging_manager",
    "get_pool",
    "handle_database_error",
    "is_recoverable_error",
    "create_limiter",
    "log_alert",
    "log_error",
    "log_database_error",
    "log_errors",
    "log_event",
    "log_operation",
    "log_service_status",
    "log_slow_operation",
    "log_timing",
    "add_rate_limit_handler",
    "add_validation_error_handler",
    "resolve_session_secret",
    "run_migration",
    "run_migrations_dir",
    "set_log_context",
]
