@duffel/components 1.3.1-beta.0 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +0 -0
- package/README.md +3 -2
- package/dist/CardPayment.esm.js +2 -0
- package/dist/CardPayment.esm.js.LICENSE.txt +6 -0
- package/dist/CardPayment.js +2 -0
- package/dist/CardPayment.js.LICENSE.txt +6 -0
- package/dist/CardPayment.min.css +233 -0
- package/dist/CardPayment.umd.min.js +2 -0
- package/dist/CardPayment.umd.min.js.LICENSE.txt +63 -0
- package/dist/SeatSelection.esm.js +1 -0
- package/dist/SeatSelection.js +1 -0
- package/dist/SeatSelection.min.css +1043 -0
- package/dist/SeatSelection.umd.min.js +2 -0
- package/dist/SeatSelection.umd.min.js.LICENSE.txt +54 -0
- package/dist/duffel-components.d.ts +799 -1605
- package/dist/duffel-components.esm.js +2 -1
- package/dist/duffel-components.esm.js.LICENSE.txt +6 -0
- package/dist/duffel-components.js +2 -1
- package/dist/duffel-components.js.LICENSE.txt +6 -0
- package/dist/duffel-components.min.css +1089 -0
- package/dist/duffel-components.umd.min.js +1 -1
- package/dist/duffel-components.umd.min.js.LICENSE.txt +16 -0
- package/package.json +63 -23
|
@@ -1,1639 +1,833 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
import { Component } from 'react';
|
|
22
|
-
interface State {
|
|
23
|
-
hasError: boolean;
|
|
24
|
-
error?: Error;
|
|
25
|
-
}
|
|
26
|
-
export class ErrorBoundary extends Component<Record<string, unknown>, State> {
|
|
27
|
-
constructor(props: Record<string, unknown> | Readonly<Record<string, unknown>>);
|
|
28
|
-
static getDerivedStateFromError(): {
|
|
29
|
-
hasError: boolean;
|
|
30
|
-
};
|
|
31
|
-
componentDidCatch(error: Error): void;
|
|
32
|
-
render(): React.ReactNode;
|
|
33
|
-
}
|
|
34
|
-
export {};
|
|
35
|
-
|
|
36
|
-
export * from './ErrorBoundary';
|
|
37
|
-
|
|
38
|
-
import * as React from 'react';
|
|
39
|
-
import { CurrencyConversion, Offer, SeatMap } from '@lib/types';
|
|
40
|
-
import { SeatSelectionContextInterface, SeatSelectionPassenger } from './SeatSelectContext';
|
|
41
|
-
import '@lib/styles/global.css';
|
|
42
|
-
import './SeatSelect.css';
|
|
43
|
-
export interface SeatSelectionProps {
|
|
44
|
-
/**
|
|
45
|
-
* The offer we are booking seats for.
|
|
46
|
-
*/
|
|
47
|
-
offer: Offer;
|
|
48
|
-
/**
|
|
49
|
-
* List of available seat maps
|
|
50
|
-
*/
|
|
51
|
-
seatMaps: SeatMap[];
|
|
52
|
-
/**
|
|
53
|
-
* List of all passengers that can be assigned seats
|
|
54
|
-
*/
|
|
55
|
-
passengers: SeatSelectionPassenger[];
|
|
56
|
-
/**
|
|
57
|
-
* What to do when the user presses the Confirm button
|
|
58
|
-
*/
|
|
59
|
-
onSubmit: (seats: SeatSelectionContextInterface) => void;
|
|
60
|
-
/**
|
|
61
|
-
* Already selected seats to initialize the map with
|
|
62
|
-
*/
|
|
63
|
-
initialSeatSelection?: SeatSelectionContextInterface;
|
|
64
|
-
/**
|
|
65
|
-
* The segment ID to select upon initialization
|
|
66
|
-
*/
|
|
67
|
-
initialSegmentId?: string;
|
|
68
|
-
/**
|
|
69
|
-
* Optional currency conversion to enable prices to be shown in an alternative currency
|
|
70
|
-
*/
|
|
71
|
-
currencyConversion?: CurrencyConversion;
|
|
72
|
-
}
|
|
73
|
-
export const SeatSelection: React.FC<SeatSelectionProps>;
|
|
74
|
-
export const RenderSeatSelectionComponent: (target: string, props: any) => void;
|
|
75
|
-
|
|
76
|
-
/// <reference types="react" />
|
|
77
|
-
import { Offer, OfferSliceSegment, SeatMapCabinRowSectionElementSeat, SeatMapCabinRowSectionAvailableService, SeatMap } from '@lib/types';
|
|
78
|
-
import { Size } from './SeatMap/sizes';
|
|
79
|
-
export interface SeatSelectionPassenger {
|
|
80
|
-
id: string;
|
|
81
|
-
name?: string | null;
|
|
82
|
-
}
|
|
83
|
-
export type SeatSelectionContextInterface = {
|
|
84
|
-
[segmentId: string]: SeatSelectionForSegment;
|
|
85
|
-
};
|
|
86
|
-
export type SeatSelectionForSegment = {
|
|
87
|
-
[passengerId: string]: SeatInformation | null;
|
|
88
|
-
};
|
|
89
|
-
export type SeatInformation = {
|
|
90
|
-
designator: string;
|
|
91
|
-
service: SeatMapCabinRowSectionAvailableService;
|
|
92
|
-
};
|
|
93
|
-
export interface CurrentSeat {
|
|
94
|
-
seat: SeatMapCabinRowSectionElementSeat | null;
|
|
95
|
-
service: SeatMapCabinRowSectionAvailableService | undefined;
|
|
96
|
-
}
|
|
97
|
-
export interface ExtendedSeatInfo {
|
|
98
|
-
segment: string;
|
|
99
|
-
seat: SeatMapCabinRowSectionElementSeat;
|
|
100
|
-
service: SeatMapCabinRowSectionAvailableService;
|
|
101
|
-
}
|
|
102
|
-
export interface SeatSelectionContextValue {
|
|
103
|
-
offer: Offer;
|
|
104
|
-
seatMaps: SeatMap[];
|
|
105
|
-
passengers: SeatSelectionPassenger[];
|
|
106
|
-
segments: OfferSliceSegment[];
|
|
107
|
-
segmentId: string;
|
|
108
|
-
passengerId: string;
|
|
109
|
-
currentSelectedSegment: OfferSliceSegment;
|
|
110
|
-
currentSelectedPassenger: SeatSelectionPassenger;
|
|
111
|
-
seatSelection: SeatSelectionContextInterface;
|
|
112
|
-
size: Size;
|
|
113
|
-
currentSeat: CurrentSeat;
|
|
114
|
-
setCurrentSeat: (seat: CurrentSeat) => void;
|
|
115
|
-
onSelectSeat: (seat: SeatInformation | null) => void;
|
|
116
|
-
onSelectPassenger: (passengerId: string, segmentId: string) => void;
|
|
117
|
-
setIsLoading: (isLoading: boolean) => void;
|
|
118
|
-
extendedSeatInfo: ExtendedSeatInfo[];
|
|
119
|
-
setExtendedSeatInfo: (seat: ExtendedSeatInfo[]) => void;
|
|
120
|
-
currency: string;
|
|
121
|
-
}
|
|
122
|
-
export const SeatSelectionContext: import("react").Context<SeatSelectionContextValue>;
|
|
123
|
-
export const useSeatSelectionContext: () => SeatSelectionContextValue;
|
|
124
|
-
|
|
125
|
-
export * from './SeatSelect';
|
|
126
|
-
|
|
127
|
-
import * as React from 'react';
|
|
128
|
-
import './ErrorState.css';
|
|
129
|
-
export interface ErrorStateProps {
|
|
130
|
-
errorType: 'error_loading' | 'error_unavailable';
|
|
131
|
-
}
|
|
132
|
-
export const ErrorState: React.FC<ErrorStateProps>;
|
|
133
|
-
|
|
134
|
-
type ErrorTypes = 'error_loading' | 'error_unavailable';
|
|
135
|
-
export type ErrorStateProps = {
|
|
136
|
-
[key in ErrorTypes]: {
|
|
137
|
-
iconName: 'no_seat' | 'no_airplane';
|
|
138
|
-
title: string;
|
|
139
|
-
message: string;
|
|
140
|
-
};
|
|
141
|
-
};
|
|
142
|
-
export const ErrorStateOptions: ErrorStateProps;
|
|
143
|
-
export {};
|
|
144
|
-
|
|
145
|
-
export * from './ErrorState';
|
|
146
|
-
|
|
147
|
-
import * as React from 'react';
|
|
148
|
-
import './LoadingState.css';
|
|
149
|
-
export interface LoadingStateProps {
|
|
150
|
-
origin: string;
|
|
151
|
-
destination: string;
|
|
152
|
-
duration: string;
|
|
153
|
-
done: () => void;
|
|
154
|
-
}
|
|
155
|
-
export const LoadingState: React.FC<LoadingStateProps>;
|
|
156
|
-
|
|
157
|
-
import * as React from 'react';
|
|
158
|
-
import './passenger-select.css';
|
|
1
|
+
// Generated by dts-bundle-generator v5.9.0
|
|
2
|
+
|
|
3
|
+
/// <reference types="prop-types" />
|
|
4
|
+
/// <reference types="react" />
|
|
5
|
+
/// <reference types="scheduler" />
|
|
6
|
+
|
|
7
|
+
import { StripeError } from '@stripe/stripe-js';
|
|
8
|
+
import * as React from 'react';
|
|
9
|
+
|
|
10
|
+
export interface CardPaymentProps {
|
|
11
|
+
duffelPaymentIntentClientToken: string;
|
|
12
|
+
successfulPaymentHandler: () => void;
|
|
13
|
+
errorPaymentHandler: (error: StripeError) => void;
|
|
14
|
+
}
|
|
15
|
+
export declare const CardPayment: React.FC<CardPaymentProps>;
|
|
16
|
+
/**
|
|
17
|
+
* Airports are used to identify origins and destinations in journey slices
|
|
18
|
+
* @link https://duffel.com/docs/api/airports/schema
|
|
19
|
+
*/
|
|
20
|
+
export interface Airport {
|
|
159
21
|
/**
|
|
160
|
-
* The
|
|
22
|
+
* The metropolitan area where the airport is located.
|
|
23
|
+
* Only present for airports which are registered with IATA as belonging to a metropolitan area.
|
|
161
24
|
*/
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
export * from './PassengerSelect';
|
|
165
|
-
|
|
166
|
-
import * as React from 'react';
|
|
167
|
-
import { OfferSliceSegment } from '@lib/types';
|
|
168
|
-
import { SeatSelectionPassenger } from '../../SeatSelectContext';
|
|
169
|
-
import './selection-passenger.css';
|
|
170
|
-
export interface PassengerSelectionSegmentPassengerProps {
|
|
171
|
-
segment: OfferSliceSegment;
|
|
172
|
-
passenger: SeatSelectionPassenger;
|
|
173
|
-
passengerIndex: number;
|
|
174
|
-
}
|
|
175
|
-
export const PassengerSelectionSegmentPassenger: React.FC<PassengerSelectionSegmentPassengerProps>;
|
|
176
|
-
|
|
177
|
-
export * from './SelectionPassenger';
|
|
178
|
-
|
|
179
|
-
import * as React from 'react';
|
|
180
|
-
import { OfferSliceSegment } from '@lib/types';
|
|
181
|
-
import './selection-segment.css';
|
|
182
|
-
export interface PassengerSelectionSegmentProps {
|
|
183
|
-
segment: OfferSliceSegment;
|
|
184
|
-
}
|
|
185
|
-
export const PassengerSelectionSegment: React.FC<PassengerSelectionSegmentProps>;
|
|
186
|
-
|
|
187
|
-
export * from './SelectionSegment';
|
|
188
|
-
|
|
189
|
-
import * as React from 'react';
|
|
190
|
-
export interface DeckSelectProps {
|
|
191
|
-
/**
|
|
192
|
-
* The currently selected deck number
|
|
193
|
-
*/
|
|
194
|
-
value: number;
|
|
195
|
-
/**
|
|
196
|
-
* What to do when the user selects a deck
|
|
197
|
-
*/
|
|
198
|
-
setValue: (value: number) => void;
|
|
199
|
-
}
|
|
200
|
-
/**
|
|
201
|
-
* The deck selection component for the seat map.
|
|
202
|
-
*/
|
|
203
|
-
export const DeckSelect: React.FC<DeckSelectProps>;
|
|
204
|
-
|
|
205
|
-
import * as React from 'react';
|
|
206
|
-
import { SeatMapCabinRowSectionElementAmenity } from '@lib/types';
|
|
207
|
-
import './Legend.css';
|
|
208
|
-
export interface LegendProps {
|
|
209
|
-
/**
|
|
210
|
-
* The set of additional symbols to display
|
|
211
|
-
*/
|
|
212
|
-
symbols: Set<SeatMapCabinRowSectionElementAmenity>;
|
|
213
|
-
}
|
|
214
|
-
/**
|
|
215
|
-
* The legend for the seat map.
|
|
216
|
-
*/
|
|
217
|
-
export const Legend: React.FC<LegendProps>;
|
|
218
|
-
|
|
219
|
-
import * as React from 'react';
|
|
220
|
-
import './SeatMap.css';
|
|
25
|
+
city?: City | null;
|
|
221
26
|
/**
|
|
222
|
-
* The
|
|
27
|
+
* The name of the city (or cities separated by a `/`) where the airport is located
|
|
223
28
|
*/
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
export * from './SeatMap';
|
|
227
|
-
export * from './DeckSelect';
|
|
228
|
-
|
|
229
|
-
export const sizes: {
|
|
230
|
-
default: {
|
|
231
|
-
element: number;
|
|
232
|
-
icon: number;
|
|
233
|
-
spacing: number;
|
|
234
|
-
};
|
|
235
|
-
small: {
|
|
236
|
-
element: number;
|
|
237
|
-
icon: number;
|
|
238
|
-
spacing: number;
|
|
239
|
-
};
|
|
240
|
-
};
|
|
241
|
-
export type Size = keyof typeof sizes;
|
|
242
|
-
|
|
243
|
-
import { SeatMapCabinRowSectionElementAmenity } from '@lib/types';
|
|
244
|
-
import * as React from 'react';
|
|
245
|
-
import './Amenity.css';
|
|
246
|
-
export interface AmenityProps {
|
|
247
|
-
/**
|
|
248
|
-
* The type of the amenity
|
|
249
|
-
*/
|
|
250
|
-
type: SeatMapCabinRowSectionElementAmenity;
|
|
251
|
-
}
|
|
252
|
-
/**
|
|
253
|
-
* An amenity on the seat map.
|
|
254
|
-
*/
|
|
255
|
-
export const Amenity: React.FC<AmenityProps>;
|
|
256
|
-
|
|
257
|
-
import * as React from 'react';
|
|
258
|
-
import { SeatMapCabinRow } from '@lib/types';
|
|
259
|
-
import './Row.css';
|
|
260
|
-
export interface RowProps {
|
|
261
|
-
/**
|
|
262
|
-
* The row contents.
|
|
263
|
-
*/
|
|
264
|
-
row: SeatMapCabinRow;
|
|
265
|
-
/**
|
|
266
|
-
* Does the row sit above wings?
|
|
267
|
-
*/
|
|
268
|
-
hasWings: boolean;
|
|
269
|
-
}
|
|
270
|
-
/**
|
|
271
|
-
* The row component for the seat map.
|
|
272
|
-
*/
|
|
273
|
-
export const Row: React.FC<RowProps>;
|
|
274
|
-
|
|
275
|
-
export {};
|
|
276
|
-
|
|
277
|
-
import { SeatMapCabinRow } from '@lib/types';
|
|
278
|
-
export const getRowNumber: (row: SeatMapCabinRow) => string | null;
|
|
279
|
-
|
|
280
|
-
export {};
|
|
281
|
-
|
|
282
|
-
import { SeatMapCabinRowSectionElementSeat } from '@lib/types';
|
|
283
|
-
import { SeatSelectionForSegment } from '@components/SeatSelect/SeatSelectContext';
|
|
284
|
-
export const getServiceInformation: (forSeat: SeatMapCabinRowSectionElementSeat, forPassengerId: string, selectedServices: SeatSelectionForSegment) => {
|
|
285
|
-
service: import("@lib/types").SeatMapCabinRowSectionAvailableService | undefined;
|
|
286
|
-
isAvailable: boolean;
|
|
287
|
-
selectedBy: string | undefined;
|
|
288
|
-
};
|
|
289
|
-
|
|
290
|
-
export * from './Row';
|
|
291
|
-
|
|
292
|
-
import * as React from 'react';
|
|
293
|
-
import { SeatMapCabinRowSectionElementSeat } from '@lib/types';
|
|
294
|
-
import './Seat.css';
|
|
295
|
-
export interface SeatProps {
|
|
296
|
-
/**
|
|
297
|
-
* The seat information.
|
|
298
|
-
*/
|
|
299
|
-
seat: SeatMapCabinRowSectionElementSeat;
|
|
300
|
-
}
|
|
301
|
-
/**
|
|
302
|
-
* A seat on the seat map.
|
|
303
|
-
*/
|
|
304
|
-
export const Seat: React.FC<SeatProps>;
|
|
305
|
-
|
|
306
|
-
import * as React from 'react';
|
|
307
|
-
import { SeatMapCabinRowSectionElementSeat, SeatMapCabinRowSectionAvailableService } from '@lib/types';
|
|
308
|
-
import './SeatInfo.css';
|
|
309
|
-
export interface SeatInfoProps {
|
|
310
|
-
/**
|
|
311
|
-
* The seat information.
|
|
312
|
-
*/
|
|
313
|
-
seat: SeatMapCabinRowSectionElementSeat | null;
|
|
314
|
-
/**
|
|
315
|
-
* The service information.
|
|
316
|
-
*/
|
|
317
|
-
service: SeatMapCabinRowSectionAvailableService | undefined;
|
|
318
|
-
}
|
|
319
|
-
/**
|
|
320
|
-
* Contents of the seat info panel with seat information
|
|
321
|
-
*/
|
|
322
|
-
export const SeatInfo: React.FC<SeatInfoProps>;
|
|
323
|
-
|
|
324
|
-
export * from './Seat';
|
|
325
|
-
|
|
326
|
-
import * as React from 'react';
|
|
327
|
-
import { PassengerSelectionSegmentProps } from '../PassengerSelect/SelectionSegment';
|
|
328
|
-
import './Segment.css';
|
|
329
|
-
interface SegmentComponentProps extends PassengerSelectionSegmentProps {
|
|
330
|
-
className?: string;
|
|
331
|
-
}
|
|
332
|
-
export const Segment: React.FC<SegmentComponentProps>;
|
|
333
|
-
export {};
|
|
334
|
-
|
|
335
|
-
export * from './Segment';
|
|
336
|
-
|
|
337
|
-
import * as React from 'react';
|
|
338
|
-
import './Summary.css';
|
|
339
|
-
export interface SummaryProps {
|
|
340
|
-
/**
|
|
341
|
-
* What to do when the user clicks the summary button
|
|
342
|
-
*/
|
|
343
|
-
onClick: () => void;
|
|
344
|
-
/**
|
|
345
|
-
* What to do when the user clicks the back button on mobile
|
|
346
|
-
*/
|
|
347
|
-
onBackClick: () => void;
|
|
348
|
-
/**
|
|
349
|
-
* Disable back button if first passenger is selected on mobile
|
|
350
|
-
*/
|
|
351
|
-
disableBackButton: boolean;
|
|
352
|
-
/**
|
|
353
|
-
* What copy should the summary button render
|
|
354
|
-
* Ex.: "Continue"
|
|
355
|
-
*/
|
|
356
|
-
primaryButtonCopy: string;
|
|
357
|
-
/**
|
|
358
|
-
* What copy should the cancel button be
|
|
359
|
-
* Ex.: "Cancel"
|
|
360
|
-
*/
|
|
361
|
-
cancelButtonCopy?: string;
|
|
362
|
-
iconAfter?: any;
|
|
363
|
-
}
|
|
364
|
-
/**
|
|
365
|
-
* The seat selection summary component.
|
|
366
|
-
*/
|
|
367
|
-
export const Summary: React.FC<SummaryProps>;
|
|
368
|
-
|
|
369
|
-
export * from './Summary';
|
|
370
|
-
|
|
371
|
-
export const convertDurationToString: (duration: string) => string;
|
|
372
|
-
|
|
373
|
-
export {};
|
|
374
|
-
|
|
375
|
-
import { Offer, SeatMap } from '@lib/types';
|
|
376
|
-
export const getCabin: (forDeck: number, forSegmentId: string, segments: SeatMap[], offer: Offer) => {
|
|
377
|
-
cabin: null;
|
|
378
|
-
hasMultipleDecks?: undefined;
|
|
379
|
-
anyHasWings?: undefined;
|
|
380
|
-
} | {
|
|
381
|
-
cabin: import("@lib/types").SeatMapCabin;
|
|
382
|
-
hasMultipleDecks: boolean;
|
|
383
|
-
anyHasWings: boolean;
|
|
384
|
-
};
|
|
385
|
-
|
|
386
|
-
export const getNextItemInArray: (items: string[], currentItem: string) => number;
|
|
387
|
-
|
|
388
|
-
export {};
|
|
389
|
-
|
|
390
|
-
import { SeatMapCabinRowSectionAvailableService } from '@lib/types';
|
|
391
|
-
import { SeatSelectionContextInterface } from '../SeatSelectContext';
|
|
392
|
-
export const getSeatServices: (forSeatSelection: SeatSelectionContextInterface) => SeatMapCabinRowSectionAvailableService[];
|
|
393
|
-
|
|
394
|
-
import { OfferSliceSegment } from '@lib/types';
|
|
395
|
-
import { SeatSelectionContextInterface } from '../SeatSelectContext';
|
|
396
|
-
export type SeatPerSegmentsProps = Record<string, string[]>;
|
|
397
|
-
export const getSeatsPerSegment: (currentSelectedSegment: OfferSliceSegment, seatSelection: SeatSelectionContextInterface) => SeatPerSegmentsProps;
|
|
398
|
-
|
|
399
|
-
export {};
|
|
400
|
-
|
|
401
|
-
import { SeatMapCabin, SeatMapCabinRowSectionElementAmenity } from '@lib/types';
|
|
402
|
-
export const getSymbols: (forCabin: SeatMapCabin) => Set<SeatMapCabinRowSectionElementAmenity>;
|
|
403
|
-
|
|
404
|
-
export * from './common';
|
|
405
|
-
export * from './helpers';
|
|
406
|
-
export * from './hooks';
|
|
407
|
-
export * from './types';
|
|
408
|
-
|
|
409
|
-
export * from './Button';
|
|
410
|
-
export * from './Icon';
|
|
411
|
-
export * from './PopoverContainer';
|
|
412
|
-
export * from './Portal';
|
|
413
|
-
export * from './Spinner';
|
|
414
|
-
export * from './Tabs';
|
|
415
|
-
|
|
416
|
-
import * as React from 'react';
|
|
417
|
-
import { BaseButtonProps } from './common';
|
|
418
|
-
import './Button.css';
|
|
419
|
-
export interface ButtonProps extends BaseButtonProps {
|
|
420
|
-
/**
|
|
421
|
-
* Click event handler
|
|
422
|
-
*/
|
|
423
|
-
onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
424
|
-
/**
|
|
425
|
-
* Keydown event handler
|
|
426
|
-
*/
|
|
427
|
-
onKeyDown?: (event: React.KeyboardEvent<HTMLButtonElement>) => void;
|
|
428
|
-
/**
|
|
429
|
-
* HTML type attribute of button. Accepted values are "button", "submit", and "reset".
|
|
430
|
-
*/
|
|
431
|
-
type?: 'button' | 'submit' | 'reset';
|
|
432
|
-
/**
|
|
433
|
-
* Element ID
|
|
434
|
-
*/
|
|
435
|
-
id?: string;
|
|
436
|
-
}
|
|
437
|
-
/**
|
|
438
|
-
* Useful to communicate actions to your users.
|
|
439
|
-
*/
|
|
440
|
-
export const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
441
|
-
|
|
442
|
-
import * as React from 'react';
|
|
443
|
-
export interface ChromelessButtonProps {
|
|
444
|
-
/**
|
|
445
|
-
* A space-delimited list of class names to pass along to a child element.
|
|
446
|
-
*/
|
|
447
|
-
className?: string;
|
|
448
|
-
/**
|
|
449
|
-
* Click event handler
|
|
450
|
-
*/
|
|
451
|
-
onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
452
|
-
/**
|
|
453
|
-
* Keydown event handler
|
|
454
|
-
*/
|
|
455
|
-
onKeyDown?: (event: React.KeyboardEvent<HTMLButtonElement>) => void;
|
|
456
|
-
/**
|
|
457
|
-
* The type of the button
|
|
458
|
-
*/
|
|
459
|
-
type?: 'button' | 'submit' | 'reset';
|
|
460
|
-
/**
|
|
461
|
-
* Element ID
|
|
462
|
-
*/
|
|
463
|
-
id?: string;
|
|
464
|
-
}
|
|
465
|
-
/**
|
|
466
|
-
* A button that has all styling removed. This is useful for a base for custom buttons.
|
|
467
|
-
*/
|
|
468
|
-
export const ChromelessButton: React.FC<ChromelessButtonProps>;
|
|
469
|
-
|
|
470
|
-
import { IconName } from '@lib/common/Icon';
|
|
471
|
-
export interface BaseButtonProps {
|
|
472
|
-
/**
|
|
473
|
-
* A space-delimited list of class names to pass along to a child element.
|
|
474
|
-
*/
|
|
475
|
-
className?: string;
|
|
476
|
-
/**
|
|
477
|
-
* Is the button currently disabled?
|
|
478
|
-
*/
|
|
479
|
-
disabled?: boolean;
|
|
480
|
-
/**
|
|
481
|
-
* An icon to show after the button's label.
|
|
482
|
-
*/
|
|
483
|
-
iconAfter?: IconName;
|
|
484
|
-
/**
|
|
485
|
-
* An icon to show before the button's label.
|
|
486
|
-
*/
|
|
487
|
-
iconBefore?: IconName;
|
|
488
|
-
/**
|
|
489
|
-
* An icon to show before the button's label.
|
|
490
|
-
*/
|
|
491
|
-
iconOnly?: IconName;
|
|
492
|
-
/**
|
|
493
|
-
* What is the intent of the button? This will change the colour of the button.
|
|
494
|
-
*/
|
|
495
|
-
intent?: 'PRIMARY' | 'MUTED';
|
|
496
|
-
/**
|
|
497
|
-
* Should this button use outlined styles.
|
|
498
|
-
*/
|
|
499
|
-
outlined?: boolean;
|
|
500
|
-
/**
|
|
501
|
-
* The text to be displayed in the button. If `iconOnly` is set, this text will be used as an `aria-label`.
|
|
502
|
-
*/
|
|
503
|
-
text: string;
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
export * from './Button';
|
|
507
|
-
export * from './ChromelessButton';
|
|
508
|
-
|
|
509
|
-
import * as React from 'react';
|
|
510
|
-
import './Icon.css';
|
|
511
|
-
export const iconMap: {
|
|
512
|
-
arrow_forward: JSX.Element;
|
|
513
|
-
bassinet: JSX.Element;
|
|
514
|
-
chevron: JSX.Element;
|
|
515
|
-
close: JSX.Element;
|
|
516
|
-
closet: JSX.Element;
|
|
517
|
-
exit_row: JSX.Element;
|
|
518
|
-
exit_row_right: JSX.Element;
|
|
519
|
-
galley: JSX.Element;
|
|
520
|
-
lavatory: JSX.Element;
|
|
521
|
-
lie_flat_seat: JSX.Element;
|
|
522
|
-
no_airplane: JSX.Element;
|
|
523
|
-
no_seat: JSX.Element;
|
|
524
|
-
seat: JSX.Element;
|
|
525
|
-
seat_paid_indicator: JSX.Element;
|
|
526
|
-
stairs: JSX.Element;
|
|
527
|
-
wifi: JSX.Element;
|
|
528
|
-
};
|
|
529
|
-
export type IconName = keyof typeof iconMap;
|
|
530
|
-
interface IconProps {
|
|
531
|
-
name: IconName;
|
|
532
|
-
className?: string;
|
|
533
|
-
size?: number;
|
|
534
|
-
onClick?: (event: React.MouseEvent<SVGSVGElement, MouseEvent>) => void;
|
|
535
|
-
ml?: string;
|
|
536
|
-
viewBox?: string;
|
|
537
|
-
}
|
|
538
|
-
export const Icon: React.FunctionComponent<IconProps>;
|
|
539
|
-
export {};
|
|
540
|
-
|
|
541
|
-
export * from './Icon';
|
|
542
|
-
|
|
543
|
-
import * as React from 'react';
|
|
544
|
-
import './PopoverContainer.css';
|
|
545
|
-
export interface PopoverContainerProps {
|
|
546
|
-
id?: string;
|
|
547
|
-
style?: React.CSSProperties;
|
|
548
|
-
}
|
|
549
|
-
export const PopoverContainer: React.ForwardRefExoticComponent<PopoverContainerProps & {
|
|
550
|
-
children: React.ReactNode;
|
|
551
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
552
|
-
|
|
553
|
-
export * from './PopoverContainer';
|
|
554
|
-
|
|
555
|
-
import * as React from 'react';
|
|
556
|
-
type Portal = {
|
|
557
|
-
id: string;
|
|
558
|
-
children: React.ReactNode;
|
|
559
|
-
};
|
|
560
|
-
export const Portal: React.FC<Portal>;
|
|
561
|
-
export {};
|
|
562
|
-
|
|
563
|
-
export * from './Portal';
|
|
564
|
-
|
|
565
|
-
import * as React from 'react';
|
|
566
|
-
import './Spinner.css';
|
|
567
|
-
interface SpinnerProps {
|
|
568
|
-
size?: 'small' | 'default';
|
|
569
|
-
dots?: 'one' | 'two' | 'three';
|
|
570
|
-
intent?: 'primary' | 'muted' | 'danger' | 'default';
|
|
571
|
-
}
|
|
572
|
-
export const Spinner: React.FC<SpinnerProps>;
|
|
573
|
-
export {};
|
|
574
|
-
|
|
575
|
-
export * from './Spinner';
|
|
576
|
-
|
|
577
|
-
/// <reference types="react" />
|
|
578
|
-
import './Tabs.css';
|
|
579
|
-
export interface TabsProps<T_Options extends string> {
|
|
580
|
-
/**
|
|
581
|
-
* The currently selected tab option
|
|
582
|
-
*/
|
|
583
|
-
value: T_Options;
|
|
584
|
-
/**
|
|
585
|
-
* Callback for when a new tab option is selected
|
|
586
|
-
*/
|
|
587
|
-
onChange: (value: T_Options) => void;
|
|
588
|
-
/**
|
|
589
|
-
* The options you want to render on the tabs
|
|
590
|
-
*/
|
|
591
|
-
options: T_Options[];
|
|
592
|
-
}
|
|
593
|
-
export function Tabs<T extends string>({ value, onChange, options }: TabsProps<T>): JSX.Element;
|
|
594
|
-
|
|
595
|
-
export * from './Tabs';
|
|
596
|
-
|
|
597
|
-
export {};
|
|
598
|
-
|
|
599
|
-
import { CurrencyConversion, SeatMap } from '@lib/types';
|
|
29
|
+
city_name: string;
|
|
600
30
|
/**
|
|
601
|
-
*
|
|
31
|
+
* The three-character IATA code for the airport
|
|
602
32
|
*/
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
export * from './convert-currency-for-seatmaps';
|
|
606
|
-
export * from './is-element-visible';
|
|
607
|
-
export * from './is-mobile-or-tablet';
|
|
608
|
-
export * from './money-string-formatter';
|
|
609
|
-
export * from './sum';
|
|
610
|
-
|
|
611
|
-
export const isElementVisible: (element: HTMLElement) => boolean;
|
|
612
|
-
|
|
613
|
-
export const isMobileOrTablet: (viewport: number) => boolean;
|
|
614
|
-
|
|
33
|
+
iata_code?: string;
|
|
615
34
|
/**
|
|
616
|
-
*
|
|
617
|
-
*
|
|
618
|
-
* @
|
|
35
|
+
* The ISO 3166-1 alpha-2 code for the country where the city is located
|
|
36
|
+
* @link https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
|
|
37
|
+
* @example "GB"
|
|
619
38
|
*/
|
|
620
|
-
|
|
621
|
-
[option: string]: string;
|
|
622
|
-
}) => (value: number) => string;
|
|
39
|
+
iata_country_code: string;
|
|
623
40
|
/**
|
|
624
|
-
*
|
|
625
|
-
*
|
|
626
|
-
* @param currency The ISO-4217 currency code to be used by the formatter
|
|
41
|
+
* The 3-letter IATA code for the city where the place is located.
|
|
42
|
+
* 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).
|
|
627
43
|
*/
|
|
628
|
-
|
|
44
|
+
iata_city_code?: string | null;
|
|
629
45
|
/**
|
|
630
|
-
*
|
|
631
|
-
*
|
|
632
|
-
* @param currency The ISO-4217 currency code to be used by the formatter
|
|
46
|
+
* The four-character ICAO code for the airport
|
|
633
47
|
*/
|
|
634
|
-
|
|
635
|
-
isNegative: boolean;
|
|
636
|
-
currency: string;
|
|
637
|
-
integer: string;
|
|
638
|
-
fraction: string;
|
|
639
|
-
currencyBeforeNumber: boolean;
|
|
640
|
-
};
|
|
641
|
-
|
|
642
|
-
export const sum: (arr: any[]) => any;
|
|
643
|
-
|
|
644
|
-
export * from './use-duffel-popper';
|
|
645
|
-
export * from './use-viewport-width';
|
|
646
|
-
export * from './use-portal';
|
|
647
|
-
|
|
648
|
-
import * as PopperJS from '@popperjs/core';
|
|
649
|
-
import React from 'react';
|
|
650
|
-
import { usePopper } from 'react-popper';
|
|
651
|
-
type UsePopperReturnType = ReturnType<typeof usePopper>;
|
|
652
|
-
interface UseDuffelPopper {
|
|
653
|
-
popper: UsePopperReturnType;
|
|
654
|
-
setReferenceElement: React.Dispatch<React.SetStateAction<HTMLElement | null>>;
|
|
655
|
-
setPopperElement: React.Dispatch<React.SetStateAction<HTMLElement | null>>;
|
|
656
|
-
setArrowElement: React.Dispatch<React.SetStateAction<HTMLElement | null>>;
|
|
657
|
-
}
|
|
658
|
-
export const useDuffelPopper: (isOpen: boolean, onClose: () => void, popperOptions: Partial<PopperJS.Options>, options?: {
|
|
659
|
-
shouldInsideClickClose?: boolean | undefined;
|
|
660
|
-
} | undefined) => UseDuffelPopper;
|
|
661
|
-
export {};
|
|
662
|
-
|
|
48
|
+
icao_code?: string;
|
|
663
49
|
/**
|
|
664
|
-
*
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
* exists.
|
|
668
|
-
* @example
|
|
669
|
-
* const target = usePortal(id, [id]);
|
|
670
|
-
* return createPortal(children, target);
|
|
671
|
-
* @param {String} id The id of the target container, e.g 'modal' or 'spotlight'
|
|
672
|
-
* @returns {HTMLElement} The DOM node to use as the Portal target.
|
|
673
|
-
*/
|
|
674
|
-
export function usePortal(id: string): HTMLElement;
|
|
675
|
-
|
|
676
|
-
export const useViewportWidth: () => number;
|
|
677
|
-
|
|
678
|
-
export * from './mocks';
|
|
679
|
-
|
|
680
|
-
export * from './make-mock-aircraft';
|
|
681
|
-
export * from './make-mock-airline';
|
|
682
|
-
export * from './make-mock-airport';
|
|
683
|
-
export * from './make-mock-city';
|
|
684
|
-
export * from './make-mock-date';
|
|
685
|
-
export * from './make-mock-offer';
|
|
686
|
-
export * from './make-mock-offer-available-service';
|
|
687
|
-
export * from './make-mock-offer-available-service-metadata';
|
|
688
|
-
export * from './make-mock-offer-passenger';
|
|
689
|
-
export * from './make-mock-offer-request-passenger';
|
|
690
|
-
export * from './make-mock-offer-slice';
|
|
691
|
-
export * from './make-mock-offer-slice-place';
|
|
692
|
-
export * from './make-mock-offer-slice-segment';
|
|
693
|
-
export * from './make-mock-offer-slice-segment-passenger';
|
|
694
|
-
export * from './make-mock-offer-slice-segment-passenger-baggage';
|
|
695
|
-
export * from './make-mock-seat-map';
|
|
696
|
-
export * from './make-mock-seat-map-cabin';
|
|
697
|
-
export * from './make-mock-seat-map-cabin-row';
|
|
698
|
-
export * from './make-mock-seat-map-cabin-row-section-available-service';
|
|
699
|
-
export * from './make-mock-seat-map-cabin-row-section-element-seat';
|
|
700
|
-
export * from './make-mock-seat-selection-context-value';
|
|
701
|
-
export * from './mockOfferInvalidProps';
|
|
702
|
-
export * from './mockOfferOneSegment';
|
|
703
|
-
export * from './mockOfferTwoSegments';
|
|
704
|
-
export * from './mockCurrencyConvertedSeatMaps';
|
|
705
|
-
|
|
706
|
-
import { Aircraft } from '@lib/types';
|
|
707
|
-
export const makeMockAircraft: (extendDefault?: Partial<Aircraft> | undefined) => Aircraft;
|
|
708
|
-
|
|
709
|
-
import { Airline } from '@lib/types';
|
|
710
|
-
export const makeMockAirline: (extendDefault?: Partial<Airline> | undefined) => Airline;
|
|
711
|
-
|
|
712
|
-
import { Airport } from '@lib/types';
|
|
713
|
-
export const makeMockAirport: (extendDefault?: Partial<Airport> | undefined) => Airport;
|
|
714
|
-
|
|
715
|
-
import { City } from '@lib/types';
|
|
716
|
-
export const makeMockCity: (extendDefault?: Partial<City> | undefined) => City;
|
|
717
|
-
|
|
718
|
-
export const makeMockDateInTheFuture: (daysAhead: number) => Date;
|
|
719
|
-
export const makeMockDateInThePast: (daysBehind: number) => Date;
|
|
720
|
-
|
|
721
|
-
import { OfferAvailableServiceMetadataMap } from '@lib/types';
|
|
722
|
-
export const makeMockOfferAvailableServiceMetadata: <T_ServiceType extends "baggage" = "baggage">(extendDefault?: Partial<OfferAvailableServiceMetadataMap[T_ServiceType]> | undefined) => OfferAvailableServiceMetadataMap[T_ServiceType];
|
|
723
|
-
|
|
724
|
-
import { OfferAvailableService } from '@lib/types';
|
|
725
|
-
export const makeMockOfferAvailableService: (extendDefault?: Partial<OfferAvailableService<"baggage">> | undefined) => OfferAvailableService;
|
|
726
|
-
|
|
727
|
-
import { OfferPassenger } from '@lib/types';
|
|
728
|
-
export const makeMockOfferPassenger: (extendDefault?: Partial<OfferPassenger> | undefined) => OfferPassenger;
|
|
729
|
-
|
|
730
|
-
import { OfferPassenger } from '@lib/types';
|
|
731
|
-
export const makeMockOfferRequestPassenger: (extendDefault?: Partial<OfferPassenger> | undefined) => OfferPassenger;
|
|
732
|
-
|
|
733
|
-
import { Place } from '@lib/types';
|
|
734
|
-
export const makeMockOfferSlicePlace: (extendDefault?: Partial<Place> | undefined) => Place;
|
|
735
|
-
|
|
736
|
-
import { OfferSliceSegmentPassengerBaggage } from '@lib/types';
|
|
737
|
-
export const makeMockOfferSliceSegmentPassengerBaggage: (extendDefault?: Partial<OfferSliceSegmentPassengerBaggage> | undefined) => OfferSliceSegmentPassengerBaggage;
|
|
738
|
-
|
|
739
|
-
import { OfferSliceSegmentPassenger } from '@lib/types';
|
|
740
|
-
export const makeMockOfferSliceSegmentPassenger: (extendDefault?: Partial<OfferSliceSegmentPassenger> | undefined) => OfferSliceSegmentPassenger;
|
|
741
|
-
|
|
742
|
-
import { OfferSliceSegment } from '@lib/types';
|
|
743
|
-
export const makeMockOfferSliceSegment: (extendDefault?: Partial<OfferSliceSegment> | undefined) => OfferSliceSegment;
|
|
744
|
-
export const makeMockOfferSliceSegmentFromOriginDestination: (originIataCode: string, destinationIataCode: string, passenger_id?: string | undefined, secondPassengerId?: string | undefined) => OfferSliceSegment;
|
|
745
|
-
|
|
746
|
-
import { OfferSlice } from '@lib/types';
|
|
747
|
-
export const makeMockOfferSlice: (extendDefault?: Partial<OfferSlice> | undefined) => OfferSlice;
|
|
748
|
-
export const makeMockOfferSliceFromOriginDestination: (originIataCode: string, destinationIataCode: string, passengerId?: string | undefined, secondPassengerId?: string | undefined) => OfferSlice;
|
|
749
|
-
|
|
750
|
-
import { Offer } from '@lib/types';
|
|
751
|
-
export const makeMockOffer: (extendDefault?: Partial<Offer> | undefined) => Offer;
|
|
752
|
-
|
|
753
|
-
import { SeatMapCabinRowSectionAvailableService } from '@lib/types';
|
|
754
|
-
export const makeMockSeatMapCabinRowSectionAvailableService: (extendDefault?: Partial<SeatMapCabinRowSectionAvailableService> | undefined) => SeatMapCabinRowSectionAvailableService;
|
|
755
|
-
|
|
756
|
-
import { SeatMapCabinRowSectionElementSeat } from '@lib/types';
|
|
757
|
-
export const makeMockSeatMapCabinRowSectionElementSeat: (extendDefault?: Partial<SeatMapCabinRowSectionElementSeat> | undefined) => SeatMapCabinRowSectionElementSeat;
|
|
758
|
-
|
|
759
|
-
import { SeatMapCabinRow } from '@lib/types';
|
|
760
|
-
export const makeMockSeatMapCabinRow: (extendDefault?: Partial<SeatMapCabinRow> | undefined) => SeatMapCabinRow;
|
|
761
|
-
|
|
762
|
-
import { SeatMapCabin } from '@lib/types';
|
|
763
|
-
export const makeMockSeatMapCabin: (extendDefault?: Partial<SeatMapCabin> | undefined) => SeatMapCabin;
|
|
764
|
-
|
|
765
|
-
import { SeatMap } from '@lib/types';
|
|
766
|
-
export const makeMockSeatMap: (extendDefault?: Partial<SeatMap> | undefined) => SeatMap;
|
|
767
|
-
|
|
768
|
-
import { SeatSelectionContextValue } from '@components/SeatSelect/SeatSelectContext';
|
|
769
|
-
export const makeMockSeatSelectionContextValue: (extendDefault?: Partial<SeatSelectionContextValue> | undefined) => SeatSelectionContextValue;
|
|
770
|
-
|
|
50
|
+
* Duffel's unique identifier for the airport
|
|
51
|
+
*/
|
|
52
|
+
id: string;
|
|
771
53
|
/**
|
|
772
|
-
*
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
export interface Aircraft {
|
|
776
|
-
/**
|
|
777
|
-
* The name of the aircraft
|
|
778
|
-
*/
|
|
779
|
-
name: string;
|
|
780
|
-
/**
|
|
781
|
-
* Duffel's unique identifier for the aircraft
|
|
782
|
-
*/
|
|
783
|
-
id: string;
|
|
784
|
-
/**
|
|
785
|
-
* The three-character IATA code for the aircraft
|
|
786
|
-
*/
|
|
787
|
-
iata_code: string;
|
|
788
|
-
}
|
|
789
|
-
|
|
54
|
+
* The latitude position of the airport represented in Decimal degrees with 6 decimal points with a range between -90° and 90°
|
|
55
|
+
*/
|
|
56
|
+
latitude: number;
|
|
790
57
|
/**
|
|
791
|
-
*
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
export interface Airline {
|
|
795
|
-
/**
|
|
796
|
-
* The three-character IATA code for the airline
|
|
797
|
-
*/
|
|
798
|
-
name: string;
|
|
799
|
-
/**
|
|
800
|
-
* Duffel's unique identifier for the airline
|
|
801
|
-
*/
|
|
802
|
-
id: string;
|
|
803
|
-
iata_code: string;
|
|
804
|
-
}
|
|
805
|
-
|
|
806
|
-
import { City } from './index';
|
|
807
|
-
/**
|
|
808
|
-
* Airports are used to identify origins and destinations in journey slices
|
|
809
|
-
* @link https://duffel.com/docs/api/airports/schema
|
|
810
|
-
*/
|
|
811
|
-
export interface Airport {
|
|
812
|
-
/**
|
|
813
|
-
* The metropolitan area where the airport is located.
|
|
814
|
-
* Only present for airports which are registered with IATA as belonging to a metropolitan area.
|
|
815
|
-
*/
|
|
816
|
-
city?: City | null;
|
|
817
|
-
/**
|
|
818
|
-
* The name of the city (or cities separated by a `/`) where the airport is located
|
|
819
|
-
*/
|
|
820
|
-
city_name: string;
|
|
821
|
-
/**
|
|
822
|
-
* The three-character IATA code for the airport
|
|
823
|
-
*/
|
|
824
|
-
iata_code?: string;
|
|
825
|
-
/**
|
|
826
|
-
* The ISO 3166-1 alpha-2 code for the country where the city is located
|
|
827
|
-
* @link https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
|
|
828
|
-
* @example "GB"
|
|
829
|
-
*/
|
|
830
|
-
iata_country_code: string;
|
|
831
|
-
/**
|
|
832
|
-
* The 3-letter IATA code for the city where the place is located.
|
|
833
|
-
* 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).
|
|
834
|
-
*/
|
|
835
|
-
iata_city_code?: string | null;
|
|
836
|
-
/**
|
|
837
|
-
* The four-character ICAO code for the airport
|
|
838
|
-
*/
|
|
839
|
-
icao_code?: string;
|
|
840
|
-
/**
|
|
841
|
-
* Duffel's unique identifier for the airport
|
|
842
|
-
*/
|
|
843
|
-
id: string;
|
|
844
|
-
/**
|
|
845
|
-
* The latitude position of the airport represented in Decimal degrees with 6 decimal points with a range between -90° and 90°
|
|
846
|
-
*/
|
|
847
|
-
latitude: number;
|
|
848
|
-
/**
|
|
849
|
-
* The longitude position of the airport represented in Decimal degrees with 6 decimal points with a range between -180° and 180°
|
|
850
|
-
*/
|
|
851
|
-
longitude: number;
|
|
852
|
-
/**
|
|
853
|
-
* The name of the airport
|
|
854
|
-
*/
|
|
855
|
-
name: string;
|
|
856
|
-
/**
|
|
857
|
-
* The time zone of the airport, specified by name from the [tz database](https://en.wikipedia.org/wiki/Tz_database)
|
|
858
|
-
*/
|
|
859
|
-
time_zone: string;
|
|
860
|
-
}
|
|
861
|
-
|
|
862
|
-
export interface CurrencyConversion {
|
|
863
|
-
/**
|
|
864
|
-
* currency The ISO-4217 currency code to be used
|
|
865
|
-
*/
|
|
866
|
-
currency: string;
|
|
867
|
-
/**
|
|
868
|
-
* Conversion multiple to be applied to all prices
|
|
869
|
-
*/
|
|
870
|
-
rate: number;
|
|
871
|
-
}
|
|
872
|
-
|
|
873
|
-
import { CabinClass, FlightsConditions, PassengerIdentityDocumentType, Place, PlaceType, Aircraft, Airline, Airport } from './index';
|
|
874
|
-
/**
|
|
875
|
-
* Each offer represents flights you can buy from an airline at a particular price that meet your search criteria.
|
|
876
|
-
* @link https://duffel.com/docs/api/offers/schema
|
|
877
|
-
*/
|
|
878
|
-
export interface Offer {
|
|
879
|
-
/**
|
|
880
|
-
* The types of identity documents that may be provided for the passengers when creating an order based on this offer.
|
|
881
|
-
* Currently, the only supported type is `passport`. If this is `[]`, then you must not provide identity documents.
|
|
882
|
-
*/
|
|
883
|
-
allowed_passenger_identity_document_types: PassengerIdentityDocumentType[];
|
|
884
|
-
/**
|
|
885
|
-
* The services that can be booked along with the offer but are not included by default, for example an additional checked bag.
|
|
886
|
-
* This field is only returned in the Get single offer endpoint.
|
|
887
|
-
* When there are no services available, or we don't support services for the airline, this list will be empty.
|
|
888
|
-
*/
|
|
889
|
-
available_services: OfferAvailableService[];
|
|
890
|
-
/**
|
|
891
|
-
* The base price of the offer for all passengers, excluding taxes.
|
|
892
|
-
* It does not include the base amount of any service(s) that might be booked with the offer.
|
|
893
|
-
*/
|
|
894
|
-
base_amount: string;
|
|
895
|
-
/**
|
|
896
|
-
* The currency of the `base_amount`, as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code
|
|
897
|
-
*/
|
|
898
|
-
base_currency: string;
|
|
899
|
-
/**
|
|
900
|
-
* The conditions associated with this offer, describing the kinds of modifications you can make post-booking and any penalties that will apply to those modifications.
|
|
901
|
-
* This information assumes the condition is applied to all of the slices and passengers associated with this offer - for information at the slice level (e.g. "what happens if I just want to change the first slice?") refer to the `slices`.
|
|
902
|
-
* If a particular kind of modification is allowed, you may not always be able to take action through the Duffel API.
|
|
903
|
-
* In some cases, you may need to contact the Duffel support team or the airline directly.
|
|
904
|
-
*/
|
|
905
|
-
conditions: FlightsConditions;
|
|
906
|
-
/**
|
|
907
|
-
* The ISO 8601 datetime at which the offer was created
|
|
908
|
-
*/
|
|
909
|
-
created_at: string;
|
|
910
|
-
/**
|
|
911
|
-
* The ISO 8601 datetime at which the offer will expire and no longer be usable to create an order
|
|
912
|
-
*/
|
|
913
|
-
expires_at: string;
|
|
914
|
-
/**
|
|
915
|
-
* Duffel's unique identifier for the offer
|
|
916
|
-
*/
|
|
917
|
-
id: string;
|
|
918
|
-
/**
|
|
919
|
-
* Whether the offer request was created in live mode.
|
|
920
|
-
* This field will be set to `true` if the offer request was created in live mode, or `false` if it was created in test mode.
|
|
921
|
-
*/
|
|
922
|
-
live_mode: boolean;
|
|
923
|
-
/**
|
|
924
|
-
* The airline which provided the offer
|
|
925
|
-
*/
|
|
926
|
-
owner: Airline;
|
|
927
|
-
/**
|
|
928
|
-
* Whether identity documents must be provided for each of the passengers when creating an order based on this offer.
|
|
929
|
-
* If this is `true`, you must provide an identity document for every passenger.
|
|
930
|
-
*/
|
|
931
|
-
passenger_identity_documents_required: boolean;
|
|
932
|
-
/**
|
|
933
|
-
* The passengers included in the offer
|
|
934
|
-
*/
|
|
935
|
-
passengers: OfferPassenger[];
|
|
936
|
-
/**
|
|
937
|
-
* The payment requirements for this offer
|
|
938
|
-
*/
|
|
939
|
-
payment_requirements: PaymentRequirements;
|
|
940
|
-
/**
|
|
941
|
-
* The slices that make up this offer. Each slice will include one or more segments,
|
|
942
|
-
* the specific flights that the airline is offering to take the passengers from the slice's `origin` to its `destination`.
|
|
943
|
-
*/
|
|
944
|
-
slices: OfferSlice[];
|
|
945
|
-
/**
|
|
946
|
-
* The amount of tax payable on the offer for all passengers
|
|
947
|
-
*/
|
|
948
|
-
tax_amount: string | null;
|
|
949
|
-
/**
|
|
950
|
-
* The currency of the `tax_amount`, as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code
|
|
951
|
-
*/
|
|
952
|
-
tax_currency: string | null;
|
|
953
|
-
/**
|
|
954
|
-
* The total price of the offer for all passengers, including taxes.
|
|
955
|
-
* It does not include the total price of any service(s) that might be booked with the offer.
|
|
956
|
-
*/
|
|
957
|
-
total_amount: string;
|
|
958
|
-
/**
|
|
959
|
-
* An estimate of the total carbon dioxide (CO₂) emissions when
|
|
960
|
-
* all of the passengers fly this offer's itinerary, measured in kilograms
|
|
961
|
-
*/
|
|
962
|
-
total_emissions_kg: string;
|
|
963
|
-
/**
|
|
964
|
-
* The currency of the `total_amount`, as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code
|
|
965
|
-
*/
|
|
966
|
-
total_currency: string;
|
|
967
|
-
/**
|
|
968
|
-
* The ISO 8601 datetime at which the offer was last updated
|
|
969
|
-
*/
|
|
970
|
-
updated_at: string;
|
|
971
|
-
}
|
|
972
|
-
export interface OfferAvailableServiceBaggageMetadata {
|
|
973
|
-
/**
|
|
974
|
-
* The maximum weight that the baggage can have in kilograms
|
|
975
|
-
*/
|
|
976
|
-
maximum_weight_kg: number | null;
|
|
977
|
-
/**
|
|
978
|
-
* The maximum height that the baggage can have in centimetres
|
|
979
|
-
*/
|
|
980
|
-
maximum_height_cm: number | null;
|
|
981
|
-
/**
|
|
982
|
-
* The maximum length that the baggage can have in centimetres
|
|
983
|
-
*/
|
|
984
|
-
maximum_length_cm: number | null;
|
|
985
|
-
/**
|
|
986
|
-
* The maximum depth that the baggage can have in centimetres
|
|
987
|
-
*/
|
|
988
|
-
maximum_depth_cm: number | null;
|
|
989
|
-
/**
|
|
990
|
-
* The type of the baggage
|
|
991
|
-
*/
|
|
992
|
-
type: BaggageType;
|
|
993
|
-
}
|
|
994
|
-
export interface PaymentRequirements {
|
|
995
|
-
/**
|
|
996
|
-
* The ISO 8601 datetime by which you must pay for this order.
|
|
997
|
-
* At this time, if still unpaid, the reserved space on the flight(s)
|
|
998
|
-
* will be released and you will have to create a new order.
|
|
999
|
-
* This will be null only for orders where `awaiting_payment` is `false`.
|
|
1000
|
-
*/
|
|
1001
|
-
payment_required_by?: string | null;
|
|
1002
|
-
/**
|
|
1003
|
-
* The ISO 8601 datetime at which the price associated
|
|
1004
|
-
* with the order will no longer be guaranteed by the airline
|
|
1005
|
-
* and the order will need to be repriced before payment.
|
|
1006
|
-
* This can be null when there is no price guarantee.
|
|
1007
|
-
*/
|
|
1008
|
-
price_guarantee_expires_at?: string | null;
|
|
1009
|
-
/**
|
|
1010
|
-
* Whether immediate payment is required or not
|
|
1011
|
-
*/
|
|
1012
|
-
requires_instant_payment: boolean;
|
|
1013
|
-
}
|
|
1014
|
-
export interface OfferAvailableServiceMetadataMap {
|
|
1015
|
-
baggage: OfferAvailableServiceBaggageMetadata;
|
|
1016
|
-
}
|
|
1017
|
-
export type OfferAvailableServiceType = keyof OfferAvailableServiceMetadataMap;
|
|
1018
|
-
export interface OfferAvailableService<T_ServiceType extends OfferAvailableServiceType = 'baggage'> {
|
|
1019
|
-
/**
|
|
1020
|
-
* Duffel's unique identifier for the service
|
|
1021
|
-
*/
|
|
1022
|
-
id: string;
|
|
1023
|
-
/**
|
|
1024
|
-
* The maximum quantity of this service that can be booked with an order
|
|
1025
|
-
*/
|
|
1026
|
-
maximum_quantity: number;
|
|
1027
|
-
/**
|
|
1028
|
-
* An object containing metadata about the service, like the maximum weight and dimensions of the baggage.
|
|
1029
|
-
*/
|
|
1030
|
-
metadata?: OfferAvailableServiceMetadataMap[T_ServiceType];
|
|
1031
|
-
/**
|
|
1032
|
-
* The list of passenger `id`s the service applies to.
|
|
1033
|
-
* If you add this service to an order it will apply to all the passengers in this list.
|
|
1034
|
-
* For services where the type is `baggage`, this list will include only a single passenger.
|
|
1035
|
-
*/
|
|
1036
|
-
passenger_ids: string[];
|
|
1037
|
-
/**
|
|
1038
|
-
* The list of segment ids the service applies to.
|
|
1039
|
-
* If you add this service to an order it will apply to all the segments in this list.
|
|
1040
|
-
* For services where the type is baggage, depending on the airline,
|
|
1041
|
-
* this list includes all the segments of all slices or all the segments of a single slice.
|
|
1042
|
-
*/
|
|
1043
|
-
segment_ids: string[];
|
|
1044
|
-
/**
|
|
1045
|
-
* The total price of the service for all passengers and segments it applies to, including taxes
|
|
1046
|
-
*/
|
|
1047
|
-
total_amount: string;
|
|
1048
|
-
/**
|
|
1049
|
-
* The currency of the `total_amount`, as an ISO 4217 currency code
|
|
1050
|
-
*/
|
|
1051
|
-
total_currency: string;
|
|
1052
|
-
/**
|
|
1053
|
-
* The type of the service.
|
|
1054
|
-
* For now we only return services of type baggage but we will return other types in the future.
|
|
1055
|
-
* We won't consider adding new service types a break change.
|
|
1056
|
-
*/
|
|
1057
|
-
type: T_ServiceType;
|
|
1058
|
-
}
|
|
1059
|
-
export interface OfferPassenger {
|
|
1060
|
-
/**
|
|
1061
|
-
* The age of the passenger on the departure_date of the final slice.
|
|
1062
|
-
*/
|
|
1063
|
-
age?: number;
|
|
1064
|
-
/**
|
|
1065
|
-
* The type of the passenger.
|
|
1066
|
-
*/
|
|
1067
|
-
type?: 'adult';
|
|
1068
|
-
/**
|
|
1069
|
-
* The identifier for the passenger, unique within this Offer Request and across all Offer Requests.
|
|
1070
|
-
* This ID will be generated by Duffel unless you had optionally provided one.
|
|
1071
|
-
* Optionally providing one has been deprecated.
|
|
1072
|
-
*/
|
|
1073
|
-
id: string;
|
|
1074
|
-
}
|
|
1075
|
-
export interface OfferSlice {
|
|
1076
|
-
/**
|
|
1077
|
-
* The type of the destination
|
|
1078
|
-
*/
|
|
1079
|
-
destination_type: PlaceType;
|
|
1080
|
-
/**
|
|
1081
|
-
* The city or airport where this slice ends
|
|
1082
|
-
*/
|
|
1083
|
-
destination: Place;
|
|
1084
|
-
/**
|
|
1085
|
-
* The type of the origin
|
|
1086
|
-
*/
|
|
1087
|
-
origin_type: PlaceType;
|
|
1088
|
-
/**
|
|
1089
|
-
* The city or airport where this slice begins
|
|
1090
|
-
*/
|
|
1091
|
-
origin: Place;
|
|
1092
|
-
/**
|
|
1093
|
-
* The duration of the slice, represented as a ISO 8601 duration
|
|
1094
|
-
*/
|
|
1095
|
-
duration: string | null;
|
|
1096
|
-
/**
|
|
1097
|
-
* The name of the fare brand associated with this slice.
|
|
1098
|
-
* A fare brand specifies the travel conditions you get on your slice made available
|
|
1099
|
-
* by the airline. e.g. a British Airways Economy Basic fare will only include a hand baggage allowance.
|
|
1100
|
-
* It is worth noting that the fare brand names are defined by the airlines themselves and therefore they
|
|
1101
|
-
* are subject to change without any prior notice. We're in the process of adding support for fare_brand_name across
|
|
1102
|
-
* all our airlines, so for now, this field may be null in some offers.
|
|
1103
|
-
* This will become a non-nullable attribute in the near future.
|
|
1104
|
-
*/
|
|
1105
|
-
fare_brand_name: string | null;
|
|
1106
|
-
/**
|
|
1107
|
-
* Duffel's unique identifier for the slice. It identifies the slice of an offer (i.e. the same slice across offers will have different `id`s
|
|
1108
|
-
*/
|
|
1109
|
-
id: string;
|
|
1110
|
-
/**
|
|
1111
|
-
* The segments - that is, specific flights - that the airline is offering to get the passengers from the `origin` to the `destination`
|
|
1112
|
-
*/
|
|
1113
|
-
segments: OfferSliceSegment[];
|
|
1114
|
-
/**
|
|
1115
|
-
* The conditions associated with this slice, describing the kinds of modifications you can make post-booking and any penalties that will apply to those modifications.
|
|
1116
|
-
* This condition is applied only to this slice and to all the passengers associated with this offer - for information at the offer level (e.g. "what happens if I want to change all the slices?") refer to the conditions at the top level.
|
|
1117
|
-
* If a particular kind of modification is allowed, you may not always be able to take action through the Duffel API.
|
|
1118
|
-
* In some cases, you may need to contact the Duffel support team or the airline directly.
|
|
1119
|
-
*/
|
|
1120
|
-
conditions: FlightsConditions;
|
|
1121
|
-
}
|
|
1122
|
-
export interface OfferSliceSegment {
|
|
1123
|
-
/**
|
|
1124
|
-
* The aircraft that the operating carrier will use to operate this segment
|
|
1125
|
-
*/
|
|
1126
|
-
aircraft: Aircraft;
|
|
1127
|
-
/**
|
|
1128
|
-
* The ISO 8601 datetime at which the segment is scheduled to arrive
|
|
1129
|
-
*/
|
|
1130
|
-
arriving_at: string;
|
|
1131
|
-
/**
|
|
1132
|
-
* The terminal at the destination airport where the segment is scheduled to arrive
|
|
1133
|
-
*/
|
|
1134
|
-
destination_terminal: string | null;
|
|
1135
|
-
/**
|
|
1136
|
-
* The ISO 8601 datetime at which the segment is scheduled to depart
|
|
1137
|
-
*/
|
|
1138
|
-
departing_at: string;
|
|
1139
|
-
/**
|
|
1140
|
-
* The terminal at the origin airport from which the segment is scheduled to depart
|
|
1141
|
-
*/
|
|
1142
|
-
origin_terminal: string | null;
|
|
1143
|
-
/**
|
|
1144
|
-
* The airport at which the segment is scheduled to arrive
|
|
1145
|
-
*/
|
|
1146
|
-
destination: Airport;
|
|
1147
|
-
/**
|
|
1148
|
-
* The distance of the segment in kilometres
|
|
1149
|
-
*/
|
|
1150
|
-
distance: string | null;
|
|
1151
|
-
/**
|
|
1152
|
-
* The duration of the segment, represented as a ISO 8601 duration
|
|
1153
|
-
*/
|
|
1154
|
-
duration: string | null;
|
|
1155
|
-
/**
|
|
1156
|
-
* Duffel's unique identifier for the segment. It identifies the segment of an offer (i.e. the same segment across offers will have different `id`s
|
|
1157
|
-
*/
|
|
1158
|
-
id: string;
|
|
1159
|
-
/**
|
|
1160
|
-
* The airline selling the tickets for this segment.
|
|
1161
|
-
* This may differ from the `operating_carrier` in the case of a "codeshare", where one airline sells flights operated by another airline.
|
|
1162
|
-
*/
|
|
1163
|
-
marketing_carrier: Airline;
|
|
1164
|
-
/**
|
|
1165
|
-
* The flight number assigned by the marketing carrier
|
|
1166
|
-
*/
|
|
1167
|
-
marketing_carrier_flight_number: string;
|
|
1168
|
-
/**
|
|
1169
|
-
* The airport from which the flight is scheduled to depart
|
|
1170
|
-
*/
|
|
1171
|
-
origin: Airport;
|
|
1172
|
-
/**
|
|
1173
|
-
* The airline actually operating this segment.
|
|
1174
|
-
* This may differ from the marketing_carrier in the case of a "codeshare", where one airline sells flights operated by another airline.
|
|
1175
|
-
*/
|
|
1176
|
-
operating_carrier: Airline;
|
|
1177
|
-
/**
|
|
1178
|
-
* The flight number assigned by the operating carrier
|
|
1179
|
-
*/
|
|
1180
|
-
operating_carrier_flight_number: string;
|
|
1181
|
-
/**
|
|
1182
|
-
* Additional segment-specific information about the passengers included in the offer (e.g. their baggage allowance and the cabin class they will be travelling in)
|
|
1183
|
-
*/
|
|
1184
|
-
passengers: OfferSliceSegmentPassenger[];
|
|
1185
|
-
}
|
|
1186
|
-
export interface OfferSliceSegmentPassenger {
|
|
1187
|
-
/**
|
|
1188
|
-
* The baggage allowances for the passenger on this segment included in the offer.
|
|
1189
|
-
* Some airlines may allow additional baggage to be booked as a service - see the offer's available_services.
|
|
1190
|
-
*/
|
|
1191
|
-
baggages: OfferSliceSegmentPassengerBaggage[];
|
|
1192
|
-
/**
|
|
1193
|
-
* The cabin class that the passenger will travel in on this segment
|
|
1194
|
-
*/
|
|
1195
|
-
cabin_class: CabinClass;
|
|
1196
|
-
/**
|
|
1197
|
-
* The name that the marketing carrier uses to market this cabin class
|
|
1198
|
-
*/
|
|
1199
|
-
cabin_class_marketing_name: string;
|
|
1200
|
-
/**
|
|
1201
|
-
* The identifier for the passenger.
|
|
1202
|
-
* You may have specified this ID yourself when creating the offer request, or otherwise, Duffel will have generated its own random ID.
|
|
1203
|
-
*/
|
|
1204
|
-
passenger_id: string;
|
|
1205
|
-
/**
|
|
1206
|
-
* The airline's alphanumeric code for the fare that the passenger is using to travel. Where this is `null`, it means that either the
|
|
1207
|
-
* fare basis code is not available or the airline does not use fare basis codes.
|
|
1208
|
-
*/
|
|
1209
|
-
fare_basis_code: string;
|
|
1210
|
-
}
|
|
1211
|
-
export type BaggageType = 'carry_on' | 'checked';
|
|
1212
|
-
export interface OfferSliceSegmentPassengerBaggage {
|
|
1213
|
-
/**
|
|
1214
|
-
* The type of the baggage allowance
|
|
1215
|
-
*/
|
|
1216
|
-
type: BaggageType;
|
|
1217
|
-
/**
|
|
1218
|
-
* The number of this type of bag allowed on the segment. Note that this can currently be 0 in some cases.
|
|
1219
|
-
*/
|
|
1220
|
-
quantity: number;
|
|
1221
|
-
}
|
|
1222
|
-
|
|
58
|
+
* The longitude position of the airport represented in Decimal degrees with 6 decimal points with a range between -180° and 180°
|
|
59
|
+
*/
|
|
60
|
+
longitude: number;
|
|
1223
61
|
/**
|
|
1224
|
-
*
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
*/
|
|
1228
|
-
export interface SeatMap {
|
|
1229
|
-
/**
|
|
1230
|
-
* Duffel's unique identifier for the seat map
|
|
1231
|
-
*/
|
|
1232
|
-
id: string;
|
|
1233
|
-
/**
|
|
1234
|
-
* Duffel's unique identifier for the slice. It identifies the slice of an offer (i.e. the same slice across offers will have different ids.)
|
|
1235
|
-
*/
|
|
1236
|
-
slice_id: string;
|
|
1237
|
-
/**
|
|
1238
|
-
* Duffel's unique identifier for the segment. It identifies the segment of an offer (i.e. the same segment across offers will have different ids).
|
|
1239
|
-
*/
|
|
1240
|
-
segment_id: string;
|
|
1241
|
-
/**
|
|
1242
|
-
* The list of cabins in this seat map.
|
|
1243
|
-
* Cabins are ordered by deck from lowest to highest, and then within each deck from the front to back of the aircraft.
|
|
1244
|
-
*/
|
|
1245
|
-
cabins: SeatMapCabin[];
|
|
1246
|
-
}
|
|
1247
|
-
export interface SeatMapCabin {
|
|
1248
|
-
/**
|
|
1249
|
-
* Level 0 is the main deck and level 1 is the upper deck above that, which is found on some large aircraft.
|
|
1250
|
-
*/
|
|
1251
|
-
deck: number;
|
|
1252
|
-
/**
|
|
1253
|
-
* The cabin class that the passenger will travel in on this segment
|
|
1254
|
-
*/
|
|
1255
|
-
cabin_class: string;
|
|
1256
|
-
/**
|
|
1257
|
-
* Where the wings of the aircraft are in relation to rows in the cabin.
|
|
1258
|
-
* The numbers correspond to the indices of the first and the last row which are overwing. You can use this to draw a visual representation of the wings to help users get a better idea of what they will see outside their window.
|
|
1259
|
-
* The indices are 0 th-based and are for all rows, not just those that have seats.
|
|
1260
|
-
* This is null when no rows of the cabin are overwing.
|
|
1261
|
-
*/
|
|
1262
|
-
wings: {
|
|
1263
|
-
/**
|
|
1264
|
-
* The index of the first row which is overwing, starting from the front of the aircraft.
|
|
1265
|
-
*/
|
|
1266
|
-
first_row_index: number;
|
|
1267
|
-
/**
|
|
1268
|
-
* The index of the last row which is overwing, starting from the front of the aircraft.
|
|
1269
|
-
*/
|
|
1270
|
-
last_row_index: number;
|
|
1271
|
-
} | null;
|
|
1272
|
-
/**
|
|
1273
|
-
* The number of aisles in this cabin.
|
|
1274
|
-
* If this is set to 1, each row of the cabin is split into two sections. If this is set to 2, each row of the cabin is split into three section.
|
|
1275
|
-
*/
|
|
1276
|
-
aisles: number;
|
|
1277
|
-
/**
|
|
1278
|
-
* A list of rows in this cabin.
|
|
1279
|
-
* Row sections are broken up by aisles. Rows are ordered from front to back of the aircraft.
|
|
1280
|
-
*/
|
|
1281
|
-
rows: SeatMapCabinRow[];
|
|
1282
|
-
}
|
|
1283
|
-
export interface SeatMapCabinRow {
|
|
1284
|
-
/**
|
|
1285
|
-
* A list of sections.
|
|
1286
|
-
* Each row is divided into sections by one or more aisles.
|
|
1287
|
-
*/
|
|
1288
|
-
sections: SeatMapCabinRowSection[];
|
|
1289
|
-
}
|
|
1290
|
-
export interface SeatMapCabinRowSection {
|
|
1291
|
-
/**
|
|
1292
|
-
* The elements that make up this section.
|
|
1293
|
-
*/
|
|
1294
|
-
elements: SeatMapCabinRowSectionElement[];
|
|
1295
|
-
}
|
|
1296
|
-
/**
|
|
1297
|
-
* A seat for a passenger. If the available_services list is empty (which will be represented as an empty list : []), the seat is unavailable.
|
|
1298
|
-
* For display, all seats should be displayed with the same static width.
|
|
1299
|
-
*/
|
|
1300
|
-
export interface SeatMapCabinRowSectionElementSeat {
|
|
1301
|
-
/**
|
|
1302
|
-
* The type of this element.
|
|
1303
|
-
*/
|
|
1304
|
-
type: 'seat';
|
|
1305
|
-
/**
|
|
1306
|
-
* The designator used to uniquely identify the seat, usually made up of a row number and a column letter
|
|
1307
|
-
*/
|
|
1308
|
-
designator: string;
|
|
1309
|
-
/**
|
|
1310
|
-
* A name which describes the type of seat, which you can display in your user interface to help customers to understand its features
|
|
1311
|
-
*/
|
|
1312
|
-
name?: string;
|
|
1313
|
-
/**
|
|
1314
|
-
* Each disclosure is text, in English, provided by the airline that describes the terms and conditions of this seat. We recommend showing this in your user interface to make sure that customers understand any restrictions and limitations.
|
|
1315
|
-
*/
|
|
1316
|
-
disclosures: string[];
|
|
1317
|
-
/**
|
|
1318
|
-
* Seats are considered a special kind of service. There will be at most one service per seat per passenger. A seat can only be booked for one passenger. If a seat has no available services (which will be represented as an empty list : []) then it's unavailable.
|
|
1319
|
-
*/
|
|
1320
|
-
available_services: SeatMapCabinRowSectionAvailableService[];
|
|
1321
|
-
}
|
|
1322
|
-
export interface SeatMapCabinRowSectionAvailableService {
|
|
1323
|
-
/**
|
|
1324
|
-
* Duffel's unique identifier for the service
|
|
1325
|
-
*/
|
|
1326
|
-
id: string;
|
|
1327
|
-
/**
|
|
1328
|
-
* The passenger that this seat is for
|
|
1329
|
-
*/
|
|
1330
|
-
passenger_id: string;
|
|
1331
|
-
/**
|
|
1332
|
-
* The total price of the seat, including taxes
|
|
1333
|
-
*/
|
|
1334
|
-
total_amount: string;
|
|
1335
|
-
/**
|
|
1336
|
-
* The currency of the total_amount, as an ISO 4217 currency code
|
|
1337
|
-
*/
|
|
1338
|
-
total_currency: string;
|
|
1339
|
-
}
|
|
1340
|
-
/**
|
|
1341
|
-
* A bassinet is a child's cradle. This element will be aligned with the corresponding seat in the following row.
|
|
1342
|
-
* For display, this element should have the same width as a seat for proper alignment.
|
|
1343
|
-
*/
|
|
1344
|
-
export interface SeatMapCabinRowSectionElementBassinet {
|
|
1345
|
-
/**
|
|
1346
|
-
* The type of this element.
|
|
1347
|
-
*/
|
|
1348
|
-
type: 'bassinet';
|
|
1349
|
-
}
|
|
1350
|
-
/**
|
|
1351
|
-
* An empty space used for padding in some non-standard seat arrangements.
|
|
1352
|
-
* For display, this element should have the same dimensions as a seat for proper alignment.
|
|
1353
|
-
*/
|
|
1354
|
-
export interface SeatMapCabinRowSectionElementEmpty {
|
|
1355
|
-
/**
|
|
1356
|
-
* The type of this element.
|
|
1357
|
-
*/
|
|
1358
|
-
type: 'empty';
|
|
1359
|
-
}
|
|
1360
|
-
/**
|
|
1361
|
-
* An exit row represents the extra wide legroom used to reach aircraft exits. There is one exit_row element per row section.
|
|
1362
|
-
* Exit row elements only occur in their own row, so they can be displayed as one element across the whole row. Displaying an exit row element filling all available space in its section or using the same width as the seat is also reasonable.
|
|
1363
|
-
*/
|
|
1364
|
-
export interface SeatMapCabinRowSectionElementExitRow {
|
|
1365
|
-
/**
|
|
1366
|
-
* The type of this element.
|
|
1367
|
-
*/
|
|
1368
|
-
type: 'exit_row';
|
|
1369
|
-
}
|
|
1370
|
-
/**
|
|
1371
|
-
* A lavatory for use by passengers.
|
|
1372
|
-
* For display, this element should ideally fill or shrink to available space in a row section. Displaying it with the same width as seat is also reasonable.
|
|
1373
|
-
*/
|
|
1374
|
-
export interface SeatMapCabinRowSectionElementLavatory {
|
|
1375
|
-
/**
|
|
1376
|
-
* The type of this element.
|
|
1377
|
-
*/
|
|
1378
|
-
type: 'lavatory';
|
|
1379
|
-
}
|
|
1380
|
-
/**
|
|
1381
|
-
* A galley is the compartment where food is cooked or prepared. These are conventionally marked with a teacup symbol.
|
|
1382
|
-
* For display, this element should ideally fill or shrink to available space in a row section. Displaying it with the same width as seat is also reasonable.
|
|
1383
|
-
*/
|
|
1384
|
-
export interface SeatMapCabinRowSectionElementGalley {
|
|
1385
|
-
/**
|
|
1386
|
-
* The type of this element.
|
|
1387
|
-
*/
|
|
1388
|
-
type: 'galley';
|
|
1389
|
-
}
|
|
1390
|
-
/**
|
|
1391
|
-
* A closet used for storage. These are conventionally marked with a clothes hanger symbol.
|
|
1392
|
-
* For display, this element should ideally fill or shrink to available space in a row section. Displaying it with the same width as seat is also reasonable.
|
|
1393
|
-
*/
|
|
1394
|
-
export interface SeatMapCabinRowSectionElementCloset {
|
|
1395
|
-
/**
|
|
1396
|
-
* The type of this element.
|
|
1397
|
-
*/
|
|
1398
|
-
type: 'closet';
|
|
1399
|
-
}
|
|
1400
|
-
/**
|
|
1401
|
-
* A set of stairs to another deck.
|
|
1402
|
-
* For display, this element should ideally fill or shrink to available space in a row section. Displaying it with the same width as seat is also reasonable.
|
|
1403
|
-
*/
|
|
1404
|
-
export interface SeatMapCabinRowSectionElementStairs {
|
|
1405
|
-
/**
|
|
1406
|
-
* The type of this element.
|
|
1407
|
-
*/
|
|
1408
|
-
type: 'stairs';
|
|
1409
|
-
}
|
|
1410
|
-
export type SeatMapCabinRowSectionElement = SeatMapCabinRowSectionElementSeat | SeatMapCabinRowSectionElementBassinet | SeatMapCabinRowSectionElementEmpty | SeatMapCabinRowSectionElementExitRow | SeatMapCabinRowSectionElementLavatory | SeatMapCabinRowSectionElementGalley | SeatMapCabinRowSectionElementCloset | SeatMapCabinRowSectionElementStairs;
|
|
1411
|
-
export type SeatMapCabinRowSectionElementType = SeatMapCabinRowSectionElement['type'];
|
|
1412
|
-
export type SeatMapCabinRowSectionElementAmenity = Exclude<SeatMapCabinRowSectionElementType, 'empty' | 'seat'>;
|
|
1413
|
-
|
|
1414
|
-
export * from './Airport';
|
|
1415
|
-
export * from './Airlines';
|
|
1416
|
-
export * from './Aircraft';
|
|
1417
|
-
export * from './CurrencyConversion';
|
|
1418
|
-
export * from './Offer';
|
|
1419
|
-
export * from './SeatMap';
|
|
1420
|
-
export * from './shared';
|
|
1421
|
-
|
|
1422
|
-
import { Airport } from './index';
|
|
62
|
+
* The name of the airport
|
|
63
|
+
*/
|
|
64
|
+
name: string;
|
|
1423
65
|
/**
|
|
1424
|
-
* The
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
/**
|
|
1434
|
-
* The three-character IATA code for the city
|
|
1435
|
-
* @example "LON"
|
|
1436
|
-
*/
|
|
1437
|
-
iata_code: string;
|
|
1438
|
-
/**
|
|
1439
|
-
* The ISO 3166-1 alpha-2 code for the country where the city is located
|
|
1440
|
-
* @link https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
|
|
1441
|
-
* @example "GB"
|
|
1442
|
-
*/
|
|
1443
|
-
iata_country_code: string;
|
|
1444
|
-
/**
|
|
1445
|
-
* Duffel's unique identifier for the city
|
|
1446
|
-
* @example "cit_lon_gb"
|
|
1447
|
-
*/
|
|
1448
|
-
id: string;
|
|
1449
|
-
/**
|
|
1450
|
-
* The name of the city
|
|
1451
|
-
* @example "London"
|
|
1452
|
-
*/
|
|
1453
|
-
name: string;
|
|
1454
|
-
/**
|
|
1455
|
-
* The time zone of the airport, specified by name from the [tz database](https://en.wikipedia.org/wiki/Tz_database)
|
|
1456
|
-
*/
|
|
1457
|
-
time_zone?: string | null;
|
|
1458
|
-
/**
|
|
1459
|
-
* 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°
|
|
1460
|
-
*/
|
|
1461
|
-
longitude?: number | null;
|
|
1462
|
-
/**
|
|
1463
|
-
* 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°
|
|
1464
|
-
*/
|
|
1465
|
-
latitude?: number | null;
|
|
1466
|
-
/**
|
|
1467
|
-
* The 3-letter IATA code for the city where the place is located.
|
|
1468
|
-
* 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).
|
|
1469
|
-
*/
|
|
1470
|
-
iata_city_code?: string | null;
|
|
1471
|
-
/**
|
|
1472
|
-
* The name of the city (or cities separated by a `/`) where the airport is located
|
|
1473
|
-
*/
|
|
1474
|
-
city_name?: string | null;
|
|
1475
|
-
}
|
|
66
|
+
* The time zone of the airport, specified by name from the [tz database](https://en.wikipedia.org/wiki/Tz_database)
|
|
67
|
+
*/
|
|
68
|
+
time_zone: string;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Airlines are used to identify the air travel companies selling and operating flights
|
|
72
|
+
* @link https://duffel.com/docs/api/airlines/schema
|
|
73
|
+
*/
|
|
74
|
+
export interface Airline {
|
|
1476
75
|
/**
|
|
1477
|
-
* The
|
|
76
|
+
* The three-character IATA code for the airline
|
|
77
|
+
*/
|
|
78
|
+
name: string;
|
|
79
|
+
/**
|
|
80
|
+
* Duffel's unique identifier for the airline
|
|
81
|
+
*/
|
|
82
|
+
id: string;
|
|
83
|
+
iata_code: string;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Aircraft are used to describe what passengers will fly in for a given trip
|
|
87
|
+
* @link https://duffel.com/docs/api/aircraft/schema
|
|
88
|
+
*/
|
|
89
|
+
export interface Aircraft {
|
|
90
|
+
/**
|
|
91
|
+
* The name of the aircraft
|
|
92
|
+
*/
|
|
93
|
+
name: string;
|
|
94
|
+
/**
|
|
95
|
+
* Duffel's unique identifier for the aircraft
|
|
1478
96
|
*/
|
|
1479
|
-
|
|
97
|
+
id: string;
|
|
1480
98
|
/**
|
|
1481
|
-
* The
|
|
99
|
+
* The three-character IATA code for the aircraft
|
|
1482
100
|
*/
|
|
1483
|
-
|
|
101
|
+
iata_code: string;
|
|
102
|
+
}
|
|
103
|
+
export interface CurrencyConversion {
|
|
1484
104
|
/**
|
|
1485
|
-
* The
|
|
105
|
+
* currency The ISO-4217 currency code to be used
|
|
1486
106
|
*/
|
|
1487
|
-
|
|
107
|
+
currency: string;
|
|
1488
108
|
/**
|
|
1489
|
-
*
|
|
109
|
+
* Conversion multiple to be applied to all prices
|
|
1490
110
|
*/
|
|
1491
|
-
|
|
111
|
+
rate: number;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Each offer represents flights you can buy from an airline at a particular price that meet your search criteria.
|
|
115
|
+
* @link https://duffel.com/docs/api/offers/schema
|
|
116
|
+
*/
|
|
117
|
+
export interface Offer {
|
|
1492
118
|
/**
|
|
1493
|
-
* The
|
|
1494
|
-
*
|
|
119
|
+
* The types of identity documents that may be provided for the passengers when creating an order based on this offer.
|
|
120
|
+
* Currently, the only supported type is `passport`. If this is `[]`, then you must not provide identity documents.
|
|
1495
121
|
*/
|
|
1496
|
-
|
|
122
|
+
allowed_passenger_identity_document_types: PassengerIdentityDocumentType[];
|
|
1497
123
|
/**
|
|
1498
|
-
* The
|
|
124
|
+
* The services that can be booked along with the offer but are not included by default, for example an additional checked bag.
|
|
125
|
+
* This field is only returned in the Get single offer endpoint.
|
|
126
|
+
* When there are no services available, or we don't support services for the airline, this list will be empty.
|
|
1499
127
|
*/
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
128
|
+
available_services: OfferAvailableService[];
|
|
129
|
+
/**
|
|
130
|
+
* The base price of the offer for all passengers, excluding taxes.
|
|
131
|
+
* It does not include the base amount of any service(s) that might be booked with the offer.
|
|
132
|
+
*/
|
|
133
|
+
base_amount: string;
|
|
134
|
+
/**
|
|
135
|
+
* The currency of the `base_amount`, as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code
|
|
136
|
+
*/
|
|
137
|
+
base_currency: string;
|
|
1507
138
|
/**
|
|
1508
139
|
* The conditions associated with this offer, describing the kinds of modifications you can make post-booking and any penalties that will apply to those modifications.
|
|
1509
|
-
* This information assumes the condition is applied to all of the slices and passengers associated with this offer - for information at the slice level (e.g. "what happens if I just want to change the first slice?") refer to the slices
|
|
140
|
+
* This information assumes the condition is applied to all of the slices and passengers associated with this offer - for information at the slice level (e.g. "what happens if I just want to change the first slice?") refer to the `slices`.
|
|
1510
141
|
* If a particular kind of modification is allowed, you may not always be able to take action through the Duffel API.
|
|
1511
142
|
* In some cases, you may need to contact the Duffel support team or the airline directly.
|
|
1512
143
|
*/
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
*
|
|
1577
|
-
*/
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
144
|
+
conditions: FlightsConditions;
|
|
145
|
+
/**
|
|
146
|
+
* The ISO 8601 datetime at which the offer was created
|
|
147
|
+
*/
|
|
148
|
+
created_at: string;
|
|
149
|
+
/**
|
|
150
|
+
* The ISO 8601 datetime at which the offer will expire and no longer be usable to create an order
|
|
151
|
+
*/
|
|
152
|
+
expires_at: string;
|
|
153
|
+
/**
|
|
154
|
+
* Duffel's unique identifier for the offer
|
|
155
|
+
*/
|
|
156
|
+
id: string;
|
|
157
|
+
/**
|
|
158
|
+
* Whether the offer request was created in live mode.
|
|
159
|
+
* This field will be set to `true` if the offer request was created in live mode, or `false` if it was created in test mode.
|
|
160
|
+
*/
|
|
161
|
+
live_mode: boolean;
|
|
162
|
+
/**
|
|
163
|
+
* The airline which provided the offer
|
|
164
|
+
*/
|
|
165
|
+
owner: Airline;
|
|
166
|
+
/**
|
|
167
|
+
* Whether identity documents must be provided for each of the passengers when creating an order based on this offer.
|
|
168
|
+
* If this is `true`, you must provide an identity document for every passenger.
|
|
169
|
+
*/
|
|
170
|
+
passenger_identity_documents_required: boolean;
|
|
171
|
+
/**
|
|
172
|
+
* The passengers included in the offer
|
|
173
|
+
*/
|
|
174
|
+
passengers: OfferPassenger[];
|
|
175
|
+
/**
|
|
176
|
+
* The payment requirements for this offer
|
|
177
|
+
*/
|
|
178
|
+
payment_requirements: PaymentRequirements;
|
|
179
|
+
/**
|
|
180
|
+
* The slices that make up this offer. Each slice will include one or more segments,
|
|
181
|
+
* the specific flights that the airline is offering to take the passengers from the slice's `origin` to its `destination`.
|
|
182
|
+
*/
|
|
183
|
+
slices: OfferSlice[];
|
|
184
|
+
/**
|
|
185
|
+
* The amount of tax payable on the offer for all passengers
|
|
186
|
+
*/
|
|
187
|
+
tax_amount: string | null;
|
|
188
|
+
/**
|
|
189
|
+
* The currency of the `tax_amount`, as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code
|
|
190
|
+
*/
|
|
191
|
+
tax_currency: string | null;
|
|
192
|
+
/**
|
|
193
|
+
* The total price of the offer for all passengers, including taxes.
|
|
194
|
+
* It does not include the total price of any service(s) that might be booked with the offer.
|
|
195
|
+
*/
|
|
196
|
+
total_amount: string;
|
|
197
|
+
/**
|
|
198
|
+
* An estimate of the total carbon dioxide (CO₂) emissions when
|
|
199
|
+
* all of the passengers fly this offer's itinerary, measured in kilograms
|
|
200
|
+
*/
|
|
201
|
+
total_emissions_kg: string;
|
|
202
|
+
/**
|
|
203
|
+
* The currency of the `total_amount`, as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code
|
|
204
|
+
*/
|
|
205
|
+
total_currency: string;
|
|
206
|
+
/**
|
|
207
|
+
* The ISO 8601 datetime at which the offer was last updated
|
|
208
|
+
*/
|
|
209
|
+
updated_at: string;
|
|
210
|
+
}
|
|
211
|
+
export interface OfferAvailableServiceBaggageMetadata {
|
|
212
|
+
/**
|
|
213
|
+
* The maximum weight that the baggage can have in kilograms
|
|
214
|
+
*/
|
|
215
|
+
maximum_weight_kg: number | null;
|
|
216
|
+
/**
|
|
217
|
+
* The maximum height that the baggage can have in centimetres
|
|
218
|
+
*/
|
|
219
|
+
maximum_height_cm: number | null;
|
|
220
|
+
/**
|
|
221
|
+
* The maximum length that the baggage can have in centimetres
|
|
222
|
+
*/
|
|
223
|
+
maximum_length_cm: number | null;
|
|
224
|
+
/**
|
|
225
|
+
* The maximum depth that the baggage can have in centimetres
|
|
226
|
+
*/
|
|
227
|
+
maximum_depth_cm: number | null;
|
|
228
|
+
/**
|
|
229
|
+
* The type of the baggage
|
|
230
|
+
*/
|
|
231
|
+
type: BaggageType;
|
|
232
|
+
}
|
|
233
|
+
export interface PaymentRequirements {
|
|
234
|
+
/**
|
|
235
|
+
* The ISO 8601 datetime by which you must pay for this order.
|
|
236
|
+
* At this time, if still unpaid, the reserved space on the flight(s)
|
|
237
|
+
* will be released and you will have to create a new order.
|
|
238
|
+
* This will be null only for orders where `awaiting_payment` is `false`.
|
|
239
|
+
*/
|
|
240
|
+
payment_required_by?: string | null;
|
|
241
|
+
/**
|
|
242
|
+
* The ISO 8601 datetime at which the price associated
|
|
243
|
+
* with the order will no longer be guaranteed by the airline
|
|
244
|
+
* and the order will need to be repriced before payment.
|
|
245
|
+
* This can be null when there is no price guarantee.
|
|
246
|
+
*/
|
|
247
|
+
price_guarantee_expires_at?: string | null;
|
|
248
|
+
/**
|
|
249
|
+
* Whether immediate payment is required or not
|
|
250
|
+
*/
|
|
251
|
+
requires_instant_payment: boolean;
|
|
252
|
+
}
|
|
253
|
+
export interface OfferAvailableServiceMetadataMap {
|
|
254
|
+
baggage: OfferAvailableServiceBaggageMetadata;
|
|
255
|
+
}
|
|
256
|
+
export declare type OfferAvailableServiceType = keyof OfferAvailableServiceMetadataMap;
|
|
257
|
+
export interface OfferAvailableService<T_ServiceType extends OfferAvailableServiceType = "baggage"> {
|
|
258
|
+
/**
|
|
259
|
+
* Duffel's unique identifier for the service
|
|
260
|
+
*/
|
|
261
|
+
id: string;
|
|
262
|
+
/**
|
|
263
|
+
* The maximum quantity of this service that can be booked with an order
|
|
264
|
+
*/
|
|
265
|
+
maximum_quantity: number;
|
|
266
|
+
/**
|
|
267
|
+
* An object containing metadata about the service, like the maximum weight and dimensions of the baggage.
|
|
268
|
+
*/
|
|
269
|
+
metadata?: OfferAvailableServiceMetadataMap[T_ServiceType];
|
|
270
|
+
/**
|
|
271
|
+
* The list of passenger `id`s the service applies to.
|
|
272
|
+
* If you add this service to an order it will apply to all the passengers in this list.
|
|
273
|
+
* For services where the type is `baggage`, this list will include only a single passenger.
|
|
274
|
+
*/
|
|
275
|
+
passenger_ids: string[];
|
|
276
|
+
/**
|
|
277
|
+
* The list of segment ids the service applies to.
|
|
278
|
+
* If you add this service to an order it will apply to all the segments in this list.
|
|
279
|
+
* For services where the type is baggage, depending on the airline,
|
|
280
|
+
* this list includes all the segments of all slices or all the segments of a single slice.
|
|
281
|
+
*/
|
|
282
|
+
segment_ids: string[];
|
|
283
|
+
/**
|
|
284
|
+
* The total price of the service for all passengers and segments it applies to, including taxes
|
|
285
|
+
*/
|
|
286
|
+
total_amount: string;
|
|
287
|
+
/**
|
|
288
|
+
* The currency of the `total_amount`, as an ISO 4217 currency code
|
|
289
|
+
*/
|
|
290
|
+
total_currency: string;
|
|
291
|
+
/**
|
|
292
|
+
* The type of the service.
|
|
293
|
+
* For now we only return services of type baggage but we will return other types in the future.
|
|
294
|
+
* We won't consider adding new service types a break change.
|
|
295
|
+
*/
|
|
296
|
+
type: T_ServiceType;
|
|
297
|
+
}
|
|
298
|
+
export interface OfferPassenger {
|
|
299
|
+
/**
|
|
300
|
+
* The age of the passenger on the departure_date of the final slice.
|
|
301
|
+
*/
|
|
302
|
+
age?: number;
|
|
303
|
+
/**
|
|
304
|
+
* The type of the passenger.
|
|
305
|
+
*/
|
|
306
|
+
type?: "adult";
|
|
307
|
+
/**
|
|
308
|
+
* The identifier for the passenger, unique within this Offer Request and across all Offer Requests.
|
|
309
|
+
* This ID will be generated by Duffel unless you had optionally provided one.
|
|
310
|
+
* Optionally providing one has been deprecated.
|
|
311
|
+
*/
|
|
312
|
+
id: string;
|
|
313
|
+
}
|
|
314
|
+
export interface OfferSlice {
|
|
315
|
+
/**
|
|
316
|
+
* The type of the destination
|
|
317
|
+
*/
|
|
318
|
+
destination_type: PlaceType;
|
|
319
|
+
/**
|
|
320
|
+
* The city or airport where this slice ends
|
|
321
|
+
*/
|
|
322
|
+
destination: Place;
|
|
323
|
+
/**
|
|
324
|
+
* The type of the origin
|
|
325
|
+
*/
|
|
326
|
+
origin_type: PlaceType;
|
|
327
|
+
/**
|
|
328
|
+
* The city or airport where this slice begins
|
|
329
|
+
*/
|
|
330
|
+
origin: Place;
|
|
331
|
+
/**
|
|
332
|
+
* The duration of the slice, represented as a ISO 8601 duration
|
|
333
|
+
*/
|
|
334
|
+
duration: string | null;
|
|
335
|
+
/**
|
|
336
|
+
* The name of the fare brand associated with this slice.
|
|
337
|
+
* A fare brand specifies the travel conditions you get on your slice made available
|
|
338
|
+
* by the airline. e.g. a British Airways Economy Basic fare will only include a hand baggage allowance.
|
|
339
|
+
* It is worth noting that the fare brand names are defined by the airlines themselves and therefore they
|
|
340
|
+
* are subject to change without any prior notice. We're in the process of adding support for fare_brand_name across
|
|
341
|
+
* all our airlines, so for now, this field may be null in some offers.
|
|
342
|
+
* This will become a non-nullable attribute in the near future.
|
|
343
|
+
*/
|
|
344
|
+
fare_brand_name: string | null;
|
|
345
|
+
/**
|
|
346
|
+
* Duffel's unique identifier for the slice. It identifies the slice of an offer (i.e. the same slice across offers will have different `id`s
|
|
347
|
+
*/
|
|
348
|
+
id: string;
|
|
349
|
+
/**
|
|
350
|
+
* The segments - that is, specific flights - that the airline is offering to get the passengers from the `origin` to the `destination`
|
|
351
|
+
*/
|
|
352
|
+
segments: OfferSliceSegment[];
|
|
353
|
+
/**
|
|
354
|
+
* The conditions associated with this slice, describing the kinds of modifications you can make post-booking and any penalties that will apply to those modifications.
|
|
355
|
+
* This condition is applied only to this slice and to all the passengers associated with this offer - for information at the offer level (e.g. "what happens if I want to change all the slices?") refer to the conditions at the top level.
|
|
356
|
+
* If a particular kind of modification is allowed, you may not always be able to take action through the Duffel API.
|
|
357
|
+
* In some cases, you may need to contact the Duffel support team or the airline directly.
|
|
358
|
+
*/
|
|
359
|
+
conditions: FlightsConditions;
|
|
360
|
+
}
|
|
361
|
+
export interface OfferSliceSegment {
|
|
362
|
+
/**
|
|
363
|
+
* The aircraft that the operating carrier will use to operate this segment
|
|
364
|
+
*/
|
|
365
|
+
aircraft: Aircraft;
|
|
366
|
+
/**
|
|
367
|
+
* The ISO 8601 datetime at which the segment is scheduled to arrive
|
|
368
|
+
*/
|
|
369
|
+
arriving_at: string;
|
|
370
|
+
/**
|
|
371
|
+
* The terminal at the destination airport where the segment is scheduled to arrive
|
|
372
|
+
*/
|
|
373
|
+
destination_terminal: string | null;
|
|
374
|
+
/**
|
|
375
|
+
* The ISO 8601 datetime at which the segment is scheduled to depart
|
|
376
|
+
*/
|
|
377
|
+
departing_at: string;
|
|
378
|
+
/**
|
|
379
|
+
* The terminal at the origin airport from which the segment is scheduled to depart
|
|
380
|
+
*/
|
|
381
|
+
origin_terminal: string | null;
|
|
382
|
+
/**
|
|
383
|
+
* The airport at which the segment is scheduled to arrive
|
|
384
|
+
*/
|
|
385
|
+
destination: Airport;
|
|
386
|
+
/**
|
|
387
|
+
* The distance of the segment in kilometres
|
|
388
|
+
*/
|
|
389
|
+
distance: string | null;
|
|
390
|
+
/**
|
|
391
|
+
* The duration of the segment, represented as a ISO 8601 duration
|
|
392
|
+
*/
|
|
393
|
+
duration: string | null;
|
|
394
|
+
/**
|
|
395
|
+
* Duffel's unique identifier for the segment. It identifies the segment of an offer (i.e. the same segment across offers will have different `id`s
|
|
396
|
+
*/
|
|
397
|
+
id: string;
|
|
398
|
+
/**
|
|
399
|
+
* The airline selling the tickets for this segment.
|
|
400
|
+
* This may differ from the `operating_carrier` in the case of a "codeshare", where one airline sells flights operated by another airline.
|
|
401
|
+
*/
|
|
402
|
+
marketing_carrier: Airline;
|
|
403
|
+
/**
|
|
404
|
+
* The flight number assigned by the marketing carrier
|
|
405
|
+
*/
|
|
406
|
+
marketing_carrier_flight_number: string;
|
|
407
|
+
/**
|
|
408
|
+
* The airport from which the flight is scheduled to depart
|
|
409
|
+
*/
|
|
410
|
+
origin: Airport;
|
|
411
|
+
/**
|
|
412
|
+
* The airline actually operating this segment.
|
|
413
|
+
* This may differ from the marketing_carrier in the case of a "codeshare", where one airline sells flights operated by another airline.
|
|
414
|
+
*/
|
|
415
|
+
operating_carrier: Airline;
|
|
416
|
+
/**
|
|
417
|
+
* The flight number assigned by the operating carrier
|
|
418
|
+
*/
|
|
419
|
+
operating_carrier_flight_number: string;
|
|
420
|
+
/**
|
|
421
|
+
* Additional segment-specific information about the passengers included in the offer (e.g. their baggage allowance and the cabin class they will be travelling in)
|
|
422
|
+
*/
|
|
423
|
+
passengers: OfferSliceSegmentPassenger[];
|
|
424
|
+
}
|
|
425
|
+
export interface OfferSliceSegmentPassenger {
|
|
426
|
+
/**
|
|
427
|
+
* The baggage allowances for the passenger on this segment included in the offer.
|
|
428
|
+
* Some airlines may allow additional baggage to be booked as a service - see the offer's available_services.
|
|
429
|
+
*/
|
|
430
|
+
baggages: OfferSliceSegmentPassengerBaggage[];
|
|
431
|
+
/**
|
|
432
|
+
* The cabin class that the passenger will travel in on this segment
|
|
433
|
+
*/
|
|
434
|
+
cabin_class: CabinClass;
|
|
435
|
+
/**
|
|
436
|
+
* The name that the marketing carrier uses to market this cabin class
|
|
437
|
+
*/
|
|
438
|
+
cabin_class_marketing_name: string;
|
|
439
|
+
/**
|
|
440
|
+
* The identifier for the passenger.
|
|
441
|
+
* You may have specified this ID yourself when creating the offer request, or otherwise, Duffel will have generated its own random ID.
|
|
442
|
+
*/
|
|
443
|
+
passenger_id: string;
|
|
444
|
+
/**
|
|
445
|
+
* The airline's alphanumeric code for the fare that the passenger is using to travel. Where this is `null`, it means that either the
|
|
446
|
+
* fare basis code is not available or the airline does not use fare basis codes.
|
|
447
|
+
*/
|
|
448
|
+
fare_basis_code: string;
|
|
449
|
+
}
|
|
450
|
+
export declare type BaggageType = "carry_on" | "checked";
|
|
451
|
+
export interface OfferSliceSegmentPassengerBaggage {
|
|
452
|
+
/**
|
|
453
|
+
* The type of the baggage allowance
|
|
454
|
+
*/
|
|
455
|
+
type: BaggageType;
|
|
456
|
+
/**
|
|
457
|
+
* The number of this type of bag allowed on the segment. Note that this can currently be 0 in some cases.
|
|
458
|
+
*/
|
|
459
|
+
quantity: number;
|
|
460
|
+
}
|
|
461
|
+
/**
|
|
462
|
+
* Seat maps are used to build a rich experience for your customers so they can select a seat as part of an order.
|
|
463
|
+
* A seat map includes the data for rendering seats in the relevant cabins, along with their total cost and other information such as disclosures.
|
|
464
|
+
* @link https://duffel.com/docs/api/seat-maps/schema
|
|
465
|
+
*/
|
|
466
|
+
export interface SeatMap {
|
|
467
|
+
/**
|
|
468
|
+
* Duffel's unique identifier for the seat map
|
|
469
|
+
*/
|
|
470
|
+
id: string;
|
|
471
|
+
/**
|
|
472
|
+
* Duffel's unique identifier for the slice. It identifies the slice of an offer (i.e. the same slice across offers will have different ids.)
|
|
473
|
+
*/
|
|
474
|
+
slice_id: string;
|
|
475
|
+
/**
|
|
476
|
+
* Duffel's unique identifier for the segment. It identifies the segment of an offer (i.e. the same segment across offers will have different ids).
|
|
477
|
+
*/
|
|
478
|
+
segment_id: string;
|
|
479
|
+
/**
|
|
480
|
+
* The list of cabins in this seat map.
|
|
481
|
+
* Cabins are ordered by deck from lowest to highest, and then within each deck from the front to back of the aircraft.
|
|
482
|
+
*/
|
|
483
|
+
cabins: SeatMapCabin[];
|
|
484
|
+
}
|
|
485
|
+
export interface SeatMapCabin {
|
|
486
|
+
/**
|
|
487
|
+
* Level 0 is the main deck and level 1 is the upper deck above that, which is found on some large aircraft.
|
|
488
|
+
*/
|
|
489
|
+
deck: number;
|
|
490
|
+
/**
|
|
491
|
+
* The cabin class that the passenger will travel in on this segment
|
|
492
|
+
*/
|
|
493
|
+
cabin_class: string;
|
|
494
|
+
/**
|
|
495
|
+
* Where the wings of the aircraft are in relation to rows in the cabin.
|
|
496
|
+
* The numbers correspond to the indices of the first and the last row which are overwing. You can use this to draw a visual representation of the wings to help users get a better idea of what they will see outside their window.
|
|
497
|
+
* The indices are 0 th-based and are for all rows, not just those that have seats.
|
|
498
|
+
* This is null when no rows of the cabin are overwing.
|
|
499
|
+
*/
|
|
500
|
+
wings: {
|
|
501
|
+
/**
|
|
502
|
+
* The index of the first row which is overwing, starting from the front of the aircraft.
|
|
503
|
+
*/
|
|
504
|
+
first_row_index: number;
|
|
505
|
+
/**
|
|
506
|
+
* The index of the last row which is overwing, starting from the front of the aircraft.
|
|
507
|
+
*/
|
|
508
|
+
last_row_index: number;
|
|
509
|
+
} | null;
|
|
510
|
+
/**
|
|
511
|
+
* The number of aisles in this cabin.
|
|
512
|
+
* If this is set to 1, each row of the cabin is split into two sections. If this is set to 2, each row of the cabin is split into three section.
|
|
513
|
+
*/
|
|
514
|
+
aisles: number;
|
|
515
|
+
/**
|
|
516
|
+
* A list of rows in this cabin.
|
|
517
|
+
* Row sections are broken up by aisles. Rows are ordered from front to back of the aircraft.
|
|
518
|
+
*/
|
|
519
|
+
rows: SeatMapCabinRow[];
|
|
520
|
+
}
|
|
521
|
+
export interface SeatMapCabinRow {
|
|
522
|
+
/**
|
|
523
|
+
* A list of sections.
|
|
524
|
+
* Each row is divided into sections by one or more aisles.
|
|
525
|
+
*/
|
|
526
|
+
sections: SeatMapCabinRowSection[];
|
|
527
|
+
}
|
|
528
|
+
export interface SeatMapCabinRowSection {
|
|
529
|
+
/**
|
|
530
|
+
* The elements that make up this section.
|
|
531
|
+
*/
|
|
532
|
+
elements: SeatMapCabinRowSectionElement[];
|
|
533
|
+
}
|
|
534
|
+
/**
|
|
535
|
+
* A seat for a passenger. If the available_services list is empty (which will be represented as an empty list : []), the seat is unavailable.
|
|
536
|
+
* For display, all seats should be displayed with the same static width.
|
|
537
|
+
*/
|
|
538
|
+
export interface SeatMapCabinRowSectionElementSeat {
|
|
539
|
+
/**
|
|
540
|
+
* The type of this element.
|
|
541
|
+
*/
|
|
542
|
+
type: "seat";
|
|
543
|
+
/**
|
|
544
|
+
* The designator used to uniquely identify the seat, usually made up of a row number and a column letter
|
|
545
|
+
*/
|
|
546
|
+
designator: string;
|
|
547
|
+
/**
|
|
548
|
+
* A name which describes the type of seat, which you can display in your user interface to help customers to understand its features
|
|
549
|
+
*/
|
|
550
|
+
name?: string;
|
|
551
|
+
/**
|
|
552
|
+
* Each disclosure is text, in English, provided by the airline that describes the terms and conditions of this seat. We recommend showing this in your user interface to make sure that customers understand any restrictions and limitations.
|
|
553
|
+
*/
|
|
554
|
+
disclosures: string[];
|
|
555
|
+
/**
|
|
556
|
+
* Seats are considered a special kind of service. There will be at most one service per seat per passenger. A seat can only be booked for one passenger. If a seat has no available services (which will be represented as an empty list : []) then it's unavailable.
|
|
557
|
+
*/
|
|
558
|
+
available_services: SeatMapCabinRowSectionAvailableService[];
|
|
559
|
+
}
|
|
560
|
+
export interface SeatMapCabinRowSectionAvailableService {
|
|
561
|
+
/**
|
|
562
|
+
* Duffel's unique identifier for the service
|
|
563
|
+
*/
|
|
564
|
+
id: string;
|
|
565
|
+
/**
|
|
566
|
+
* The passenger that this seat is for
|
|
567
|
+
*/
|
|
568
|
+
passenger_id: string;
|
|
569
|
+
/**
|
|
570
|
+
* The total price of the seat, including taxes
|
|
571
|
+
*/
|
|
572
|
+
total_amount: string;
|
|
573
|
+
/**
|
|
574
|
+
* The currency of the total_amount, as an ISO 4217 currency code
|
|
575
|
+
*/
|
|
576
|
+
total_currency: string;
|
|
577
|
+
}
|
|
578
|
+
/**
|
|
579
|
+
* A bassinet is a child's cradle. This element will be aligned with the corresponding seat in the following row.
|
|
580
|
+
* For display, this element should have the same width as a seat for proper alignment.
|
|
581
|
+
*/
|
|
582
|
+
export interface SeatMapCabinRowSectionElementBassinet {
|
|
583
|
+
/**
|
|
584
|
+
* The type of this element.
|
|
585
|
+
*/
|
|
586
|
+
type: "bassinet";
|
|
587
|
+
}
|
|
588
|
+
/**
|
|
589
|
+
* An empty space used for padding in some non-standard seat arrangements.
|
|
590
|
+
* For display, this element should have the same dimensions as a seat for proper alignment.
|
|
591
|
+
*/
|
|
592
|
+
export interface SeatMapCabinRowSectionElementEmpty {
|
|
593
|
+
/**
|
|
594
|
+
* The type of this element.
|
|
595
|
+
*/
|
|
596
|
+
type: "empty";
|
|
597
|
+
}
|
|
598
|
+
/**
|
|
599
|
+
* An exit row represents the extra wide legroom used to reach aircraft exits. There is one exit_row element per row section.
|
|
600
|
+
* Exit row elements only occur in their own row, so they can be displayed as one element across the whole row. Displaying an exit row element filling all available space in its section or using the same width as the seat is also reasonable.
|
|
601
|
+
*/
|
|
602
|
+
export interface SeatMapCabinRowSectionElementExitRow {
|
|
603
|
+
/**
|
|
604
|
+
* The type of this element.
|
|
605
|
+
*/
|
|
606
|
+
type: "exit_row";
|
|
607
|
+
}
|
|
608
|
+
/**
|
|
609
|
+
* A lavatory for use by passengers.
|
|
610
|
+
* For display, this element should ideally fill or shrink to available space in a row section. Displaying it with the same width as seat is also reasonable.
|
|
611
|
+
*/
|
|
612
|
+
export interface SeatMapCabinRowSectionElementLavatory {
|
|
613
|
+
/**
|
|
614
|
+
* The type of this element.
|
|
615
|
+
*/
|
|
616
|
+
type: "lavatory";
|
|
617
|
+
}
|
|
618
|
+
/**
|
|
619
|
+
* A galley is the compartment where food is cooked or prepared. These are conventionally marked with a teacup symbol.
|
|
620
|
+
* For display, this element should ideally fill or shrink to available space in a row section. Displaying it with the same width as seat is also reasonable.
|
|
621
|
+
*/
|
|
622
|
+
export interface SeatMapCabinRowSectionElementGalley {
|
|
623
|
+
/**
|
|
624
|
+
* The type of this element.
|
|
625
|
+
*/
|
|
626
|
+
type: "galley";
|
|
627
|
+
}
|
|
628
|
+
/**
|
|
629
|
+
* A closet used for storage. These are conventionally marked with a clothes hanger symbol.
|
|
630
|
+
* For display, this element should ideally fill or shrink to available space in a row section. Displaying it with the same width as seat is also reasonable.
|
|
631
|
+
*/
|
|
632
|
+
export interface SeatMapCabinRowSectionElementCloset {
|
|
633
|
+
/**
|
|
634
|
+
* The type of this element.
|
|
635
|
+
*/
|
|
636
|
+
type: "closet";
|
|
637
|
+
}
|
|
638
|
+
/**
|
|
639
|
+
* A set of stairs to another deck.
|
|
640
|
+
* For display, this element should ideally fill or shrink to available space in a row section. Displaying it with the same width as seat is also reasonable.
|
|
641
|
+
*/
|
|
642
|
+
export interface SeatMapCabinRowSectionElementStairs {
|
|
643
|
+
/**
|
|
644
|
+
* The type of this element.
|
|
645
|
+
*/
|
|
646
|
+
type: "stairs";
|
|
647
|
+
}
|
|
648
|
+
export declare type SeatMapCabinRowSectionElement = SeatMapCabinRowSectionElementSeat | SeatMapCabinRowSectionElementBassinet | SeatMapCabinRowSectionElementEmpty | SeatMapCabinRowSectionElementExitRow | SeatMapCabinRowSectionElementLavatory | SeatMapCabinRowSectionElementGalley | SeatMapCabinRowSectionElementCloset | SeatMapCabinRowSectionElementStairs;
|
|
649
|
+
/**
|
|
650
|
+
* The metropolitan area where the airport is located.
|
|
651
|
+
* Only present for airports which are registered with IATA as belonging to a metropolitan area.
|
|
652
|
+
* @link https://portal.iata.org/faq/articles/en_US/FAQ/How-do-I-create-a-new-Metropolitan-Area
|
|
653
|
+
*/
|
|
654
|
+
export interface City {
|
|
655
|
+
/**
|
|
656
|
+
* The type of the place
|
|
657
|
+
*/
|
|
658
|
+
type?: "city";
|
|
659
|
+
/**
|
|
660
|
+
* The three-character IATA code for the city
|
|
661
|
+
* @example "LON"
|
|
662
|
+
*/
|
|
663
|
+
iata_code: string;
|
|
664
|
+
/**
|
|
665
|
+
* The ISO 3166-1 alpha-2 code for the country where the city is located
|
|
666
|
+
* @link https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
|
|
667
|
+
* @example "GB"
|
|
668
|
+
*/
|
|
669
|
+
iata_country_code: string;
|
|
670
|
+
/**
|
|
671
|
+
* Duffel's unique identifier for the city
|
|
672
|
+
* @example "cit_lon_gb"
|
|
673
|
+
*/
|
|
674
|
+
id: string;
|
|
675
|
+
/**
|
|
676
|
+
* The name of the city
|
|
677
|
+
* @example "London"
|
|
678
|
+
*/
|
|
679
|
+
name: string;
|
|
680
|
+
/**
|
|
681
|
+
* The time zone of the airport, specified by name from the [tz database](https://en.wikipedia.org/wiki/Tz_database)
|
|
682
|
+
*/
|
|
683
|
+
time_zone?: string | null;
|
|
684
|
+
/**
|
|
685
|
+
* 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°
|
|
686
|
+
*/
|
|
687
|
+
longitude?: number | null;
|
|
688
|
+
/**
|
|
689
|
+
* 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°
|
|
690
|
+
*/
|
|
691
|
+
latitude?: number | null;
|
|
692
|
+
/**
|
|
693
|
+
* The 3-letter IATA code for the city where the place is located.
|
|
694
|
+
* 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).
|
|
695
|
+
*/
|
|
696
|
+
iata_city_code?: string | null;
|
|
697
|
+
/**
|
|
698
|
+
* The name of the city (or cities separated by a `/`) where the airport is located
|
|
699
|
+
*/
|
|
700
|
+
city_name?: string | null;
|
|
701
|
+
}
|
|
702
|
+
/**
|
|
703
|
+
* The cabin class that the passenger will travel in on this segment
|
|
704
|
+
*/
|
|
705
|
+
export declare type CabinClass = "first" | "business" | "premium_economy" | "economy";
|
|
706
|
+
/**
|
|
707
|
+
* The type of the identity document. Currently, the only supported type is passport.
|
|
708
|
+
* This must be one of the `allowed_passenger_identity_document_types` on the offer.
|
|
709
|
+
*/
|
|
710
|
+
export declare type PassengerIdentityDocumentType = "passport";
|
|
711
|
+
/**
|
|
712
|
+
* The type of the origin or destination
|
|
713
|
+
*/
|
|
714
|
+
export declare type PlaceType = "airport" | "city";
|
|
715
|
+
export declare type Place = (Airport & {
|
|
716
|
+
type?: "airport";
|
|
717
|
+
airports?: Airport[] | null;
|
|
718
|
+
}) | (City & {
|
|
719
|
+
type?: "city";
|
|
720
|
+
});
|
|
721
|
+
/**
|
|
722
|
+
* The conditions associated with this offer, describing the kinds of modifications you can make post-booking and any penalties that will apply to those modifications.
|
|
723
|
+
* This information assumes the condition is applied to all of the slices and passengers associated with this offer - for information at the slice level (e.g. "what happens if I just want to change the first slice?") refer to the slices.
|
|
724
|
+
* If a particular kind of modification is allowed, you may not always be able to take action through the Duffel API.
|
|
725
|
+
* In some cases, you may need to contact the Duffel support team or the airline directly.
|
|
726
|
+
*/
|
|
727
|
+
export declare type FlightsConditions = {
|
|
728
|
+
/**
|
|
729
|
+
* Whether the whole order or offer can be refunded before the departure of the first slice.
|
|
730
|
+
* If all of the slices on the order or offer can be refunded then the `allowed` property will be `true` and information will be provided about any penalties.
|
|
731
|
+
* If any of the slices on the order or offer can't be refunded then the `allowed` property will be `false`.
|
|
732
|
+
* If the airline hasn't provided any information about whether this order or offer can be refunded then this property will be `null`.
|
|
733
|
+
*/
|
|
734
|
+
refund_before_departure?: {
|
|
735
|
+
/**
|
|
736
|
+
* The currency of the `penalty_amount` as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.
|
|
737
|
+
* This will be in a currency determined by the airline, which is not necessarily the same as the currency of the order or offer.
|
|
738
|
+
* If this is `null` then `penalty_amount` will also be `null`.
|
|
739
|
+
* @example "GBP"
|
|
740
|
+
*/
|
|
741
|
+
penalty_currency?: string;
|
|
742
|
+
/**
|
|
743
|
+
* If the modification is `allowed` then this is the amount payable to apply the modification to all passengers.
|
|
744
|
+
* If there is no penalty, the value will be zero. If the modification isn't `allowed` or the penalty is not known then this field will be `null`.
|
|
745
|
+
* If this is `null` then the `penalty_currency` will also be null.
|
|
746
|
+
* @example "100.00"
|
|
747
|
+
*/
|
|
748
|
+
penalty_amount?: string;
|
|
749
|
+
/**
|
|
750
|
+
* Whether this kind of modification is allowed post-booking
|
|
751
|
+
*
|
|
752
|
+
* @example "true"
|
|
753
|
+
*/
|
|
754
|
+
allowed: boolean;
|
|
755
|
+
} | null;
|
|
756
|
+
/**
|
|
757
|
+
* Whether the whole order or offer can be changed before the departure of the first slice.
|
|
758
|
+
* If all of the slices on the order or offer can be changed then the `allowed` property will be `true`.
|
|
759
|
+
* Refer to the `slices` for information about change penalties.
|
|
760
|
+
* If any of the slices on the order or offer can't be changed then the `allowed` property will be `false`.
|
|
761
|
+
* In this case you should refer to the slices conditions to determine if any part of the order or offer is changeable.
|
|
762
|
+
* If the airline hasn't provided any information about whether this order or offer can be changed then this property will be `null`.
|
|
763
|
+
*/
|
|
764
|
+
change_before_departure?: {
|
|
765
|
+
/**
|
|
766
|
+
* The currency of the `penalty_amount` as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.
|
|
767
|
+
* This will be in a currency determined by the airline, which is not necessarily the same as the currency of the order or offer.
|
|
768
|
+
* If this is `null` then `penalty_amount` will also be `null`.
|
|
769
|
+
* @example "GBP"
|
|
770
|
+
*/
|
|
771
|
+
penalty_currency: string;
|
|
772
|
+
/**
|
|
773
|
+
* If the modification is `allowed` then this is the amount payable to apply the modification to all passengers.
|
|
774
|
+
* If there is no penalty, the value will be zero. If the modification isn't `allowed` or the penalty is not known then this field will be `null`.
|
|
775
|
+
* If this is `null` then the `penalty_currency` will also be null.
|
|
776
|
+
* @example "100.00"
|
|
777
|
+
*/
|
|
778
|
+
penalty_amount?: string;
|
|
779
|
+
/**
|
|
780
|
+
* Whether this kind of modification is allowed post-booking
|
|
781
|
+
*
|
|
782
|
+
* @example "true"
|
|
783
|
+
*/
|
|
784
|
+
allowed: boolean;
|
|
785
|
+
} | null;
|
|
786
|
+
};
|
|
787
|
+
export interface SeatSelectionPassenger {
|
|
788
|
+
id: string;
|
|
789
|
+
name?: string | null;
|
|
790
|
+
}
|
|
791
|
+
export declare type SeatSelectionContextInterface = {
|
|
792
|
+
[segmentId: string]: SeatSelectionForSegment;
|
|
793
|
+
};
|
|
794
|
+
export declare type SeatSelectionForSegment = {
|
|
795
|
+
[passengerId: string]: SeatInformation | null;
|
|
796
|
+
};
|
|
797
|
+
export declare type SeatInformation = {
|
|
798
|
+
designator: string;
|
|
799
|
+
service: SeatMapCabinRowSectionAvailableService;
|
|
800
|
+
};
|
|
801
|
+
export interface SeatSelectionProps {
|
|
802
|
+
/**
|
|
803
|
+
* The offer we are booking seats for.
|
|
804
|
+
*/
|
|
805
|
+
offer: Offer;
|
|
806
|
+
/**
|
|
807
|
+
* List of available seat maps
|
|
808
|
+
*/
|
|
809
|
+
seatMaps: SeatMap[];
|
|
810
|
+
/**
|
|
811
|
+
* List of all passengers that can be assigned seats
|
|
812
|
+
*/
|
|
813
|
+
passengers: SeatSelectionPassenger[];
|
|
814
|
+
/**
|
|
815
|
+
* What to do when the user presses the Confirm button
|
|
816
|
+
*/
|
|
817
|
+
onSubmit: (seats: SeatSelectionContextInterface) => void;
|
|
818
|
+
/**
|
|
819
|
+
* Already selected seats to initialize the map with
|
|
820
|
+
*/
|
|
821
|
+
initialSeatSelection?: SeatSelectionContextInterface;
|
|
822
|
+
/**
|
|
823
|
+
* The segment ID to select upon initialization
|
|
824
|
+
*/
|
|
825
|
+
initialSegmentId?: string;
|
|
826
|
+
/**
|
|
827
|
+
* Optional currency conversion to enable prices to be shown in an alternative currency
|
|
828
|
+
*/
|
|
829
|
+
currencyConversion?: CurrencyConversion;
|
|
830
|
+
}
|
|
831
|
+
export declare const SeatSelection: React.FC<SeatSelectionProps>;
|
|
832
|
+
|
|
833
|
+
export {};
|