"""PalPluss Python SDK — Official client library for the PalPluss payments API."""

from importlib.metadata import PackageNotFoundError, version

try:
    __version__ = version("palpluss")
except PackageNotFoundError:  # pragma: no cover
    __version__ = "unknown"

from .client import AsyncPalPluss, PalPluss
from .http.errors import PalPlussApiError, RateLimitError
from .types.b2c import B2cPayoutResponse
from .types.channels import PaymentWalletChannel
from .types.common import ChannelType, TransactionStatus, TransactionType
from .types.stk import StkInitiateResponse
from .types.transactions import Transaction, TransactionListResponse
from .types.wallets import ServiceTopupResponse, ServiceWalletBalance
from .types.webhooks import WebhookEventType, WebhookPayload, WebhookTransaction
from .webhooks import parse_webhook_payload

__all__ = [
    # Package version
    "__version__",
    # Clients
    "PalPluss",
    "AsyncPalPluss",
    # Errors
    "PalPlussApiError",
    "RateLimitError",
    # Utilities
    "parse_webhook_payload",
    # Types
    "TransactionStatus",
    "TransactionType",
    "ChannelType",
    "StkInitiateResponse",
    "B2cPayoutResponse",
    "ServiceWalletBalance",
    "ServiceTopupResponse",
    "Transaction",
    "TransactionListResponse",
    "PaymentWalletChannel",
    "WebhookTransaction",
    "WebhookEventType",
    "WebhookPayload",
]
