@duffel/components 2.1.9 → 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.
- package/dist/AdditionalBaggage.umd.min.js +1 -1
- package/dist/AdditionalBaggageSelection.esm.js +1 -1
- package/dist/AdditionalBaggageSelection.js +1 -1
- package/dist/AdditionalBaggageSelection.umd.min.js +1 -1
- package/dist/CardPayment.esm.js +1 -1
- package/dist/CardPayment.js +1 -1
- package/dist/CardPayment.umd.min.js +1 -1
- package/dist/SeatSelection.esm.js +1 -1
- package/dist/SeatSelection.js +1 -1
- package/dist/SeatSelection.umd.min.js +1 -1
- package/dist/duffel-components.d.ts +155 -144
- package/dist/duffel-components.esm.js +1 -1
- package/dist/duffel-components.js +1 -1
- package/dist/duffel-components.umd.min.js +1 -1
- package/package.json +83 -88
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
// Generated by dts-bundle-generator v6.
|
|
1
|
+
// Generated by dts-bundle-generator v6.11.0
|
|
2
2
|
|
|
3
3
|
import { StripeError } from '@stripe/stripe-js';
|
|
4
4
|
import * as React from 'react';
|
|
5
|
-
import React from 'react';
|
|
6
5
|
|
|
7
6
|
export interface CardPaymentProps {
|
|
8
7
|
duffelPaymentIntentClientToken: string;
|
|
@@ -455,6 +454,156 @@ export interface OfferSliceSegmentPassengerBaggage {
|
|
|
455
454
|
*/
|
|
456
455
|
quantity: number;
|
|
457
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
|
+
}
|
|
458
607
|
/**
|
|
459
608
|
* Seat maps are used to build a rich experience for your customers so they can select a seat as part of an order.
|
|
460
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.
|
|
@@ -571,6 +720,10 @@ export interface SeatMapCabinRowSectionAvailableService {
|
|
|
571
720
|
* The currency of the total_amount, as an ISO 4217 currency code
|
|
572
721
|
*/
|
|
573
722
|
total_currency: string;
|
|
723
|
+
/**
|
|
724
|
+
* Metadata for component usage tracking
|
|
725
|
+
*/
|
|
726
|
+
metadata?: ComponentUsageMetadata;
|
|
574
727
|
}
|
|
575
728
|
/**
|
|
576
729
|
* A bassinet is a child's cradle. This element will be aligned with the corresponding seat in the following row.
|
|
@@ -643,148 +796,6 @@ export interface SeatMapCabinRowSectionElementStairs {
|
|
|
643
796
|
type: "stairs";
|
|
644
797
|
}
|
|
645
798
|
export declare type SeatMapCabinRowSectionElement = SeatMapCabinRowSectionElementSeat | SeatMapCabinRowSectionElementBassinet | SeatMapCabinRowSectionElementEmpty | SeatMapCabinRowSectionElementExitRow | SeatMapCabinRowSectionElementLavatory | SeatMapCabinRowSectionElementGalley | SeatMapCabinRowSectionElementCloset | SeatMapCabinRowSectionElementStairs;
|
|
646
|
-
/**
|
|
647
|
-
* The metropolitan area where the airport is located.
|
|
648
|
-
* Only present for airports which are registered with IATA as belonging to a metropolitan area.
|
|
649
|
-
* @link https://portal.iata.org/faq/articles/en_US/FAQ/How-do-I-create-a-new-Metropolitan-Area
|
|
650
|
-
*/
|
|
651
|
-
export interface City {
|
|
652
|
-
/**
|
|
653
|
-
* The type of the place
|
|
654
|
-
*/
|
|
655
|
-
type?: "city";
|
|
656
|
-
/**
|
|
657
|
-
* The three-character IATA code for the city
|
|
658
|
-
* @example "LON"
|
|
659
|
-
*/
|
|
660
|
-
iata_code: string;
|
|
661
|
-
/**
|
|
662
|
-
* The ISO 3166-1 alpha-2 code for the country where the city is located
|
|
663
|
-
* @link https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
|
|
664
|
-
* @example "GB"
|
|
665
|
-
*/
|
|
666
|
-
iata_country_code: string;
|
|
667
|
-
/**
|
|
668
|
-
* Duffel's unique identifier for the city
|
|
669
|
-
* @example "cit_lon_gb"
|
|
670
|
-
*/
|
|
671
|
-
id: string;
|
|
672
|
-
/**
|
|
673
|
-
* The name of the city
|
|
674
|
-
* @example "London"
|
|
675
|
-
*/
|
|
676
|
-
name: string;
|
|
677
|
-
/**
|
|
678
|
-
* The time zone of the airport, specified by name from the [tz database](https://en.wikipedia.org/wiki/Tz_database)
|
|
679
|
-
*/
|
|
680
|
-
time_zone?: string | null;
|
|
681
|
-
/**
|
|
682
|
-
* 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°
|
|
683
|
-
*/
|
|
684
|
-
longitude?: number | null;
|
|
685
|
-
/**
|
|
686
|
-
* 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°
|
|
687
|
-
*/
|
|
688
|
-
latitude?: number | null;
|
|
689
|
-
/**
|
|
690
|
-
* The 3-letter IATA code for the city where the place is located.
|
|
691
|
-
* 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).
|
|
692
|
-
*/
|
|
693
|
-
iata_city_code?: string | null;
|
|
694
|
-
/**
|
|
695
|
-
* The name of the city (or cities separated by a `/`) where the airport is located
|
|
696
|
-
*/
|
|
697
|
-
city_name?: string | null;
|
|
698
|
-
}
|
|
699
|
-
/**
|
|
700
|
-
* The cabin class that the passenger will travel in on this segment
|
|
701
|
-
*/
|
|
702
|
-
export declare type CabinClass = "first" | "business" | "premium_economy" | "economy";
|
|
703
|
-
/**
|
|
704
|
-
* The type of the identity document. Currently, the only supported type is passport.
|
|
705
|
-
* This must be one of the `allowed_passenger_identity_document_types` on the offer.
|
|
706
|
-
*/
|
|
707
|
-
export declare type PassengerIdentityDocumentType = "passport";
|
|
708
|
-
/**
|
|
709
|
-
* The type of the origin or destination
|
|
710
|
-
*/
|
|
711
|
-
export declare type PlaceType = "airport" | "city";
|
|
712
|
-
export declare type Place = (Airport & {
|
|
713
|
-
type?: "airport";
|
|
714
|
-
airports?: Airport[] | null;
|
|
715
|
-
}) | (City & {
|
|
716
|
-
type?: "city";
|
|
717
|
-
});
|
|
718
|
-
/**
|
|
719
|
-
* 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.
|
|
720
|
-
* 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.
|
|
721
|
-
* If a particular kind of modification is allowed, you may not always be able to take action through the Duffel API.
|
|
722
|
-
* In some cases, you may need to contact the Duffel support team or the airline directly.
|
|
723
|
-
*/
|
|
724
|
-
export declare type FlightsConditions = {
|
|
725
|
-
/**
|
|
726
|
-
* Whether the whole order or offer can be refunded before the departure of the first slice.
|
|
727
|
-
* 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.
|
|
728
|
-
* If any of the slices on the order or offer can't be refunded then the `allowed` property will be `false`.
|
|
729
|
-
* If the airline hasn't provided any information about whether this order or offer can be refunded then this property will be `null`.
|
|
730
|
-
*/
|
|
731
|
-
refund_before_departure?: {
|
|
732
|
-
/**
|
|
733
|
-
* The currency of the `penalty_amount` as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.
|
|
734
|
-
* This will be in a currency determined by the airline, which is not necessarily the same as the currency of the order or offer.
|
|
735
|
-
* If this is `null` then `penalty_amount` will also be `null`.
|
|
736
|
-
* @example "GBP"
|
|
737
|
-
*/
|
|
738
|
-
penalty_currency?: string;
|
|
739
|
-
/**
|
|
740
|
-
* If the modification is `allowed` then this is the amount payable to apply the modification to all passengers.
|
|
741
|
-
* 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`.
|
|
742
|
-
* If this is `null` then the `penalty_currency` will also be null.
|
|
743
|
-
* @example "100.00"
|
|
744
|
-
*/
|
|
745
|
-
penalty_amount?: string;
|
|
746
|
-
/**
|
|
747
|
-
* Whether this kind of modification is allowed post-booking
|
|
748
|
-
*
|
|
749
|
-
* @example "true"
|
|
750
|
-
*/
|
|
751
|
-
allowed: boolean;
|
|
752
|
-
} | null;
|
|
753
|
-
/**
|
|
754
|
-
* Whether the whole order or offer can be changed before the departure of the first slice.
|
|
755
|
-
* If all of the slices on the order or offer can be changed then the `allowed` property will be `true`.
|
|
756
|
-
* Refer to the `slices` for information about change penalties.
|
|
757
|
-
* If any of the slices on the order or offer can't be changed then the `allowed` property will be `false`.
|
|
758
|
-
* In this case you should refer to the slices conditions to determine if any part of the order or offer is changeable.
|
|
759
|
-
* If the airline hasn't provided any information about whether this order or offer can be changed then this property will be `null`.
|
|
760
|
-
*/
|
|
761
|
-
change_before_departure?: {
|
|
762
|
-
/**
|
|
763
|
-
* The currency of the `penalty_amount` as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.
|
|
764
|
-
* This will be in a currency determined by the airline, which is not necessarily the same as the currency of the order or offer.
|
|
765
|
-
* If this is `null` then `penalty_amount` will also be `null`.
|
|
766
|
-
* @example "GBP"
|
|
767
|
-
*/
|
|
768
|
-
penalty_currency: string;
|
|
769
|
-
/**
|
|
770
|
-
* If the modification is `allowed` then this is the amount payable to apply the modification to all passengers.
|
|
771
|
-
* 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`.
|
|
772
|
-
* If this is `null` then the `penalty_currency` will also be null.
|
|
773
|
-
* @example "100.00"
|
|
774
|
-
*/
|
|
775
|
-
penalty_amount?: string;
|
|
776
|
-
/**
|
|
777
|
-
* Whether this kind of modification is allowed post-booking
|
|
778
|
-
*
|
|
779
|
-
* @example "true"
|
|
780
|
-
*/
|
|
781
|
-
allowed: boolean;
|
|
782
|
-
} | null;
|
|
783
|
-
};
|
|
784
|
-
export interface LayoutSelectionPassenger {
|
|
785
|
-
id: string;
|
|
786
|
-
name?: string | null;
|
|
787
|
-
}
|
|
788
799
|
export interface SeatSelectionPassenger {
|
|
789
800
|
id: string;
|
|
790
801
|
name?: string | null;
|