From e0f939c4e544e7601bd426c6bc06334eeb1a356f Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Sun, 17 Aug 2025 00:13:42 +0000 Subject: [PATCH] Update database adapter to work with existing shared database cgen-94d8dbc08c204cf28de7ddc58f1b3f3d --- client/lib/aethex-database-adapter.ts | 33 ++++++++------------------- 1 file changed, 10 insertions(+), 23 deletions(-) diff --git a/client/lib/aethex-database-adapter.ts b/client/lib/aethex-database-adapter.ts index 2ed18b23..2747d07f 100644 --- a/client/lib/aethex-database-adapter.ts +++ b/client/lib/aethex-database-adapter.ts @@ -5,32 +5,19 @@ import { supabase } from "./supabase"; import type { Database } from "./database.types"; import { aethexToast } from "./aethex-toast"; -// Extended user profile type that matches existing + new schema -export interface AethexUserProfile { - id: string; - username: string; +// Use the existing database user profile type directly +import type { UserProfile } from "./database.types"; + +// Extended type that matches the existing shared database +export interface AethexUserProfile extends UserProfile { email?: string; - role: string; - onboarded: boolean; - bio?: string; - skills?: string[]; - avatar_url?: string; + username: string | null; + onboarded?: boolean; + role?: string; + loyalty_points?: number; banner_url?: string; social_links?: any; - loyalty_points: number; - created_at: string; - updated_at: string; - // New AeThex app fields - user_type?: "game_developer" | "client" | "community_member" | "customer"; - experience_level?: "beginner" | "intermediate" | "advanced" | "expert"; - full_name?: string; - location?: string; - website_url?: string; - github_url?: string; - twitter_url?: string; - linkedin_url?: string; - total_xp?: number; - level?: number; + skills?: string[]; } export interface AethexProject {