WebhookEndpointField

Displays a webhook endpoint's URL and last-delivery status badge. The signing secret is never rendered.

Installation

pnpm dlx shadcn@latest add @shadmin/webhook-endpoint-field

Usage

import { WebhookEndpointField } from "@/components/admin";
 
<WebhookEndpointField source="endpoint" />;

Storage shape

interface WebhookEndpoint {
  url: string;
  secret: string;
  eventTypes: readonly string[];
  lastDelivery?: { status: "ok" | "failed" | "pending"; at: string };
}

Status badge

StatusColorSource
okgreenlastDelivery.status === "ok"
failedredlastDelivery.status === "failed"
pendingmutedlastDelivery is missing or status === "pending"