import 'next-auth';
import 'next-auth/jwt';

declare module 'next-auth' {
  /**
   * Extended session interface with custom properties
   */
  interface Session {
    accessToken: string;
    error?: string;
    user: {
      id: string;
      name?: string | null;
      email?: string | null;
      image?: string | null;
      roles: string[];
    };
  }
}

declare module 'next-auth/jwt' {
  /**
   * Extended JWT interface with custom properties
   */
  interface JWT {
    accessToken?: string;
    refreshToken?: string;
    accessTokenExpires?: number;
    roles?: string[];
    error?: string;
  }
}
