vendor_connectors.meshy.webhooks.handler
Webhook handler for Meshy API callbacks.
Module Contents
Section titled “Module Contents”Classes
Section titled “Classes”WebhookHandler | Handle webhook callbacks from Meshy API. |
|---|
Functions
Section titled “Functions”_utc_now | Return current UTC time with timezone info. |
|---|
vendor_connectors.meshy.webhooks.handler._utc_now() → datetime.datetime
Section titled “vendor_connectors.meshy.webhooks.handler._utc_now() → datetime.datetime”Return current UTC time with timezone info.
class vendor_connectors.meshy.webhooks.handler.WebhookHandler(repository: vendor_connectors.meshy.persistence.repository.TaskRepository, download_artifacts: bool = True)
Section titled “class vendor_connectors.meshy.webhooks.handler.WebhookHandler(repository: vendor_connectors.meshy.persistence.repository.TaskRepository, download_artifacts: bool = True)”Handle webhook callbacks from Meshy API.
This class processes webhook payloads, updates task state in the repository, and downloads artifacts on successful completion.
Initialization
Section titled “Initialization”Initialize webhook handler.
Args: repository: TaskRepository for updating state download_artifacts: Whether to download GLB files on SUCCEEDED
handle_webhook(payload: vendor_connectors.meshy.webhooks.schemas.MeshyWebhookPayload, project: str | None = None, spec_hash: str | None = None) → dict[str, Any]
Section titled “handle_webhook(payload: vendor_connectors.meshy.webhooks.schemas.MeshyWebhookPayload, project: str | None = None, spec_hash: str | None = None) → dict[str, Any]”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: Dict with status and details
_download_glb_artifact(project: str, spec_hash: str, service: str, glb_url: str) → vendor_connectors.meshy.persistence.schemas.ArtifactRecord | None
Section titled “_download_glb_artifact(project: str, spec_hash: str, service: str, glb_url: str) → vendor_connectors.meshy.persistence.schemas.ArtifactRecord | None”Download GLB artifact and create record.
verify_signature(payload: bytes, signature: str) → bool
Section titled “verify_signature(payload: bytes, signature: str) → bool”Verify webhook signature (stubbed for testing).