diff --git a/src/booking/OfferRequests/OfferRequestsTypes.ts b/src/booking/OfferRequests/OfferRequestsTypes.ts index cb860e78..5534f8c7 100644 --- a/src/booking/OfferRequests/OfferRequestsTypes.ts +++ b/src/booking/OfferRequests/OfferRequestsTypes.ts @@ -16,12 +16,12 @@ export interface OfferRequestSlice { /** * The city or airport the passengers want to travel to */ - destination: Place | string + destination: Place /** * The city or airport the passengers want to depart from */ - origin: Place | string + origin: Place /** * The type of the origin diff --git a/src/booking/OfferRequests/mockOfferRequest.ts b/src/booking/OfferRequests/mockOfferRequest.ts index 2c569c54..c6b39a11 100644 --- a/src/booking/OfferRequests/mockOfferRequest.ts +++ b/src/booking/OfferRequests/mockOfferRequest.ts @@ -4,8 +4,32 @@ import { CreateOfferRequest, OfferRequest } from '../../types' export const mockCreateOfferRequest: CreateOfferRequest = { slices: [ { - origin: 'LHR', - destination: 'JFK', + origin: { + iata_code: 'LHR', + type: 'airport', + name: 'Heathrow Airport', + longitude: -0.458118, + latitude: 51.470311, + id: 'arp_lhr_gb', + icao_code: 'EGLL', + iata_country_code: 'GB', + iata_city_code: 'LON', + time_zone: 'Europe/London', + city_name: 'London', + }, + destination: { + iata_code: 'JFK', + type: 'airport', + time_zone: 'America/New_York', + name: 'John F. Kennedy International Airport', + longitude: -73.778519, + latitude: 40.640556, + id: 'arp_jfk_us', + icao_code: 'KJFK', + iata_country_code: 'US', + iata_city_code: 'NYC', + city_name: 'New York', + }, departure_date: '2020-04-24', }, ], diff --git a/src/booking/Orders/OrdersTypes.ts b/src/booking/Orders/OrdersTypes.ts index 55ad3f2e..d62f02f0 100644 --- a/src/booking/Orders/OrdersTypes.ts +++ b/src/booking/Orders/OrdersTypes.ts @@ -1,8 +1,8 @@ -import { Airport } from '@duffel/api/types' import { Aircraft, Airline, AirlineInitiatedChange, + Airport, CabinClass, DuffelPassengerGender, DuffelPassengerTitle, diff --git a/src/booking/Orders/mockOrders.ts b/src/booking/Orders/mockOrders.ts index 3e909396..36204aba 100644 --- a/src/booking/Orders/mockOrders.ts +++ b/src/booking/Orders/mockOrders.ts @@ -296,7 +296,6 @@ export const mockOnHoldOrders: Order[] = [ ], origin_terminal: null, origin: { - type: 'airport', time_zone: 'America/Indiana/Indianapolis', name: 'Indianapolis International Airport', longitude: -86.295526, @@ -331,7 +330,6 @@ export const mockOnHoldOrders: Order[] = [ distance: null, destination_terminal: null, destination: { - type: 'airport', time_zone: 'America/New_York', name: 'Miami International Airport', longitude: -80.288826, @@ -466,7 +464,6 @@ export const mockOnHoldOrders: Order[] = [ ], origin_terminal: null, origin: { - type: 'airport', time_zone: 'America/Indiana/Indianapolis', name: 'Indianapolis International Airport', longitude: -86.295526, @@ -501,7 +498,6 @@ export const mockOnHoldOrders: Order[] = [ distance: null, destination_terminal: null, destination: { - type: 'airport', time_zone: 'America/New_York', name: 'Miami International Airport', longitude: -80.288826, diff --git a/src/booking/PartialOfferRequests/mockPartialOfferRequest.ts b/src/booking/PartialOfferRequests/mockPartialOfferRequest.ts index 47e14008..8c7316e4 100644 --- a/src/booking/PartialOfferRequests/mockPartialOfferRequest.ts +++ b/src/booking/PartialOfferRequests/mockPartialOfferRequest.ts @@ -4,8 +4,32 @@ import { CreateOfferRequest, OfferRequest } from '../../types' export const mockCreatePartialOfferRequest: CreateOfferRequest = { slices: [ { - origin: 'LHR', - destination: 'JFK', + origin: { + iata_code: 'LHR', + type: 'airport', + name: 'Heathrow Airport', + longitude: -0.458118, + latitude: 51.470311, + id: 'arp_lhr_gb', + icao_code: 'EGLL', + iata_country_code: 'GB', + iata_city_code: 'LON', + time_zone: 'Europe/London', + city_name: 'London', + }, + destination: { + iata_code: 'JFK', + type: 'airport', + time_zone: 'America/New_York', + name: 'John F. Kennedy International Airport', + longitude: -73.778519, + latitude: 40.640556, + id: 'arp_jfk_us', + icao_code: 'KJFK', + iata_country_code: 'US', + iata_city_code: 'NYC', + city_name: 'New York', + }, departure_date: '2020-04-24', }, ],