You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The return value is typed as DuffelResponse<StaysSearchResult>
Therefore when trying to autocomplete, Typescript will think that response.data contains a single StaysSearchResult object, whereas instead the response is correctly wrapped in a results JSON field.
That's the behavior you see even in the library's test case:
The text was updated successfully, but these errors were encountered:
When searching for stays:
const response = await duffel.stays.search({...})
The return value is typed as
DuffelResponse<StaysSearchResult>
Therefore when trying to autocomplete, Typescript will think that
response.data
contains a singleStaysSearchResult
object, whereas instead the response is correctly wrapped in aresults
JSON field.That's the behavior you see even in the library's test case:
The text was updated successfully, but these errors were encountered: