"""Retired unauthenticated Supraworx upload helpers.

Production delivery uses the authenticated, durable DataHub outbox in
``main.integrations.datahub``. These compatibility functions deliberately
fail before opening a network connection.
"""

from __future__ import annotations


LEGACY_UPLOAD_DISABLED_MESSAGE = (
    "Legacy Supraworx upload is retired: use the authenticated DataHub outbox"
)


class LegacySupraworxUploadDisabledError(RuntimeError):
    """Raised for calls to the retired direct-upload client."""


def _disabled(*_args, **_kwargs):
    raise LegacySupraworxUploadDisabledError(LEGACY_UPLOAD_DISABLED_MESSAGE)


def send_to_supraworx(result, additional_json):
    """Reject the legacy direct JSON upload."""

    _disabled(result, additional_json)


def send_image_to_supraworx(image_buffer):
    """Reject the legacy direct image upload."""

    _disabled(image_buffer)
