Right now you have to define one function per each field, and each function received the same data, that came from Google or Github or whatever. However, that means that you might need to replicate some logic between these functions, like parsing that data with zod.
What would probably make more sense is to instead have them provide a single function that then returns an object containing all the fields. There would be less boilerplate (1 vs N functions) and they could reuse code while doing that.
Right now you have to define one function per each field, and each function received the same
data
, that came from Google or Github or whatever. However, that means that you might need to replicate some logic between these functions, like parsing that data with zod. What would probably make more sense is to instead have them provide a single function that then returns an object containing all the fields. There would be less boilerplate (1 vs N functions) and they could reuse code while doing that.