vendor_fabric.meshy.webhooks.handler

Webhook handler for Meshy API callbacks.

Module Contents

Classes

WebhookHandler

Handle webhook callbacks from Meshy API.

API

class vendor_fabric.meshy.webhooks.handler.WebhookHandler(repository: vendor_fabric.meshy.persistence.repository.TaskRepository, download_artifacts: bool = True, webhook_secret: str | bytes | None = None)

Handle webhook callbacks from Meshy API.

This class processes webhook payloads, updates task state in the repository, and downloads artifacts on successful completion.

Initialization

Initialize webhook handler.

Args: repository: TaskRepository for updating state download_artifacts: Whether to download GLB files on SUCCEEDED webhook_secret: Shared secret used to verify HMAC-SHA256 signatures

handle_signed_webhook(payload: bytes, signature: str, project: str | None = None, spec_hash: str | None = None) extended_data.containers.ExtendedDict

Verify a raw webhook payload before parsing and processing it.

handle_webhook(payload: vendor_fabric.meshy.webhooks.schemas.MeshyWebhookPayload, project: str | None = None, spec_hash: str | None = None) extended_data.containers.ExtendedDict

Process webhook payload and update repository.

Args: payload: Parsed webhook payload project: Optional project name (will search if not provided) spec_hash: Optional spec hash (will search if not provided)

Returns: Extended dict with status and details.

verify_signature(payload: bytes, signature: str, *, secret: str | bytes | None = None) bool

Verify an HMAC-SHA256 webhook signature for a raw payload.