19 lines
386 B
TypeScript
19 lines
386 B
TypeScript
import { DefaultCtx, SessionContext, SimpleRolesIsAuthorized } from "blitz";
|
|
|
|
import { User, Role } from "./db";
|
|
|
|
declare module "blitz" {
|
|
export interface Ctx extends DefaultCtx {
|
|
session: SessionContext;
|
|
}
|
|
|
|
export interface Session {
|
|
isAuthorized: SimpleRolesIsAuthorized<Role>;
|
|
PublicData: {
|
|
userId: User["id"];
|
|
role: Role;
|
|
hasCompletedOnboarding?: true;
|
|
};
|
|
}
|
|
}
|