import type mongoose from 'mongoose';

export interface AuthUser {
  keycloakId: string;
  email: string;
  displayName: string;
  roles: string[];
  householdIds: string[];
}

declare module 'fastify' {
  interface FastifyRequest {
    user: AuthUser;
    householdId: string;
  }
}

declare module '@fastify/awilix' {
  interface Cradle {
    mongoose: typeof mongoose;
  }
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
  interface RequestCradle {}
}
