import "next-auth";

declare module "next-auth" {
  interface Session {
    user: {
      id: string;
      name?: string | null;
      email?: string | null;
      image?: string | null;
      roles?: string[];
      subscriptionPlan: "free" | "plus" | "premium";
    };
    accessToken: string;
    refreshToken: string;
  }

  interface User {
    id: string;
    name?: string;
    email: string;
    accessToken: string;
    refreshToken: string;
    roles?: string[];
    subscriptionPlan?: "free" | "plus" | "premium";
  }
}

declare module "next-auth/jwt" {
  interface JWT {
    id: string;
    accessToken: string;
    refreshToken: string;
    roles?: string[];
    subscriptionPlan: "free" | "plus" | "premium";
  }
}
