mirror of
https://github.com/34892002/edgeKey.git
synced 2026-05-06 23:33:10 +08:00
41 lines
782 B
TypeScript
41 lines
782 B
TypeScript
import { Session } from "@auth/core/types";
|
|
import type { PrismaClient } from "./generated/prisma/client";
|
|
import type { getPublicSiteInfo } from "./modules/site/service";
|
|
|
|
declare global {
|
|
namespace Vike {
|
|
interface PageContext {
|
|
session?: Session | null;
|
|
prisma: PrismaClient;
|
|
site?: Awaited<ReturnType<typeof getPublicSiteInfo>>;
|
|
}
|
|
}
|
|
}
|
|
|
|
declare module "telefunc" {
|
|
namespace Telefunc {
|
|
interface Context {
|
|
prisma: PrismaClient;
|
|
session?: Session | null;
|
|
}
|
|
}
|
|
}
|
|
|
|
declare module "@auth/core/types" {
|
|
interface Session {
|
|
user?: Session["user"] & {
|
|
id?: string;
|
|
username?: string;
|
|
role?: "admin";
|
|
};
|
|
}
|
|
|
|
interface User {
|
|
id?: string;
|
|
username?: string;
|
|
role?: "admin";
|
|
}
|
|
}
|
|
|
|
export {};
|