@duffel/components 3.1.3--prototype.10 → 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.
@@ -0,0 +1,2156 @@
1
+ declare module "src/types/Aircraft" {
2
+ export interface Aircraft {
3
+ /**
4
+ * The three-character IATA code for the aircraft
5
+ */
6
+ iata_code: string;
7
+ /**
8
+ * Duffel's unique identifier for the aircraft
9
+ */
10
+ id: string;
11
+ /**
12
+ * The name of the aircraft
13
+ */
14
+ name: string;
15
+ }
16
+ }
17
+ declare module "src/types/Airline" {
18
+ export interface Airline {
19
+ /**
20
+ * The two-character IATA code for the airline. This may be null for non-IATA carriers.
21
+ */
22
+ iata_code: string | null;
23
+ /**
24
+ * Duffel's unique identifier for the airline
25
+ */
26
+ id: string;
27
+ /**
28
+ * The name of the airline
29
+ */
30
+ name: string;
31
+ }
32
+ }
33
+ declare module "src/types/City" {
34
+ export interface City {
35
+ /**
36
+ * The three-character IATA code for the city
37
+ */
38
+ iata_code: string;
39
+ /**
40
+ * Duffel's unique identifier for the city
41
+ */
42
+ id: string;
43
+ /**
44
+ * The ISO 3166-1 alpha-2 code for the country where the city is located
45
+ */
46
+ iata_country_code: string;
47
+ /**
48
+ * The name of the city
49
+ */
50
+ name: string;
51
+ }
52
+ }
53
+ declare module "src/types/Airport" {
54
+ import { City } from "src/types/City";
55
+ export interface Airport {
56
+ /**
57
+ * The three-character IATA code for the airport
58
+ */
59
+ iata_code: string | null;
60
+ /**
61
+ * Duffel's unique identifier for the airport
62
+ */
63
+ id: string;
64
+ /**
65
+ * The name of the airport
66
+ */
67
+ name: string;
68
+ /**
69
+ * The ISO 3166-1 alpha-2 code for the country where the airport is located
70
+ */
71
+ iata_country_code: string;
72
+ /**
73
+ * The latitude position of the airport represented in Decimal degrees with 6 decimal points with a range between -90° and 90°
74
+ */
75
+ latitude: number;
76
+ /**
77
+ * The longitude position of the airport represented in Decimal degrees with 6 decimal points with a range between -180° and 180°
78
+ */
79
+ longitude: number;
80
+ /**
81
+ * The four-character ICAO code for the airport
82
+ */
83
+ icao_code: string | null;
84
+ /**
85
+ * The time zone of the airport, specified by name from the [tz database](https://en.wikipedia.org/wiki/Tz_database)
86
+ */
87
+ time_zone: string;
88
+ /**
89
+ * The name of the city (or cities separated by a `/`) where the airport is located
90
+ */
91
+ city_name: string;
92
+ /**
93
+ * The metropolitan area where the airport is located.
94
+ * Only present for airports which are registered with IATA as belonging to a metropolitan area.
95
+ */
96
+ city: City;
97
+ }
98
+ }
99
+ declare module "src/types/Offer" {
100
+ import { Aircraft } from "src/types/Aircraft";
101
+ import { Airline } from "src/types/Airline";
102
+ import { Airport } from "src/types/Airport";
103
+ import { City } from "src/types/City";
104
+ export const CabinClassMap: {
105
+ economy: string;
106
+ premium_economy: string;
107
+ business: string;
108
+ first: string;
109
+ any: string;
110
+ };
111
+ export type CabinClass = keyof typeof CabinClassMap;
112
+ export type PassengerIdentityDocumentType = "passport";
113
+ /**
114
+ * Each offer represents flights you can buy from an airline at a particular price that meet your search criteria.
115
+ */
116
+ export type PaymentType = "arc_bsp_cash" | "balance" | "payments" | "card";
117
+ export type BaggageType = "carry_on" | "checked";
118
+ export const PassengerTypeMap: {
119
+ adult: string;
120
+ child: string;
121
+ infant_without_seat: string;
122
+ };
123
+ export type PassengerType = keyof typeof PassengerTypeMap;
124
+ export type PlaceType = "airport" | "city";
125
+ export interface PaymentRequirements {
126
+ /**
127
+ * The ISO 8601 datetime by which you must pay for this offer. At this
128
+ * time, if still unpaid, the reserved space on the flight(s) will be
129
+ * released and you will have to create a new order. This will be `null`
130
+ * when the offer requires immediate payment - that is, when
131
+ * `requires_instant_payment` is `true`.
132
+ *
133
+ * @example
134
+ * "2020-01-17T10:42:14Z"
135
+ */
136
+ payment_required_by?: string | null;
137
+ /**
138
+ * The ISO 8601 datetime at which the price associated with the order will
139
+ * no longer be guaranteed by the airline and may change before payment.
140
+ * This will be null when `requires_instant_payment` is `true`.
141
+ *
142
+ * @example
143
+ * "2020-01-17T10:42:14"
144
+ */
145
+ price_guarantee_expires_at?: string | null;
146
+ /**
147
+ * When payment is required at the time of booking this will be `true` and
148
+ * `payment_required_by` and `price_guarantee_expires_at` will be `null`.
149
+ * When payment can be made at a time after booking, this will be false
150
+ * and the time limits on the payment will be provided in
151
+ * `payment_required_by` and `price_guarantee_expires_at`.
152
+ */
153
+ requires_instant_payment: boolean;
154
+ }
155
+ export interface OfferAvailableServiceCommon {
156
+ /**
157
+ * Duffel's unique identifier for the service.
158
+ *
159
+ * @example
160
+ * "ase_00009UhD4ongolulWd9123"
161
+ */
162
+ id: string;
163
+ /**
164
+ * The maximum quantity of this service that can be booked with an order.
165
+ *
166
+ * @example
167
+ * 1
168
+ */
169
+ maximum_quantity: number;
170
+ /**
171
+ * The list of passenger `id`s the service applies to. If you add this
172
+ * service to an order it will apply to all the passengers in this list.
173
+ * For services where the type is `baggage`, this list will include only a
174
+ * single passenger.
175
+ *
176
+ * @example
177
+ * ["pas_00009hj8USM7Ncg31cBCLL"]
178
+ */
179
+ passenger_ids: string[];
180
+ /**
181
+ * The list of segment `id`s the service applies to. If you add this
182
+ * service to an order it will apply to all the segments in this list. For
183
+ * services where the type is `baggage`, depending on the airline, this
184
+ * list includes all the segments of all slices or all the segments of a
185
+ * single slice.
186
+ *
187
+ * @example
188
+ * ["seg_00009hj8USM7Ncg31cB456"]
189
+ */
190
+ segment_ids: string[];
191
+ /**
192
+ * The total price of the service for all passengers and segments it
193
+ * applies to, including taxes. This price is for a single unit of the
194
+ * service.
195
+ *
196
+ * @example
197
+ * "15.00"
198
+ */
199
+ total_amount: string;
200
+ /**
201
+ * The currency of the `totalAmount`, as an ISO 4217 currency code.
202
+ */
203
+ total_currency: string;
204
+ }
205
+ export interface OfferAvailableServiceBaggageMetadata {
206
+ /**
207
+ * The maximum depth that the baggage can have in centimetres
208
+ *
209
+ * @example
210
+ * 75
211
+ */
212
+ maximum_depth_cm: number | null;
213
+ /**
214
+ * The maximum height that the baggage can have in centimetres
215
+ *
216
+ * @example
217
+ * 90
218
+ */
219
+ maximum_height_cm: number | null;
220
+ /**
221
+ * The maximum length that the baggage can have in centimetres
222
+ *
223
+ * @example
224
+ * 90
225
+ */
226
+ maximum_length_cm: number | null;
227
+ /**
228
+ * The maximum weight that the baggage can have in kilograms
229
+ *
230
+ * @example
231
+ * 23
232
+ */
233
+ maximum_weight_kg: number | null;
234
+ /**
235
+ * The type of the baggage
236
+ */
237
+ type: BaggageType;
238
+ }
239
+ export interface OfferAvailableServiceBaggage extends OfferAvailableServiceCommon {
240
+ /**
241
+ * The metadata varies by the type of service. It includes further data
242
+ * about the service. For example, for baggages, it may have data about
243
+ * size and weight restrictions.
244
+ */
245
+ metadata: OfferAvailableServiceBaggageMetadata;
246
+ /**
247
+ * The type of the service.
248
+ */
249
+ type: "baggage";
250
+ }
251
+ export interface Offer {
252
+ /**
253
+ * The types of identity documents that may be provided for the passengers when creating an order based on this offer.
254
+ * Currently, the only supported type is `passport`. If this is `[]`, then you must not provide identity documents.
255
+ */
256
+ allowed_passenger_identity_document_types: PassengerIdentityDocumentType[];
257
+ /**
258
+ * The services that can be booked along with the offer but are not included by default, for example an additional checked bag.
259
+ * This field is only returned in the Get single offer endpoint.
260
+ * When there are no services available, or we don't support services for the airline, this list will be empty.
261
+ */
262
+ available_services: Array<OfferAvailableBaggageService | OfferAvailableServiceCancelForAnyReason>;
263
+ /**
264
+ * The base price of the offer for all passengers, excluding taxes.
265
+ * It does not include the base amount of any service(s) that might be booked with the offer.
266
+ */
267
+ base_amount: string;
268
+ /**
269
+ * The currency of the `base_amount`, as an ISO 4217 currency code
270
+ */
271
+ base_currency: string;
272
+ /**
273
+ * The ISO 8601 datetime at which the offer was created
274
+ */
275
+ created_at: string;
276
+ /**
277
+ * The ISO 8601 datetime at which the offer will expire and no longer be usable to create an order
278
+ */
279
+ expires_at: string;
280
+ /**
281
+ * Duffel's unique identifier for the offer
282
+ */
283
+ id: string;
284
+ /**
285
+ * Whether the offer request was created in live mode.
286
+ * 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.
287
+ */
288
+ live_mode: boolean;
289
+ /**
290
+ * The airline which provided the offer
291
+ */
292
+ owner: Airline;
293
+ /**
294
+ * Whether the offer is a partial offer
295
+ */
296
+ partial?: boolean;
297
+ /**
298
+ * Whether identity documents must be provided for each of the passengers when creating an order based on this offer.
299
+ * If this is `true`, you must provide an identity document for every passenger.
300
+ */
301
+ passenger_identity_documents_required: boolean;
302
+ /**
303
+ * The passengers included in the offer
304
+ */
305
+ passengers: OfferPassenger[];
306
+ /**
307
+ * The payment requirements for this offer.
308
+ */
309
+ payment_requirements: PaymentRequirements;
310
+ /**
311
+ * The private fares applied on this offer.
312
+ */
313
+ private_fares: OfferPrivateFare[];
314
+ /**
315
+ * The slices that make up this offer. Each slice will include one or more segments,
316
+ * the specific flights that the airline is offering to take the passengers from the slice's `origin` to its `destination`.
317
+ */
318
+ slices: OfferSlice[];
319
+ /**
320
+ * The amount of tax payable on the offer for all passengers
321
+ */
322
+ tax_amount: string | null;
323
+ /**
324
+ * The currency of the `tax_amount`, as an ISO 4217 currency code
325
+ */
326
+ tax_currency: string | null;
327
+ /**
328
+ * The total price of the offer for all passengers, including taxes.
329
+ * It does not include the total price of any service(s) that might be booked with the offer.
330
+ */
331
+ total_amount: string;
332
+ /**
333
+ * An estimate of the total carbon dioxide (CO₂) emissions when
334
+ * all of the passengers fly this offer's itinerary, measured in kilograms
335
+ */
336
+ total_emissions_kg: string;
337
+ /**
338
+ * The currency of the `total_amount`, as an ISO 4217 currency code
339
+ */
340
+ total_currency: string;
341
+ /**
342
+ * List of supported payment types
343
+ */
344
+ available_payment_types: PaymentType[];
345
+ /**
346
+ * The conditions associated with this offer
347
+ */
348
+ conditions: {
349
+ /**
350
+ * Whether the whole offer can be changed before the departure of the
351
+ * first slice. If the airline hasn't provided any information about
352
+ * whether this offer can be changed then this property will be `null`.
353
+ */
354
+ change_before_departure: OfferCondition | null;
355
+ /**
356
+ * Whether the whole offer can be refunded before the departure of the
357
+ * first slice. If the airline hasn't provided any information about
358
+ * whether this offer can be refunded then this property will be `null`.
359
+ */
360
+ refund_before_departure: OfferCondition | null;
361
+ };
362
+ client_key: string;
363
+ }
364
+ export interface OfferPassenger {
365
+ /**
366
+ * The age of the passenger on the departure_date of the final slice.
367
+ *
368
+ * @example
369
+ * 14
370
+ */
371
+ age: number;
372
+ /**
373
+ * The passenger's family name. Only `space`, `-`, `'`, and letters from
374
+ * the `ASCII`, `Latin-1 Supplement` and `Latin Extended-A` (with the
375
+ * exceptions of `Æ`, `æ`, `IJ`, `ij`, `Œ`, `œ`, `Þ`, and `ð`) Unicode
376
+ * charts are accepted. All other characters will result in a validation
377
+ * error. The minimum length is 1 character, and the maximum is 20
378
+ * characters.
379
+ *
380
+ * This is only required if you're also including Loyalty Programme
381
+ * Accounts.
382
+ *
383
+ * @example
384
+ * "Earhart"
385
+ */
386
+ family_name: string | null;
387
+ /**
388
+ * The passenger's given name. Only `space`, `-`, `'`, and letters from
389
+ * the `ASCII`, `Latin-1 Supplement` and `Latin Extended-A` (with the
390
+ * exceptions of `Æ`, `æ`, `IJ`, `ij`, `Œ`, `œ`, `Þ`, and `ð`) Unicode
391
+ * charts are accepted. All other characters will result in a validation
392
+ * error. The minimum length is 1 character, and the maximum is 20
393
+ * characters.
394
+ *
395
+ * This is only required if you're also including Loyalty Programme
396
+ * Accounts.
397
+ *
398
+ * @example
399
+ * "Amelia"
400
+ */
401
+ given_name: string | null;
402
+ /**
403
+ * The identifier for the passenger. This ID will be generated by Duffel.
404
+ *
405
+ * @example
406
+ * "pas_00009hj8USM7Ncg31cBCLx"
407
+ */
408
+ id: string;
409
+ /**
410
+ * The Loyalty Programme Accounts for this passenger.
411
+ */
412
+ loyalty_programme_accounts?: LoyaltyProgrammeAccount[];
413
+ /**
414
+ * The type of the passenger.
415
+ */
416
+ type: PassengerType;
417
+ }
418
+ export interface LoyaltyProgrammeAccount {
419
+ /**
420
+ * The passenger's account number for this Loyalty Programme Account
421
+ */
422
+ account_number: string;
423
+ /**
424
+ * The IATA code for the airline that this Loyalty Programme Account belongs to
425
+ */
426
+ airline_iata_code: string;
427
+ }
428
+ export interface OfferPrivateFare {
429
+ /**
430
+ * The corporate code that was applied, if any.
431
+ */
432
+ corporate_code?: string;
433
+ /**
434
+ * The tracking reference that was applied, if any.
435
+ */
436
+ tracking_reference?: string;
437
+ /**
438
+ * The type of private fare applied.
439
+ */
440
+ type: "corporate" | "leisure" | "negotiated";
441
+ }
442
+ export interface OfferSlice {
443
+ /**
444
+ * The options and conditions to change or cancel this slice. Only
445
+ * "changing before departure" is allowed.
446
+ */
447
+ conditions: {
448
+ /**
449
+ * Whether this slice can be changed before the departure. If the slice
450
+ * can be changed for all of the passengers then the allowed property
451
+ * will be `true` and information will be provided about any penalties. If
452
+ * none of the passengers on the slice can be changed then the allowed
453
+ * property will be `false`. In all other cases this property will be
454
+ * `null`indicating we can't provide the information for this slice.
455
+ */
456
+ change_before_departure: OfferCondition | null;
457
+ };
458
+ /**
459
+ * The city or airport where this slice ends.
460
+ */
461
+ destination: OfferSlicePlace;
462
+ /**
463
+ * The type of the destination.
464
+ */
465
+ destination_type: PlaceType;
466
+ /**
467
+ * The duration of the slice, represented as a ISO 8601 duration.
468
+ *
469
+ * @example
470
+ * "PT02H26M"
471
+ */
472
+ duration: string | null;
473
+ /**
474
+ * The name of the fare brand associated with this slice. A fare brand
475
+ * specifies the travel conditions you get on your slice made available by
476
+ * the airline. e.g. a British Airways Economy Basic fare will only
477
+ * include a hand baggage allowance. It is worth noting that the fare
478
+ * brand names are defined by the airlines themselves and therefore they
479
+ * are subject to change without any prior notice. We are in the process
480
+ * of adding support for `fare_brand_name` across all our airlines, so for
481
+ * now, this field may be `null` in some offers. This will become a
482
+ * non-nullable attribute in the near future.
483
+ *
484
+ * @example
485
+ * "Basic"
486
+ */
487
+ fare_brand_name: string | null;
488
+ /**
489
+ * Duffel's unique identifier for the slice. It identifies the slice of
490
+ * an offer (i.e. the same slice across offers will have different `id`s).
491
+ *
492
+ * @example
493
+ * "sli_00009htYpSCXrwaB9Dn123"
494
+ */
495
+ id: string;
496
+ /**
497
+ * The city or airport where this slice begins.
498
+ */
499
+ origin: OfferSlicePlace;
500
+ /**
501
+ * The type of the origin
502
+ */
503
+ origin_type: PlaceType;
504
+ /**
505
+ * The segments - that is, specific flights - that the airline is offering
506
+ * to get the passengers from the `origin` to the `destination`
507
+ */
508
+ segments: OfferSliceSegment[];
509
+ }
510
+ export interface OfferSlicePlace {
511
+ /**
512
+ * The 3-letter IATA code for the city where the place is located.
513
+ * 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).
514
+ */
515
+ iata_city_code: string | null;
516
+ /**
517
+ * The 3-letter IATA code for the place
518
+ */
519
+ iata_code: string;
520
+ /**
521
+ * Duffel's unique identifier for the place
522
+ */
523
+ id: string;
524
+ /**
525
+ * The name of the place
526
+ */
527
+ name: string;
528
+ /**
529
+ * The type of the place
530
+ */
531
+ type: PlaceType;
532
+ /**
533
+ * The ISO 3166-1 alpha-2 code for the country where the city is located
534
+ */
535
+ iata_country_code: string;
536
+ /**
537
+ * The latitude position of the airport represented in Decimal degrees with 6 decimal points with a range between -90° and 90°
538
+ */
539
+ latitude: number | null;
540
+ /**
541
+ * The longitude position of the airport represented in Decimal degrees with 6 decimal points with a range between -180° and 180°
542
+ */
543
+ longitude: number | null;
544
+ /**
545
+ * The four-character ICAO code for the airport
546
+ */
547
+ icao_code: string | null;
548
+ /**
549
+ * The time zone of the airport, specified by name from the [tz database](https://en.wikipedia.org/wiki/Tz_database)
550
+ */
551
+ time_zone: string | null;
552
+ /**
553
+ * The name of the city (or cities separated by a `/`) where the airport is located
554
+ */
555
+ city_name: string | null;
556
+ /**
557
+ * The metropolitan area where the airport is located.
558
+ * Only present for airports which are registered with IATA as belonging to a metropolitan area.
559
+ */
560
+ city: City;
561
+ }
562
+ export interface OfferSliceSegment {
563
+ /**
564
+ * The aircraft that the operating carrier will use to operate this segment
565
+ */
566
+ aircraft: Aircraft;
567
+ /**
568
+ * The ISO 8601 datetime at which the segment is scheduled to arrive
569
+ */
570
+ arriving_at: string;
571
+ /**
572
+ * The terminal at the destination airport where the segment is scheduled to arrive
573
+ */
574
+ destination_terminal: string | null;
575
+ /**
576
+ * The ISO 8601 datetime at which the segment is scheduled to depart
577
+ */
578
+ departing_at: string;
579
+ /**
580
+ * The terminal at the origin airport from which the segment is scheduled to depart
581
+ */
582
+ origin_terminal: string | null;
583
+ /**
584
+ * The airport at which the segment is scheduled to arrive
585
+ */
586
+ destination: Airport;
587
+ /**
588
+ * The distance of the segment in kilometres
589
+ */
590
+ distance: string | null;
591
+ /**
592
+ * The duration of the segment, represented as a ISO 8601 duration
593
+ */
594
+ duration: string | null;
595
+ /**
596
+ * 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
597
+ */
598
+ id: string;
599
+ /**
600
+ * The airline selling the tickets for this segment.
601
+ * This may differ from the `operating_carrier` in the case of a "codeshare", where one airline sells flights operated by another airline.
602
+ */
603
+ marketing_carrier: Airline;
604
+ /**
605
+ * The flight number assigned by the marketing carrier
606
+ */
607
+ marketing_carrier_flight_number: string;
608
+ /**
609
+ * The airport from which the flight is scheduled to depart
610
+ */
611
+ origin: Airport;
612
+ /**
613
+ * The airline actually operating this segment.
614
+ * This may differ from the marketing_carrier in the case of a "codeshare", where one airline sells flights operated by another airline.
615
+ */
616
+ operating_carrier: Airline;
617
+ /**
618
+ * The flight number assigned by the operating carrier
619
+ */
620
+ operating_carrier_flight_number?: string;
621
+ /**
622
+ * 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)
623
+ */
624
+ passengers: OfferSliceSegmentPassenger[];
625
+ /**
626
+ * Additional segment-specific information about the stops, if any, included in the segment
627
+ */
628
+ stops: OfferSliceSegmentStop[];
629
+ }
630
+ export interface OfferConditionModificationAllowed {
631
+ /**
632
+ * Allow the modification to the order
633
+ */
634
+ allowed: true;
635
+ /**
636
+ * The penalty of the modification
637
+ */
638
+ penalty_amount: number | null;
639
+ /**
640
+ * The penalty currency of the modification
641
+ */
642
+ penalty_currency: string | null;
643
+ }
644
+ export interface OfferConditionNoModification {
645
+ /**
646
+ * No modification to the order is allowed
647
+ */
648
+ allowed: false;
649
+ /**
650
+ * When the modification to the order is not allowed, both penalty amount and currency should be null
651
+ */
652
+ penalty_amount: null;
653
+ penalty_currency: null;
654
+ }
655
+ export type OfferCondition = OfferConditionModificationAllowed | OfferConditionNoModification;
656
+ export interface OfferSliceSegmentPassenger {
657
+ /**
658
+ * The baggage allowances for the passenger on this segment included in the offer.
659
+ * Some airlines may allow additional baggage to be booked as a service - see the offer's available_services.
660
+ */
661
+ baggages: OfferSliceSegmentPassengerBaggage[];
662
+ /**
663
+ * The cabin class that the passenger will travel in on this segment
664
+ */
665
+ cabin_class: CabinClass;
666
+ /**
667
+ * The name that the marketing carrier uses to market this cabin class
668
+ */
669
+ cabin_class_marketing_name: string;
670
+ /**
671
+ * The identifier for the passenger.
672
+ * You may have specified this ID yourself when creating the offer request, or otherwise, Duffel will have generated its own random ID.
673
+ */
674
+ passenger_id: string;
675
+ }
676
+ export interface OfferSliceSegmentPassengerBaggage {
677
+ /**
678
+ * The type of the baggage allowance
679
+ */
680
+ type: BaggageType;
681
+ /**
682
+ * The number of this type of bag allowed on the segment. Note that this can currently be 0 in some cases.
683
+ */
684
+ quantity: number;
685
+ }
686
+ export interface OfferSliceSegmentStop {
687
+ /**
688
+ * Duffel's unique identifier for the Stop
689
+ */
690
+ id: string;
691
+ /**
692
+ * The airport at which the Stop happens
693
+ */
694
+ airport: Airport;
695
+ /**
696
+ * The ISO 8601 datetime at which the Stop is scheduled to arrive, in the airport's timezone (see destination.timezone)
697
+ */
698
+ arriving_at: string;
699
+ /**
700
+ * The ISO 8601 datetime at which the Stop is scheduled to depart, in the airport's timezone (see origin.timezone)
701
+ */
702
+ departing_at: string;
703
+ /**
704
+ * The duration of the Stop, represented as a ISO 8601 duration
705
+ */
706
+ duration: string;
707
+ }
708
+ export interface LayoutSelectionPassenger {
709
+ id: string;
710
+ name?: string | null;
711
+ }
712
+ export interface OfferAvailableServiceSeatMetadata {
713
+ /**
714
+ * The designator used to uniquely identify the seat, usually made up of a row number and a column letter
715
+ */
716
+ designator: string;
717
+ /**
718
+ * 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.
719
+ */
720
+ disclosures: string[];
721
+ /**
722
+ * A name which describes the type of seat, which you can display in your user interface to help customers to understand its features
723
+ */
724
+ name: string;
725
+ }
726
+ export type OfferAvailableService = OfferAvailableBaggageService | OfferAvailableServiceCancelForAnyReason;
727
+ interface OfferAvailableServiceBase {
728
+ /**
729
+ * Duffel's unique identifier for the service
730
+ */
731
+ id: string;
732
+ /**
733
+ * The maximum quantity of this service that can be booked with an order
734
+ */
735
+ maximum_quantity: number;
736
+ /**
737
+ * The list of passenger `id`s the service applies to.
738
+ * If you add this service to an order it will apply to all the passengers in this list.
739
+ * For services where the type is `baggage`, this list will include only a single passenger.
740
+ */
741
+ passenger_ids: string[];
742
+ /**
743
+ * The list of segment ids the service applies to.
744
+ * If you add this service to an order it will apply to all the segments in this list.
745
+ * For services where the type is baggage, depending on the airline,
746
+ * this list includes all the segments of all slices or all the segments of a single slice.
747
+ */
748
+ segment_ids: string[];
749
+ /**
750
+ * The total price of the service for all passengers and segments it applies to, including taxes
751
+ */
752
+ total_amount: string;
753
+ /**
754
+ * The currency of the `total_amount`, as an ISO 4217 currency code
755
+ */
756
+ total_currency: string;
757
+ }
758
+ export interface OfferAvailableBaggageService extends OfferAvailableServiceBase {
759
+ /**
760
+ * An object containing metadata about the service, like the maximum weight and dimensions of the baggage.
761
+ */
762
+ metadata: OfferAvailableServiceBaggageMetadata;
763
+ /**
764
+ * The type of the service.
765
+ * For now we only return services of type baggage but we will return other types in the future.
766
+ * We won't consider adding new service types a break change.
767
+ */
768
+ type: "baggage";
769
+ }
770
+ export interface OfferAvailableServiceCancelForAnyReason extends OfferAvailableServiceBase {
771
+ /**
772
+ * An object containing metadata about the service, like the refund amount when cancelling.
773
+ */
774
+ metadata: OfferAvailableCancelForAnyReasonServiceMetadata;
775
+ /**
776
+ * The type of the service.
777
+ * For now we only return services of type baggage but we will return other types in the future.
778
+ * We won't consider adding new service types a break change.
779
+ */
780
+ type: "cancel_for_any_reason";
781
+ }
782
+ export interface OfferAvailableSeatService extends OfferAvailableServiceBase {
783
+ /**
784
+ * An object containing metadata about the service, like the maximum weight and dimensions of the baggage.
785
+ */
786
+ metadata: OfferAvailableServiceSeatMetadata;
787
+ /**
788
+ * The type of the service.
789
+ * For now we only return services of type baggage but we will return other types in the future.
790
+ * We won't consider adding new service types a break change.
791
+ */
792
+ type: "seats";
793
+ }
794
+ export interface OfferAvailableCancelForAnyReasonServiceMetadata {
795
+ /**
796
+ * The URL where you can find the terms and conditions for this CFAR service
797
+ */
798
+ terms_and_conditions_url: string;
799
+ /**
800
+ * The amount of money that will be returned
801
+ */
802
+ refund_amount: string;
803
+ /**
804
+ * Details of what this CFAR service entails and how it can be used
805
+ */
806
+ merchant_copy: string;
807
+ }
808
+ export type OfferAvailableServiceType = OfferAvailableService["type"];
809
+ export type OfferAvailableServiceMetadata = OfferAvailableServiceBaggageMetadata | OfferAvailableServiceSeatMetadata;
810
+ }
811
+ declare module "src/types/CreateOrderPayload" {
812
+ import { Offer, OfferAvailableCancelForAnyReasonServiceMetadata, OfferAvailableServiceBaggageMetadata } from "src/types/Offer";
813
+ export interface CreateOrderPayload {
814
+ selected_offers: Array<Offer["id"]>;
815
+ passengers: CreateOrderPayloadPassengers;
816
+ services: CreateOrderPayloadServices;
817
+ payments: Array<CreateOrderPayloadPayment>;
818
+ type: "instant";
819
+ metadata: Record<string, string>;
820
+ }
821
+ export interface CreateOrderPayloadPassenger {
822
+ id: string;
823
+ given_name: string;
824
+ family_name: string;
825
+ gender: string;
826
+ title: string;
827
+ born_on: string;
828
+ email?: string;
829
+ phone_number?: string;
830
+ }
831
+ export type CreateOrderPayloadPassengers = Array<CreateOrderPayloadPassenger>;
832
+ export type CreateOrderPayloadPaymentType = "balance";
833
+ export interface CreateOrderPayloadPayment {
834
+ type: CreateOrderPayloadPaymentType;
835
+ amount: string;
836
+ currency: string;
837
+ }
838
+ export type CreateOrderPayloadServices = CreateOrderPayloadService[];
839
+ export interface CreateOrderPayloadService {
840
+ id: string;
841
+ quantity: number;
842
+ /** `serviceInformation` is meant for:
843
+ * 1. internal use within the Duffel Ancillaries component, so it is convenient to augument selected services with data about it.
844
+ * 2. When `onPayloadReady` is ready, we'll return selected bags and seat services along with the `serviceInformation` to allow consumer to enrich their price breakdown.
845
+ *
846
+ * Note: `serviceInformation` is not known by the Duffel API.
847
+ */
848
+ serviceInformation?: CreateOrderPayloadServiceInformation;
849
+ }
850
+ export interface CreateOrderPayloadSeatService {
851
+ id: string;
852
+ quantity: number;
853
+ /** `serviceInformation` is meant for:
854
+ * 1. internal use within the Duffel Ancillaries component, so it is convenient to augument selected services with data about it.
855
+ * 2. When `onPayloadReady` is ready, we'll return selected bags and seat services along with the `serviceInformation` to allow consumer to enrich their price breakdown.
856
+ *
857
+ * Note: `serviceInformation` is not known by the Duffel API.
858
+ */
859
+ serviceInformation?: CreateOrderPayloadServiceInformationForSeats;
860
+ }
861
+ type CreateOrderPayloadServiceInformation = CreateOrderPayloadServiceInformationForSeats | CreateOrderPayloadServiceInformationForBags | CreateOrderPayloadServiceInformationForCancelForAnyReason;
862
+ interface CreateOrderPayloadCommonServiceInformation {
863
+ segmentId: string;
864
+ passengerId: string;
865
+ passengerName: string;
866
+ total_amount: string;
867
+ total_currency: string;
868
+ }
869
+ export interface CreateOrderPayloadServiceInformationForSeats extends CreateOrderPayloadCommonServiceInformation {
870
+ type: "seat";
871
+ designator: string;
872
+ disclosures: string[];
873
+ }
874
+ export type CreateOrderPayloadServiceInformationForBags = CreateOrderPayloadCommonServiceInformation & OfferAvailableServiceBaggageMetadata;
875
+ export type CreateOrderPayloadServiceInformationForCancelForAnyReason = {
876
+ type: "cancel_for_any_reason";
877
+ } & Pick<CreateOrderPayloadCommonServiceInformation,
878
+ /**
879
+ * only using `total_amount` and `total_currency` from `CreateOrderPayloadCommonServiceInformation`
880
+ * because the cancel for any reason service applies to the whole order, not a specific segment or passenger
881
+ */
882
+ "total_amount" | "total_currency"> & OfferAvailableCancelForAnyReasonServiceMetadata;
883
+ }
884
+ declare module "src/types/SeatMap" {
885
+ /**
886
+ * Seat maps are used to build a rich experience for your customers so they can select a seat as part of an order.
887
+ * A seat map includes the data for rendering seats in the relevant cabins, along with their total cost and other information such as disclosures.
888
+ * @link https://duffel.com/docs/api/seat-maps/schema
889
+ */
890
+ export interface SeatMap {
891
+ /**
892
+ * Duffel's unique identifier for the seat map
893
+ */
894
+ id: string;
895
+ /**
896
+ * 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.)
897
+ */
898
+ slice_id: string;
899
+ /**
900
+ * 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).
901
+ */
902
+ segment_id: string;
903
+ /**
904
+ * The list of cabins in this seat map.
905
+ * Cabins are ordered by deck from lowest to highest, and then within each deck from the front to back of the aircraft.
906
+ */
907
+ cabins: SeatMapCabin[];
908
+ }
909
+ export interface SeatMapCabin {
910
+ /**
911
+ * Level 0 is the main deck and level 1 is the upper deck above that, which is found on some large aircraft.
912
+ */
913
+ deck: number;
914
+ /**
915
+ * The cabin class that the passenger will travel in on this segment
916
+ */
917
+ cabin_class: string;
918
+ /**
919
+ * Where the wings of the aircraft are in relation to rows in the cabin.
920
+ * 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.
921
+ * The indices are 0 th-based and are for all rows, not just those that have seats.
922
+ * This is null when no rows of the cabin are overwing.
923
+ */
924
+ wings: {
925
+ /**
926
+ * The index of the first row which is overwing, starting from the front of the aircraft.
927
+ */
928
+ first_row_index: number;
929
+ /**
930
+ * The index of the last row which is overwing, starting from the front of the aircraft.
931
+ */
932
+ last_row_index: number;
933
+ } | null;
934
+ /**
935
+ * The number of aisles in this cabin.
936
+ * 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.
937
+ */
938
+ aisles: number;
939
+ /**
940
+ * A list of rows in this cabin.
941
+ * Row sections are broken up by aisles. Rows are ordered from front to back of the aircraft.
942
+ */
943
+ rows: SeatMapCabinRow[];
944
+ }
945
+ export interface SeatMapCabinRow {
946
+ /**
947
+ * A list of sections.
948
+ * Each row is divided into sections by one or more aisles.
949
+ */
950
+ sections: SeatMapCabinRowSection[];
951
+ }
952
+ export interface SeatMapCabinRowSection {
953
+ /**
954
+ * The elements that make up this section.
955
+ */
956
+ elements: SeatMapCabinRowSectionElement[];
957
+ }
958
+ /**
959
+ * A seat for a passenger. If the available_services list is empty (which will be represented as an empty list : []), the seat is unavailable.
960
+ * For display, all seats should be displayed with the same static width.
961
+ */
962
+ export interface SeatMapCabinRowSectionElementSeat {
963
+ /**
964
+ * The type of this element.
965
+ */
966
+ type: "seat";
967
+ /**
968
+ * The designator used to uniquely identify the seat, usually made up of a row number and a column letter
969
+ */
970
+ designator: string;
971
+ /**
972
+ * A name which describes the type of seat, which you can display in your user interface to help customers to understand its features
973
+ */
974
+ name?: string;
975
+ /**
976
+ * 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.
977
+ */
978
+ disclosures: string[];
979
+ /**
980
+ * 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.
981
+ */
982
+ available_services: SeatMapCabinRowSectionAvailableService[];
983
+ }
984
+ export interface SeatMapCabinRowSectionAvailableService {
985
+ /**
986
+ * Duffel's unique identifier for the service
987
+ */
988
+ id: string;
989
+ /**
990
+ * The passenger that this seat is for
991
+ */
992
+ passenger_id: string;
993
+ /**
994
+ * The total price of the seat, including taxes
995
+ */
996
+ total_amount: string;
997
+ /**
998
+ * The currency of the total_amount, as an ISO 4217 currency code
999
+ */
1000
+ total_currency: string;
1001
+ }
1002
+ /**
1003
+ * A bassinet is a child's cradle. This element will be aligned with the corresponding seat in the following row.
1004
+ * For display, this element should have the same width as a seat for proper alignment.
1005
+ */
1006
+ export interface SeatMapCabinRowSectionElementBassinet {
1007
+ /**
1008
+ * The type of this element.
1009
+ */
1010
+ type: "bassinet";
1011
+ }
1012
+ /**
1013
+ * An empty space used for padding in some non-standard seat arrangements.
1014
+ * For display, this element should have the same dimensions as a seat for proper alignment.
1015
+ */
1016
+ export interface SeatMapCabinRowSectionElementEmpty {
1017
+ /**
1018
+ * The type of this element.
1019
+ */
1020
+ type: "empty";
1021
+ }
1022
+ /**
1023
+ * An exit row represents the extra wide legroom used to reach aircraft exits. There is one exit_row element per row section.
1024
+ * 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.
1025
+ */
1026
+ export interface SeatMapCabinRowSectionElementExitRow {
1027
+ /**
1028
+ * The type of this element.
1029
+ */
1030
+ type: "exit_row";
1031
+ }
1032
+ /**
1033
+ * A lavatory for use by passengers.
1034
+ * 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.
1035
+ */
1036
+ export interface SeatMapCabinRowSectionElementLavatory {
1037
+ /**
1038
+ * The type of this element.
1039
+ */
1040
+ type: "lavatory";
1041
+ }
1042
+ /**
1043
+ * A galley is the compartment where food is cooked or prepared. These are conventionally marked with a teacup symbol.
1044
+ * 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.
1045
+ */
1046
+ export interface SeatMapCabinRowSectionElementGalley {
1047
+ /**
1048
+ * The type of this element.
1049
+ */
1050
+ type: "galley";
1051
+ }
1052
+ /**
1053
+ * A closet used for storage. These are conventionally marked with a clothes hanger symbol.
1054
+ * 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.
1055
+ */
1056
+ export interface SeatMapCabinRowSectionElementCloset {
1057
+ /**
1058
+ * The type of this element.
1059
+ */
1060
+ type: "closet";
1061
+ }
1062
+ /**
1063
+ * A set of stairs to another deck.
1064
+ * 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.
1065
+ */
1066
+ export interface SeatMapCabinRowSectionElementStairs {
1067
+ /**
1068
+ * The type of this element.
1069
+ */
1070
+ type: "stairs";
1071
+ }
1072
+ export type SeatMapCabinRowSectionElement = SeatMapCabinRowSectionElementSeat | SeatMapCabinRowSectionElementBassinet | SeatMapCabinRowSectionElementEmpty | SeatMapCabinRowSectionElementExitRow | SeatMapCabinRowSectionElementLavatory | SeatMapCabinRowSectionElementGalley | SeatMapCabinRowSectionElementCloset | SeatMapCabinRowSectionElementStairs;
1073
+ export type SeatMapCabinRowSectionElementType = SeatMapCabinRowSectionElement["type"];
1074
+ export type SeatMapCabinRowSectionElementAmenity = Exclude<SeatMapCabinRowSectionElementType, "empty" | "seat">;
1075
+ }
1076
+ declare module "src/types/DuffelAncillariesProps" {
1077
+ import { CreateOrderPayload, CreateOrderPayloadServices } from "src/types/CreateOrderPayload";
1078
+ import { Offer, OfferAvailableServiceBaggage, OfferAvailableServiceCancelForAnyReason } from "src/types/Offer";
1079
+ import { SeatMap, SeatMapCabinRowSectionAvailableService } from "src/types/SeatMap";
1080
+ export type DuffelAncillariesProps = DuffelAncillariesPropsWithOfferIdForFixture | DuffelAncillariesPropsWithClientKeyAndOfferId | DuffelAncillariesPropWithOfferAndClientKey | DuffelAncillariesPropsWithOffersAndSeatMaps;
1081
+ export interface DuffelAncillariesCommonProps {
1082
+ styles?: CustomStyles;
1083
+ onPayloadReady: OnPayloadReady;
1084
+ passengers: CreateOrderPayload["passengers"];
1085
+ services: Ancillaries[];
1086
+ markup?: DuffelAncillariesMarkup;
1087
+ priceFormatters?: DuffelAncillariesPriceFormatters;
1088
+ debug?: boolean;
1089
+ }
1090
+ export interface DuffelAncillariesPropsWithOfferIdForFixture extends DuffelAncillariesCommonProps {
1091
+ offer_id: `fixture_${string}`;
1092
+ }
1093
+ export interface DuffelAncillariesPropsWithClientKeyAndOfferId extends DuffelAncillariesCommonProps {
1094
+ offer_id: string;
1095
+ client_key: string;
1096
+ }
1097
+ export interface DuffelAncillariesPropWithOfferAndClientKey extends DuffelAncillariesCommonProps {
1098
+ offer: Offer;
1099
+ client_key: string;
1100
+ }
1101
+ export interface DuffelAncillariesPropsWithOffersAndSeatMaps extends DuffelAncillariesCommonProps {
1102
+ offer: Offer;
1103
+ seat_maps: SeatMap[];
1104
+ }
1105
+ export type DuffelAncillariesMarkupDefinition = {
1106
+ rate: number;
1107
+ amount: number;
1108
+ };
1109
+ export interface DuffelAncillariesMarkup {
1110
+ bags?: DuffelAncillariesMarkupDefinition;
1111
+ seats?: DuffelAncillariesMarkupDefinition;
1112
+ cancel_for_any_reason?: DuffelAncillariesMarkupDefinition;
1113
+ }
1114
+ export type DuffelAncillariesPriceFormatterForBags = (amount: number, currency: string, service: OfferAvailableServiceBaggage) => {
1115
+ amount: number;
1116
+ currency?: string;
1117
+ };
1118
+ export type DuffelAncillariesPriceFormatterForSeats = (amount: number, currency: string, service: SeatMapCabinRowSectionAvailableService) => {
1119
+ amount: number;
1120
+ currency?: string;
1121
+ };
1122
+ export type DuffelAncillariesPriceFormatterForCancelForAnyReason = (amount: number, currency: string, service: OfferAvailableServiceCancelForAnyReason) => {
1123
+ amount: number;
1124
+ currency?: string;
1125
+ };
1126
+ export interface DuffelAncillariesPriceFormatters {
1127
+ bags?: DuffelAncillariesPriceFormatterForBags;
1128
+ seats?: DuffelAncillariesPriceFormatterForSeats;
1129
+ cancel_for_any_reason?: DuffelAncillariesPriceFormatterForCancelForAnyReason;
1130
+ }
1131
+ export interface CustomStyles {
1132
+ accentColor?: string;
1133
+ buttonCornerRadius?: string;
1134
+ fontFamily?: string;
1135
+ }
1136
+ export type OnPayloadReady = (data: CreateOrderPayload, metadata: OnPayloadReadyMetadata) => void;
1137
+ export interface OnPayloadReadyMetadata {
1138
+ offer_total_amount: Offer["total_amount"];
1139
+ offer_total_currency: Offer["total_currency"];
1140
+ offer_tax_amount: Offer["tax_amount"];
1141
+ offer_tax_currency: Offer["tax_currency"];
1142
+ baggage_services: CreateOrderPayloadServices;
1143
+ seat_services: CreateOrderPayloadServices;
1144
+ cancel_for_any_reason_services: CreateOrderPayloadServices;
1145
+ }
1146
+ export type Ancillaries = "bags" | "seats" | "cancel_for_any_reason";
1147
+ }
1148
+ declare module "src/lib/captureErrorInSentry" {
1149
+ export const captureErrorInSentry: (error: Error) => string;
1150
+ }
1151
+ declare module "src/lib/logging" {
1152
+ /**
1153
+ * The functions in this file are used to enable logging.
1154
+ *
1155
+ * Usage:
1156
+ *
1157
+ * In your app's outermost container, import the LogContext and wrap your app in it:
1158
+ *
1159
+ * ```jsx
1160
+ * import { LogContext, initializeLogger } from '@lib/logging'
1161
+ *
1162
+ * const logger = initializeLogger(props.debugMode || false)
1163
+ *
1164
+ * <LogContext.Provider value={logger}>
1165
+ * ...
1166
+ * </LogContext.Provider>
1167
+ * ```
1168
+ *
1169
+ * Then in your components nested within the above container, import the useLog hook and use it:
1170
+ *
1171
+ * import { useLog } from '@lib/logging'
1172
+ *
1173
+ * const { log, logGroup } = useLog()
1174
+ * log('This is a log message')
1175
+ * logGroup('These messages will be grouped together', ['This is a log message', 'This is another log message'])
1176
+ */
1177
+ const initializeLogger: (debugMode: boolean) => void;
1178
+ /**
1179
+ * Log a message to the console. Messages will be prefixed with "[Duffel Ancillaries]".
1180
+ * @param message The message to print to the console.
1181
+ */
1182
+ const log: (message: any) => void;
1183
+ /**
1184
+ * Log a series of messages to the console inside a collapsible group.
1185
+ * @param groupName The name of the group of messages. This will be prefixed with "[Duffel Ancillaries]".
1186
+ * @param messages An array of messages to print to the console, inside the group.
1187
+ */
1188
+ function logGroup(groupName: string, messages: any[]): void;
1189
+ /**
1190
+ * Log a series of messages to the console inside a collapsible group.
1191
+ * @param groupName The name of the group of messages. This will be prefixed with "[Duffel Ancillaries]".
1192
+ * @param object An object to print to the console, inside the group.
1193
+ */
1194
+ function logGroup(groupName: string, object: {
1195
+ [key: string]: any;
1196
+ }): void;
1197
+ export { initializeLogger, log, logGroup };
1198
+ }
1199
+ declare module "src/components/shared/Icon" {
1200
+ import * as React from "react";
1201
+ export const ICON_MAP: {
1202
+ add: import("react/jsx-runtime").JSX.Element;
1203
+ apartment: import("react/jsx-runtime").JSX.Element;
1204
+ arrow_forward: import("react/jsx-runtime").JSX.Element;
1205
+ arrow_left: import("react/jsx-runtime").JSX.Element;
1206
+ arrow_right: import("react/jsx-runtime").JSX.Element;
1207
+ autorenew: import("react/jsx-runtime").JSX.Element;
1208
+ bassinet: import("react/jsx-runtime").JSX.Element;
1209
+ cabin_bag: import("react/jsx-runtime").JSX.Element;
1210
+ check: import("react/jsx-runtime").JSX.Element;
1211
+ checked_bag: import("react/jsx-runtime").JSX.Element;
1212
+ chevron: import("react/jsx-runtime").JSX.Element;
1213
+ close: import("react/jsx-runtime").JSX.Element;
1214
+ closet: import("react/jsx-runtime").JSX.Element;
1215
+ exit_row: import("react/jsx-runtime").JSX.Element;
1216
+ exit_row_right: import("react/jsx-runtime").JSX.Element;
1217
+ expand_content: import("react/jsx-runtime").JSX.Element;
1218
+ flight_class: import("react/jsx-runtime").JSX.Element;
1219
+ flight_takeoff: import("react/jsx-runtime").JSX.Element;
1220
+ galley: import("react/jsx-runtime").JSX.Element;
1221
+ lavatory: import("react/jsx-runtime").JSX.Element;
1222
+ lie_flat_seat: import("react/jsx-runtime").JSX.Element;
1223
+ minus: import("react/jsx-runtime").JSX.Element;
1224
+ no_airplane: import("react/jsx-runtime").JSX.Element;
1225
+ no_bag: import("react/jsx-runtime").JSX.Element;
1226
+ no_seat: import("react/jsx-runtime").JSX.Element;
1227
+ north_east: import("react/jsx-runtime").JSX.Element;
1228
+ seat: import("react/jsx-runtime").JSX.Element;
1229
+ seat_paid_indicator: import("react/jsx-runtime").JSX.Element;
1230
+ shield_with_moon: import("react/jsx-runtime").JSX.Element;
1231
+ stairs: import("react/jsx-runtime").JSX.Element;
1232
+ wifi: import("react/jsx-runtime").JSX.Element;
1233
+ };
1234
+ export type IconName = keyof typeof ICON_MAP;
1235
+ interface IconProps {
1236
+ name: IconName;
1237
+ className?: string;
1238
+ size?: number;
1239
+ onClick?: (event: React.MouseEvent<SVGSVGElement, MouseEvent>) => void;
1240
+ ml?: string;
1241
+ viewBox?: string;
1242
+ style?: React.CSSProperties;
1243
+ }
1244
+ export const Icon: React.FunctionComponent<IconProps>;
1245
+ }
1246
+ declare module "src/components/shared/Button" {
1247
+ import { IconName } from "src/components/shared/Icon";
1248
+ import * as React from "react";
1249
+ const BUTTON_VARIANTS: {
1250
+ primary: string;
1251
+ outlined: string;
1252
+ destructive: string;
1253
+ };
1254
+ type ButtonVariants = keyof typeof BUTTON_VARIANTS;
1255
+ const BUTTON_SIZES: {
1256
+ 32: string;
1257
+ 40: string;
1258
+ 48: string;
1259
+ };
1260
+ type ButtonSizes = keyof typeof BUTTON_SIZES;
1261
+ type NativeButtonProps = React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;
1262
+ export interface ButtonProps extends Pick<NativeButtonProps, "id" | "onClick" | "disabled" | "children" | "className" | "type"> {
1263
+ "data-testid"?: string;
1264
+ iconBefore?: IconName;
1265
+ variant?: ButtonVariants;
1266
+ size?: ButtonSizes;
1267
+ }
1268
+ export const Button: React.FC<ButtonProps>;
1269
+ }
1270
+ declare module "src/components/shared/NonIdealState" {
1271
+ import React from "react";
1272
+ export const NonIdealState: React.FC<React.PropsWithChildren<{
1273
+ style?: React.CSSProperties;
1274
+ }>>;
1275
+ }
1276
+ declare module "src/components/shared/ErrorBoundary" {
1277
+ import React from "react";
1278
+ export class ErrorBoundary extends React.Component<{
1279
+ children: React.ReactNode | React.ReactNode[];
1280
+ }> {
1281
+ state: {
1282
+ hasError: boolean;
1283
+ };
1284
+ static getDerivedStateFromError(): {
1285
+ hasError: boolean;
1286
+ };
1287
+ componentDidCatch(error: Error): void;
1288
+ render(): string | number | boolean | Iterable<React.ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
1289
+ }
1290
+ }
1291
+ declare module "src/components/shared/FetchOfferErrorState" {
1292
+ import * as React from "react";
1293
+ export const FetchOfferErrorState: React.FC<{
1294
+ height: string;
1295
+ message: string;
1296
+ }>;
1297
+ }
1298
+ declare module "src/lib/getServicePriceMapById" {
1299
+ import { OfferAvailableService } from "src/types/Offer";
1300
+ export type ServicePriceMapById = Record<OfferAvailableService["id"], Pick<OfferAvailableService, "total_amount" | "total_currency">>;
1301
+ export const getServicePriceMapById: (availableServices: OfferAvailableService[]) => ServicePriceMapById;
1302
+ }
1303
+ declare module "src/lib/getTotalAmountForServices" {
1304
+ import { CreateOrderPayloadServices } from "src/types/CreateOrderPayload";
1305
+ import { Offer } from "src/types/Offer";
1306
+ import { SeatMap } from "src/types/SeatMap";
1307
+ import { ServicePriceMapById } from "src/lib/getServicePriceMapById";
1308
+ export const getTotalAmountForServices: (offer: Offer, selectedServices: CreateOrderPayloadServices, seatMaps?: SeatMap[]) => number;
1309
+ export const getTotalAmountForServicesWithPriceMap: (servicePriceMap: ServicePriceMapById, selectedServices: CreateOrderPayloadServices, seatMaps?: SeatMap[]) => number;
1310
+ }
1311
+ declare module "src/lib/compileCreateOrderPayload" {
1312
+ import { CreateOrderPayload, CreateOrderPayloadServices } from "src/types/CreateOrderPayload";
1313
+ import { DuffelAncillariesProps } from "src/types/DuffelAncillariesProps";
1314
+ import { Offer } from "src/types/Offer";
1315
+ import { SeatMap } from "src/types/SeatMap";
1316
+ interface CompileCreateOrderPayloadInput {
1317
+ offer: Offer;
1318
+ passengers: DuffelAncillariesProps["passengers"];
1319
+ baggageSelectedServices: CreateOrderPayloadServices;
1320
+ seatSelectedServices: CreateOrderPayloadServices;
1321
+ cfarSelectedServices: CreateOrderPayloadServices;
1322
+ seatMaps?: SeatMap[];
1323
+ }
1324
+ export const compileCreateOrderPayload: ({ baggageSelectedServices, seatSelectedServices, cfarSelectedServices, offer, seatMaps, passengers, }: CompileCreateOrderPayloadInput) => Partial<CreateOrderPayload>;
1325
+ }
1326
+ declare module "src/lib/createPriceFormatters" {
1327
+ import { DuffelAncillariesMarkup, DuffelAncillariesPriceFormatters } from "src/types/DuffelAncillariesProps";
1328
+ /**
1329
+ * Creates price formatters from the markup and priceFormatters passed in.
1330
+ * Throws an error if both are supplied.
1331
+ * If neither are supplied, the priceFormatters will be undefined.
1332
+ *
1333
+ * @param markup The markup to be applied to the prices of the available services of an offer.
1334
+ * @param priceFormatters Price formatters to apply to the prices of the available services of an offer.
1335
+ * @returns
1336
+ */
1337
+ const createPriceFormatters: (markup?: DuffelAncillariesMarkup, priceFormatters?: DuffelAncillariesPriceFormatters) => DuffelAncillariesPriceFormatters;
1338
+ export { createPriceFormatters };
1339
+ }
1340
+ declare module "src/lib/isBaggageService" {
1341
+ import { OfferAvailableBaggageService, OfferAvailableService } from "src/types/Offer";
1342
+ export const isBaggageService: (service: OfferAvailableService) => service is OfferAvailableBaggageService;
1343
+ }
1344
+ declare module "src/lib/isCancelForAnyReasonService" {
1345
+ import { OfferAvailableService, OfferAvailableServiceCancelForAnyReason } from "src/types/Offer";
1346
+ export const isCancelForAnyReasonService: (service: OfferAvailableService) => service is OfferAvailableServiceCancelForAnyReason;
1347
+ }
1348
+ declare module "src/lib/formatAvailableServices" {
1349
+ import { DuffelAncillariesPriceFormatters } from "src/types/DuffelAncillariesProps";
1350
+ import { Offer } from "src/types/Offer";
1351
+ /**
1352
+ * Formats the prices of the available services of an offer according to the
1353
+ * priceFormatters passed in.
1354
+ *
1355
+ * @param offer An offer from the Duffel API
1356
+ * @param priceFormatters Optional price formatting functions. If not passed in, the offer will be returned unchanged.
1357
+ * @returns An offer with the prices of its available services formatted according to the priceFormatters passed in.
1358
+ */
1359
+ const formatAvailableServices: (offer: Offer, priceFormatters?: DuffelAncillariesPriceFormatters) => Offer;
1360
+ export { formatAvailableServices };
1361
+ }
1362
+ declare module "src/lib/isSeatElement" {
1363
+ import { SeatMapCabinRowSectionElement, SeatMapCabinRowSectionElementSeat } from "src/types/SeatMap";
1364
+ export function isSeatElement(element: SeatMapCabinRowSectionElement): element is SeatMapCabinRowSectionElementSeat;
1365
+ }
1366
+ declare module "src/lib/formatSeatMaps" {
1367
+ import { DuffelAncillariesPriceFormatterForSeats } from "src/types/DuffelAncillariesProps";
1368
+ import { SeatMap } from "src/types/SeatMap";
1369
+ const formatSeatMaps: (seatMaps: SeatMap[], priceFormatter?: DuffelAncillariesPriceFormatterForSeats) => SeatMap[];
1370
+ export { formatSeatMaps };
1371
+ }
1372
+ declare module "src/lib/hasHighLuminance" {
1373
+ export const hasHighLuminance: (accentColor: string) => boolean;
1374
+ }
1375
+ declare module "src/lib/isPayloadComplete" {
1376
+ import { CreateOrderPayload } from "src/types/CreateOrderPayload";
1377
+ export const isPayloadComplete: (payload: Partial<CreateOrderPayload>) => payload is CreateOrderPayload;
1378
+ }
1379
+ declare module "src/lib/offerIsExpired" {
1380
+ import { Offer } from "src/types/Offer";
1381
+ export const offerIsExpired: (offer: Offer) => boolean | "";
1382
+ }
1383
+ declare module "src/lib/fetchFromDuffelAPI" {
1384
+ export interface ErrorResponse extends Response {
1385
+ data: {
1386
+ meta: any;
1387
+ errors: any[];
1388
+ };
1389
+ }
1390
+ export const isErrorResponse: (response: any) => response is ErrorResponse;
1391
+ export function fetchFromDuffelAPI(withClientKey: string, path: string, method?: string, body?: string): Promise<any>;
1392
+ }
1393
+ declare module "src/lib/fetchFromFixtures" {
1394
+ import { Offer } from "src/types/Offer";
1395
+ import { SeatMap } from "src/types/SeatMap";
1396
+ export const importFromOfferFixtures: (offerId: string) => Promise<Offer>;
1397
+ export const importFromSeatMapsFixtures: (offerId: string) => Promise<SeatMap[]>;
1398
+ }
1399
+ declare module "src/lib/isFixtureOfferId" {
1400
+ import { Offer } from "src/types/Offer";
1401
+ export const isFixtureOfferId: (offerId: Offer["id"]) => boolean;
1402
+ }
1403
+ declare module "src/lib/retrieveOfferFromDuffelAPI" {
1404
+ export function retrieveOfferFromDuffelAPI(offer_id: string, client_key: string): Promise<any>;
1405
+ }
1406
+ declare module "src/lib/retrieveOffer" {
1407
+ import { Offer } from "src/types/Offer";
1408
+ export function retrieveOffer(offer_id: string, client_key: string | null, onError: (error: string) => void, setIsLoading: (isLoading: boolean) => void, onOfferReady: (offer: Offer) => void): Promise<void>;
1409
+ }
1410
+ declare module "src/lib/retrieveSeatMapsFromDuffelAPI" {
1411
+ export function retrieveSeatMapsFromDuffelAPI(offer_id: string, client_key: string): Promise<any>;
1412
+ }
1413
+ declare module "src/lib/retrieveSeatMaps" {
1414
+ import { SeatMap } from "src/types/SeatMap";
1415
+ export function retrieveSeatMaps(offer_id: string, client_key: string | null, onError: () => void, setIsLoading: (isLoading: boolean) => void, onSeatMapReady: (seatMaps: SeatMap[]) => void): Promise<void>;
1416
+ }
1417
+ declare module "src/lib/validateProps" {
1418
+ import { DuffelAncillariesProps, DuffelAncillariesPropsWithClientKeyAndOfferId, DuffelAncillariesPropsWithOfferIdForFixture, DuffelAncillariesPropsWithOffersAndSeatMaps, DuffelAncillariesPropWithOfferAndClientKey } from "src/types/DuffelAncillariesProps";
1419
+ export const areDuffelAncillariesPropsValid: (props: DuffelAncillariesProps) => boolean;
1420
+ export const hasCommonRequiredProps: (props: DuffelAncillariesProps) => boolean;
1421
+ export const isDuffelAncillariesPropsWithOfferIdForFixture: (props: DuffelAncillariesProps) => props is DuffelAncillariesPropsWithOfferIdForFixture;
1422
+ export const isDuffelAncillariesPropsWithClientKeyAndOfferId: (props: DuffelAncillariesProps) => props is DuffelAncillariesPropsWithClientKeyAndOfferId;
1423
+ export const isDuffelAncillariesPropsWithOfferAndSeatMaps: (props: DuffelAncillariesProps) => props is DuffelAncillariesPropsWithOffersAndSeatMaps;
1424
+ export const isDuffelAncillariesPropsWithOfferAndClientKey: (props: DuffelAncillariesProps) => props is DuffelAncillariesPropWithOfferAndClientKey;
1425
+ }
1426
+ declare module "src/components/shared/AnimatedLoaderEllipsis" {
1427
+ import * as React from "react";
1428
+ export const AnimatedLoaderEllipsis: React.FC;
1429
+ }
1430
+ declare module "src/components/shared/Stamp" {
1431
+ import React from "react";
1432
+ export interface StampProps {
1433
+ backgroundColor: React.CSSProperties["backgroundColor"];
1434
+ color: React.CSSProperties["color"];
1435
+ children: React.ReactNode;
1436
+ }
1437
+ export const Stamp: React.FC<StampProps>;
1438
+ }
1439
+ declare module "src/lib/getCurrencyForServices" {
1440
+ import { Offer } from "src/types/Offer";
1441
+ /**
1442
+ *
1443
+ * Returns the currency of the first service of the given type in the offer.
1444
+ *
1445
+ * @param offer An offer
1446
+ * @returns A string representing the currency of the services in the offer.
1447
+ * @throws If there are no services, or none of the services are of the given type.
1448
+ */
1449
+ const getCurrencyForServices: (offer: Offer, serviceType: string) => string;
1450
+ export { getCurrencyForServices };
1451
+ }
1452
+ declare module "src/lib/getTotalQuantity" {
1453
+ import { CreateOrderPayloadServices } from "src/types/CreateOrderPayload";
1454
+ export const getTotalQuantity: (fromSelectedServices: CreateOrderPayloadServices) => number;
1455
+ }
1456
+ declare module "src/lib/hasService" {
1457
+ import { Offer, OfferAvailableServiceType } from "src/types/Offer";
1458
+ export const hasService: (offer: Offer | undefined, type: OfferAvailableServiceType) => boolean | undefined;
1459
+ }
1460
+ declare module "src/lib/moneyStringFormatter" {
1461
+ /**
1462
+ * Return a function to format a number into a money amount for a given currency
1463
+ *
1464
+ * @param currency The ISO-4217 currency code to be used by the formatter
1465
+ */
1466
+ export const moneyStringFormatter: (currency: string, locale?: string, options?: {
1467
+ [option: string]: string;
1468
+ }) => (value: number) => string;
1469
+ }
1470
+ declare module "src/lib/withPlural" {
1471
+ export const withPlural: (totalQuantity: number, singular: string, plural: string) => string;
1472
+ }
1473
+ declare module "src/components/DuffelAncillaries/Card" {
1474
+ import { IconName } from "src/components/shared/Icon";
1475
+ import * as React from "react";
1476
+ export interface CardProps {
1477
+ buttonTitle: string;
1478
+ title: string;
1479
+ icon: IconName;
1480
+ onClick?: (() => void) | null;
1481
+ children: React.ReactNode;
1482
+ copy: string;
1483
+ isLoading?: boolean;
1484
+ disabled?: boolean;
1485
+ isSelected?: boolean;
1486
+ }
1487
+ export const Card: React.FC<CardProps>;
1488
+ }
1489
+ declare module "src/lib/setBodyScrollability" {
1490
+ export const setBodyScrollability: (shouldScroll: boolean) => void;
1491
+ }
1492
+ declare module "src/components/shared/IconButton" {
1493
+ import * as React from "react";
1494
+ import { IconName } from "src/components/shared/Icon";
1495
+ const ICON_BUTTON_VARIANTS: {
1496
+ primary: string;
1497
+ outlined: string;
1498
+ };
1499
+ type IconButtonVariants = keyof typeof ICON_BUTTON_VARIANTS;
1500
+ type NativeButtonProps = React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;
1501
+ export interface IconButtonProps extends Pick<NativeButtonProps, "id" | "onClick" | "disabled" | "className"> {
1502
+ "data-testid"?: string;
1503
+ icon: IconName;
1504
+ title: string;
1505
+ variant?: IconButtonVariants;
1506
+ }
1507
+ export const IconButton: React.FC<IconButtonProps>;
1508
+ }
1509
+ declare module "src/components/shared/Modal" {
1510
+ import * as React from "react";
1511
+ interface ModalProps {
1512
+ onClose: () => void;
1513
+ isOpen: boolean;
1514
+ children: React.ReactNode;
1515
+ }
1516
+ export const Modal: React.FC<ModalProps>;
1517
+ export const ModalBody: React.FC<{
1518
+ children: React.ReactNode;
1519
+ }>;
1520
+ }
1521
+ declare module "src/lib/getPassengerMapById" {
1522
+ import { CreateOrderPayloadPassenger, CreateOrderPayloadPassengers } from "src/types/CreateOrderPayload";
1523
+ export type PassengerMapById = Record<CreateOrderPayloadPassenger["id"], CreateOrderPayloadPassenger>;
1524
+ export const getPassengerMapById: (passengers: CreateOrderPayloadPassengers) => PassengerMapById;
1525
+ }
1526
+ declare module "src/lib/getSegmentList" {
1527
+ import { Offer, OfferSliceSegment } from "src/types/Offer";
1528
+ export const getSegmentList: (offer: Offer) => OfferSliceSegment[];
1529
+ }
1530
+ declare module "src/lib/getPassengerName" {
1531
+ import { CreateOrderPayloadPassenger } from "src/types/CreateOrderPayload";
1532
+ import { OfferPassenger } from "src/types/Offer";
1533
+ export const getPassengerName: (createOrderPayloadPassenger: CreateOrderPayloadPassenger, offerPassenger: OfferPassenger | undefined, fallbackIndex: number) => string;
1534
+ }
1535
+ declare module "src/lib/getBaggageServiceDescription" {
1536
+ import { OfferAvailableServiceBaggageMetadata } from "src/types/Offer";
1537
+ export const getBaggageServiceDescription: (metadata: OfferAvailableServiceBaggageMetadata) => string | null;
1538
+ }
1539
+ declare module "src/lib/hasServiceOfSameMetadataTypeAlreadyBeenSelected" {
1540
+ import { CreateOrderPayloadServices } from "src/types/CreateOrderPayload";
1541
+ import { OfferAvailableServiceBaggage } from "src/types/Offer";
1542
+ export const hasServiceOfSameMetadataTypeAlreadyBeenSelected: (selectedServices: CreateOrderPayloadServices, segmentId: string, passengerId: string, availableService: OfferAvailableServiceBaggage) => boolean;
1543
+ }
1544
+ declare module "src/components/DuffelAncillaries/Counter" {
1545
+ import * as React from "react";
1546
+ interface CounterProps {
1547
+ id: string;
1548
+ min: number;
1549
+ max: number;
1550
+ value: number;
1551
+ onChange: (value: number) => void;
1552
+ }
1553
+ export const Counter: React.FC<CounterProps>;
1554
+ }
1555
+ declare module "src/components/DuffelAncillaries/bags/BaggageSelectionController" {
1556
+ import React from "react";
1557
+ import { CreateOrderPayloadServices } from "src/types/CreateOrderPayload";
1558
+ import { OfferAvailableServiceBaggage } from "src/types/Offer";
1559
+ interface BaggageSelectionControllerProps {
1560
+ segmentId: string;
1561
+ passengerId: string;
1562
+ availableService: OfferAvailableServiceBaggage;
1563
+ selectedServices: CreateOrderPayloadServices;
1564
+ quantity: number;
1565
+ onQuantityChanged: (quantity: number) => void;
1566
+ }
1567
+ export const BaggageSelectionController: React.FC<BaggageSelectionControllerProps>;
1568
+ }
1569
+ declare module "src/components/DuffelAncillaries/bags/IncludedBaggageBanner" {
1570
+ import React from "react";
1571
+ import { OfferSliceSegmentPassengerBaggage } from "src/types/Offer";
1572
+ interface IncludedBaggageBannerProps {
1573
+ includedBaggage: OfferSliceSegmentPassengerBaggage[];
1574
+ }
1575
+ export const IncludedBaggageBanner: React.FC<IncludedBaggageBannerProps>;
1576
+ }
1577
+ declare module "src/components/DuffelAncillaries/bags/BaggageSelectionModalBodyPassenger" {
1578
+ import React from "react";
1579
+ import { CreateOrderPayloadServices } from "src/types/CreateOrderPayload";
1580
+ import { OfferAvailableServiceBaggage, OfferSliceSegmentPassengerBaggage } from "src/types/Offer";
1581
+ export interface BaggageSelectionModalBodyPassengerProps {
1582
+ segmentId: string;
1583
+ passengerId: string;
1584
+ passengerName: string;
1585
+ includedBaggage: OfferSliceSegmentPassengerBaggage[];
1586
+ passengerServicesForSegment: OfferAvailableServiceBaggage[];
1587
+ selectedServices: CreateOrderPayloadServices;
1588
+ setSelectedServices: (selectedServices: CreateOrderPayloadServices) => void;
1589
+ }
1590
+ export const BaggageSelectionModalBodyPassenger: React.FC<BaggageSelectionModalBodyPassengerProps>;
1591
+ }
1592
+ declare module "src/components/DuffelAncillaries/bags/BaggageSelectionModalBody" {
1593
+ import React from "react";
1594
+ import { CreateOrderPayloadPassenger, CreateOrderPayloadServices } from "src/types/CreateOrderPayload";
1595
+ import { Offer, OfferSliceSegment } from "src/types/Offer";
1596
+ export interface BaggageSelectionModalBodyProps {
1597
+ offer: Offer;
1598
+ segment: OfferSliceSegment;
1599
+ passengersById: Record<CreateOrderPayloadPassenger["id"], CreateOrderPayloadPassenger>;
1600
+ selectedServices: CreateOrderPayloadServices;
1601
+ setSelectedServices: (selectedServices: CreateOrderPayloadServices) => void;
1602
+ }
1603
+ export const BaggageSelectionModalBody: React.FC<BaggageSelectionModalBodyProps>;
1604
+ }
1605
+ declare module "src/components/DuffelAncillaries/bags/BaggageSelectionModalFooter" {
1606
+ import { ServicePriceMapById } from "src/lib/getServicePriceMapById";
1607
+ import React from "react";
1608
+ import { CreateOrderPayloadServices } from "src/types/CreateOrderPayload";
1609
+ export interface BaggageSelectionModalFooterProps {
1610
+ currency: string;
1611
+ selectedServices: CreateOrderPayloadServices;
1612
+ servicePrices: ServicePriceMapById;
1613
+ isFirstSegment: boolean;
1614
+ isLastSegment: boolean;
1615
+ onNextSegmentButtonClicked: () => void;
1616
+ onPreviousSegmentButtonClicked: () => void;
1617
+ onClose: () => void;
1618
+ }
1619
+ export const BaggageSelectionModalFooter: React.FC<BaggageSelectionModalFooterProps>;
1620
+ }
1621
+ declare module "src/lib/formatDate" {
1622
+ export const formatDateString: (dateString: string) => string | undefined;
1623
+ export const formatDate: (date: Date) => string;
1624
+ }
1625
+ declare module "src/components/DuffelAncillaries/bags/BaggageSelectionModalHeader" {
1626
+ import React from "react";
1627
+ import { OfferSliceSegment } from "src/types/Offer";
1628
+ export interface BaggageSelectionModalHeaderProps {
1629
+ segmentCount: number;
1630
+ currentSegmentIndex: number;
1631
+ currentSegment: OfferSliceSegment;
1632
+ setCurrentSegmentIndex: (index: number) => void;
1633
+ }
1634
+ export const BaggageSelectionModalHeader: React.FC<BaggageSelectionModalHeaderProps>;
1635
+ }
1636
+ declare module "src/components/DuffelAncillaries/bags/BaggageSelectionModal" {
1637
+ import React from "react";
1638
+ import { CreateOrderPayload, CreateOrderPayloadServices } from "src/types/CreateOrderPayload";
1639
+ import { Offer } from "src/types/Offer";
1640
+ export interface BaggageSelectionModalProps {
1641
+ isOpen: boolean;
1642
+ offer?: Offer;
1643
+ passengers: CreateOrderPayload["passengers"];
1644
+ selectedServices: CreateOrderPayloadServices;
1645
+ onClose: (selectedServices: CreateOrderPayloadServices) => void;
1646
+ }
1647
+ export const BaggageSelectionModal: React.FC<BaggageSelectionModalProps>;
1648
+ }
1649
+ declare module "src/components/DuffelAncillaries/bags/BaggageSelectionCard" {
1650
+ import React from "react";
1651
+ import { CreateOrderPayload, CreateOrderPayloadServices } from "src/types/CreateOrderPayload";
1652
+ import { Offer } from "src/types/Offer";
1653
+ export interface BaggageSelectionCardProps {
1654
+ isLoading: boolean;
1655
+ offer?: Offer;
1656
+ passengers: CreateOrderPayload["passengers"];
1657
+ selectedServices: CreateOrderPayloadServices;
1658
+ setSelectedServices: (selectedServices: CreateOrderPayloadServices) => void;
1659
+ }
1660
+ export const BaggageSelectionCard: React.FC<BaggageSelectionCardProps>;
1661
+ }
1662
+ declare module "src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBodyListItem" {
1663
+ import React, { ReactNode } from "react";
1664
+ export const CfarSelectionModalBodyListItem: React.FC<{
1665
+ children: ReactNode;
1666
+ }>;
1667
+ }
1668
+ declare module "src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBody" {
1669
+ import React from "react";
1670
+ import { Offer, OfferAvailableServiceCancelForAnyReason } from "src/types/Offer";
1671
+ export interface CfarSelectionModalBodyProps {
1672
+ offerCurrency: Offer["base_currency"];
1673
+ service: OfferAvailableServiceCancelForAnyReason;
1674
+ }
1675
+ export const CfarSelectionModalBody: React.FC<CfarSelectionModalBodyProps>;
1676
+ }
1677
+ declare module "src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalFooter" {
1678
+ import React from "react";
1679
+ import { CreateOrderPayloadServices } from "src/types/CreateOrderPayload";
1680
+ import { OfferAvailableServiceCancelForAnyReason } from "src/types/Offer";
1681
+ export interface CfarSelectionModalFooterProps {
1682
+ service: OfferAvailableServiceCancelForAnyReason;
1683
+ selectedServices: CreateOrderPayloadServices;
1684
+ onAddCfarService: () => void;
1685
+ onRemoveCfarService: () => void;
1686
+ onClose: () => void;
1687
+ }
1688
+ export const CfarSelectionModalFooter: React.FC<CfarSelectionModalFooterProps>;
1689
+ }
1690
+ declare module "src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalHeader" {
1691
+ import React from "react";
1692
+ export const CfarSelectionModalHeader: React.FC;
1693
+ }
1694
+ declare module "src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModal" {
1695
+ import React from "react";
1696
+ import { CreateOrderPayloadServices } from "src/types/CreateOrderPayload";
1697
+ import { Offer, OfferAvailableServiceCancelForAnyReason } from "src/types/Offer";
1698
+ export interface CfarSelectionModalProps {
1699
+ isOpen: boolean;
1700
+ offerCurrency?: Offer["base_currency"];
1701
+ service?: OfferAvailableServiceCancelForAnyReason;
1702
+ selectedServices: CreateOrderPayloadServices;
1703
+ onClose: (selectedServices: CreateOrderPayloadServices) => void;
1704
+ }
1705
+ export const CfarSelectionModal: React.FC<CfarSelectionModalProps>;
1706
+ }
1707
+ declare module "src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionCard" {
1708
+ import React from "react";
1709
+ import { CreateOrderPayloadServices } from "src/types/CreateOrderPayload";
1710
+ import { Offer } from "src/types/Offer";
1711
+ export interface CfarSelectionCardProps {
1712
+ isLoading: boolean;
1713
+ offer?: Offer;
1714
+ selectedServices: CreateOrderPayloadServices;
1715
+ setSelectedServices: (selectedServices: CreateOrderPayloadServices) => void;
1716
+ }
1717
+ export const CfarSelectionCard: React.FC<CfarSelectionCardProps>;
1718
+ }
1719
+ declare module "src/lib/getFirstSeatElementMatchingCriteria" {
1720
+ import { SeatMap, SeatMapCabinRowSectionElement } from "src/types/SeatMap";
1721
+ const getFirstSeatElementMatchingCriteria: (seatMaps: SeatMap[], matcher: (element: SeatMapCabinRowSectionElement) => boolean) => SeatMapCabinRowSectionElement | undefined;
1722
+ export { getFirstSeatElementMatchingCriteria };
1723
+ }
1724
+ declare module "src/lib/getCurrencyForSeatMaps" {
1725
+ import { SeatMap } from "src/types/SeatMap";
1726
+ /**
1727
+ *
1728
+ * Returns the currency of the first service of the given seat maps.
1729
+ *
1730
+ * @param seatMaps[] Array of seat maps
1731
+ * @returns A string representing the currency of the seat maps in the offer.
1732
+ */
1733
+ const getCurrencyForSeatMaps: (seatMaps: SeatMap[]) => string | undefined;
1734
+ export { getCurrencyForSeatMaps };
1735
+ }
1736
+ declare module "src/lib/getPassengerBySegmentList" {
1737
+ import { OfferSliceSegment } from "src/types/Offer";
1738
+ export const getPassengerBySegmentList: (segments: OfferSliceSegment[]) => {
1739
+ passenger: import("src/types/Offer").OfferSliceSegmentPassenger;
1740
+ passengerIndex: number;
1741
+ segment: OfferSliceSegment;
1742
+ }[];
1743
+ }
1744
+ declare module "src/lib/getCabinsForSegmentAndDeck" {
1745
+ import { SeatMap } from "src/types/SeatMap";
1746
+ export const getCabinsForSegmentAndDeck: (forDeck: number, seatMap: SeatMap) => import("src/types/SeatMap").SeatMapCabin[];
1747
+ }
1748
+ declare module "src/lib/getSymbols" {
1749
+ import { SeatMapCabin, SeatMapCabinRowSectionElementAmenity } from "src/types/SeatMap";
1750
+ export const getSymbols: (cabins: SeatMapCabin[]) => Set<SeatMapCabinRowSectionElementAmenity>;
1751
+ }
1752
+ declare module "src/lib/hasWings" {
1753
+ import { SeatMapCabin } from "src/types/SeatMap";
1754
+ export const hasWings: (cabin: SeatMapCabin, rowIndex: number) => boolean;
1755
+ }
1756
+ declare module "src/components/shared/Tabs" {
1757
+ import React from "react";
1758
+ export interface TabsProps {
1759
+ /**
1760
+ * The currently selected tab option
1761
+ */
1762
+ value: string;
1763
+ /**
1764
+ * Callback for when a new tab option is selected
1765
+ */
1766
+ onChange: (value: string) => void;
1767
+ /**
1768
+ * The options you want to render on the tabs
1769
+ */
1770
+ options: string[];
1771
+ }
1772
+ export const Tabs: React.FC<TabsProps>;
1773
+ }
1774
+ declare module "src/components/DuffelAncillaries/seats/DeckSelect" {
1775
+ import * as React from "react";
1776
+ export interface DeckSelectProps {
1777
+ /**
1778
+ * The currently selected deck number
1779
+ */
1780
+ value: number;
1781
+ /**
1782
+ * What to do when the user selects a deck
1783
+ */
1784
+ setValue: (value: number) => void;
1785
+ }
1786
+ /**
1787
+ * The deck selection component for the seat map.
1788
+ */
1789
+ export const DeckSelect: React.FC<DeckSelectProps>;
1790
+ }
1791
+ declare module "src/components/DuffelAncillaries/seats/Legend" {
1792
+ import * as React from "react";
1793
+ import { SeatMapCabinRowSectionElementAmenity } from "src/types/SeatMap";
1794
+ export interface LegendProps {
1795
+ /**
1796
+ * The set of additional symbols to display
1797
+ */
1798
+ symbols: Set<SeatMapCabinRowSectionElementAmenity>;
1799
+ }
1800
+ /**
1801
+ * The legend for the seat map.
1802
+ */
1803
+ export const Legend: React.FC<LegendProps>;
1804
+ }
1805
+ declare module "src/lib/getRowNumber" {
1806
+ import { SeatMapCabinRow } from "src/types/SeatMap";
1807
+ export const getRowNumber: (row: SeatMapCabinRow) => string | null;
1808
+ }
1809
+ declare module "src/components/DuffelAncillaries/seats/Amenity" {
1810
+ import * as React from "react";
1811
+ import { SeatMapCabinRowSectionElementAmenity } from "src/types/SeatMap";
1812
+ export interface AmenityProps {
1813
+ type: SeatMapCabinRowSectionElementAmenity;
1814
+ }
1815
+ export const Amenity: React.FC<AmenityProps>;
1816
+ }
1817
+ declare module "src/components/DuffelAncillaries/seats/EmptyElement" {
1818
+ import * as React from "react";
1819
+ export const EmptyElement: React.FC;
1820
+ }
1821
+ declare module "src/components/DuffelAncillaries/seats/ExitElement" {
1822
+ import * as React from "react";
1823
+ interface ExitElementProps {
1824
+ isRight: boolean;
1825
+ }
1826
+ export const ExitElement: React.FC<ExitElementProps>;
1827
+ }
1828
+ declare module "src/lib/getPassengerInitials" {
1829
+ export const getPassengerInitials: (passengerName?: string) => string;
1830
+ }
1831
+ declare module "src/components/DuffelAncillaries/seats/SeatInfo" {
1832
+ import * as React from "react";
1833
+ import { SeatMapCabinRowSectionAvailableService, SeatMapCabinRowSectionElementSeat } from "src/types/SeatMap";
1834
+ export interface SeatInfoProps {
1835
+ seat: SeatMapCabinRowSectionElementSeat | null;
1836
+ service: SeatMapCabinRowSectionAvailableService | undefined;
1837
+ }
1838
+ export const SeatInfo: React.FC<SeatInfoProps>;
1839
+ }
1840
+ declare module "src/components/DuffelAncillaries/seats/SeatUnavailable" {
1841
+ import * as React from "react";
1842
+ import { SeatMapCabinRowSectionElementSeat } from "src/types/SeatMap";
1843
+ export const SeatUnavailable: React.FC<{
1844
+ seat: SeatMapCabinRowSectionElementSeat;
1845
+ }>;
1846
+ }
1847
+ declare module "src/components/DuffelAncillaries/seats/SeatElement" {
1848
+ import * as React from "react";
1849
+ import { CreateOrderPayloadSeatService } from "src/types/CreateOrderPayload";
1850
+ import { SeatMapCabinRowSectionElementSeat } from "src/types/SeatMap";
1851
+ interface SeatElementProps {
1852
+ element: SeatMapCabinRowSectionElementSeat;
1853
+ currentSegmentId: string;
1854
+ currentPassengerId: string;
1855
+ currentPassengerName: string;
1856
+ onSeatToggled: (seatService: CreateOrderPayloadSeatService) => void;
1857
+ selectedServicesMap: Record<string, CreateOrderPayloadSeatService>;
1858
+ }
1859
+ export const SeatElement: React.FC<SeatElementProps>;
1860
+ }
1861
+ declare module "src/components/DuffelAncillaries/seats/Element" {
1862
+ import * as React from "react";
1863
+ import { CreateOrderPayloadSeatService } from "src/types/CreateOrderPayload";
1864
+ import { SeatMapCabinRowSectionElement } from "src/types/SeatMap";
1865
+ interface ElementProps {
1866
+ sectionIndex: number;
1867
+ elementIndex: number;
1868
+ element: SeatMapCabinRowSectionElement;
1869
+ selectedServicesMap: Record<string, CreateOrderPayloadSeatService>;
1870
+ onSeatToggled: (seatService: CreateOrderPayloadSeatService) => void;
1871
+ currentPassengerId: string;
1872
+ currentSegmentId: string;
1873
+ currentPassengerName: string;
1874
+ }
1875
+ export const Element: React.FC<ElementProps>;
1876
+ }
1877
+ declare module "src/components/DuffelAncillaries/seats/RowSection" {
1878
+ import * as React from "react";
1879
+ import { CreateOrderPayloadSeatService } from "src/types/CreateOrderPayload";
1880
+ import { SeatMapCabinRow, SeatMapCabinRowSection } from "src/types/SeatMap";
1881
+ interface RowSectionProps {
1882
+ row: SeatMapCabinRow;
1883
+ rowNumber: string | null;
1884
+ hasWings: boolean;
1885
+ section: SeatMapCabinRowSection;
1886
+ sectionIndex: number;
1887
+ selectedServicesMap: Record<string, CreateOrderPayloadSeatService>;
1888
+ onSeatToggled: (seatService: CreateOrderPayloadSeatService) => void;
1889
+ currentPassengerId: string;
1890
+ currentPassengerName: string;
1891
+ currentSegmentId: string;
1892
+ }
1893
+ export const RowSection: React.FC<RowSectionProps>;
1894
+ }
1895
+ declare module "src/components/DuffelAncillaries/seats/Row" {
1896
+ import * as React from "react";
1897
+ import { CreateOrderPayloadSeatService } from "src/types/CreateOrderPayload";
1898
+ import { SeatMapCabinRow } from "src/types/SeatMap";
1899
+ export interface RowProps {
1900
+ row: SeatMapCabinRow;
1901
+ hasWings: boolean;
1902
+ selectedServicesMap: Record<string, CreateOrderPayloadSeatService>;
1903
+ onSeatToggled: (seatService: CreateOrderPayloadSeatService) => void;
1904
+ currentPassengerId: string;
1905
+ currentPassengerName: string;
1906
+ currentSegmentId: string;
1907
+ }
1908
+ export const Row: React.FC<RowProps>;
1909
+ }
1910
+ declare module "src/components/DuffelAncillaries/seats/SeatMapUnavailable" {
1911
+ import * as React from "react";
1912
+ export const SeatMapUnavailable: React.FC;
1913
+ }
1914
+ declare module "src/components/DuffelAncillaries/seats/SeatMap" {
1915
+ import * as React from "react";
1916
+ import { CreateOrderPayloadSeatService } from "src/types/CreateOrderPayload";
1917
+ import { SeatMap as SeatMapType } from "src/types/SeatMap";
1918
+ export interface SeatMapProps {
1919
+ seatMap: SeatMapType;
1920
+ selectedServicesMap: Record<string, CreateOrderPayloadSeatService>;
1921
+ onSeatToggled: (seatService: CreateOrderPayloadSeatService) => void;
1922
+ currentPassengerId: string;
1923
+ currentPassengerName: string;
1924
+ currentSegmentId: string;
1925
+ }
1926
+ export const SeatMap: React.FC<SeatMapProps>;
1927
+ }
1928
+ declare module "src/components/DuffelAncillaries/seats/SeatSelectionModalBody" {
1929
+ import React from "react";
1930
+ import { SeatMapProps } from "src/components/DuffelAncillaries/seats/SeatMap";
1931
+ export type SeatSelectionModalBodyProps = SeatMapProps;
1932
+ export const SeatSelectionModalBody: React.FC<SeatSelectionModalBodyProps>;
1933
+ }
1934
+ declare module "src/components/DuffelAncillaries/seats/SeatSelectionModalFooter" {
1935
+ import { ServicePriceMapById } from "src/lib/getServicePriceMapById";
1936
+ import React from "react";
1937
+ import { CreateOrderPayloadServices } from "src/types/CreateOrderPayload";
1938
+ import { SeatMap } from "src/types/SeatMap";
1939
+ export interface SeatSelectionModalFooterProps {
1940
+ currency: string;
1941
+ selectedServices: CreateOrderPayloadServices;
1942
+ servicePrices: ServicePriceMapById;
1943
+ isFirstSegment: boolean;
1944
+ isLastSegment: boolean;
1945
+ onNextSegmentButtonClicked: () => void;
1946
+ onPreviousSegmentButtonClicked: () => void;
1947
+ onClose: () => void;
1948
+ seatMaps: SeatMap[];
1949
+ }
1950
+ export const SeatSelectionModalFooter: React.FC<SeatSelectionModalFooterProps>;
1951
+ }
1952
+ declare module "src/components/DuffelAncillaries/seats/SeatSelectionModalHeader" {
1953
+ import React from "react";
1954
+ import { OfferSliceSegment } from "src/types/Offer";
1955
+ export interface SeatSelectionModalHeaderProps {
1956
+ segmentAndPassengerPermutationsCount: number;
1957
+ currentSegment: OfferSliceSegment;
1958
+ currentPassengerName: string;
1959
+ currentSegmentAndPassengerPermutationsIndex: number;
1960
+ setCurrentSegmentAndPassengerPermutationsIndex: (index: number) => void;
1961
+ }
1962
+ export const SeatSelectionModalHeader: React.FC<SeatSelectionModalHeaderProps>;
1963
+ }
1964
+ declare module "src/components/DuffelAncillaries/seats/SeatSelectionModal" {
1965
+ import React from "react";
1966
+ import { CreateOrderPayload, CreateOrderPayloadSeatService } from "src/types/CreateOrderPayload";
1967
+ import { Offer } from "src/types/Offer";
1968
+ import { SeatMap } from "src/types/SeatMap";
1969
+ export interface SeatSelectionModalProps {
1970
+ isOpen: boolean;
1971
+ offer?: Offer;
1972
+ seatMaps?: SeatMap[];
1973
+ selectedServices: CreateOrderPayloadSeatService[];
1974
+ passengers: CreateOrderPayload["passengers"];
1975
+ onClose: (selectedServices: CreateOrderPayloadSeatService[]) => void;
1976
+ }
1977
+ export const SeatSelectionModal: React.FC<SeatSelectionModalProps>;
1978
+ }
1979
+ declare module "src/components/DuffelAncillaries/seats/SeatSelectionCard" {
1980
+ import React from "react";
1981
+ import { CreateOrderPayload, CreateOrderPayloadServices } from "src/types/CreateOrderPayload";
1982
+ import { Offer } from "src/types/Offer";
1983
+ import { SeatMap } from "src/types/SeatMap";
1984
+ export interface SeatSelectionCardProps {
1985
+ isLoading: boolean;
1986
+ offer?: Offer;
1987
+ seatMaps?: SeatMap[];
1988
+ passengers: CreateOrderPayload["passengers"];
1989
+ selectedServices: CreateOrderPayloadServices;
1990
+ setSelectedServices: (selectedServices: CreateOrderPayloadServices) => void;
1991
+ }
1992
+ export const SeatSelectionCard: React.FC<SeatSelectionCardProps>;
1993
+ }
1994
+ declare module "src/components/DuffelAncillaries/DuffelAncillaries" {
1995
+ import * as React from "react";
1996
+ import { DuffelAncillariesProps } from "src/types/DuffelAncillariesProps";
1997
+ export const DuffelAncillaries: React.FC<DuffelAncillariesProps>;
1998
+ }
1999
+ declare module "src/components/DuffelAncillaries/DuffelAncillariesCustomElement" {
2000
+ import { DuffelAncillariesPropsWithClientKeyAndOfferId, DuffelAncillariesPropsWithOfferIdForFixture, DuffelAncillariesPropsWithOffersAndSeatMaps, DuffelAncillariesPropWithOfferAndClientKey, OnPayloadReady } from "src/types/DuffelAncillariesProps";
2001
+ global {
2002
+ namespace JSX {
2003
+ interface IntrinsicElements {
2004
+ "duffel-ancillaries": React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
2005
+ }
2006
+ }
2007
+ }
2008
+ type DuffelAncillariesCustomElementRenderArguments = Omit<DuffelAncillariesPropsWithOfferIdForFixture, "onPayloadReady"> | Omit<DuffelAncillariesPropsWithClientKeyAndOfferId, "onPayloadReady"> | Omit<DuffelAncillariesPropWithOfferAndClientKey, "onPayloadReady"> | Omit<DuffelAncillariesPropsWithOffersAndSeatMaps, "onPayloadReady">;
2009
+ export function renderDuffelAncillariesCustomElement(props: DuffelAncillariesCustomElementRenderArguments): void;
2010
+ export function onDuffelAncillariesPayloadReady(onPayloadReady: OnPayloadReady): void;
2011
+ }
2012
+ declare module "src/types/CurrencyConversion" {
2013
+ export interface CurrencyConversion {
2014
+ /**
2015
+ * currency The ISO-4217 currency code to be used
2016
+ */
2017
+ currency: string;
2018
+ /**
2019
+ * Conversion multiple to be applied to all prices
2020
+ */
2021
+ rate: number;
2022
+ }
2023
+ }
2024
+ declare module "src/types/Order" {
2025
+ export type Order = {
2026
+ id: string;
2027
+ [any: string]: any;
2028
+ slices: {
2029
+ segments: any[];
2030
+ }[];
2031
+ };
2032
+ export type OrderAvailableService = any;
2033
+ }
2034
+ declare module "src/types/Place" {
2035
+ import { Airport } from "src/types/Airport";
2036
+ import { City } from "src/types/City";
2037
+ export type Place = (Airport & {
2038
+ type?: "airport";
2039
+ airports?: Airport[] | null;
2040
+ }) | (City & {
2041
+ type?: "city";
2042
+ });
2043
+ }
2044
+ declare module "src/types/index" {
2045
+ export * from "src/types/Aircraft";
2046
+ export * from "src/types/Airline";
2047
+ export * from "src/types/Airport";
2048
+ export * from "src/types/City";
2049
+ export * from "src/types/CreateOrderPayload";
2050
+ export * from "src/types/CurrencyConversion";
2051
+ export * from "src/types/DuffelAncillariesProps";
2052
+ export * from "src/types/Offer";
2053
+ export * from "src/types/Order";
2054
+ export * from "src/types/Place";
2055
+ export * from "src/types/SeatMap";
2056
+ }
2057
+ declare module "src/components/DuffelPayments/DuffelPayments" {
2058
+ import { StripeError } from "@stripe/stripe-js";
2059
+ import * as React from "react";
2060
+ import { CustomStyles } from "src/types/index";
2061
+ export interface DuffelPaymentsProps {
2062
+ paymentIntentClientToken: string;
2063
+ onSuccessfulPayment: () => void;
2064
+ onFailedPayment: (error: StripeError) => void;
2065
+ styles?: CustomStyles;
2066
+ debug?: boolean;
2067
+ }
2068
+ export const DuffelPayments: React.FC<DuffelPaymentsProps>;
2069
+ }
2070
+ declare module "src/components/DuffelPayments/DuffelPaymentsCustomElement" {
2071
+ import { DuffelPaymentsProps } from "src/components/DuffelPayments/DuffelPayments";
2072
+ global {
2073
+ namespace JSX {
2074
+ interface IntrinsicElements {
2075
+ "duffel-payments": React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
2076
+ }
2077
+ }
2078
+ }
2079
+ type DuffelPaymentsCustomElementRenderArguments = Pick<DuffelPaymentsProps, "paymentIntentClientToken" | "styles">;
2080
+ export function renderDuffelPaymentsCustomElement(props: DuffelPaymentsCustomElementRenderArguments): void;
2081
+ export function onDuffelPaymentsSuccessfulPayment(onSuccessfulPayment: DuffelPaymentsProps["onSuccessfulPayment"]): void;
2082
+ export function onDuffelPaymentsFailedPayment(onFailedPayment: DuffelPaymentsProps["onFailedPayment"]): void;
2083
+ }
2084
+ declare module "src/custom-elements" {
2085
+ /**
2086
+ * This file is one of the entry points for the library -- `@duffel/components/custom-elements`.
2087
+ * If you'd like to expose other custom element functions, please add them here.
2088
+ */
2089
+ export { onDuffelAncillariesPayloadReady, renderDuffelAncillariesCustomElement, } from "src/components/DuffelAncillaries/DuffelAncillariesCustomElement";
2090
+ export { onDuffelPaymentsFailedPayment, onDuffelPaymentsSuccessfulPayment, renderDuffelPaymentsCustomElement, } from "src/components/DuffelPayments/DuffelPaymentsCustomElement";
2091
+ }
2092
+ declare module "src/index" {
2093
+ /**
2094
+ * This file is the main entry point for the library -- `@duffel/components`.
2095
+ * If you'd like to expose other react components, please add them here.
2096
+ */
2097
+ export * from "src/components/DuffelAncillaries/DuffelAncillaries";
2098
+ export * from "src/components/DuffelPayments/DuffelPayments";
2099
+ export * from "src/types/index";
2100
+ }
2101
+ declare module "src/components/PlacesLookup/PlacesLookup" {
2102
+ import React from "react";
2103
+ interface City {
2104
+ type: "city";
2105
+ name: string;
2106
+ iata_code: string;
2107
+ }
2108
+ interface Airport {
2109
+ type: "airport";
2110
+ name: string;
2111
+ iata_code: string;
2112
+ latitude: string;
2113
+ longitude: string;
2114
+ }
2115
+ type Place = City | Airport;
2116
+ export interface PlacesLookupProps {
2117
+ onPlaceSelected: (selection: Place) => void;
2118
+ placeholder?: string;
2119
+ }
2120
+ export const PlacesLookup: React.FC<PlacesLookupProps>;
2121
+ }
2122
+ declare module "scripts/generate-fixture" {
2123
+ export const makeMockDateInTheFuture: (daysAhead: number) => Date;
2124
+ const _default: Promise<void>;
2125
+ export default _default;
2126
+ }
2127
+ declare module "scripts/setup-suggestion-data" {
2128
+ export interface CityCsvRow {
2129
+ id: string;
2130
+ iata_code: string;
2131
+ iata_country_code: string;
2132
+ name: string;
2133
+ inserted_at: string;
2134
+ updated_at: string;
2135
+ metropolitan_area: string;
2136
+ }
2137
+ export interface AirportCsvRow {
2138
+ id: string;
2139
+ iata_code: string;
2140
+ iata_city_code: string;
2141
+ iata_country_code: string;
2142
+ name: string;
2143
+ inserted_at: string;
2144
+ updated_at: string;
2145
+ source_type: string;
2146
+ alternative_names: string;
2147
+ icao_code: string;
2148
+ disabled_at: string;
2149
+ city_name: string;
2150
+ latitude: string;
2151
+ longitude: string;
2152
+ time_zone: string;
2153
+ }
2154
+ const _default_1: Promise<void>;
2155
+ export default _default_1;
2156
+ }