-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEAT] Type definition for webhook events #5
Comments
Interesting request @waptik. This isn't something we've considered adding to the library, however, do you mind sharing how you'd like this to work? Using the |
@damilola-paystack I think @waptik means having types like what we have here in Stripe Events |
Yup, this is exactly what I meant. |
Got it @orimdominic @waptik. I'll look into adding this in an upcoming version. You could also make this your first contribution if you are up for it 😀. |
@gray-adeyi/paystack-sdk 0.2.4 release is now available with even better type support 🔥 https://www.npmjs.com/package/@gray-adeyi/paystack-sdk |
Is your feature request related to a problem? Please describe.
As for right now, there doesn't to be any type definition for webhook events inside this library that will help validate the incoming webhook events.
Describe the solution you'd like
It'd be great to have a built-in type definition for webhook events in this library. This will save us time of having to manually write our own.
Describe alternatives you've considered
What i've been doing so far is to model the types of each events(
charge.success
as for now) based on received webhook response or often time cross check supported-eventsAdditional context
None
The text was updated successfully, but these errors were encountered: