GithubHelp home page GithubHelp logo

Comments (9)

mnida avatar mnida commented on August 18, 2024 1

@djanda97 Great! Yep this issue is still available! You should be all set on the frontend side beside that DeveloperTab you pointed out.

Looping in @diego-escobedo to check if there is anything else on the backend.

from lotus.

diego-escobedo avatar diego-escobedo commented on August 18, 2024 1

Hey David! Sorry for the late response, missed this one. Looks like the right path for the backend. I'll add in a few other things you might find useful.

  • Webhooks need to be registered with the webhooks server (Svix) before being used, here's where we do it in the code:
    if SVIX_CONNECTOR is not None:
    Should be pretty plug and play
  • https://raw.githubusercontent.com/uselotus/lotus/442db21387ebaf47c65d6bf2fdb569d12abcd97d/docs/webhooks/webhooks.mdx the current documentation page we have for webhooks. Unfortunately, we don't have a great way of displaying the schema for the response objects in our mintlify docs atm, so what we do is: Run management command python manage.py generate_schema, copy paste the openapi spec into a different openapi renderer, and screenshot it. In the case of an existing response schema (like we have for invoices), we just link them to the appropriate place in the docs.

In terms of where you'd actually be putting the x_webhook() calls imported from the webhooks file:

Doing all of the webhooks at once might be too much to chew off / review in a single PR, so perhaps spinning them out one issue at a time might end up being easier.

Let me know if you need any more details or if you're curious about how the webhooks work in more detail! Happy to discuss.

from lotus.

djanda97 avatar djanda97 commented on August 18, 2024 1

Thanks for the info! I agree that trying to implement all the new webhooks would be a bit much to tackle in a single PR, so I'll start with the customer created webhook & reach out when I have any questions after diving into the code!

from lotus.

mnida avatar mnida commented on August 18, 2024 1

Great! Awesome to hear and excited to review next week.

from lotus.

mnida avatar mnida commented on August 18, 2024 1

Yeah! @djanda97 Feel free to create some more issues, we treated this one as just customer-created. You can use the same issue format and create and self-assign to as many as you are up for!

from lotus.

djanda97 avatar djanda97 commented on August 18, 2024

Hi @mnida!

If this issue is still available, I would like to work on it. After cloning the repo and poking around the codebase for a while, I found a few files that look like a good starting point for adding new webhooks.

Backend:

Frontend:

Do you have a recommendation for other files (either backend or frontend) to look into that will require editing for adding new webhooks?

Cheers,
David

from lotus.

mnida avatar mnida commented on August 18, 2024

Hey @djanda97 checking in to see how the issue is going?

from lotus.

djanda97 avatar djanda97 commented on August 18, 2024

Hi @mnida, so far so good! I've created a draft PR that registers the customer created webhook with the webhook server (svix) and adds it to the WEBHOOK_TRIGGER_EVENTS class. The bulk of the implementation is something I plan to get to this upcoming week.

from lotus.

djanda97 avatar djanda97 commented on August 18, 2024

Is your feature request related to a problem? Please describe. Users want webhooks for these events:

* when a subscription ends/is cancelled

* when a subscription is created

* when a subscription is renewed

* customer created

Describe the solution you'd like In the backend add this webhook functionality using our alerts framework and svix.

In the frontend simply add the checkbox in the create webhook url form.

Now that #539 is merged, could the subscription related webhooks be split up into different issues so that they could be worked on individually? I would be interested in implementing a few more now that I've done it once before and know the general locations where code would need to be added 😄

from lotus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.