import { Request } from 'express';

/**
 * Express request after an auth guard (see src/auth) has attached the resolved
 * user via `request.user`. Only valid on guarded routes (`@UseGuards(...)`),
 * where the guard guarantees `user` is set — giving handlers typed access to
 * the acting user's id without falling back to `any`.
 */
export interface AuthenticatedRequest extends Request {
  user: { id: number; roles?: string[]; [key: string]: unknown };
}
