e878e1a665
* fix: shared next-auth calendso session type fix * fix: move imports from @lib -> @calcom/lib to fix types * Consolidates next-auth definitions Co-authored-by: Agusti Fernandez Pardo <git@agusti.me> Co-authored-by: zomars <zomars@me.com>
20 lines
549 B
TypeScript
20 lines
549 B
TypeScript
import { UserPermissionRole } from "@prisma/client";
|
|
import { 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 {
|
|
hasValidLicense: boolean;
|
|
user: CalendsoSessionUser;
|
|
}
|
|
}
|