-
Notifications
You must be signed in to change notification settings - Fork 16
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
Fix more types #969
Fix more types #969
Conversation
@@ -316,12 +318,12 @@ export interface CreateOfferRequestSlice { | |||
/** | |||
* The inclusive time range for the arrival of the slice | |||
*/ | |||
arrival_time?: string | null | |||
arrival_time?: TimeRangeFilter | null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we remove the undefined please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have to provide these filters though, even as null
? From reading the examples on here I didn't think so: https://duffel.com/docs/guides/following-search-best-practices
Below are both valid:
I guess I'm not sure if the sides of the filter can be null
, but I can't find the descriptions in the actual API reference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The concept of null or undefined to the API is the same I guess. Whether we send the attribute set to null or don't send it at all. But i did notice that when we do redefine or reference some of these types on the dashboard they may mismatch because one side expects undefined to be part of the type vs not. Or some places where we only check if null
. Not big deal though if you'd prefer to keep the undefined so we don't need to add to objects when using them.
|
||
/** | ||
* The inclusive time range for the departure of the slice | ||
*/ | ||
departure_time?: string | null | ||
departure_time?: TimeRangeFilter | null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[2] Can we remove the undefined please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense relative to the couple of other issues.
Just to double check here are the V2 yaml definitions:
754e0d0
to
a39ea3a
Compare
Fixes issues reported in #936 (guide) and #945.