Files
supabase/packages/api-types
Monica Khoury d0cf8dbc50 fix: align webhook FE with updated API changes (#51800)
## What
Aligns the webhooks FE with backend changes confirmed by Pawel
(FE-4621):

1. `custom_headers` is optional but never null, matches the updated
contract.
2. Removed the client-only `name` field (never persisted by the API).
Display name is now the endpoint's URL plus its subscribed event types.
3. The deliveries list endpoint now returns the full `event` object, so
`eventType`/`eventPayload` are always populated. Added an Event column
to the deliveries table.

Also regenerates `packages/api-types` from production to pick up these
changes.

While testing, found and fixed two more related issues:

4. A delivery can briefly exist before the backend finishes attaching
its event data, regardless of what triggered it (test, retry, or real
traffic). The deliveries list now polls every 5s while open, so new or
still-settling deliveries fill in automatically instead of requiring a
manual refresh.
5. "Send test event" always defaulted to an unrelated sample event type.
The test endpoint actually accepts a specific `event_type`, so this now
sends the endpoint's own subscribed type automatically, or shows a
picker when there's more than one to choose from.

## Testing
All webhooks component/unit tests pass (30/30), typecheck and lint
clean. Manually verified on localhost against a live backend.

## Note
This may clash with #51614 (`custom_headers: null` in a test fixture, no
longer a valid value once this merges). Will follow up there after this
lands.
2026-10-15 20:17:56 +03:00
..
2026-08-13 11:17:18 +02:00