@duffel/components 3.1.3--prototype.8 → 3.1.3--prototype.11

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.
Files changed (116) hide show
  1. package/README.md +68 -0
  2. package/package.json +7 -7
  3. package/{custom-elements.js → react-dist/custom-elements.js} +2 -2
  4. package/{custom-elements.js.map → react-dist/custom-elements.js.map} +1 -1
  5. package/react-dist/index.d.ts +2156 -0
  6. package/{index.js → react-dist/index.js} +2 -2
  7. package/{index.js.map → react-dist/index.js.map} +1 -1
  8. package/react-dist/index.tsbuildinfo +1 -0
  9. package/components/DuffelAncillaries/Card.d.ts +0 -14
  10. package/components/DuffelAncillaries/Counter.d.ts +0 -10
  11. package/components/DuffelAncillaries/DuffelAncillaries.d.ts +0 -3
  12. package/components/DuffelAncillaries/DuffelAncillariesCustomElement.d.ts +0 -12
  13. package/components/DuffelAncillaries/bags/BaggageSelectionCard.d.ts +0 -11
  14. package/components/DuffelAncillaries/bags/BaggageSelectionController.d.ts +0 -13
  15. package/components/DuffelAncillaries/bags/BaggageSelectionModal.d.ts +0 -11
  16. package/components/DuffelAncillaries/bags/BaggageSelectionModalBody.d.ts +0 -11
  17. package/components/DuffelAncillaries/bags/BaggageSelectionModalBodyPassenger.d.ts +0 -13
  18. package/components/DuffelAncillaries/bags/BaggageSelectionModalFooter.d.ts +0 -14
  19. package/components/DuffelAncillaries/bags/BaggageSelectionModalHeader.d.ts +0 -9
  20. package/components/DuffelAncillaries/bags/IncludedBaggageBanner.d.ts +0 -7
  21. package/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionCard.d.ts +0 -10
  22. package/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModal.d.ts +0 -11
  23. package/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBody.d.ts +0 -7
  24. package/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBodyListItem.d.ts +0 -4
  25. package/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalFooter.d.ts +0 -11
  26. package/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalHeader.d.ts +0 -2
  27. package/components/DuffelAncillaries/seats/Amenity.d.ts +0 -6
  28. package/components/DuffelAncillaries/seats/DeckSelect.d.ts +0 -15
  29. package/components/DuffelAncillaries/seats/Element.d.ts +0 -15
  30. package/components/DuffelAncillaries/seats/EmptyElement.d.ts +0 -2
  31. package/components/DuffelAncillaries/seats/ExitElement.d.ts +0 -6
  32. package/components/DuffelAncillaries/seats/Legend.d.ts +0 -12
  33. package/components/DuffelAncillaries/seats/Row.d.ts +0 -13
  34. package/components/DuffelAncillaries/seats/RowSection.d.ts +0 -17
  35. package/components/DuffelAncillaries/seats/SeatElement.d.ts +0 -13
  36. package/components/DuffelAncillaries/seats/SeatInfo.d.ts +0 -7
  37. package/components/DuffelAncillaries/seats/SeatMap.d.ts +0 -12
  38. package/components/DuffelAncillaries/seats/SeatMapUnavailable.d.ts +0 -2
  39. package/components/DuffelAncillaries/seats/SeatSelectionCard.d.ts +0 -13
  40. package/components/DuffelAncillaries/seats/SeatSelectionModal.d.ts +0 -13
  41. package/components/DuffelAncillaries/seats/SeatSelectionModalBody.d.ts +0 -4
  42. package/components/DuffelAncillaries/seats/SeatSelectionModalFooter.d.ts +0 -16
  43. package/components/DuffelAncillaries/seats/SeatSelectionModalHeader.d.ts +0 -10
  44. package/components/DuffelAncillaries/seats/SeatUnavailable.d.ts +0 -5
  45. package/components/DuffelPayments/DuffelPayments.d.ts +0 -11
  46. package/components/DuffelPayments/DuffelPaymentsCustomElement.d.ts +0 -13
  47. package/components/PlacesLookup/PlacesLookup.d.ts +0 -20
  48. package/components/shared/AnimatedLoaderEllipsis.d.ts +0 -2
  49. package/components/shared/Button.d.ts +0 -23
  50. package/components/shared/ErrorBoundary.d.ts +0 -13
  51. package/components/shared/FetchOfferErrorState.d.ts +0 -5
  52. package/components/shared/Icon.d.ts +0 -46
  53. package/components/shared/IconButton.d.ts +0 -16
  54. package/components/shared/Modal.d.ts +0 -11
  55. package/components/shared/NonIdealState.d.ts +0 -4
  56. package/components/shared/Stamp.d.ts +0 -7
  57. package/components/shared/Tabs.d.ts +0 -16
  58. package/custom-elements.d.ts +0 -6
  59. package/index.d.ts +0 -7
  60. package/lib/captureErrorInSentry.d.ts +0 -1
  61. package/lib/compileCreateOrderPayload.d.ts +0 -14
  62. package/lib/createPriceFormatters.d.ts +0 -12
  63. package/lib/fetchFromDuffelAPI.d.ts +0 -8
  64. package/lib/fetchFromFixtures.d.ts +0 -4
  65. package/lib/formatAvailableServices.d.ts +0 -12
  66. package/lib/formatDate.d.ts +0 -2
  67. package/lib/formatSeatMaps.d.ts +0 -4
  68. package/lib/getBaggageServiceDescription.d.ts +0 -2
  69. package/lib/getCabinsForSegmentAndDeck.d.ts +0 -2
  70. package/lib/getCurrencyForSeatMaps.d.ts +0 -10
  71. package/lib/getCurrencyForServices.d.ts +0 -11
  72. package/lib/getFirstSeatElementMatchingCriteria.d.ts +0 -3
  73. package/lib/getPassengerBySegmentList.d.ts +0 -6
  74. package/lib/getPassengerInitials.d.ts +0 -1
  75. package/lib/getPassengerMapById.d.ts +0 -3
  76. package/lib/getPassengerName.d.ts +0 -3
  77. package/lib/getRowNumber.d.ts +0 -2
  78. package/lib/getSegmentList.d.ts +0 -2
  79. package/lib/getServicePriceMapById.d.ts +0 -3
  80. package/lib/getSymbols.d.ts +0 -2
  81. package/lib/getTotalAmountForServices.d.ts +0 -6
  82. package/lib/getTotalQuantity.d.ts +0 -2
  83. package/lib/hasHighLuminance.d.ts +0 -1
  84. package/lib/hasService.d.ts +0 -2
  85. package/lib/hasServiceOfSameMetadataTypeAlreadyBeenSelected.d.ts +0 -3
  86. package/lib/hasWings.d.ts +0 -2
  87. package/lib/isBaggageService.d.ts +0 -2
  88. package/lib/isCancelForAnyReasonService.d.ts +0 -2
  89. package/lib/isFixtureOfferId.d.ts +0 -2
  90. package/lib/isPayloadComplete.d.ts +0 -2
  91. package/lib/isSeatElement.d.ts +0 -2
  92. package/lib/logging.d.ts +0 -46
  93. package/lib/moneyStringFormatter.d.ts +0 -8
  94. package/lib/offerIsExpired.d.ts +0 -2
  95. package/lib/retrieveOffer.d.ts +0 -2
  96. package/lib/retrieveOfferFromDuffelAPI.d.ts +0 -1
  97. package/lib/retrieveSeatMaps.d.ts +0 -2
  98. package/lib/retrieveSeatMapsFromDuffelAPI.d.ts +0 -1
  99. package/lib/setBodyScrollability.d.ts +0 -1
  100. package/lib/validateProps.d.ts +0 -7
  101. package/lib/withPlural.d.ts +0 -1
  102. package/scripts/generate-fixture.d.ts +0 -3
  103. package/scripts/setup-suggestion-data.d.ts +0 -28
  104. package/tsconfig.tsbuildinfo +0 -1
  105. package/types/Aircraft.d.ts +0 -14
  106. package/types/Airline.d.ts +0 -14
  107. package/types/Airport.d.ts +0 -44
  108. package/types/City.d.ts +0 -18
  109. package/types/CreateOrderPayload.d.ts +0 -72
  110. package/types/CurrencyConversion.d.ts +0 -10
  111. package/types/DuffelAncillariesProps.d.ts +0 -70
  112. package/types/Offer.d.ts +0 -711
  113. package/types/Order.d.ts +0 -8
  114. package/types/Place.d.ts +0 -8
  115. package/types/SeatMap.d.ts +0 -190
  116. package/types/index.d.ts +0 -11
package/types/Offer.d.ts DELETED
@@ -1,711 +0,0 @@
1
- import { Aircraft } from "./Aircraft";
2
- import { Airline } from "./Airline";
3
- import { Airport } from "./Airport";
4
- import { City } from "./City";
5
- export declare const CabinClassMap: {
6
- economy: string;
7
- premium_economy: string;
8
- business: string;
9
- first: string;
10
- any: string;
11
- };
12
- export type CabinClass = keyof typeof CabinClassMap;
13
- export type PassengerIdentityDocumentType = "passport";
14
- /**
15
- * Each offer represents flights you can buy from an airline at a particular price that meet your search criteria.
16
- */
17
- export type PaymentType = "arc_bsp_cash" | "balance" | "payments" | "card";
18
- export type BaggageType = "carry_on" | "checked";
19
- export declare const PassengerTypeMap: {
20
- adult: string;
21
- child: string;
22
- infant_without_seat: string;
23
- };
24
- export type PassengerType = keyof typeof PassengerTypeMap;
25
- export type PlaceType = "airport" | "city";
26
- export interface PaymentRequirements {
27
- /**
28
- * The ISO 8601 datetime by which you must pay for this offer. At this
29
- * time, if still unpaid, the reserved space on the flight(s) will be
30
- * released and you will have to create a new order. This will be `null`
31
- * when the offer requires immediate payment - that is, when
32
- * `requires_instant_payment` is `true`.
33
- *
34
- * @example
35
- * "2020-01-17T10:42:14Z"
36
- */
37
- payment_required_by?: string | null;
38
- /**
39
- * The ISO 8601 datetime at which the price associated with the order will
40
- * no longer be guaranteed by the airline and may change before payment.
41
- * This will be null when `requires_instant_payment` is `true`.
42
- *
43
- * @example
44
- * "2020-01-17T10:42:14"
45
- */
46
- price_guarantee_expires_at?: string | null;
47
- /**
48
- * When payment is required at the time of booking this will be `true` and
49
- * `payment_required_by` and `price_guarantee_expires_at` will be `null`.
50
- * When payment can be made at a time after booking, this will be false
51
- * and the time limits on the payment will be provided in
52
- * `payment_required_by` and `price_guarantee_expires_at`.
53
- */
54
- requires_instant_payment: boolean;
55
- }
56
- export interface OfferAvailableServiceCommon {
57
- /**
58
- * Duffel's unique identifier for the service.
59
- *
60
- * @example
61
- * "ase_00009UhD4ongolulWd9123"
62
- */
63
- id: string;
64
- /**
65
- * The maximum quantity of this service that can be booked with an order.
66
- *
67
- * @example
68
- * 1
69
- */
70
- maximum_quantity: number;
71
- /**
72
- * The list of passenger `id`s the service applies to. If you add this
73
- * service to an order it will apply to all the passengers in this list.
74
- * For services where the type is `baggage`, this list will include only a
75
- * single passenger.
76
- *
77
- * @example
78
- * ["pas_00009hj8USM7Ncg31cBCLL"]
79
- */
80
- passenger_ids: string[];
81
- /**
82
- * The list of segment `id`s the service applies to. If you add this
83
- * service to an order it will apply to all the segments in this list. For
84
- * services where the type is `baggage`, depending on the airline, this
85
- * list includes all the segments of all slices or all the segments of a
86
- * single slice.
87
- *
88
- * @example
89
- * ["seg_00009hj8USM7Ncg31cB456"]
90
- */
91
- segment_ids: string[];
92
- /**
93
- * The total price of the service for all passengers and segments it
94
- * applies to, including taxes. This price is for a single unit of the
95
- * service.
96
- *
97
- * @example
98
- * "15.00"
99
- */
100
- total_amount: string;
101
- /**
102
- * The currency of the `totalAmount`, as an ISO 4217 currency code.
103
- */
104
- total_currency: string;
105
- }
106
- export interface OfferAvailableServiceBaggageMetadata {
107
- /**
108
- * The maximum depth that the baggage can have in centimetres
109
- *
110
- * @example
111
- * 75
112
- */
113
- maximum_depth_cm: number | null;
114
- /**
115
- * The maximum height that the baggage can have in centimetres
116
- *
117
- * @example
118
- * 90
119
- */
120
- maximum_height_cm: number | null;
121
- /**
122
- * The maximum length that the baggage can have in centimetres
123
- *
124
- * @example
125
- * 90
126
- */
127
- maximum_length_cm: number | null;
128
- /**
129
- * The maximum weight that the baggage can have in kilograms
130
- *
131
- * @example
132
- * 23
133
- */
134
- maximum_weight_kg: number | null;
135
- /**
136
- * The type of the baggage
137
- */
138
- type: BaggageType;
139
- }
140
- export interface OfferAvailableServiceBaggage extends OfferAvailableServiceCommon {
141
- /**
142
- * The metadata varies by the type of service. It includes further data
143
- * about the service. For example, for baggages, it may have data about
144
- * size and weight restrictions.
145
- */
146
- metadata: OfferAvailableServiceBaggageMetadata;
147
- /**
148
- * The type of the service.
149
- */
150
- type: "baggage";
151
- }
152
- export interface Offer {
153
- /**
154
- * The types of identity documents that may be provided for the passengers when creating an order based on this offer.
155
- * Currently, the only supported type is `passport`. If this is `[]`, then you must not provide identity documents.
156
- */
157
- allowed_passenger_identity_document_types: PassengerIdentityDocumentType[];
158
- /**
159
- * The services that can be booked along with the offer but are not included by default, for example an additional checked bag.
160
- * This field is only returned in the Get single offer endpoint.
161
- * When there are no services available, or we don't support services for the airline, this list will be empty.
162
- */
163
- available_services: Array<OfferAvailableBaggageService | OfferAvailableServiceCancelForAnyReason>;
164
- /**
165
- * The base price of the offer for all passengers, excluding taxes.
166
- * It does not include the base amount of any service(s) that might be booked with the offer.
167
- */
168
- base_amount: string;
169
- /**
170
- * The currency of the `base_amount`, as an ISO 4217 currency code
171
- */
172
- base_currency: string;
173
- /**
174
- * The ISO 8601 datetime at which the offer was created
175
- */
176
- created_at: string;
177
- /**
178
- * The ISO 8601 datetime at which the offer will expire and no longer be usable to create an order
179
- */
180
- expires_at: string;
181
- /**
182
- * Duffel's unique identifier for the offer
183
- */
184
- id: string;
185
- /**
186
- * Whether the offer request was created in live mode.
187
- * 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.
188
- */
189
- live_mode: boolean;
190
- /**
191
- * The airline which provided the offer
192
- */
193
- owner: Airline;
194
- /**
195
- * Whether the offer is a partial offer
196
- */
197
- partial?: boolean;
198
- /**
199
- * Whether identity documents must be provided for each of the passengers when creating an order based on this offer.
200
- * If this is `true`, you must provide an identity document for every passenger.
201
- */
202
- passenger_identity_documents_required: boolean;
203
- /**
204
- * The passengers included in the offer
205
- */
206
- passengers: OfferPassenger[];
207
- /**
208
- * The payment requirements for this offer.
209
- */
210
- payment_requirements: PaymentRequirements;
211
- /**
212
- * The private fares applied on this offer.
213
- */
214
- private_fares: OfferPrivateFare[];
215
- /**
216
- * The slices that make up this offer. Each slice will include one or more segments,
217
- * the specific flights that the airline is offering to take the passengers from the slice's `origin` to its `destination`.
218
- */
219
- slices: OfferSlice[];
220
- /**
221
- * The amount of tax payable on the offer for all passengers
222
- */
223
- tax_amount: string | null;
224
- /**
225
- * The currency of the `tax_amount`, as an ISO 4217 currency code
226
- */
227
- tax_currency: string | null;
228
- /**
229
- * The total price of the offer for all passengers, including taxes.
230
- * It does not include the total price of any service(s) that might be booked with the offer.
231
- */
232
- total_amount: string;
233
- /**
234
- * An estimate of the total carbon dioxide (CO₂) emissions when
235
- * all of the passengers fly this offer's itinerary, measured in kilograms
236
- */
237
- total_emissions_kg: string;
238
- /**
239
- * The currency of the `total_amount`, as an ISO 4217 currency code
240
- */
241
- total_currency: string;
242
- /**
243
- * List of supported payment types
244
- */
245
- available_payment_types: PaymentType[];
246
- /**
247
- * The conditions associated with this offer
248
- */
249
- conditions: {
250
- /**
251
- * Whether the whole offer can be changed before the departure of the
252
- * first slice. If the airline hasn't provided any information about
253
- * whether this offer can be changed then this property will be `null`.
254
- */
255
- change_before_departure: OfferCondition | null;
256
- /**
257
- * Whether the whole offer can be refunded before the departure of the
258
- * first slice. If the airline hasn't provided any information about
259
- * whether this offer can be refunded then this property will be `null`.
260
- */
261
- refund_before_departure: OfferCondition | null;
262
- };
263
- client_key: string;
264
- }
265
- export interface OfferPassenger {
266
- /**
267
- * The age of the passenger on the departure_date of the final slice.
268
- *
269
- * @example
270
- * 14
271
- */
272
- age: number;
273
- /**
274
- * The passenger's family name. Only `space`, `-`, `'`, and letters from
275
- * the `ASCII`, `Latin-1 Supplement` and `Latin Extended-A` (with the
276
- * exceptions of `Æ`, `æ`, `IJ`, `ij`, `Œ`, `œ`, `Þ`, and `ð`) Unicode
277
- * charts are accepted. All other characters will result in a validation
278
- * error. The minimum length is 1 character, and the maximum is 20
279
- * characters.
280
- *
281
- * This is only required if you're also including Loyalty Programme
282
- * Accounts.
283
- *
284
- * @example
285
- * "Earhart"
286
- */
287
- family_name: string | null;
288
- /**
289
- * The passenger's given name. Only `space`, `-`, `'`, and letters from
290
- * the `ASCII`, `Latin-1 Supplement` and `Latin Extended-A` (with the
291
- * exceptions of `Æ`, `æ`, `IJ`, `ij`, `Œ`, `œ`, `Þ`, and `ð`) Unicode
292
- * charts are accepted. All other characters will result in a validation
293
- * error. The minimum length is 1 character, and the maximum is 20
294
- * characters.
295
- *
296
- * This is only required if you're also including Loyalty Programme
297
- * Accounts.
298
- *
299
- * @example
300
- * "Amelia"
301
- */
302
- given_name: string | null;
303
- /**
304
- * The identifier for the passenger. This ID will be generated by Duffel.
305
- *
306
- * @example
307
- * "pas_00009hj8USM7Ncg31cBCLx"
308
- */
309
- id: string;
310
- /**
311
- * The Loyalty Programme Accounts for this passenger.
312
- */
313
- loyalty_programme_accounts?: LoyaltyProgrammeAccount[];
314
- /**
315
- * The type of the passenger.
316
- */
317
- type: PassengerType;
318
- }
319
- export interface LoyaltyProgrammeAccount {
320
- /**
321
- * The passenger's account number for this Loyalty Programme Account
322
- */
323
- account_number: string;
324
- /**
325
- * The IATA code for the airline that this Loyalty Programme Account belongs to
326
- */
327
- airline_iata_code: string;
328
- }
329
- export interface OfferPrivateFare {
330
- /**
331
- * The corporate code that was applied, if any.
332
- */
333
- corporate_code?: string;
334
- /**
335
- * The tracking reference that was applied, if any.
336
- */
337
- tracking_reference?: string;
338
- /**
339
- * The type of private fare applied.
340
- */
341
- type: "corporate" | "leisure" | "negotiated";
342
- }
343
- export interface OfferSlice {
344
- /**
345
- * The options and conditions to change or cancel this slice. Only
346
- * "changing before departure" is allowed.
347
- */
348
- conditions: {
349
- /**
350
- * Whether this slice can be changed before the departure. If the slice
351
- * can be changed for all of the passengers then the allowed property
352
- * will be `true` and information will be provided about any penalties. If
353
- * none of the passengers on the slice can be changed then the allowed
354
- * property will be `false`. In all other cases this property will be
355
- * `null`indicating we can't provide the information for this slice.
356
- */
357
- change_before_departure: OfferCondition | null;
358
- };
359
- /**
360
- * The city or airport where this slice ends.
361
- */
362
- destination: OfferSlicePlace;
363
- /**
364
- * The type of the destination.
365
- */
366
- destination_type: PlaceType;
367
- /**
368
- * The duration of the slice, represented as a ISO 8601 duration.
369
- *
370
- * @example
371
- * "PT02H26M"
372
- */
373
- duration: string | null;
374
- /**
375
- * The name of the fare brand associated with this slice. A fare brand
376
- * specifies the travel conditions you get on your slice made available by
377
- * the airline. e.g. a British Airways Economy Basic fare will only
378
- * include a hand baggage allowance. It is worth noting that the fare
379
- * brand names are defined by the airlines themselves and therefore they
380
- * are subject to change without any prior notice. We are in the process
381
- * of adding support for `fare_brand_name` across all our airlines, so for
382
- * now, this field may be `null` in some offers. This will become a
383
- * non-nullable attribute in the near future.
384
- *
385
- * @example
386
- * "Basic"
387
- */
388
- fare_brand_name: string | null;
389
- /**
390
- * Duffel's unique identifier for the slice. It identifies the slice of
391
- * an offer (i.e. the same slice across offers will have different `id`s).
392
- *
393
- * @example
394
- * "sli_00009htYpSCXrwaB9Dn123"
395
- */
396
- id: string;
397
- /**
398
- * The city or airport where this slice begins.
399
- */
400
- origin: OfferSlicePlace;
401
- /**
402
- * The type of the origin
403
- */
404
- origin_type: PlaceType;
405
- /**
406
- * The segments - that is, specific flights - that the airline is offering
407
- * to get the passengers from the `origin` to the `destination`
408
- */
409
- segments: OfferSliceSegment[];
410
- }
411
- export interface OfferSlicePlace {
412
- /**
413
- * The 3-letter IATA code for the city where the place is located.
414
- * 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).
415
- */
416
- iata_city_code: string | null;
417
- /**
418
- * The 3-letter IATA code for the place
419
- */
420
- iata_code: string;
421
- /**
422
- * Duffel's unique identifier for the place
423
- */
424
- id: string;
425
- /**
426
- * The name of the place
427
- */
428
- name: string;
429
- /**
430
- * The type of the place
431
- */
432
- type: PlaceType;
433
- /**
434
- * The ISO 3166-1 alpha-2 code for the country where the city is located
435
- */
436
- iata_country_code: string;
437
- /**
438
- * The latitude position of the airport represented in Decimal degrees with 6 decimal points with a range between -90° and 90°
439
- */
440
- latitude: number | null;
441
- /**
442
- * The longitude position of the airport represented in Decimal degrees with 6 decimal points with a range between -180° and 180°
443
- */
444
- longitude: number | null;
445
- /**
446
- * The four-character ICAO code for the airport
447
- */
448
- icao_code: string | null;
449
- /**
450
- * The time zone of the airport, specified by name from the [tz database](https://en.wikipedia.org/wiki/Tz_database)
451
- */
452
- time_zone: string | null;
453
- /**
454
- * The name of the city (or cities separated by a `/`) where the airport is located
455
- */
456
- city_name: string | null;
457
- /**
458
- * The metropolitan area where the airport is located.
459
- * Only present for airports which are registered with IATA as belonging to a metropolitan area.
460
- */
461
- city: City;
462
- }
463
- export interface OfferSliceSegment {
464
- /**
465
- * The aircraft that the operating carrier will use to operate this segment
466
- */
467
- aircraft: Aircraft;
468
- /**
469
- * The ISO 8601 datetime at which the segment is scheduled to arrive
470
- */
471
- arriving_at: string;
472
- /**
473
- * The terminal at the destination airport where the segment is scheduled to arrive
474
- */
475
- destination_terminal: string | null;
476
- /**
477
- * The ISO 8601 datetime at which the segment is scheduled to depart
478
- */
479
- departing_at: string;
480
- /**
481
- * The terminal at the origin airport from which the segment is scheduled to depart
482
- */
483
- origin_terminal: string | null;
484
- /**
485
- * The airport at which the segment is scheduled to arrive
486
- */
487
- destination: Airport;
488
- /**
489
- * The distance of the segment in kilometres
490
- */
491
- distance: string | null;
492
- /**
493
- * The duration of the segment, represented as a ISO 8601 duration
494
- */
495
- duration: string | null;
496
- /**
497
- * 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
498
- */
499
- id: string;
500
- /**
501
- * The airline selling the tickets for this segment.
502
- * This may differ from the `operating_carrier` in the case of a "codeshare", where one airline sells flights operated by another airline.
503
- */
504
- marketing_carrier: Airline;
505
- /**
506
- * The flight number assigned by the marketing carrier
507
- */
508
- marketing_carrier_flight_number: string;
509
- /**
510
- * The airport from which the flight is scheduled to depart
511
- */
512
- origin: Airport;
513
- /**
514
- * The airline actually operating this segment.
515
- * This may differ from the marketing_carrier in the case of a "codeshare", where one airline sells flights operated by another airline.
516
- */
517
- operating_carrier: Airline;
518
- /**
519
- * The flight number assigned by the operating carrier
520
- */
521
- operating_carrier_flight_number?: string;
522
- /**
523
- * 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)
524
- */
525
- passengers: OfferSliceSegmentPassenger[];
526
- /**
527
- * Additional segment-specific information about the stops, if any, included in the segment
528
- */
529
- stops: OfferSliceSegmentStop[];
530
- }
531
- export interface OfferConditionModificationAllowed {
532
- /**
533
- * Allow the modification to the order
534
- */
535
- allowed: true;
536
- /**
537
- * The penalty of the modification
538
- */
539
- penalty_amount: number | null;
540
- /**
541
- * The penalty currency of the modification
542
- */
543
- penalty_currency: string | null;
544
- }
545
- export interface OfferConditionNoModification {
546
- /**
547
- * No modification to the order is allowed
548
- */
549
- allowed: false;
550
- /**
551
- * When the modification to the order is not allowed, both penalty amount and currency should be null
552
- */
553
- penalty_amount: null;
554
- penalty_currency: null;
555
- }
556
- export type OfferCondition = OfferConditionModificationAllowed | OfferConditionNoModification;
557
- export interface OfferSliceSegmentPassenger {
558
- /**
559
- * The baggage allowances for the passenger on this segment included in the offer.
560
- * Some airlines may allow additional baggage to be booked as a service - see the offer's available_services.
561
- */
562
- baggages: OfferSliceSegmentPassengerBaggage[];
563
- /**
564
- * The cabin class that the passenger will travel in on this segment
565
- */
566
- cabin_class: CabinClass;
567
- /**
568
- * The name that the marketing carrier uses to market this cabin class
569
- */
570
- cabin_class_marketing_name: string;
571
- /**
572
- * The identifier for the passenger.
573
- * You may have specified this ID yourself when creating the offer request, or otherwise, Duffel will have generated its own random ID.
574
- */
575
- passenger_id: string;
576
- }
577
- export interface OfferSliceSegmentPassengerBaggage {
578
- /**
579
- * The type of the baggage allowance
580
- */
581
- type: BaggageType;
582
- /**
583
- * The number of this type of bag allowed on the segment. Note that this can currently be 0 in some cases.
584
- */
585
- quantity: number;
586
- }
587
- export interface OfferSliceSegmentStop {
588
- /**
589
- * Duffel's unique identifier for the Stop
590
- */
591
- id: string;
592
- /**
593
- * The airport at which the Stop happens
594
- */
595
- airport: Airport;
596
- /**
597
- * The ISO 8601 datetime at which the Stop is scheduled to arrive, in the airport's timezone (see destination.timezone)
598
- */
599
- arriving_at: string;
600
- /**
601
- * The ISO 8601 datetime at which the Stop is scheduled to depart, in the airport's timezone (see origin.timezone)
602
- */
603
- departing_at: string;
604
- /**
605
- * The duration of the Stop, represented as a ISO 8601 duration
606
- */
607
- duration: string;
608
- }
609
- export interface LayoutSelectionPassenger {
610
- id: string;
611
- name?: string | null;
612
- }
613
- export interface OfferAvailableServiceSeatMetadata {
614
- /**
615
- * The designator used to uniquely identify the seat, usually made up of a row number and a column letter
616
- */
617
- designator: string;
618
- /**
619
- * 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.
620
- */
621
- disclosures: string[];
622
- /**
623
- * A name which describes the type of seat, which you can display in your user interface to help customers to understand its features
624
- */
625
- name: string;
626
- }
627
- export type OfferAvailableService = OfferAvailableBaggageService | OfferAvailableServiceCancelForAnyReason;
628
- interface OfferAvailableServiceBase {
629
- /**
630
- * Duffel's unique identifier for the service
631
- */
632
- id: string;
633
- /**
634
- * The maximum quantity of this service that can be booked with an order
635
- */
636
- maximum_quantity: number;
637
- /**
638
- * The list of passenger `id`s the service applies to.
639
- * If you add this service to an order it will apply to all the passengers in this list.
640
- * For services where the type is `baggage`, this list will include only a single passenger.
641
- */
642
- passenger_ids: string[];
643
- /**
644
- * The list of segment ids the service applies to.
645
- * If you add this service to an order it will apply to all the segments in this list.
646
- * For services where the type is baggage, depending on the airline,
647
- * this list includes all the segments of all slices or all the segments of a single slice.
648
- */
649
- segment_ids: string[];
650
- /**
651
- * The total price of the service for all passengers and segments it applies to, including taxes
652
- */
653
- total_amount: string;
654
- /**
655
- * The currency of the `total_amount`, as an ISO 4217 currency code
656
- */
657
- total_currency: string;
658
- }
659
- export interface OfferAvailableBaggageService extends OfferAvailableServiceBase {
660
- /**
661
- * An object containing metadata about the service, like the maximum weight and dimensions of the baggage.
662
- */
663
- metadata: OfferAvailableServiceBaggageMetadata;
664
- /**
665
- * The type of the service.
666
- * For now we only return services of type baggage but we will return other types in the future.
667
- * We won't consider adding new service types a break change.
668
- */
669
- type: "baggage";
670
- }
671
- export interface OfferAvailableServiceCancelForAnyReason extends OfferAvailableServiceBase {
672
- /**
673
- * An object containing metadata about the service, like the refund amount when cancelling.
674
- */
675
- metadata: OfferAvailableCancelForAnyReasonServiceMetadata;
676
- /**
677
- * The type of the service.
678
- * For now we only return services of type baggage but we will return other types in the future.
679
- * We won't consider adding new service types a break change.
680
- */
681
- type: "cancel_for_any_reason";
682
- }
683
- export interface OfferAvailableSeatService extends OfferAvailableServiceBase {
684
- /**
685
- * An object containing metadata about the service, like the maximum weight and dimensions of the baggage.
686
- */
687
- metadata: OfferAvailableServiceSeatMetadata;
688
- /**
689
- * The type of the service.
690
- * For now we only return services of type baggage but we will return other types in the future.
691
- * We won't consider adding new service types a break change.
692
- */
693
- type: "seats";
694
- }
695
- export interface OfferAvailableCancelForAnyReasonServiceMetadata {
696
- /**
697
- * The URL where you can find the terms and conditions for this CFAR service
698
- */
699
- terms_and_conditions_url: string;
700
- /**
701
- * The amount of money that will be returned
702
- */
703
- refund_amount: string;
704
- /**
705
- * Details of what this CFAR service entails and how it can be used
706
- */
707
- merchant_copy: string;
708
- }
709
- export type OfferAvailableServiceType = OfferAvailableService["type"];
710
- export type OfferAvailableServiceMetadata = OfferAvailableServiceBaggageMetadata | OfferAvailableServiceSeatMetadata;
711
- export {};