Paste a notion page JSON payload and get a Zod z.object schema you can run inside your handler. Same shape walker as the TypeScript-mode page, but the output is a runtime-validated schema with .optional() on missing fields and z.union for nullables.
Notion's page object is tagged-union heavy (every property carries its own type discriminator) and the database schema can change without warning. A parse turns a property type change (number→formula, multi_select→relation) into a named validation error instead of a silently-wrong sync.
Notion sync workers run server-side (cron, queue consumer) where Zod's slightly larger bundle is invisible against the network IO; the value is z.discriminatedUnion('type', ...) on the property tagged-union, which mirrors Notion's data model exactly. The output is a copy-paste-runnable z.object using only standard Zod primitives (z.string, z.number, z.array, z.union, .optional). Drop it into your handler, run schema.parse(body), and the rest of your code consumes a strongly typed value with no ambient unknowns.