import type { IUser } from '@rocket.chat/core-typings'; import { Users } from '@rocket.chat/models'; export async function validateContactManager(contactManagerUserId: string) { const contactManagerUser = await Users.findOneAgentById>(contactManagerUserId, { projection: { _id: 1 } }); if (!contactManagerUser) { throw new Error('error-contact-manager-not-found'); } }