-
TypeORM
ORM for TypeScript and JavaScript. Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, SAP Hana, WebSQL databases. Works in NodeJS, Browser, Ionic, Cordova and Electron platforms.
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
If the tokens are modeled as an entity as well, you should be able to use TypeORM's query builder and run a bulk delete like this: https://github.com/typeorm/typeorm/blob/master/docs/delete-query-builder.md
A low-level alternative is using a PostgreSQL-side facility like https://github.com/citusdata/pg_cron - this, however, requires installing a PostgreSQL extension.