Skip to content

Commit

Permalink
Merge pull request #896 from duffelhq/fix-891
Browse files Browse the repository at this point in the history
fix: update city and origin&destination types to reflect docs
  • Loading branch information
andrejak authored Mar 25, 2024
2 parents 217561d + d956347 commit cb75914
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 30 deletions.
5 changes: 0 additions & 5 deletions src/booking/OrderChangeRequests/mockOrderChangeRequests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -485,15 +485,10 @@ export const mockOrderChangeRequestAltered: OrderChangeRequestResponse = {
city_name: 'New York',
city: {
type: 'city',
time_zone: null,
name: 'New York',
longitude: null,
latitude: null,
id: 'cit_nyc_us',
iata_country_code: 'US',
iata_code: 'NYC',
iata_city_code: 'NYC',
city_name: null,
},
airports: null,
},
Expand Down
9 changes: 5 additions & 4 deletions src/booking/Orders/OrdersTypes.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Airport } from '@duffel/api/types'
import {
Aircraft,
Airline,
Expand Down Expand Up @@ -232,9 +233,9 @@ export interface OrderSliceSegment {
*/
departing_at: string
/**
* The city or airport where this slice ends
* The airport at which the segment is scheduled to arrive
*/
destination: Place
destination: Airport
/**
* The terminal at the destination airport where the segment is scheduled to arrive
* @example "5"
Expand Down Expand Up @@ -268,9 +269,9 @@ export interface OrderSliceSegment {
*/
operating_carrier_flight_number: string
/**
* The city or airport where this slice begins
* The airport from which the flight is scheduled to depart
*/
origin: Place
origin: Airport
/**
* The terminal at the origin airport from which the segment is scheduled to depart
* @example "B"
Expand Down
21 changes: 0 additions & 21 deletions src/types/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,27 +31,6 @@ export interface City {
* @example "London"
*/
name: string
/**
* The time zone of the airport, specified by name from the [tz database](https://en.wikipedia.org/wiki/Tz_database)
*/
time_zone?: string | null
/**
* The longitude position of the airport represented in [Decimal degrees](https://en.wikipedia.org/wiki/Decimal_degrees) with 6 decimal points with a range between -180° and 180°
*/
longitude?: number | null
/**
* The latitude position of the airport represented in [Decimal degrees](https://en.wikipedia.org/wiki/Decimal_degrees) with 6 decimal points with a range between -90° and 90°
*/
latitude?: number | null
/**
* The 3-letter IATA code for the city where the place is located.
* Only present for airports which are registered with IATA as belonging to a [metropolitan area](https://portal.iata.org/faq/articles/en_US/FAQ/How-do-I-create-a-new-Metropolitan-Area).
*/
iata_city_code?: string | null
/**
* The name of the city (or cities separated by a `/`) where the airport is located
*/
city_name?: string | null
}

/**
Expand Down

0 comments on commit cb75914

Please sign in to comment.