Census this tenant's outbox event delivery by status
Censuses this tenant’s transactional outbox by status: five buckets, always five, one per value of the database enum.
It answers whether the facts this gateway WROTE actually left it, which no other surface reports. A fact recorded in a local table and never published is invisible to every read beside this one: the operation books show what the gateway did, and this shows whether the world was told.
ALL FIVE BUCKETS ARE ALWAYS PRESENT, at count zero included. A bucket that vanished when it emptied would make “nothing is stuck” and “nothing was ever written” render identically.
‘oldest_created_at’ is the number to act on, and it is null exactly when the bucket is at zero. A PENDING bucket whose oldest row is hours old is a dispatcher that stopped; a PENDING bucket of the same count whose oldest row is seconds old is a healthy queue.
The status labels are the Postgres enum’s own, verbatim and UPPERCASE. This is the one read here that does not use lowercase vocabulary, deliberately: inventing a lowercase alias would give one fact two spellings, and an operator would read one on the screen and the other in every query they run against the database while acting on it.
INVALID is terminal. Those facts will never be published, and switching a relay on afterwards recovers nothing. GET /v1/consignado/event-delivery/invalid is the row-by-row read of that bucket.
It answers from a LOCAL table and never reaches the Dataprev rail, so it cannot answer 501. It takes no parameter of any kind, neither filter nor page: the whole answer is five numbers, and there is nothing for a caller to narrow. The tenant is derived from the validated identity and is never read from the request.

