
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: zomars <zomars@me.com>
18 lines
529 B
TypeScript
18 lines
529 B
TypeScript
import { UserPermissionRole } from "@prisma/client";
|
|
import NextAuth, { DefaultSession } from "next-auth";
|
|
|
|
declare module "next-auth" {
|
|
type DefaultSessionUser = NonNullable<DefaultSession["user"]>;
|
|
type CalendsoSessionUser = DefaultSessionUser & {
|
|
id: number;
|
|
username: string;
|
|
impersonatedByUID?: number;
|
|
role: UserPermissionRole;
|
|
};
|
|
/**
|
|
* Returned by `useSession`, `getSession` and received as a prop on the `Provider` React Context
|
|
*/
|
|
interface Session {
|
|
user: CalendsoSessionUser;
|
|
}
|
|
}
|