import type { PlatformUserRole, UserRole } from "@prisma/client"; import "next-auth"; import "next-auth/jwt"; declare module "next-auth/jwt" { interface JWT { // Company user fields companyId?: string; role?: UserRole; // Platform user fields isPlatformUser?: boolean; platformRole?: PlatformUserRole; } } declare module "next-auth" { interface Session { user: { id?: string; email?: string; name?: string | null; image?: string | null; // Company user fields companyId?: string; role?: UserRole; // Platform user fields isPlatformUser?: boolean; platformRole?: PlatformUserRole; }; } interface User { id: string; email: string; name?: string | null; // Company user fields companyId?: string; role?: UserRole; // Platform user fields isPlatformUser?: boolean; platformRole?: PlatformUserRole; } }