Initial commit
This commit is contained in:
32
src/types/next-auth.d.ts
vendored
Normal file
32
src/types/next-auth.d.ts
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
import type { ApprovalType, Role } from "@prisma/client";
|
||||
import type { DefaultSession } from "next-auth";
|
||||
|
||||
declare module "next-auth" {
|
||||
interface Session {
|
||||
user: {
|
||||
id: string;
|
||||
username: string;
|
||||
role: Role;
|
||||
workingGroupId: string | null;
|
||||
approvalPreference: ApprovalType | null;
|
||||
} & DefaultSession["user"];
|
||||
}
|
||||
|
||||
interface User {
|
||||
id: string;
|
||||
username: string;
|
||||
role: Role;
|
||||
workingGroupId: string | null;
|
||||
approvalPreference: ApprovalType | null;
|
||||
}
|
||||
}
|
||||
|
||||
declare module "next-auth/jwt" {
|
||||
interface JWT {
|
||||
id?: string;
|
||||
username?: string;
|
||||
role?: Role;
|
||||
workingGroupId?: string | null;
|
||||
approvalPreference?: ApprovalType | null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user