from __future__ import annotations

from ._auth import build_auth_headers, resolve_api_key
from ._errors import (
    APIError,
    AuthenticationError,
    BadRequestError,
    ConnectError,
    GunSpecError,
    InternalServerError,
    NotFoundError,
    PermissionDeniedError,
    RateLimitError,
    RequestTimeoutError,
    create_api_error,
)
from ._http_client import (
    DEFAULT_BASE_URL,
    DEFAULT_TIMEOUT,
    SDK_USER_AGENT,
    APIResponse,
    AsyncHttpClient,
    HttpClientConfig,
    PaginatedResponse,
    PaginationMeta,
    RateLimitInfo,
    SyncHttpClient,
    serialize_query,
)
from ._pagination import AsyncPage, SyncPage
from ._retry import RetryConfig, async_with_retry, compute_delay, is_retryable, with_retry

__all__ = [
    # Errors
    "GunSpecError",
    "APIError",
    "AuthenticationError",
    "PermissionDeniedError",
    "NotFoundError",
    "BadRequestError",
    "RateLimitError",
    "InternalServerError",
    "ConnectError",
    "RequestTimeoutError",
    "create_api_error",
    # Auth
    "resolve_api_key",
    "build_auth_headers",
    # HTTP client
    "SyncHttpClient",
    "AsyncHttpClient",
    "HttpClientConfig",
    "APIResponse",
    "PaginatedResponse",
    "PaginationMeta",
    "RateLimitInfo",
    "serialize_query",
    "DEFAULT_BASE_URL",
    "DEFAULT_TIMEOUT",
    "SDK_USER_AGENT",
    # Pagination
    "SyncPage",
    "AsyncPage",
    # Retry
    "RetryConfig",
    "is_retryable",
    "compute_delay",
    "with_retry",
    "async_with_retry",
]
