24 lines
409 B
TypeScript
24 lines
409 B
TypeScript
import { UserRole } from "@prisma/client";
|
|
import { User } from "next-auth";
|
|
import { JWT } from "next-auth/jwt";
|
|
|
|
export type ExtendedUser = User & {
|
|
role: UserRole;
|
|
team: string;
|
|
active: number;
|
|
apiKey: string;
|
|
emailVerified: string;
|
|
};
|
|
|
|
declare module "next-auth/jwt" {
|
|
interface JWT {
|
|
role: UserRole;
|
|
}
|
|
}
|
|
|
|
declare module "next-auth" {
|
|
interface Session {
|
|
user: ExtendedUser;
|
|
}
|
|
}
|