// SRC-06: statische Facettendimensionen-Whitelist, gespiegelt aus // mail/internal/search/fields.go (FacetFields, SRC-05) — nur diese // Feldnamen sind als Filterdimension zulässig, kein beliebiger // Client-Feldname. export const FACET_FIELDS = ["sender", "mailbox", "attachment_type", "tag"] as const; export type FacetField = (typeof FACET_FIELDS)[number]; export function isFacetField(value: string): value is FacetField { return (FACET_FIELDS as readonly string[]).includes(value); } export const FACET_FIELD_LABELS: Record = { sender: "Absender", mailbox: "Postfach", attachment_type: "Anhangstyp", tag: "Tag", };