team-telnyx / telnyx-node

Node SDK for the Telnyx API
https://developers.telnyx.com/docs/api/v2/overview
MIT License
54 stars 20 forks source link

V2.0.0 Add Typescript support #185

Open lucasassisrosa opened 2 months ago

lucasassisrosa commented 2 months ago

Addresses #32

This PR will remain open while v2.0.0 is in alpha

I have labeled some files as important for check when reviewing. Please use the file filter to omit the "excluded files" when reviewing.

Manual testing

lucasassisrosa commented 1 month ago

Following the testing instructions, the build completed successfully and the messaging example worked as shown in my portal messaging profiles:

Screenshot from 2024-10-01 13-02-20

Thanks for the review! that should be the output so all fine

lucasassisrosa commented 1 month ago

when I ran npm run lint I was given this warning:

This is "expected" as I set @typescript-eslint/typescript-estree to the latest version. I can update the package to be pointing to latest ts in project

lucasassisrosa commented 1 month ago

the only other comment was when I ran the tests I saw a lot of failures, i'm not sure if it's on my end:

It seems like an env problem considering the amount of tests failing compared to the CI. Did you have the mock running at the right port? We're still using prism and telnyx-mock-server for this release

chasenpse commented 1 month ago

the only other comment was when I ran the tests I saw a lot of failures, i'm not sure if it's on my end:

It seems like an env problem considering the amount of tests failing compared to the CI. Did you have the mock running at the right port? We're still using prism and telnyx-mock-server for this release

that seemed to be the issue, getting green all across now :+1:

lucasassisrosa commented 1 month ago

that seemed to be the issue, getting green all across now 👍

added more details to the "envs setup" README

lucasassisrosa commented 1 month ago

Before the prisim server was running I got this, 64 failed test: Screenshot 2024-10-01 at 11 23 01 AM

After I got it running I got this: Screenshot 2024-10-09 at 9 10 51 AM

Thanks @BueTelnyx, that's expected

lucasassisrosa commented 1 month ago

When I cd'd into /examples/messaging, npm installed, and npm run start, It seemed to console.log out the correct data.

However when I cd'd into /examples/call-control, did the same setup, it error'd out with '[{"code":"10005","title":"Resource not found","detail":"The requested resource or URL could not be found.","meta":{"url":"https://developers.telnyx.com/docs/overview/errors/10005"}}]'

both should yield similar console logs. I published a new patch version to address this for call-control example

lucasassisrosa commented 1 month ago

addresses:

lucasassisrosa commented 2 weeks ago

PR check failed cause /number_order_documents endpoints were removed. I'm removing these endpoints from SDK to match