Zod schemas
Is your feature request related to a problem? Please describe.
I'd be nice to have zod schemas available.
Describe the solution you'd like
Here is a workaround I am using in case it helps: https://gist.github.com/sergiojoker11/7e2da7fa97a67cba799f1e75a2e530c4
Describe alternatives you've considered
No response
Additional context
No response
Hi @sergiojoker11 thank you for the feature request! We will add this to our backlog for consideration for future versions. Can you share a bit about how you use Zod and how this would help you with your Stripe integration?
Sure, definitely.
We are building the webhook part at the minute via EventBridge. Using some event bridge rules and targets events get queue in SQS and then consumed by a lambda function. So that those objects are properly typed and we don't have to do any casting we use that zod schema to parse the event as it steps into our platform. That way everything stays strongly typed and, in case something does not adhere to the schema we'd rather fail fast. If proper testing has been done nothing should go wrong in prod.
Thank you! This is in our backlog. We'll let you know here if we pick it up for a future version.