/** * Routine background events. * * These are emitted by the tick bins (game, economy, market) on a schedule and * are diagnostic noise for members. UI surfaces hide them by default and offer * a toggle to reveal them; the admin panel always sees everything. * * Keep this module client-safe: no Payload imports. */ import type { Where } from "payload"; import { EventTypes } from "./eventTypes"; export const ROUTINE_EVENT_TYPES: readonly string[] = [ EventTypes.GameTick, EventTypes.EconomyTick, EventTypes.MarketAutoGenerate, ]; export function isRoutineEventType(type: string): boolean { return ROUTINE_EVENT_TYPES.includes(type); } /** Payload `where` fragment that excludes routine events. */ export function excludeRoutineEventsWhere(): Where { return { type: { not_in: [...ROUTINE_EVENT_TYPES] } }; }