@duffel/components 2.2.1 → 2.3.0

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.
@@ -454,6 +454,156 @@ export interface OfferSliceSegmentPassengerBaggage {
454
454
  */
455
455
  quantity: number;
456
456
  }
457
+ declare const DUFFEL_COMPONENTS_VERSION = "2.2.1";
458
+ /**
459
+ * The metropolitan area where the airport is located.
460
+ * Only present for airports which are registered with IATA as belonging to a metropolitan area.
461
+ * @link https://portal.iata.org/faq/articles/en_US/FAQ/How-do-I-create-a-new-Metropolitan-Area
462
+ */
463
+ export interface City {
464
+ /**
465
+ * The type of the place
466
+ */
467
+ type?: "city";
468
+ /**
469
+ * The three-character IATA code for the city
470
+ * @example "LON"
471
+ */
472
+ iata_code: string;
473
+ /**
474
+ * The ISO 3166-1 alpha-2 code for the country where the city is located
475
+ * @link https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
476
+ * @example "GB"
477
+ */
478
+ iata_country_code: string;
479
+ /**
480
+ * Duffel's unique identifier for the city
481
+ * @example "cit_lon_gb"
482
+ */
483
+ id: string;
484
+ /**
485
+ * The name of the city
486
+ * @example "London"
487
+ */
488
+ name: string;
489
+ /**
490
+ * The time zone of the airport, specified by name from the [tz database](https://en.wikipedia.org/wiki/Tz_database)
491
+ */
492
+ time_zone?: string | null;
493
+ /**
494
+ * The longitude position of the airport represented in [Decimal degrees](https://en.wikipedia.org/wiki/Decimal_degrees) with 6 decimal points with a range between -180° and 180°
495
+ */
496
+ longitude?: number | null;
497
+ /**
498
+ * The latitude position of the airport represented in [Decimal degrees](https://en.wikipedia.org/wiki/Decimal_degrees) with 6 decimal points with a range between -90° and 90°
499
+ */
500
+ latitude?: number | null;
501
+ /**
502
+ * The 3-letter IATA code for the city where the place is located.
503
+ * 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).
504
+ */
505
+ iata_city_code?: string | null;
506
+ /**
507
+ * The name of the city (or cities separated by a `/`) where the airport is located
508
+ */
509
+ city_name?: string | null;
510
+ }
511
+ /**
512
+ * The cabin class that the passenger will travel in on this segment
513
+ */
514
+ export declare type CabinClass = "first" | "business" | "premium_economy" | "economy";
515
+ /**
516
+ * The type of the identity document. Currently, the only supported type is passport.
517
+ * This must be one of the `allowed_passenger_identity_document_types` on the offer.
518
+ */
519
+ export declare type PassengerIdentityDocumentType = "passport";
520
+ /**
521
+ * The type of the origin or destination
522
+ */
523
+ export declare type PlaceType = "airport" | "city";
524
+ export declare type Place = (Airport & {
525
+ type?: "airport";
526
+ airports?: Airport[] | null;
527
+ }) | (City & {
528
+ type?: "city";
529
+ });
530
+ /**
531
+ * The conditions associated with this offer, describing the kinds of modifications you can make post-booking and any penalties that will apply to those modifications.
532
+ * This information assumes the condition is applied to all of the slices and passengers associated with this offer - for information at the slice level (e.g. "what happens if I just want to change the first slice?") refer to the slices.
533
+ * If a particular kind of modification is allowed, you may not always be able to take action through the Duffel API.
534
+ * In some cases, you may need to contact the Duffel support team or the airline directly.
535
+ */
536
+ export declare type FlightsConditions = {
537
+ /**
538
+ * Whether the whole order or offer can be refunded before the departure of the first slice.
539
+ * If all of the slices on the order or offer can be refunded then the `allowed` property will be `true` and information will be provided about any penalties.
540
+ * If any of the slices on the order or offer can't be refunded then the `allowed` property will be `false`.
541
+ * If the airline hasn't provided any information about whether this order or offer can be refunded then this property will be `null`.
542
+ */
543
+ refund_before_departure?: {
544
+ /**
545
+ * The currency of the `penalty_amount` as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.
546
+ * This will be in a currency determined by the airline, which is not necessarily the same as the currency of the order or offer.
547
+ * If this is `null` then `penalty_amount` will also be `null`.
548
+ * @example "GBP"
549
+ */
550
+ penalty_currency?: string;
551
+ /**
552
+ * If the modification is `allowed` then this is the amount payable to apply the modification to all passengers.
553
+ * If there is no penalty, the value will be zero. If the modification isn't `allowed` or the penalty is not known then this field will be `null`.
554
+ * If this is `null` then the `penalty_currency` will also be null.
555
+ * @example "100.00"
556
+ */
557
+ penalty_amount?: string;
558
+ /**
559
+ * Whether this kind of modification is allowed post-booking
560
+ *
561
+ * @example "true"
562
+ */
563
+ allowed: boolean;
564
+ } | null;
565
+ /**
566
+ * Whether the whole order or offer can be changed before the departure of the first slice.
567
+ * If all of the slices on the order or offer can be changed then the `allowed` property will be `true`.
568
+ * Refer to the `slices` for information about change penalties.
569
+ * If any of the slices on the order or offer can't be changed then the `allowed` property will be `false`.
570
+ * In this case you should refer to the slices conditions to determine if any part of the order or offer is changeable.
571
+ * If the airline hasn't provided any information about whether this order or offer can be changed then this property will be `null`.
572
+ */
573
+ change_before_departure?: {
574
+ /**
575
+ * The currency of the `penalty_amount` as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.
576
+ * This will be in a currency determined by the airline, which is not necessarily the same as the currency of the order or offer.
577
+ * If this is `null` then `penalty_amount` will also be `null`.
578
+ * @example "GBP"
579
+ */
580
+ penalty_currency: string;
581
+ /**
582
+ * If the modification is `allowed` then this is the amount payable to apply the modification to all passengers.
583
+ * If there is no penalty, the value will be zero. If the modification isn't `allowed` or the penalty is not known then this field will be `null`.
584
+ * If this is `null` then the `penalty_currency` will also be null.
585
+ * @example "100.00"
586
+ */
587
+ penalty_amount?: string;
588
+ /**
589
+ * Whether this kind of modification is allowed post-booking
590
+ *
591
+ * @example "true"
592
+ */
593
+ allowed: boolean;
594
+ } | null;
595
+ };
596
+ export interface LayoutSelectionPassenger {
597
+ id: string;
598
+ name?: string | null;
599
+ }
600
+ /**
601
+ * Metadata for component usage tracking
602
+ */
603
+ export interface ComponentUsageMetadata {
604
+ duffel_component_used: "additional_baggage" | "additional_baggage_selection" | "seat_selection";
605
+ duffel_components_version: typeof DUFFEL_COMPONENTS_VERSION;
606
+ }
457
607
  /**
458
608
  * Seat maps are used to build a rich experience for your customers so they can select a seat as part of an order.
459
609
  * A seat map includes the data for rendering seats in the relevant cabins, along with their total cost and other information such as disclosures.
@@ -570,6 +720,10 @@ export interface SeatMapCabinRowSectionAvailableService {
570
720
  * The currency of the total_amount, as an ISO 4217 currency code
571
721
  */
572
722
  total_currency: string;
723
+ /**
724
+ * Metadata for component usage tracking
725
+ */
726
+ metadata?: ComponentUsageMetadata;
573
727
  }
574
728
  /**
575
729
  * A bassinet is a child's cradle. This element will be aligned with the corresponding seat in the following row.
@@ -642,148 +796,6 @@ export interface SeatMapCabinRowSectionElementStairs {
642
796
  type: "stairs";
643
797
  }
644
798
  export declare type SeatMapCabinRowSectionElement = SeatMapCabinRowSectionElementSeat | SeatMapCabinRowSectionElementBassinet | SeatMapCabinRowSectionElementEmpty | SeatMapCabinRowSectionElementExitRow | SeatMapCabinRowSectionElementLavatory | SeatMapCabinRowSectionElementGalley | SeatMapCabinRowSectionElementCloset | SeatMapCabinRowSectionElementStairs;
645
- /**
646
- * The metropolitan area where the airport is located.
647
- * Only present for airports which are registered with IATA as belonging to a metropolitan area.
648
- * @link https://portal.iata.org/faq/articles/en_US/FAQ/How-do-I-create-a-new-Metropolitan-Area
649
- */
650
- export interface City {
651
- /**
652
- * The type of the place
653
- */
654
- type?: "city";
655
- /**
656
- * The three-character IATA code for the city
657
- * @example "LON"
658
- */
659
- iata_code: string;
660
- /**
661
- * The ISO 3166-1 alpha-2 code for the country where the city is located
662
- * @link https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
663
- * @example "GB"
664
- */
665
- iata_country_code: string;
666
- /**
667
- * Duffel's unique identifier for the city
668
- * @example "cit_lon_gb"
669
- */
670
- id: string;
671
- /**
672
- * The name of the city
673
- * @example "London"
674
- */
675
- name: string;
676
- /**
677
- * The time zone of the airport, specified by name from the [tz database](https://en.wikipedia.org/wiki/Tz_database)
678
- */
679
- time_zone?: string | null;
680
- /**
681
- * The longitude position of the airport represented in [Decimal degrees](https://en.wikipedia.org/wiki/Decimal_degrees) with 6 decimal points with a range between -180° and 180°
682
- */
683
- longitude?: number | null;
684
- /**
685
- * The latitude position of the airport represented in [Decimal degrees](https://en.wikipedia.org/wiki/Decimal_degrees) with 6 decimal points with a range between -90° and 90°
686
- */
687
- latitude?: number | null;
688
- /**
689
- * The 3-letter IATA code for the city where the place is located.
690
- * 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).
691
- */
692
- iata_city_code?: string | null;
693
- /**
694
- * The name of the city (or cities separated by a `/`) where the airport is located
695
- */
696
- city_name?: string | null;
697
- }
698
- /**
699
- * The cabin class that the passenger will travel in on this segment
700
- */
701
- export declare type CabinClass = "first" | "business" | "premium_economy" | "economy";
702
- /**
703
- * The type of the identity document. Currently, the only supported type is passport.
704
- * This must be one of the `allowed_passenger_identity_document_types` on the offer.
705
- */
706
- export declare type PassengerIdentityDocumentType = "passport";
707
- /**
708
- * The type of the origin or destination
709
- */
710
- export declare type PlaceType = "airport" | "city";
711
- export declare type Place = (Airport & {
712
- type?: "airport";
713
- airports?: Airport[] | null;
714
- }) | (City & {
715
- type?: "city";
716
- });
717
- /**
718
- * The conditions associated with this offer, describing the kinds of modifications you can make post-booking and any penalties that will apply to those modifications.
719
- * This information assumes the condition is applied to all of the slices and passengers associated with this offer - for information at the slice level (e.g. "what happens if I just want to change the first slice?") refer to the slices.
720
- * If a particular kind of modification is allowed, you may not always be able to take action through the Duffel API.
721
- * In some cases, you may need to contact the Duffel support team or the airline directly.
722
- */
723
- export declare type FlightsConditions = {
724
- /**
725
- * Whether the whole order or offer can be refunded before the departure of the first slice.
726
- * If all of the slices on the order or offer can be refunded then the `allowed` property will be `true` and information will be provided about any penalties.
727
- * If any of the slices on the order or offer can't be refunded then the `allowed` property will be `false`.
728
- * If the airline hasn't provided any information about whether this order or offer can be refunded then this property will be `null`.
729
- */
730
- refund_before_departure?: {
731
- /**
732
- * The currency of the `penalty_amount` as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.
733
- * This will be in a currency determined by the airline, which is not necessarily the same as the currency of the order or offer.
734
- * If this is `null` then `penalty_amount` will also be `null`.
735
- * @example "GBP"
736
- */
737
- penalty_currency?: string;
738
- /**
739
- * If the modification is `allowed` then this is the amount payable to apply the modification to all passengers.
740
- * If there is no penalty, the value will be zero. If the modification isn't `allowed` or the penalty is not known then this field will be `null`.
741
- * If this is `null` then the `penalty_currency` will also be null.
742
- * @example "100.00"
743
- */
744
- penalty_amount?: string;
745
- /**
746
- * Whether this kind of modification is allowed post-booking
747
- *
748
- * @example "true"
749
- */
750
- allowed: boolean;
751
- } | null;
752
- /**
753
- * Whether the whole order or offer can be changed before the departure of the first slice.
754
- * If all of the slices on the order or offer can be changed then the `allowed` property will be `true`.
755
- * Refer to the `slices` for information about change penalties.
756
- * If any of the slices on the order or offer can't be changed then the `allowed` property will be `false`.
757
- * In this case you should refer to the slices conditions to determine if any part of the order or offer is changeable.
758
- * If the airline hasn't provided any information about whether this order or offer can be changed then this property will be `null`.
759
- */
760
- change_before_departure?: {
761
- /**
762
- * The currency of the `penalty_amount` as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.
763
- * This will be in a currency determined by the airline, which is not necessarily the same as the currency of the order or offer.
764
- * If this is `null` then `penalty_amount` will also be `null`.
765
- * @example "GBP"
766
- */
767
- penalty_currency: string;
768
- /**
769
- * If the modification is `allowed` then this is the amount payable to apply the modification to all passengers.
770
- * If there is no penalty, the value will be zero. If the modification isn't `allowed` or the penalty is not known then this field will be `null`.
771
- * If this is `null` then the `penalty_currency` will also be null.
772
- * @example "100.00"
773
- */
774
- penalty_amount?: string;
775
- /**
776
- * Whether this kind of modification is allowed post-booking
777
- *
778
- * @example "true"
779
- */
780
- allowed: boolean;
781
- } | null;
782
- };
783
- export interface LayoutSelectionPassenger {
784
- id: string;
785
- name?: string | null;
786
- }
787
799
  export interface SeatSelectionPassenger {
788
800
  id: string;
789
801
  name?: string | null;