refactor: generate and use Supabase TypeScript types

Co-authored-by: Moheeb Zara <1184415+virgilvox@users.noreply.github.com>
This commit is contained in:
v0
2026-03-11 08:12:39 +00:00
co-authored by Moheeb Zara
parent c34d5d9529
commit 2e136b5f55
18 changed files with 1135 additions and 342 deletions
+2 -1
View File
@@ -1,4 +1,5 @@
import { createClient } from '@supabase/supabase-js'
import type { Database } from '@/types/database'
/**
* Admin client using the service role key.
@@ -6,7 +7,7 @@ import { createClient } from '@supabase/supabase-js'
* NEVER expose this client to the browser.
*/
export function createAdminClient() {
return createClient(
return createClient<Database>(
process.env.NEXT_PUBLIC_SUPABASE_URL!,
process.env.SUPABASE_SERVICE_ROLE_KEY!,
{