@duffel/components 3.7.22 → 3.7.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/components/DuffelAncillaries/DuffelAncillariesCustomElement.d.ts +12 -0
  2. package/components/DuffelAncillaries/bags/BaggageSelectionCard.d.ts +1 -0
  3. package/components/DuffelAncillaries/bags/BaggageSelectionController.d.ts +1 -0
  4. package/components/DuffelAncillaries/bags/BaggageSelectionModal.d.ts +1 -0
  5. package/components/DuffelAncillaries/bags/BaggageSelectionModalBody.d.ts +1 -0
  6. package/components/DuffelAncillaries/bags/BaggageSelectionModalBodyPassenger.d.ts +1 -0
  7. package/components/DuffelAncillaries/bags/BaggageSelectionModalFooter.d.ts +1 -0
  8. package/components/DuffelAncillaries/bags/BaggageSelectionModalHeader.d.ts +1 -0
  9. package/components/DuffelAncillaries/bags/IncludedBaggageBanner.d.ts +1 -0
  10. package/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionCard.d.ts +1 -0
  11. package/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModal.d.ts +1 -0
  12. package/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBody.d.ts +1 -0
  13. package/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalFooter.d.ts +1 -0
  14. package/components/DuffelAncillaries/seats/Amenity.d.ts +1 -0
  15. package/components/DuffelAncillaries/seats/Element.d.ts +1 -0
  16. package/components/DuffelAncillaries/seats/Legend.d.ts +1 -0
  17. package/components/DuffelAncillaries/seats/Row.d.ts +1 -0
  18. package/components/DuffelAncillaries/seats/RowSection.d.ts +1 -0
  19. package/components/DuffelAncillaries/seats/SeatElement.d.ts +1 -0
  20. package/components/DuffelAncillaries/seats/SeatInfo.d.ts +1 -0
  21. package/components/DuffelAncillaries/seats/SeatMap.d.ts +1 -0
  22. package/components/DuffelAncillaries/seats/SeatSelectionCard.d.ts +1 -0
  23. package/components/DuffelAncillaries/seats/SeatSelectionModal.d.ts +1 -0
  24. package/components/DuffelAncillaries/seats/SeatSelectionModalFooter.d.ts +1 -0
  25. package/components/DuffelAncillaries/seats/SeatSelectionModalHeader.d.ts +1 -0
  26. package/components/DuffelAncillaries/seats/SeatUnavailable.d.ts +1 -0
  27. package/components/DuffelCardForm/DuffelCardForm.d.ts +4 -1
  28. package/components/DuffelCardForm/lib/postMessageToCreateCardForTemporaryUse.d.ts +1 -0
  29. package/components/DuffelCardForm/lib/postMessageToSaveCard.d.ts +1 -0
  30. package/components/DuffelCardForm/lib/postMessageWithStyles.d.ts +2 -0
  31. package/components/DuffelCardForm/lib/types.d.ts +26 -6
  32. package/components/DuffelNGSView/DuffelNGSView.d.ts +3 -2
  33. package/components/DuffelNGSView/FilterControls.d.ts +13 -0
  34. package/components/DuffelNGSView/NGSSliceFareCard.d.ts +1 -0
  35. package/components/DuffelNGSView/NGSTable.d.ts +1 -0
  36. package/components/DuffelNGSView/SliceSummary.d.ts +1 -0
  37. package/components/DuffelNGSView/lib/deduplicate-mapped-offers-by-fare-brand.d.ts +4 -3
  38. package/components/DuffelNGSView/lib/does-slice-have-mixed-cabins.d.ts +2 -1
  39. package/components/DuffelNGSView/lib/filter-results.d.ts +2 -1
  40. package/components/DuffelNGSView/lib/get-initial-filter-values.d.ts +1 -0
  41. package/components/DuffelNGSView/lib/get-max-baggages-for-offer-slice.d.ts +2 -1
  42. package/components/DuffelNGSView/lib/getAirlines.d.ts +1 -0
  43. package/components/DuffelNGSView/lib/group-offers-for-ngs-view.d.ts +2 -1
  44. package/components/DuffelNGSView/lib/index.d.ts +1 -0
  45. package/components/DuffelNGSView/lib/sort-ngs-rows-by-shelf-price.d.ts +2 -1
  46. package/components/DuffelNGSView/lib/useFilters.d.ts +20 -7
  47. package/components/DuffelPayments/DuffelPaymentsCustomElement.d.ts +13 -0
  48. package/components/MapboxPlacesLookup/MapboxPlacesLookupCustomElement.d.ts +13 -0
  49. package/components/OfferSlice/OfferSlice.d.ts +1 -0
  50. package/components/OfferSlice/OfferSliceConditions.d.ts +7 -0
  51. package/components/OfferSlice/OfferSliceDetailTravelItem.d.ts +9 -0
  52. package/components/OfferSlice/lib/getHighlightStyles.d.ts +1 -1
  53. package/components/OfferSliceModal/OfferSliceModal.d.ts +7 -0
  54. package/components/Stays/StaysAmenities.d.ts +3 -2
  55. package/components/Stays/StaysAmenitiesCustomElement.d.ts +12 -0
  56. package/components/Stays/StaysRatingCustomElement.d.ts +14 -0
  57. package/components/Stays/StaysRoomRateCard.d.ts +1 -0
  58. package/components/Stays/StaysRoomRateCardCustomElement.d.ts +14 -0
  59. package/components/Stays/StaysSummary.d.ts +12 -0
  60. package/components/Stays/StaysSummaryCustomElement.d.ts +12 -0
  61. package/components/Stays/lib/getRateLabel.d.ts +2 -1
  62. package/components/Stays/lib/types.d.ts +3 -2
  63. package/components/shared/ErrorBoundary.d.ts +1 -1
  64. package/components/shared/Icon.d.ts +80 -80
  65. package/components/shared/SliceCarriersTitle.d.ts +1 -0
  66. package/custom-elements.js +70 -0
  67. package/custom-elements.js.map +7 -0
  68. package/fixtures/passengers/mock_passengers.d.ts +1 -0
  69. package/functions/createThreeDSecureSession/client.d.ts +22 -0
  70. package/functions/createThreeDSecureSession/createThreeDSecureSession.d.ts +7 -0
  71. package/index.js +61 -0
  72. package/index.js.map +7 -0
  73. package/lib/captureErrorInSentry.d.ts +1 -1
  74. package/lib/compileCreateOrderPayload.d.ts +2 -1
  75. package/lib/formatAvailableServices.d.ts +1 -0
  76. package/lib/getAirlinesText.d.ts +1 -0
  77. package/lib/getBaggageServiceDescription.d.ts +1 -0
  78. package/lib/getCabinsForSegmentAndDeck.d.ts +3 -1
  79. package/lib/getCarriers.d.ts +3 -2
  80. package/lib/getCurrencyForServices.d.ts +1 -0
  81. package/lib/getFareBrandName.d.ts +1 -1
  82. package/lib/getFirstSeatElementMatchingCriteria.d.ts +2 -1
  83. package/lib/getPassengerBySegmentList.d.ts +6 -1
  84. package/lib/getPassengerMapById.d.ts +3 -2
  85. package/lib/getPassengerName.d.ts +1 -1
  86. package/lib/getRowNumber.d.ts +1 -0
  87. package/lib/getSegmentDates.d.ts +2 -2
  88. package/lib/getSegmentList.d.ts +3 -1
  89. package/lib/getServicePriceMapById.d.ts +1 -0
  90. package/lib/getTotalAmountForServices.d.ts +3 -3
  91. package/lib/getTotalQuantity.d.ts +2 -1
  92. package/lib/hasAvailableSeatService.d.ts +1 -0
  93. package/lib/hasBaggageServiceOfSameMetadataTypeAlreadyBeenSelected.d.ts +1 -0
  94. package/lib/hasService.d.ts +2 -2
  95. package/lib/hasWings.d.ts +1 -0
  96. package/lib/isBaggageService.d.ts +2 -0
  97. package/lib/isCancelForAnyReasonService.d.ts +2 -0
  98. package/lib/isFixtureOfferId.d.ts +2 -1
  99. package/lib/isPayloadComplete.d.ts +3 -1
  100. package/lib/isSeatElement.d.ts +1 -0
  101. package/lib/offerIsExpired.d.ts +2 -1
  102. package/lib/retrieveOffer.d.ts +1 -0
  103. package/lib/retrieveSeatMaps.d.ts +1 -0
  104. package/package.json +26 -23
  105. package/stories/AirlineLogo.stories.d.ts +1 -2
  106. package/stories/AirlineSelector.stories.d.ts +2 -2
  107. package/stories/BaggageSelectionModalHeader.stories.d.ts +1 -1
  108. package/stories/Button.stories.d.ts +1 -1
  109. package/stories/DuffelAncillaries.stories.d.ts +1 -1
  110. package/stories/DuffelCardForm.stories.d.ts +1 -1
  111. package/stories/DuffelNGSView.stories.d.ts +1 -1
  112. package/stories/DuffelPayments.stories.d.ts +1 -1
  113. package/stories/Icon.stories.d.ts +1 -2
  114. package/stories/IconButton.stories.d.ts +1 -1
  115. package/stories/MapboxPlacesLookup.stories.d.ts +1 -2
  116. package/stories/NGSShelfInfoCard.stories.d.ts +3 -0
  117. package/stories/NGSSliceFareCard.stories.d.ts +1 -2
  118. package/stories/OfferSlice.stories.d.ts +1 -2
  119. package/stories/OfferSliceModal.stories.d.ts +1 -2
  120. package/stories/PlacesLookup.stories.d.ts +1 -2
  121. package/stories/SliceCarriersTitle.stories.d.ts +1 -1
  122. package/stories/SliceSummary.stories.d.ts +1 -2
  123. package/stories/StaysAmenities.stories.d.ts +4 -3
  124. package/stories/StaysRating.stories.d.ts +3 -3
  125. package/stories/StaysRoomRateCard.stories.d.ts +68 -11
  126. package/stories/StaysSummary.stories.d.ts +28 -4
  127. package/tsconfig.tsbuildinfo +1 -1
  128. package/types/DuffelAncillariesProps.d.ts +1 -0
  129. package/types/TravelDetails.d.ts +1 -0
@@ -0,0 +1,12 @@
1
+ import { DuffelAncillariesPropsWithClientKeyAndOfferId, DuffelAncillariesPropsWithOfferIdForFixture, DuffelAncillariesPropsWithOffersAndSeatMaps, DuffelAncillariesPropWithOfferAndClientKey, OnPayloadReady } from "../../types/DuffelAncillariesProps";
2
+ declare global {
3
+ namespace JSX {
4
+ interface IntrinsicElements {
5
+ "duffel-ancillaries": React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
6
+ }
7
+ }
8
+ }
9
+ type DuffelAncillariesCustomElementRenderArguments = Omit<DuffelAncillariesPropsWithOfferIdForFixture, "onPayloadReady"> | Omit<DuffelAncillariesPropsWithClientKeyAndOfferId, "onPayloadReady"> | Omit<DuffelAncillariesPropWithOfferAndClientKey, "onPayloadReady"> | Omit<DuffelAncillariesPropsWithOffersAndSeatMaps, "onPayloadReady">;
10
+ export declare function renderDuffelAncillariesCustomElement(props: DuffelAncillariesCustomElementRenderArguments): void;
11
+ export declare function onDuffelAncillariesPayloadReady(onPayloadReady: OnPayloadReady): void;
12
+ export {};
@@ -1,3 +1,4 @@
1
+ /// <reference types="@duffel/api" />
1
2
  import { CreateOrder, CreateOrderService, Offer } from "@duffel/api/types";
2
3
  import React from "react";
3
4
  import { WithBaggageServiceInformation } from "src/types";
@@ -1,3 +1,4 @@
1
+ /// <reference types="@duffel/api" />
1
2
  import { CreateOrderService, OfferAvailableServiceBaggage } from "@duffel/api/types";
2
3
  import React from "react";
3
4
  import { WithBaggageServiceInformation } from "src/types";
@@ -1,3 +1,4 @@
1
+ /// <reference types="@duffel/api" />
1
2
  import { CreateOrder, CreateOrderService, Offer } from "@duffel/api/types";
2
3
  import React from "react";
3
4
  import { WithBaggageServiceInformation } from "src/types";
@@ -1,3 +1,4 @@
1
+ /// <reference types="@duffel/api" />
1
2
  import React from "react";
2
3
  import { CreateOrderPassenger, CreateOrderService, Offer, OfferSliceSegment } from "@duffel/api/types";
3
4
  import { WithBaggageServiceInformation } from "src/types";
@@ -1,3 +1,4 @@
1
+ /// <reference types="@duffel/api" />
1
2
  import { CreateOrderService, OfferAvailableServiceBaggage, OfferSliceSegmentPassengerBaggage } from "@duffel/api/types";
2
3
  import React from "react";
3
4
  import { WithBaggageServiceInformation } from "src/types";
@@ -1,3 +1,4 @@
1
+ /// <reference types="@duffel/api" />
1
2
  import { CreateOrder } from "@duffel/api/types";
2
3
  import { ServicePriceMapById } from "@lib/getServicePriceMapById";
3
4
  import React from "react";
@@ -1,3 +1,4 @@
1
+ /// <reference types="@duffel/api" />
1
2
  import { OfferSliceSegment } from "@duffel/api/types";
2
3
  import React from "react";
3
4
  export interface BaggageSelectionModalHeaderProps {
@@ -1,3 +1,4 @@
1
+ /// <reference types="@duffel/api" />
1
2
  import { OfferSliceSegmentPassengerBaggage } from "@duffel/api/types";
2
3
  import React from "react";
3
4
  interface IncludedBaggageBannerProps {
@@ -1,3 +1,4 @@
1
+ /// <reference types="@duffel/api" />
1
2
  import { CreateOrderService, Offer } from "@duffel/api/types";
2
3
  import React from "react";
3
4
  import { WithServiceInformation } from "src/types";
@@ -1,3 +1,4 @@
1
+ /// <reference types="@duffel/api" />
1
2
  import { CreateOrderService, Offer, OfferAvailableServiceCFAR } from "@duffel/api/types";
2
3
  import React from "react";
3
4
  import { WithServiceInformation } from "src/types";
@@ -1,3 +1,4 @@
1
+ /// <reference types="@duffel/api" />
1
2
  import React from "react";
2
3
  import { Offer, OfferAvailableServiceCFAR } from "@duffel/api/types";
3
4
  export interface CfarSelectionModalBodyProps {
@@ -1,3 +1,4 @@
1
+ /// <reference types="@duffel/api" />
1
2
  import { CreateOrderService, OfferAvailableServiceCFAR } from "@duffel/api/types";
2
3
  import React from "react";
3
4
  import { WithServiceInformation } from "src/types";
@@ -1,3 +1,4 @@
1
+ /// <reference types="@duffel/api" />
1
2
  import { SeatMapCabinRowSectionElementAmenity } from "@duffel/api/types";
2
3
  import * as React from "react";
3
4
  export interface AmenityProps {
@@ -1,3 +1,4 @@
1
+ /// <reference types="@duffel/api" />
1
2
  import { CreateOrderService, SeatMapCabinRowSectionElement } from "@duffel/api/types";
2
3
  import * as React from "react";
3
4
  import { WithSeatServiceInformation } from "src/types";
@@ -1,3 +1,4 @@
1
+ /// <reference types="@duffel/api" />
1
2
  import { SeatMapCabinRowSectionElementAmenity } from "@duffel/api/types";
2
3
  import * as React from "react";
3
4
  export interface LegendProps {
@@ -1,3 +1,4 @@
1
+ /// <reference types="@duffel/api" />
1
2
  import { CreateOrderService, SeatMapCabinRow } from "@duffel/api/types";
2
3
  import * as React from "react";
3
4
  import { WithSeatServiceInformation } from "src/types";
@@ -1,3 +1,4 @@
1
+ /// <reference types="@duffel/api" />
1
2
  import { CreateOrderService, SeatMapCabinRow, SeatMapCabinRowSection } from "@duffel/api/types";
2
3
  import * as React from "react";
3
4
  import { WithSeatServiceInformation } from "src/types";
@@ -1,3 +1,4 @@
1
+ /// <reference types="@duffel/api" />
1
2
  import { CreateOrderService, SeatMapCabinRowSectionElementSeat } from "@duffel/api/types";
2
3
  import * as React from "react";
3
4
  import { WithSeatServiceInformation } from "src/types";
@@ -1,3 +1,4 @@
1
+ /// <reference types="@duffel/api" />
1
2
  import { SeatMapCabinRowSectionAvailableService, SeatMapCabinRowSectionElementSeat } from "@duffel/api/types";
2
3
  import * as React from "react";
3
4
  export interface SeatInfoProps {
@@ -1,3 +1,4 @@
1
+ /// <reference types="@duffel/api" />
1
2
  import { CreateOrderService, SeatMap as SeatMapType } from "@duffel/api/types";
2
3
  import * as React from "react";
3
4
  import { WithSeatServiceInformation } from "src/types";
@@ -1,3 +1,4 @@
1
+ /// <reference types="@duffel/api" />
1
2
  import { CreateOrder, CreateOrderService, Offer, SeatMap } from "@duffel/api/types";
2
3
  import React from "react";
3
4
  import { WithSeatServiceInformation } from "src/types";
@@ -1,3 +1,4 @@
1
+ /// <reference types="@duffel/api" />
1
2
  import { CreateOrder, CreateOrderService, Offer, SeatMap } from "@duffel/api/types";
2
3
  import React from "react";
3
4
  import { WithSeatServiceInformation } from "src/types";
@@ -1,3 +1,4 @@
1
+ /// <reference types="@duffel/api" />
1
2
  import { ServicePriceMapById } from "@lib/getServicePriceMapById";
2
3
  import React from "react";
3
4
  import { CreateOrder, SeatMap } from "@duffel/api/types";
@@ -1,3 +1,4 @@
1
+ /// <reference types="@duffel/api" />
1
2
  import { OfferSliceSegment } from "@duffel/api/types";
2
3
  import React from "react";
3
4
  export interface SeatSelectionModalHeaderProps {
@@ -1,3 +1,4 @@
1
+ /// <reference types="@duffel/api" />
1
2
  import { SeatMapCabinRowSectionElementSeat } from "@duffel/api/types";
2
3
  import * as React from "react";
3
4
  export declare const SeatUnavailable: React.FC<{
@@ -1 +1,4 @@
1
- export declare const DuffelCardForm: any;
1
+ import * as React from "react";
2
+ import { DuffelCardFormProps } from "./lib/types";
3
+ import { DuffelCardFormActions } from "./lib/useDuffelCardFormActions";
4
+ export declare const DuffelCardForm: React.ForwardRefExoticComponent<DuffelCardFormProps & React.RefAttributes<DuffelCardFormActions>>;
@@ -0,0 +1 @@
1
+ export declare function postMessageToCreateCardForTemporaryUse(iFrameReference: React.RefObject<HTMLIFrameElement>, baseUrl: URL): void;
@@ -0,0 +1 @@
1
+ export declare function postMessageToSaveCard(iFrameReference: React.RefObject<HTMLIFrameElement>, baseUrl: URL): void;
@@ -0,0 +1,2 @@
1
+ import { DuffelCardFormStyles } from "./types";
2
+ export declare function postMessageWithStyles(iFrameReference: React.RefObject<HTMLIFrameElement>, baseUrl: URL, styles: DuffelCardFormStyles | undefined): void;
@@ -1,7 +1,21 @@
1
1
  interface CommonCardData {
2
+ /**
3
+ * Duffel's unique identifier for the resource
4
+ */
2
5
  id: string;
6
+ /**
7
+ * Whether the card was created in live mode. This field will be set to true
8
+ * if the card was created in live mode, or false if it was created in test mode.
9
+ */
10
+ live_mode: boolean;
11
+ /**
12
+ * Last 4 digits of the card number.
13
+ */
3
14
  last_4_digits: string;
4
- live_mode: false;
15
+ /**
16
+ * Card brand name.
17
+ */
18
+ brand: "visa" | "mastercard" | "uatp" | "american_express" | "diners_club" | "jcb" | "discover";
5
19
  }
6
20
  interface CardActionError {
7
21
  status: number;
@@ -12,11 +26,16 @@ export interface SecurityPolicyViolationData {
12
26
  }
13
27
  export interface CreateCardForTemporaryUseData extends CommonCardData {
14
28
  saved: false;
15
- /** The card will no longer be available for use after this time. */
29
+ /**
30
+ * The ISO 8601 datetime at which the card will be automatically deleted.
31
+ */
16
32
  unavailable_at: string;
17
33
  }
18
34
  export interface SaveCardData extends CommonCardData {
19
35
  saved: true;
36
+ /**
37
+ * The ISO 8601 datetime at which the card will be automatically deleted.
38
+ */
20
39
  unavailable_at: null;
21
40
  }
22
41
  export interface SaveCardError extends CardActionError {
@@ -67,10 +86,11 @@ export interface DuffelCardFormProps {
67
86
  * The card intent defines what the form is meant to look like.
68
87
  * It can be one of:
69
88
  *
70
- * - `to-create-card-for-temporary-use`: The full form will be shown. You may also use this intent for the use case of using and saving the card.
71
- * - `to-use-saved-card`: When using this intent also provide the saved card ID. Only a cvv field will be rendered.
72
- * - `to-save-card`: The form will be shown without the cvv field. This only allows you to save a card for future use,
73
- * but not create an id for immediate, temporary use. For the use case of saving during checkout or save + use, use the `to-create-card-for-temporary-use` intent.
89
+ * - `to-create-card-for-temporary-use`: The full form will be shown. You may also use this intent for the use case of saving and using the card.
90
+ * - `to-use-saved-card`: Only a CVC field will be shown. When using this intent a saved card ID is required.
91
+ * - `to-save-card`: The form will be shown without the CVC field. This only allows you to save a card for future use,
92
+ * but not create an ID for immediate, temporary use. For the use case of saving and using during checkout, use the `to-create-card-for-temporary-use` intent.
93
+
74
94
  */
75
95
  intent: DuffelCardFormIntent;
76
96
  /**
@@ -1,9 +1,10 @@
1
+ /// <reference types="@duffel/api" />
1
2
  import { OfferRequest } from "@duffel/api/types";
2
3
  import * as React from "react";
3
4
  import { NGSOfferRow } from "./lib/group-offers-for-ngs-view";
4
5
  export declare function useSort(): {
5
- sortOption: any;
6
- setSortOption: any;
6
+ sortOption: "duration-asc" | "duration-desc" | "1-asc" | "1-desc" | "2-asc" | "2-desc" | "3-asc" | "3-desc" | "4-asc" | "4-desc" | "5-asc" | "5-desc" | "recommended";
7
+ setSortOption: React.Dispatch<React.SetStateAction<"duration-asc" | "duration-desc" | "1-asc" | "1-desc" | "2-asc" | "2-desc" | "3-asc" | "3-desc" | "4-asc" | "4-desc" | "5-asc" | "5-desc" | "recommended">>;
7
8
  sortingFunction: (rows: NGSOfferRow[]) => NGSOfferRow[];
8
9
  };
9
10
  export interface DuffelNGSViewProps {
@@ -0,0 +1,13 @@
1
+ import { Filters } from "./lib/filter-results";
2
+ interface FilterControlsProps {
3
+ selectedOwner?: string;
4
+ airlines: Filters["airlines"];
5
+ airlinesFilter: Filters["airlines"];
6
+ setAirlinesFilter: (airlines: Filters["airlines"]) => void;
7
+ timesFilter: Filters["times"];
8
+ setTimesFilter: (times: Filters["times"]) => void;
9
+ stopsFilter: Filters["stops"];
10
+ setStopsFilter: (stops: Filters["stops"]) => void;
11
+ }
12
+ export declare const FilterControls: React.FC<FilterControlsProps>;
13
+ export {};
@@ -1,3 +1,4 @@
1
+ /// <reference types="@duffel/api" />
1
2
  import { Offer } from "@duffel/api/types";
2
3
  import * as React from "react";
3
4
  export interface NGSSliceFareCardProps {
@@ -1,3 +1,4 @@
1
+ /// <reference types="@duffel/api" />
1
2
  import * as React from "react";
2
3
  import { NGSShelf } from "./lib";
3
4
  import { NGSOfferRow } from "./lib/group-offers-for-ngs-view";
@@ -1,3 +1,4 @@
1
+ /// <reference types="@duffel/api" />
1
2
  import { OfferSlice } from "@duffel/api/types";
2
3
  import React from "react";
3
4
  export interface SliceSummaryProps {
@@ -1,6 +1,7 @@
1
- import { Offer } from "@duffel/api/types";
1
+ /// <reference types="@duffel/api" />
2
+ import { Offer, OfferRequest } from "@duffel/api/types";
2
3
  import { NGSOfferRow } from "./group-offers-for-ngs-view";
3
4
  export declare const deduplicateMappedOffersByFareBrand: (offersMap: Record<string, NGSOfferRow>) => Record<string, NGSOfferRow>;
4
5
  export declare const getFareBrandNameForOffer: (offer: Omit<Offer, "available_services">, sliceIndex?: number) => string;
5
- export declare const getCheapestOffer: (offers: OfferRequest) => any;
6
- export declare const groupByFareBrandName: (offers: OfferRequest) => OfferRequest[];
6
+ export declare const getCheapestOffer: (offers: OfferRequest["offers"]) => Omit<Offer, "available_services">;
7
+ export declare const groupByFareBrandName: (offers: OfferRequest["offers"]) => Omit<Offer, "available_services">[][];
@@ -1,3 +1,4 @@
1
+ /// <reference types="@duffel/api" />
1
2
  import { OfferRequest, OfferSlice } from "@duffel/api/types";
2
3
  export declare function doesSliceHaveMixedCabins(slice: OfferSlice): boolean;
3
- export declare function doOffersHaveMixedCabin(offer: OfferRequest["offers"] | null, sliceIndex?: number): any;
4
+ export declare function doOffersHaveMixedCabin(offer: OfferRequest["offers"] | null, sliceIndex?: number): boolean;
@@ -1,3 +1,4 @@
1
+ /// <reference types="@duffel/api" />
1
2
  import { NGSTableProps } from "../NGSTable";
2
3
  export interface Filters {
3
4
  airlines: Array<{
@@ -10,4 +11,4 @@ export interface Filters {
10
11
  arrival: [number, number];
11
12
  };
12
13
  }
13
- export declare function filterResults(offers: NGSTableProps["offers"], currentSliceIndex: number, filters: Filters): any;
14
+ export declare function filterResults(offers: NGSTableProps["offers"], currentSliceIndex: number, filters: Filters): Omit<import("@duffel/api/types").Offer, "available_services">[];
@@ -1,3 +1,4 @@
1
+ /// <reference types="@duffel/api" />
1
2
  import { OfferRequest } from "@duffel/api/booking/OfferRequests/OfferRequestsTypes";
2
3
  import { Filters } from "./filter-results";
3
4
  export declare function getInitialFilterValues(offerRequest: OfferRequest): Filters;
@@ -1,7 +1,8 @@
1
+ import { OfferAvailableServiceBaggageMetadata, OfferSlice, OfferSliceSegmentPassenger } from "@duffel/api/types";
1
2
  /**
2
3
  * Returns the passenger baggages object with the largest quantity of baggages
3
4
  * of a specified type for a slice. Baggage quantity can (very occasionally)
4
5
  * vary across passengers and segments in a slice, so the 'max' baggages can
5
6
  * be used as the baseline for a slice.
6
7
  */
7
- export declare const getMaxBaggagesForOfferSlice: (offerSlice: OfferSlice, type: OfferAvailableServiceBaggageMetadata) => OfferSliceSegmentPassenger;
8
+ export declare const getMaxBaggagesForOfferSlice: (offerSlice: OfferSlice, type: OfferAvailableServiceBaggageMetadata["type"]) => OfferSliceSegmentPassenger["baggages"];
@@ -1,3 +1,4 @@
1
+ /// <reference types="@duffel/api" />
1
2
  import { OfferRequest } from "@duffel/api/types";
2
3
  import { Filters } from "./filter-results";
3
4
  export declare function getAirlines(offerRequest: OfferRequest): Filters["airlines"];
@@ -1,5 +1,6 @@
1
+ /// <reference types="@duffel/api" />
1
2
  import { OfferRequest, OfferSlice } from "@duffel/api/types";
2
3
  import { NGSShelf } from ".";
3
4
  export type NGSOfferRow = Record<"slice", OfferSlice> & Record<NGSShelf, OfferRequest["offers"] | null>;
4
5
  export declare const getNGSSliceKey: (slice: OfferSlice, ownerId: string | null, includeFareBrand?: boolean) => string;
5
- export declare const groupOffersForNGSView: (offers: OfferRequest, sliceIndex: number, previousSliceKeys: string[]) => NGSOfferRow[];
6
+ export declare const groupOffersForNGSView: (offers: OfferRequest["offers"], sliceIndex: number, previousSliceKeys: string[]) => NGSOfferRow[];
@@ -1,3 +1,4 @@
1
+ /// <reference types="@duffel/api" />
1
2
  import { IconName } from "@components/shared/Icon";
2
3
  import { OfferSlice, SeatType } from "@duffel/api/types";
3
4
  export declare const NGS_SHELVES: readonly [1, 2, 3, 4, 5];
@@ -1,5 +1,6 @@
1
1
  import { OfferRequest } from "@duffel/api/types";
2
+ import { NGSShelf } from ".";
2
3
  import { NGSOfferRow } from "./group-offers-for-ngs-view";
3
4
  export type SortDirection = "asc" | "desc";
4
5
  export declare const getCheapestOfferAmount: (offers: OfferRequest["offers"] | null) => number | null;
5
- export declare const sortNGSRowsByShelfPrice: (rows: NGSOfferRow[], sortShelf: OfferSlice, sortDirection: SortDirection) => NGSOfferRow[];
6
+ export declare const sortNGSRowsByShelfPrice: (rows: NGSOfferRow[], sortShelf: NGSShelf, sortDirection: SortDirection) => NGSOfferRow[];
@@ -1,15 +1,28 @@
1
+ /// <reference types="@duffel/api" />
1
2
  import { OfferRequest } from "@duffel/api/types";
2
3
  export declare function useFilters(offerRequest: OfferRequest, selectedSliceKeys: string[]): {
3
4
  airlinesFilterOptions: {
4
5
  iata_code: string;
5
6
  name: string;
6
7
  }[];
7
- airlinesFilter: any;
8
- timesFilter: any;
9
- stopsFilter: any;
10
- setAirlinesFilter: any;
11
- setTimesFilter: any;
12
- setStopsFilter: any;
8
+ airlinesFilter: {
9
+ iata_code: string;
10
+ name: string;
11
+ }[];
12
+ timesFilter: {
13
+ departure: [number, number];
14
+ arrival: [number, number];
15
+ };
16
+ stopsFilter: "direct-only" | "1-stop-at-most" | "2-stops-at-most" | "any";
17
+ setAirlinesFilter: import("react").Dispatch<import("react").SetStateAction<{
18
+ iata_code: string;
19
+ name: string;
20
+ }[]>>;
21
+ setTimesFilter: import("react").Dispatch<import("react").SetStateAction<{
22
+ departure: [number, number];
23
+ arrival: [number, number];
24
+ }>>;
25
+ setStopsFilter: import("react").Dispatch<import("react").SetStateAction<"direct-only" | "1-stop-at-most" | "2-stops-at-most" | "any">>;
13
26
  clearFilters: () => void;
14
- filteredOffers: any;
27
+ filteredOffers: Omit<import("@duffel/api/types").Offer, "available_services">[];
15
28
  };
@@ -0,0 +1,13 @@
1
+ import { DuffelPaymentsProps } from "./DuffelPayments";
2
+ declare global {
3
+ namespace JSX {
4
+ interface IntrinsicElements {
5
+ "duffel-payments": React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
6
+ }
7
+ }
8
+ }
9
+ type DuffelPaymentsCustomElementRenderArguments = Pick<DuffelPaymentsProps, "paymentIntentClientToken" | "styles">;
10
+ export declare function renderDuffelPaymentsCustomElement(props: DuffelPaymentsCustomElementRenderArguments): void;
11
+ export declare function onDuffelPaymentsSuccessfulPayment(onSuccessfulPayment: DuffelPaymentsProps["onSuccessfulPayment"]): void;
12
+ export declare function onDuffelPaymentsFailedPayment(onFailedPayment: DuffelPaymentsProps["onFailedPayment"]): void;
13
+ export {};
@@ -0,0 +1,13 @@
1
+ import { MapboxPlacesLookupProps } from "./MapboxPlacesLookup";
2
+ declare const CUSTOM_ELEMENT_TAG = "duffel-mapbox-places-lookup";
3
+ declare global {
4
+ namespace JSX {
5
+ interface IntrinsicElements {
6
+ [CUSTOM_ELEMENT_TAG]: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
7
+ }
8
+ }
9
+ }
10
+ type MapboxPlacesLookupCustomElementRenderArguments = Pick<MapboxPlacesLookupProps, "mapboxPublicKey" | "placeholder" | "inputClassName">;
11
+ export declare function renderMapboxPlacesLookupCustomElement(props: MapboxPlacesLookupCustomElementRenderArguments): void;
12
+ export declare function onMapboxPlacesLookupPlaceSelected(onPlaceSelected: MapboxPlacesLookupProps["onPlaceSelected"]): void;
13
+ export {};
@@ -1,3 +1,4 @@
1
+ /// <reference types="@duffel/api" />
1
2
  import { OfferSlice as OfferSliceType } from "@duffel/api/types";
2
3
  import React from "react";
3
4
  export interface OfferSliceProps {
@@ -0,0 +1,7 @@
1
+ /// <reference types="@duffel/api" />
2
+ import { OfferSlice } from "@duffel/api/types";
3
+ interface OfferSliceConditionsProps {
4
+ slice: OfferSlice;
5
+ }
6
+ export declare const OfferSliceConditions: React.FC<OfferSliceConditionsProps>;
7
+ export {};
@@ -0,0 +1,9 @@
1
+ import { SliceDetailItemChangeStatus, TravelDetails } from "src/types/TravelDetails";
2
+ export interface SliceDetailsTravelItemProps {
3
+ changeStatus?: SliceDetailItemChangeStatus;
4
+ travelDetails: TravelDetails<"offer" | "order">;
5
+ highlightAll?: boolean;
6
+ keysToHighlight?: string[];
7
+ }
8
+ export declare const getTerminalString: (terminal?: string | null) => string;
9
+ export declare const OfferSliceDetailTravelItem: React.FC<SliceDetailsTravelItemProps>;
@@ -1,6 +1,6 @@
1
1
  import { Color } from "@lib/colors";
2
2
  export declare const getHighlightStyles: (highlightAll: boolean, key?: string, keysToHighlight?: string[], highlightColor?: Color) => {
3
- className?: any;
3
+ className?: string | undefined;
4
4
  style?: {
5
5
  backgroundColor: string;
6
6
  } | undefined;
@@ -0,0 +1,7 @@
1
+ import { OfferSliceProps } from "@components/OfferSlice/OfferSlice";
2
+ import { ModalProps } from "@components/shared/Modal";
3
+ interface OfferSliceModalProps extends Pick<ModalProps, "isOpen" | "onClose"> {
4
+ slice: OfferSliceProps["slice"];
5
+ }
6
+ export declare const OfferSliceModal: React.FC<OfferSliceModalProps>;
7
+ export {};
@@ -1,7 +1,8 @@
1
+ /// <reference types="@duffel/api" />
1
2
  import * as React from "react";
2
3
  import { IconName } from "@components/shared/Icon";
3
- import { StaysAccommodation } from "@duffel/api/types";
4
- export declare const amenityIcon: (type: StaysAmenity) => IconName;
4
+ import { StaysAccommodation, StaysAmenity } from "@duffel/api/types";
5
+ export declare const amenityIcon: (type: StaysAmenity["type"]) => IconName;
5
6
  export interface StaysAmenitiesProps {
6
7
  amenities: StaysAccommodation["amenities"];
7
8
  }
@@ -0,0 +1,12 @@
1
+ import { StaysAmenitiesProps } from "./StaysAmenities";
2
+ declare const CUSTOM_ELEMENT_TAG = "duffel-stays-amenities";
3
+ type CustomElementRenderArguments = StaysAmenitiesProps;
4
+ declare global {
5
+ namespace JSX {
6
+ interface IntrinsicElements {
7
+ [CUSTOM_ELEMENT_TAG]: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
8
+ }
9
+ }
10
+ }
11
+ export declare function renderDuffelStaysAmenitiesCustomElement(props: CustomElementRenderArguments): void;
12
+ export {};
@@ -0,0 +1,14 @@
1
+ import { StaysRatingProps } from "./StaysRating";
2
+ declare const CUSTOM_ELEMENT_TAG = "duffel-stays-rating";
3
+ type CustomElementRenderArguments = StaysRatingProps & {
4
+ elementId: string;
5
+ };
6
+ declare global {
7
+ namespace JSX {
8
+ interface IntrinsicElements {
9
+ [CUSTOM_ELEMENT_TAG]: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
10
+ }
11
+ }
12
+ }
13
+ export declare function renderDuffelStaysRatingCustomElement(props: CustomElementRenderArguments): void;
14
+ export {};
@@ -1,3 +1,4 @@
1
+ /// <reference types="@duffel/api" />
1
2
  import * as React from "react";
2
3
  import { StaysRoomRate } from "@duffel/api/types";
3
4
  export interface StaysRoomRateCardProps {
@@ -0,0 +1,14 @@
1
+ import { StaysRoomRateCardProps } from "./StaysRoomRateCard";
2
+ declare const CUSTOM_ELEMENT_TAG = "duffel-stays-room-rate-card";
3
+ type CustomElementRenderArguments = StaysRoomRateCardProps & {
4
+ elementId: string;
5
+ };
6
+ declare global {
7
+ namespace JSX {
8
+ interface IntrinsicElements {
9
+ [CUSTOM_ELEMENT_TAG]: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
10
+ }
11
+ }
12
+ }
13
+ export declare function renderDuffelStaysRoomRateCardCustomElement(props: CustomElementRenderArguments): void;
14
+ export {};
@@ -0,0 +1,12 @@
1
+ /// <reference types="@duffel/api" />
2
+ import { StaysAccommodation, StaysBooking } from "@duffel/api/types";
3
+ export interface StaysSummaryProps {
4
+ accommodation: StaysAccommodation;
5
+ checkInDate: Date;
6
+ checkOutDate: Date;
7
+ numRooms?: number;
8
+ supportedLoyaltyProgramme?: StaysBooking["supported_loyalty_programme"];
9
+ loyaltyProgrammeAccountNumber?: string | null;
10
+ accommodationSpecialRequests?: string | null;
11
+ }
12
+ export declare const StaysSummary: React.FC<React.PropsWithChildren<StaysSummaryProps>>;
@@ -0,0 +1,12 @@
1
+ import { StaysSummaryProps } from "./StaysSummary";
2
+ declare const CUSTOM_ELEMENT_TAG = "duffel-stays-summary";
3
+ type CustomElementRenderArguments = StaysSummaryProps;
4
+ declare global {
5
+ namespace JSX {
6
+ interface IntrinsicElements {
7
+ [CUSTOM_ELEMENT_TAG]: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
8
+ }
9
+ }
10
+ }
11
+ export declare function renderDuffelStaysSummaryCustomElement(props: CustomElementRenderArguments): void;
12
+ export {};
@@ -1 +1,2 @@
1
- export declare const getRateLabel: (paymentMethod: StaysRate, paymentType: StaysRate) => string | undefined;
1
+ import { StaysRate } from "@duffel/api/types";
2
+ export declare const getRateLabel: (paymentMethod: StaysRate["payment_method"], paymentType: StaysRate["payment_type"]) => string | undefined;
@@ -1,4 +1,5 @@
1
1
  import { IconName } from "@components/shared/Icon";
2
+ import { StaysRoomRate } from "@duffel/api/types";
2
3
  export declare const LOYALTY_PROGRAMS_NAME_MAP: {
3
4
  wyndham_rewards: string;
4
5
  choice_privileges: string;
@@ -24,5 +25,5 @@ export declare const SOURCE_NAME_MAP: {
24
25
  travelport: string;
25
26
  duffel_hotel_group: string;
26
27
  };
27
- export declare const getBoardTypeLabel: (boardType: StaysRoomRate) => any;
28
- export declare const boardTypeIcon: (boardType: StaysRoomRate) => IconName;
28
+ export declare const getBoardTypeLabel: (boardType: StaysRoomRate["board_type"]) => "Room only, no meals" | "Breakfast included" | "Half board" | "Full board" | "All inclusive";
29
+ export declare const boardTypeIcon: (boardType: StaysRoomRate["board_type"]) => IconName;
@@ -9,5 +9,5 @@ export declare class ErrorBoundary extends React.Component<{
9
9
  hasError: boolean;
10
10
  };
11
11
  componentDidCatch(error: Error): void;
12
- render(): any;
12
+ render(): string | number | boolean | Iterable<React.ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
13
13
  }