
import { UserRole } from '@prisma/client';
import NextAuth from 'next-auth';

declare module 'next-auth' {
  interface Session {
    user: {
      id: string;
      email: string;
      name?: string;
      image?: string;
      role: UserRole;
      companyName?: string;
      trustScore: number;
      isPartner: boolean;
      isCustomer: boolean;
    };
  }

  interface User {
    id: string;
    email: string;
    name?: string;
    image?: string;
    role: UserRole;
    companyName?: string;
    trustScore: number;
    isPartner: boolean;
    isCustomer: boolean;
  }
}

declare module 'next-auth/jwt' {
  interface JWT {
    id: string;
    role: UserRole;
    companyName?: string;
    trustScore: number;
    isPartner: boolean;
    isCustomer: boolean;
  }
}
