-
Notifications
You must be signed in to change notification settings - Fork 116
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
Type mismatch in Events - When DataType #550
Comments
Hi @Leave-it-blank - just taking a look at this, just to confirm my understanding what is the proposed change? Would it be updating the types? Is it that the
Is it the fact that the properties are not consistent? So taking one property from Timespan like |
@relaxedtomato Yes, Types are mismatching. => "type" proprty inside when should be "object" according to API response inside When Type API RESPONSE:
Expected outcome, is to update the "type" to "object" |
So I came across more mismatch in Event creation, In SDK: API RESPONSE: Expected Change: |
@Leave-it-blank thanks for the feedback, our SDK team is going to take a look at this ticket further next, and I see that we have an open PR for the following update:
|
Thanks for reporting this issue @Leave-it-blank! You look correct; there's definitely a mismatch between the schema and the TS interfaces here. I see @hanut has submitted a PR that should address this. I'll take a look and if it's all good we'll include it in the upcoming release. |
Describe the bug
So I came across this bug, Inside the type of Event Object
Context.
type When = Time | Timespan | Date | Datespan;
So problem aries as documentation for V3 Api mentions that it will return an
"object" instead of "type" inside When dataType of Event.
In conclusion, there is a type mismatch between sdk & api doc. As api actually returns "object" instead of "type".
To Reproduce
Not sure? Just look at sdk type for Event
https://github.com/nylas/nylas-nodejs/blob/main/src/models/events.ts
https://developer.nylas.com/docs/api/v3/ecc/#get-/v3/grants/-grant_id-/events
Expected behavior
Need to update event.ts file to match api docs type.
SDK Version:
"nylas": "^7.2.1",
"I am using V3 api"
Additional context
I switched to sdk to avoid type mismatch between my codebase & nylas, if its fine then I can quickly update the types in repo and open PR.
The text was updated successfully, but these errors were encountered: