-
Notifications
You must be signed in to change notification settings - Fork 10
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
Is there a release date for Typescript support? #1
Comments
Hi @cody-ta |
Yeah, I think most of NodeJS developers will look for this issue. @shubhamUpadhyayInBlue have you tried https://github.com/acacode/swagger-typescript-api? |
Also looking for typescript support as I'm moving my website from js to typescript at the moment. |
Hello |
Until solved:
|
Better then lib 😄 |
@matthiasbruns How do you set the API key? |
new Brevo({
baseApiParams: {
headers: {
'api-key': yourKeyhere,
},
},
}) |
@NarHakobyan Thanks! |
The latest swagger file is here: So, @matthiasbruns @NarHakobyan you can try using this latest swagger file instead. |
Hi @shubhamUpadhyayInBlue, thanks for the new definition but there is an issue in the swagger file at line
|
Hi @garysb |
Take me sometimes to get it working (because din't know how swagger-typescript-api was working) but now everything is working and tested! https://gist.github.com/marentdev/28d49bfee47704ac39fcd55cb4ac8b0e (Brevo Lib) |
Hi @shubhamUpadhyayInBlue Developer: If you do not know how to use the /** npx swagger-typescript-api -p https://api.brevo.com/v3/swagger_definition.yml -o [PATH-OUTPUT] -n [TS-FILENAME (Sample: Brevo.ts)]
**/
// SAMPLE
// console
npx swagger-typescript-api -p https://api.brevo.com/v3/swagger_definition.yml -o /src/utils/email -n Brevo.ts
...
// ts-file.ts
import { Brevo } from './utils/email/Brevo';
...
const brevo = new Brevo({ baseApiParams: { headers: { 'api-key': 'YOUR-KEY' } }) |
Hi @higuitadiaz, // ts-file.ts
import { Api } from './utils/email/Brevo';
...
const brevo = new Api({ baseApiParams: { headers: { 'api-key': 'YOUR-KEY' } }) |
Really need ts support before we can migrate to brevo |
I also need ts support before I can move to brevo... |
Any update here @shubhamUpadhyayInBlue ? We do not want to continue building with deprecated lib, but the lack of Typescript support here is blocking us. It has been several months since you've raised this issue, so I would hope some progress has been made. Could you provide us with an estimate? |
Hi @cwierzbicki00 |
Thanks for the Ts help. EDIT: I figured it out.
Thanks |
Is there any update about the typescript release ? |
=> Googling, finding this github issue, then 5 minutes later:
:) (I do hope they support TS soon though as the security audit of |
Sending transactional emails via axios/fetch is more comfortable |
how do I make use of this |
I am not sure because I have not seen one |
Is there any news about TypeScript? |
Up ! |
Is there something new on this? Send In blue is gone now for a while and still missleading docs on the page, still no TS support. |
Hi, my client bought a license for Brevo without telling me, now i'm stuck with this and can't deliver the app, client is waiting, do you guys could at least bother to respond to us ? I understood you guys don't care but we are client, and you can bet I won't recommend this to any of my clients in the futur |
This seems to be a larger and larger issue for everyone. Especially knowing that the types can be generated, this is frustrating. "swagger-typescript-api -p https://api.brevo.com/v3/swagger_definition.yml -o ./lib/email/brevo" is not a valid long-term solution for a production level product like this. I am hoping for an update soon. Please at least advise how we should proceed - we need Typescript support. I don't want to build with insecure and deprecated sendinblue. What are we to do to use Brevo? Thanks |
If soon as in "we will be able to give feedback soon" is over two months, I guess I may need to look for a different company than brevo as Typescript support is non negotiable in our projects these days. |
Hello! To install it in your application: Sample code to send the transactional email:
Hope it helps. |
Many thanks! I tried your example but run directly in different issues: for the line: TS complains: also I want to use it in the next's context so I have to convert the import from require to the import syntax. If I wrap it in a function::
|
As of today, the 1.x branch is probably safer (and faster) to use... or to use some swagger-typescript-api trickery. |
Are there news vor the V2 release? |
Is there any news about TypeScript? |
Quite annoying that I have to choose between typescript support, or a version with (ancient!) unpatchable vulnerabilities. Come on, it's not that hard!
|
I think it's already been released, but it's the worst version I've ever seen. you need to call setApiKey on every class AccountApi, CompaniesApi, etc. |
I've created a PR #19 that hopefully solves this issue. Hopefully it gets accepted and merged, but in the meantime you can use @groupcards/brevo which you can verify was published from this action. Feel free to leave a comment on the PR if there are any issues with it or if it's working for you. Usage
const brevo = new BrevoApi({
headers: {
"api-key": "YOUR_API_KEY",
},
});
const account = await brevo.account.getAccount() |
Hello, as everyone here I think, I would like to see the types for this SDK. If you do not plan to do so, you could at least remove the It makes the first encounter, as a developper, with the tool, disappointing. It might be a harsh point of view but I prefer a good accessible swagger and no SDK rather than a SDK failing at its job of making integration simpler. If you cannot maintain it, drop it. @alexbrazier thanks for the MR, I'll try it ;) |
My current project used Typescript, I wasn't able to migrate from SIB to Brevo.
The text was updated successfully, but these errors were encountered: