Add `toSchema` function, to convert any legacy normalizer into a zod schema
Summary
Adds toSchema
, which can be used like this:
const statusSchema = toSchema(normalizeStatus);
// Use it on a status
statusSchema.parse(status);
// Use it in an entity hook
useEntities(['Statuses'], apiFn, { schema: statusSchema });
Eventually we'll convert everything to zod, but this will help during the transition.