For supabase 1 there was open-api to generate types for typescript which is pretty clear: https://supabase.com/docs/guides/api/generating-types
npx openapi-typescript https://your-project.supabase.co/rest/v1/?apikey=your-anon-key --output types/supabase.ts
But I am not able to use them with supabase rc 2.
So I assume I need to follow the new documentation, but there is no description of how to do it. There is only one for local DB. Plus I found --db-url
flag but not more info regarding that.
https://supabase.com/docs/reference/javascript/next/typescript-support
I have tried this command: npx supabase gen types typescript --db-url https://your-project.supabase.co > src/database.types.ts
, but I am getting error: Error: URL is not a valid Supabase connection string.
Thank you for help