Free, Open Source, Self-Hosted WhatsApp API Gateway
TypeScript apibotgatewayself-hostedwhatsappwhatsapp-apiwhatsapp-automationwhatsapp-botwhatsapp-gatewaywhatsapp-gateway-apiwhatsapp-webwhatsapp-web-api
docs: say which unsent webhook deliveries the outbox replays
Yudhi Armyndharisb428cf71d386
diff --git a/docs/05-database-design.md b/docs/05-database-design.mdindex 202553c97..477c58ced 100644--- a/docs/05-database-design.md+++ b/docs/05-database-design.md@@ -707,7 +707,7 @@ The data connection also owns:- **`templates`** — reusable message templates (`src/modules/template/entities/template.entity.ts`), with a unique constraint on `(sessionId, name)` — one template name per session.- **`status_updates`** — inbound status/story broadcasts with a 24-hour TTL (`src/modules/status-store/entities/status-update.entity.ts`); unique on `(sessionId, waStatusId)`. Attached media is stored via `StorageService`, not in the row.-- **`webhook_delivery_failures`** — durable record of a webhook delivery that exhausted its retries, or was not sent (attempts 0: shed, refused at shutdown, oversize or a preflight failure) and is pending replay (`src/modules/webhook/entities/webhook-delivery-failure.entity.ts`), surfaced via the ADMIN `GET /webhooks/delivery-failures`. A later successful delivery removes the row.+- **`webhook_delivery_failures`** — durable record of a webhook delivery that exhausted its retries, or was not sent (attempts 0) (`src/modules/webhook/entities/webhook-delivery-failure.entity.ts`), surfaced via the ADMIN `GET /webhooks/delivery-failures`. A shed or shutdown-refused delivery is replayed by the outbox until its replay budget runs out; an oversize payload or a preflight failure on first dispatch is not replayed. A later successful delivery removes the row.- **`webhook_outbox_events`**: the outbound webhook delivery record (`src/modules/webhook/entities/webhook-outbox-event.entity.ts`): a row is written `pending` before the delivery attempt, so a delivery lost to a crash is replayed by the reconciler. It settles as `dispatched` once a durable owner (the BullMQ queue, or the inline POST in direct mode) holds it, or as `failed` when the replays run out or the reconciler finds the webhook removed, disabled or unsubscribed from the event (no failure row is written then). Settled rows drop their payload and are pruned on age (§5.7).- **`plugin_instances`** — one configured instance of an adapter plugin, keyed `${pluginId}:${instanceId}` (`src/modules/integration/entities/plugin-instance.entity.ts`); holds the host-minted ingress HMAC secret, masked on API reads.- **`ingress_events`** — persist-before-ack durable row and inbound dedup oracle, unique on `(pluginId, instanceId, providerDeliveryId)` (`src/modules/integration/entities/ingress-event.entity.ts`). The full payload is retired to `NULL` once dispatch is settled, leaving a slim dedup marker.diff --git a/docs/07-api-collection.md b/docs/07-api-collection.mdindex edbe969ba..04aa66efb 100644--- a/docs/07-api-collection.md+++ b/docs/07-api-collection.md@@ -1141,8 +1141,10 @@ curl -X GET "$BASE/api/webhooks?limit=100&offset=0" \#### GET /api/webhooks/delivery-failures-List webhook deliveries that failed or were not sent (attempts 0, pending replay), most recent first-(ADMIN; results stay confined to the key's allowed sessions). `lastStatusCode` is `null` when the+List webhook deliveries that failed or were not sent (attempts 0), most recent first (ADMIN; results+stay confined to the key's allowed sessions). A shed or shutdown-refused delivery is replayed by the+outbox until its replay budget runs out; an oversize payload or a preflight failure on first dispatch+is not replayed. `lastStatusCode` is `null` when thefailure was a network/timeout/SSRF error rather than a non-2xx response.```bash