Webhook deliveries log — Table block

Pro

table-webhook-deliveries-log · for app, settings, developers pages

Webhook deliveries log

An endpoint’s page in developer settings: a dense table of deliveries (status, event, HTTP code, time, duration), each row opening in place on its request, its response and "Retry" when it failed.

Documentation

Installation

One command copies the block into your project with the shadcn CLI (the registry is set once: Installation).

pnpm dlx shadcn-vue@latest add @trame/table-webhook-deliveries-log

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import TableWebhookDeliveriesLog from '@/components/trame/blocks/table/table-webhook-deliveries-log.vue'

const props = {
endpoint: {
url: "https://api.harbor-lane.example/hooks/billing",
description: "Billing sync for the ledger",
status: "active"
},
deliveries: [
{
id: "dl_0c41",
event: "invoice.paid",
status: "failed",
code: 500,
at: "Mar 4, 10:22:07",
duration: "2.4 s",
attempt: 3,
request: "{\n \"id\": \"evt_0c41\",\n \"type\": \"invoice.paid\",\n \"created\": 1772619727,\n \"data\": {\n \"object\": {\n \"id\": \"inv_0c41\",\n \"customer\": \"cus_8QwL2m\",\n \"amount_paid\": 48000,\n \"currency\": \"usd\",\n \"status\": \"paid\"\n }\n }\n}",
response: "HTTP/1.1 500 Internal Server Error\ncontent-type: text/html\n\n<html><body><h1>500</h1><p>Upstream ledger service unavailable.</p></body></html>"
},
{
id: "dl_0c40",
event: "invoice.created",
status: "succeeded",
code: 200,
at: "Mar 4, 10:21:55",
duration: "182 ms",
attempt: 1,
request: "{\n \"id\": \"evt_0c40\",\n \"type\": \"invoice.created\",\n \"created\": 1772619727,\n \"data\": {\n \"object\": {\n \"id\": \"inv_0c40\",\n \"customer\": \"cus_8QwL2m\",\n \"amount_paid\": 48000,\n \"currency\": \"usd\",\n \"status\": \"paid\"\n }\n }\n}",
response: "{\n \"received\": true\n}"
}
],
filters: [
{
label: "All",
action: "deliveriesAll",
current: true,
count: 128
},
{
label: "Succeeded",
action: "deliveriesSucceeded",
current: false,
count: 119
}
],
retry: {
label: "Retry",
action: "retryDelivery"
},
more: {
label: "Older deliveries",
action: "olderDeliveries"
},
title: "Recent deliveries"
}
</script>

<template>
<TableWebhookDeliveriesLog v-bind="props" />
</template>

Props

Each prop says who changes it: Words, Picture, Action, Design, Data.* required.

PropTypeDescription
endpoint*Endpointthe endpoint whose deliveries these are
deliveries*Delivery[]the deliveries to that endpoint, newest first, one page as the host answers it
filtersFilter[]the host’s own filter links, e.g. "All", "Succeeded", "Failed"; the host answers each address with the matching page
retryRetrythe retry offered on failed deliveries only; absent, the log is read-only
moreMorea link to older deliveries, e.g. "Older deliveries"
titlestringWordsthe block’s heading, e.g. "Recent deliveries"; absent, the blocks’ own word for deliveries
optionsOptionsthe block’s settings, read by every variant
Endpoint endpoint · 3 props
PropTypeDescription
url*stringDatathe endpoint’s address, without credentials, e.g. "https://api.example/hooks/billing"
descriptionstringWordswhat the endpoint is for, in the host’s words, e.g. "Billing sync"
status'active' | 'disabled'whether the host still sends events there: "active" or "disabled"; absent: not shown
Delivery deliveries[] · 10 props
PropTypeDescription
id*string | numberDatathe record’s id in the tool that answers it
event*stringWordsthe event that was sent, as the host names it, e.g. "invoice.paid"
status*'succeeded' | 'failed' | 'pending' | 'retrying'how the delivery stands: "succeeded" the endpoint answered 2xx, "failed" it gave up or the last attempt failed, "pending" not sent yet, "retrying" a later attempt is scheduled
codenumberthe HTTP status the endpoint answered, e.g. 500; absent: no answer (a timeout, a refused connection, not sent yet)
at*stringWordswhen it was sent, in the host’s words, e.g. "Mar 4, 10:22:07"
durationstringWordshow long the endpoint took to answer, in the host’s words, e.g. "182 ms"
attemptnumberwhich attempt this is, counting from 1
nextRetrystringWordswhen the host tries again, in its words, e.g. "in 4 minutes"
requeststringDatathe body that was sent, as the host stored it (usually JSON), shown whole in monospace
responsestringDatathe body the endpoint answered, as the host stored it, shown whole in monospace
Filter filters[] · 6 props
PropTypeDescription
label*stringWordsthe link’s words, e.g. "See the collection"
actionstringActiona named action of the page
recordRecord<string, unknown>Datathe record the action applies to, passed to the host with it, if any
urlstringDesignan address outside the app
currentbooleantrue: the filter shown now
countnumberhow many deliveries the filter holds, as the host counts them
Retry retry · 2 props
PropTypeDescription
label*stringWordsthe retry button, e.g. "Retry"
action*stringActionsends a failed delivery again: posts `id`, the delivery’s id; hidden when the page lacks it
More more · 4 props
PropTypeDescription
label*stringWordsthe link’s words, e.g. "See the collection"
actionstringActiona named action of the page
recordRecord<string, unknown>Datathe record the action applies to, passed to the host with it, if any
urlstringDesignan address outside the app
Options options · 1 props
PropTypeDescription
mood'inverse' | 'brand' | 'warm' | 'tint' | stringa band of the page that redefines the theme surfaces inside it
What it asks your app for

The block never knows your app: it asks it, through one context provided once, where its links lead, what its actions do, how a price reads and which words to say (The host context).

MemberWhat it is for
hrefthe address an action leads to, or null to hide what leads there
actruns a change (subscribe, add to cart, save) and answers { ok } or { ok: false, error }
canwhether the page has this action
Linkyour router’s link component
cartCountthe cart badge’s number
cartDrawerwhether your app has a cart drawer
cartOpenwhether the cart drawer is open
labelyour word for an interface key, or undefined to keep the block’s own

The words it says itself, in English and French; label(key) replaces any of them:

KeyEnglishFrench
newsletter.alreadyYou are already subscribed.Vous êtes déjà inscrit.
newsletter.doneDone: you are subscribed.C’est noté : vous êtes inscrit.
newsletter.invalidCheck the email address.Vérifiez l’adresse e-mail.
newsletter.tooManyToo many attempts, try again in a moment.Trop de tentatives, réessayez dans un moment.

Features

  • Every word in the server HTML
  • Same markup in Vue and React
  • Theme tokens only: every theme, light and dark
  • Shows what you give it, invents nothing
  • No motion; still under reduced motion
  • Real buttons and links, a visible focus
  • Asks your app through actions: filters[], delivery.retry, more
  • Reads webhookDeliveries from your app

A table section, for app, settings, developers pages; it uses @lucide/vue, class-variance-authority, clsx, reka-ui, tailwind-merge.

Built with

The components this block is made of; each one installs on its own too.

More table blocks

  • Resource totals: records whose amounts matter together: a footer with the selection count and the list’s own totals.
  • Spreadsheet grid: Edit a dense table with a frozen first column and row selection, then save the edits in one go.
  • Spreadsheet summary bar: Keep the selection count and numeric sum prominent above the editable grid, saved in one go.
  • Stage rows track cards: fewer records each needing a next step: one card per record with a status sentence, the labelled track full width and the action beside it, filters in a rail.
  • Stage rows track: many records followed at a glance (shipments, sales orders): a table whose progress column is a row of joined dots, an exception named in words.
  • Stock levels filter rail: a long inventory narrowed often: filters in a left rail beside dense rows (a "Filters" sheet on a phone).
  • Stock levels meter cards: a small catalogue checked by its pictures: a grid of compact cards, prices in two figures and the stock bar at the foot.
  • Stock levels meter: a merchant scanning many lines at once: a table whose stock column is a short bar against the reorder point, with the state in words.

All 24 table blocks