import type { ILivechatCustomField } from '@rocket.chat/core-typings'; import { LivechatCustomField } from '@rocket.chat/models'; export async function getAllowedCustomFields(): Promise[]> { return LivechatCustomField.findByScope( 'visitor', { projection: { _id: 1, label: 1, regexp: 1, required: 1 }, }, false, ).toArray(); }