const MANDATORY_SECURITY_EVENTS = new Set(["LOGIN_OTP", "PASSWORD_RESET", "PASSWORD_CHANGED", "EMAIL_VERIFICATION"]); const channelAllowed = ({ eventType, channel, profile }) => { if (MANDATORY_SECURITY_EVENTS.has(eventType)) return true; if (channel === "IN_APP") return true; return profile?.notificationsEnabled !== false; }; module.exports = { MANDATORY_SECURITY_EVENTS, channelAllowed };