Skip to content

Conversation

@alexbrazier
Copy link

@alexbrazier alexbrazier commented Apr 4, 2024

Closes #1
Closes #16
Closes #15
Closes #5

Rewrite library using swagger-typescript-api with only dependency being axios.

  • Auto generate api directly from swagger spec
  • Build scripts to auto update, verify generated files and publish

There is a test version published on npm at @groupcards/brevo

This is basically a full rewrite, but should be easy to maintain as it is fully generated by running yarn generate and is based on the swagger spec. It also has a github action check to make sure no-one has modified the generated file.

As in the updated readme, it is similar to the old api and fairly easy to use with full typescript support:

import BrevoApi from "@getbrevo/brevo";

const brevo = new BrevoApi({
  headers: {
    "api-key": "YOUR_API_KEY",
  },
});

const account = await brevo.account.getAccount()

Contributing

Please see the updated contributing file to explain how to regenerate api when there are new changes and publishing npm package https://github.com/squareda/brevo-node/blob/updates/CONTRIBUTING.md

@johtso
Copy link

johtso commented Apr 12, 2024

Is it not possible to avoid the axios dependency and make it compatible with serverless environments?

@alexbrazier
Copy link
Author

Is it not possible to avoid the axios dependency and make it compatible with serverless environments?

Still waiting to hear back from Brevo about it, but it would be possible to switch by changing the generate file. Main question would be do you expect users to provide their own fetch version, or do you install a polyfill.

It would look something like this:

const brevo = new Brevo({
  baseApiParams: {
    headers: {
      "api-key": "",
    },
  },
  // optional fetch polyfill for node versions < 18
  customFetch: fetch,
});

@maxbraeutigam
Copy link

Hi @shubhamUpadhyayInBlue and @aayush-sib — you need to communicate with the community. Please, give us and @alexbrazier a feedback on how you gonna deal with his PR.

@alexbrazier
Copy link
Author

I've updated this PR to fix the merge conflicts and also switched to a newer version of the swagger url which has the new brevo domain.

I've also updated the description to include the contributing document which explains how to generate the new code when the swagger spec changes and how to easily release via github actions

@Mheaus
Copy link

Mheaus commented Oct 22, 2024

I think we could envisage using a fork instead of the official package at this point

@SergioNR
Copy link

Any updates on this PR?

@codad5
Copy link

codad5 commented Feb 18, 2025

The library and the document have many issues, and it seems the Brevo team is unconcerned. What are any of you guys using?

@jacobg
Copy link

jacobg commented Feb 25, 2025

Anything new on this merge request? Brevo seems a bit slow to move forward with their tech stack.

@the-nicolas
Copy link

@aayush-sib It a question of respect to respond to the community within "at least a few month". The guy did a great job and we are waiting for too long for a solution! That's not a good motivating for others to help Brevo for free...

@maxbraeutigam
Copy link

It is unacceptable. Just filed a ticket in Brevo—maybe this helps. At least, I will get an answer.

@aayush-sib
Copy link
Member

@aayush-sib It a question of respect to respond to the community within "at least a few month". The guy did a great job and we are waiting for too long for a solution! That's not a good motivating for others to help Brevo for free...

Hi @the-nicolas
I understand the frustration, but I am no longer maintaining this. I will get in touch with the concerned team and update the here.

@LiFaytheGoblin
Copy link

@codad5 We are considering moving to Mailjet. Does anyone have experience with the community support there? Their last release was this year at least.

@codad5
Copy link

codad5 commented Jun 25, 2025

No I don't I ended up sticking with resend and zeptomail by zoho

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

Labels

None yet

Projects

None yet

10 participants