Allow testing webhook response in setup flow (#3768)

This commit is contained in:
Marc Kelechava
2025-10-20 17:35:52 -07:00
committed by GitHub
parent a11189361b
commit 94aa66c241
10 changed files with 820 additions and 32 deletions

View File

@@ -0,0 +1,17 @@
from typing import Literal
from pydantic import BaseModel, Field
class TestWebhookRequest(BaseModel):
webhook_url: str = Field(..., description="The webhook URL to test")
run_type: Literal["task", "workflow_run"] = Field(..., description="Type of run to simulate")
run_id: str | None = Field(None, description="Optional run ID to include in the sample payload")
class TestWebhookResponse(BaseModel):
status_code: int | None = Field(None, description="HTTP status code from the webhook receiver")
latency_ms: int = Field(..., description="Round-trip time in milliseconds")
response_body: str = Field(..., description="First 2KB of the response body")
headers_sent: dict[str, str] = Field(..., description="Headers sent with the webhook request")
error: str | None = Field(None, description="Error message if the request failed")