import type { SubstituteModeConfig } from '../bot-registry.js'; /** * Pure normalizer for a raw substituteMode object (from bots.json OR a dashboard * PUT body) into a `SubstituteModeConfig`. Shared by `bot-registry` (load path) * and `substitute-mode-store` (write path) so the two never drift. * * Rules: * - Each target keeps openId / userId / unionId / email / name; a target with * none of those is dropped. * - `email` rides along as a label but never matches at runtime (mentions carry * openId/userId/unionId, not email) — it is resolved to an openId at save * time by `resolveSubstituteTargets`, so a persisted email-only target only * happens for an entry that failed resolution. * - ENABLING requires at least one matchable id (openId/userId/unionId); * otherwise the ON state would be silently dead → return undefined so the * caller can reject it. * - A DISABLED config still persists its target list (as long as it has ≥1 * target), so the dashboard toggle can flip on/off without re-entering * everyone. Only an empty disabled config collapses to undefined (delete). * - `chats` (allow-list) and `excludedChats` (block-list) are each trimmed, * de-duplicated, and dropped when empty. They persist on a disabled config * the same way targets do. */ export declare function normalizeSubstituteMode(raw: unknown): SubstituteModeConfig | undefined; //# sourceMappingURL=substitute-mode-normalize.d.ts.map