import type { ModuleAccessMap } from '../access/modules';

export interface AuthenticatedUser {
  id: string;
  email: string;
  displayName: string | null;
  role: 'USER' | 'ADMIN';
  sessionId: string;
  /**
   * Which modules this session may open. Resolved with the session so that a
   * revoked entitlement takes effect on the next request rather than at the
   * next login. Administrators always hold every module.
   */
  modules: ModuleAccessMap;
}
