1141-line lib/validations.ts → lib/validations/<feature>.ts + primitives.ts + an index.ts barrel. '@/lib/validations' now resolves to the barrel, so all 40 importers are untouched. Every one of the 143 exports is preserved verbatim (verified by symbol-diff); schemas moved unchanged. tsc 0, 635 tests green. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
11 lines
442 B
TypeScript
11 lines
442 B
TypeScript
import { z } from 'zod'
|
|
import { MUTEABLE_CATEGORIES } from '../notifications-prefs-logic'
|
|
|
|
// Only muteable categories are settable; billing is membership-critical and
|
|
// never user-controllable, so it is excluded from the enum (a request to set
|
|
// it is rejected at the boundary).
|
|
export const notificationPreferenceSchema = z.object({
|
|
category: z.enum(MUTEABLE_CATEGORIES as unknown as [string, ...string[]]),
|
|
enabled: z.boolean(),
|
|
})
|