// types/express/index.d.ts

import type { UserRoles } from "../app/src/pkg/db/schema/user_roles.ts";

declare global {
    namespace Express {
        interface User {
            id: string;
            email?: string;
            username?: string;
            roles: string[];
            rawRoles: UserRoles[]; // keep raw drizzle rows if needed
        }

        interface Request {
            user?: User;
        }
    }
}
