SayantanCode/express-unified-response ? reverse-engineered prompt

Reverse engineered prompt

Build me a TypeScript library for Express that makes API responses feel consistent everywhere.

I want a middleware setup that adds friendly helpers to res like success, created, updated, deleted, noContent, and list, so route handlers can just return data without repeating the same JSON shape over and over. It should also have one central error handler that turns thrown errors into a clean standard error response, including not found routes by default. Please include support for pagination, simple DTO style transforms, and a way to normalize common errors from things like Mongoose, Zod, JWT, Multer, and Axios.

Make it work as a production ready package, with good TypeScript types, tests, and a few example Express routes showing how to use it. Keep the API simple and pleasant to use, and make sure it works with modern Express apps on Node 18 or newer. If you need to check the latest Express or Mongoose behavior, look up the current docs online.