Currently Supabase generates only types by default but it can be useful to have enums. That's how you can do it:
-
Add your own script in package.json e.g.
"generate:enums": "node ./scripts/generate-enums.js"
-
Create
./scripts/generate-enums.js
file
const fs = require('fs');
const ts = require('typescript');