shellphone.app/types.ts

19 lines
386 B
TypeScript
Raw Normal View History

import { DefaultCtx, SessionContext, SimpleRolesIsAuthorized } from "blitz";
2021-07-31 14:33:18 +00:00
import { User, Role } from "./db";
2021-07-31 14:33:18 +00:00
declare module "blitz" {
export interface Ctx extends DefaultCtx {
session: SessionContext;
2021-07-31 14:33:18 +00:00
}
export interface Session {
isAuthorized: SimpleRolesIsAuthorized<Role>;
2021-07-31 14:33:18 +00:00
PublicData: {
userId: User["id"];
role: Role;
2021-08-01 14:01:51 +00:00
hasCompletedOnboarding?: true;
};
2021-07-31 14:33:18 +00:00
}
}