"""Core module for KubeMQ Python SDK."""

from __future__ import annotations

from kubemq.core.client import (
    AsyncBaseClient,
    BaseClient,
    NativeAsyncBaseClient,
)
from kubemq.core.config import (
    ClientConfig,
    JitterType,
    KeepAliveConfig,
    OperationTimeouts,
    RetryPolicy,
    TLSConfig,
    resolve_timeout,
)
from kubemq.core.exceptions import (
    ERROR_CLASSIFICATION,
    ErrorCategory,
    ErrorCode,
    KubeMQAuthenticationError,
    KubeMQBufferFullError,
    KubeMQCancellationError,
    KubeMQChannelError,
    KubeMQCircuitOpenError,
    KubeMQClientClosedError,
    KubeMQConfigurationError,
    KubeMQConnectionError,
    KubeMQConnectionNotReadyError,
    KubeMQError,
    KubeMQHandlerError,
    KubeMQMessageError,
    KubeMQStreamBrokenError,
    KubeMQTimeoutError,
    KubeMQTransactionError,
    KubeMQTransportError,
    KubeMQValidationError,
    classify_error,
    classify_tls_error,
    from_grpc_error,
)
from kubemq.core.health import (
    AsyncHealthChecker,
    HealthCheck,
    HealthChecker,
    HealthReport,
    HealthStatus,
)
from kubemq.core.messages import (
    BaseMessage,
    BaseReceivedMessage,
    BaseResponse,
)
from kubemq.core.types import (
    AnyErrorCallback,
    AsyncCallback,
    AsyncCloseable,
    AsyncCredentialProvider,
    AsyncErrorCallback,
    AsyncPingable,
    Callback,
    Closeable,
    ConnectionState,
    CredentialProvider,
    ErrorCallback,
    Pingable,
    ServerInfo,
    StartPosition,
    SubscribeType,
    SyncCallback,
    SyncErrorCallback,
)

__all__ = [
    # Exceptions and error types
    "ErrorCode",
    "ErrorCategory",
    "ERROR_CLASSIFICATION",
    "classify_error",
    "KubeMQError",
    "KubeMQConnectionError",
    "KubeMQAuthenticationError",
    "KubeMQTimeoutError",
    "KubeMQValidationError",
    "KubeMQChannelError",
    "KubeMQMessageError",
    "KubeMQTransactionError",
    "KubeMQConfigurationError",
    "KubeMQCircuitOpenError",
    "KubeMQClientClosedError",
    "KubeMQConnectionNotReadyError",
    "KubeMQBufferFullError",
    "KubeMQCancellationError",
    "KubeMQTransportError",
    "KubeMQHandlerError",
    "KubeMQStreamBrokenError",
    "classify_tls_error",
    "from_grpc_error",
    # Types
    "ConnectionState",
    "SubscribeType",
    "StartPosition",
    "ServerInfo",
    "CredentialProvider",
    "AsyncCredentialProvider",
    "SyncCallback",
    "AsyncCallback",
    "Callback",
    "ErrorCallback",
    "SyncErrorCallback",
    "AsyncErrorCallback",
    "AnyErrorCallback",
    "Closeable",
    "AsyncCloseable",
    "Pingable",
    "AsyncPingable",
    # Config
    "TLSConfig",
    "KeepAliveConfig",
    "ClientConfig",
    "JitterType",
    "RetryPolicy",
    "OperationTimeouts",
    "resolve_timeout",
    # Client
    "BaseClient",
    "AsyncBaseClient",
    "NativeAsyncBaseClient",
    # Messages
    "BaseMessage",
    "BaseResponse",
    "BaseReceivedMessage",
    # Health
    "HealthStatus",
    "HealthCheck",
    "HealthReport",
    "HealthChecker",
    "AsyncHealthChecker",
]
