import 'next-auth';

declare module 'next-auth' {
  interface Session {
    user: {
      id: string;
      email: string;
      name?: string | null;
      isAdmin?: boolean;
      hasWriteAccess?: boolean;
    };
  }

  interface User {
    id: string;
    email: string;
    name?: string | null;
    isAdmin?: boolean;
    hasWriteAccess?: boolean;
  }
}

declare module 'next-auth/jwt' {
  interface JWT {
    id: string;
    email: string;
    isAdmin?: boolean;
    hasWriteAccess?: boolean;
    exp?: number; // Expiration timestamp
  }
}

