Skip to content

[FEAT] Type definition for webhook events #5

Open

Description

@waptik

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-events

Additional context
None

Activity

  1. damilola-paystack commented on Oct 31, 2022

    @damilola-paystack
    Member

    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 charge.success as an example, how would you want to parse an event in your webhook function if types are available?

  2. orimdominic commented on Nov 1, 2022

    @orimdominic

    @damilola-paystack I think @waptik means having types like what we have here in Stripe Events

  3. waptik commented on Nov 1, 2022

    @waptik
    Author

    @damilola-paystack I think @waptik means having types like what we have here in Stripe Events

    Yup, this is exactly what I meant.
    I saw it being used in a project and I thought it'd be great to have the same thing here as part of the library.

  4. damilola-paystack commented on Nov 3, 2022

    @damilola-paystack
    Member

    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 😀.

  5. gray-adeyi commented on Dec 14, 2024

    @gray-adeyi

    @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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions