@duffel/components 2.7.20 → 3.0.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.
Files changed (345) hide show
  1. package/.circleci/config.yml +67 -0
  2. package/.eslintrc.js +47 -0
  3. package/.github/renovate.json +16 -0
  4. package/.github/workflows/autoapprove.yml +18 -0
  5. package/.github/workflows/release.yml +89 -0
  6. package/.husky/post-commit +4 -0
  7. package/.husky/pre-commit +4 -0
  8. package/.nvmrc +1 -0
  9. package/.prettierignore +2 -0
  10. package/.storybook/Storyshots.test.js +3 -0
  11. package/.storybook/__snapshots__/Storyshots.test.js.snap +48318 -0
  12. package/.storybook/main.ts +33 -0
  13. package/.storybook/preview.tsx +28 -0
  14. package/.tool-versions +1 -0
  15. package/CONTRIBUTING.md +83 -0
  16. package/README.md +53 -15
  17. package/__mocks__/styleMock.js +6 -0
  18. package/babel.config.js +20 -0
  19. package/commitlint.config.js +4 -0
  20. package/config/esbuild.base.config.js +18 -0
  21. package/config/esbuild.cdn.config.js +51 -0
  22. package/config/esbuild.dev.config.js +46 -0
  23. package/config/esbuild.react.config.js +42 -0
  24. package/jest.config.ts +14 -0
  25. package/package.json +135 -193
  26. package/react-dist/components/DuffelAncillaries/Card.d.ts +14 -0
  27. package/react-dist/components/DuffelAncillaries/Counter.d.ts +10 -0
  28. package/react-dist/components/DuffelAncillaries/DuffelAncillaries.d.ts +3 -0
  29. package/react-dist/components/DuffelAncillaries/DuffelAncillariesCustomElement.d.ts +13 -0
  30. package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionCard.d.ts +11 -0
  31. package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionController.d.ts +13 -0
  32. package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionModal.d.ts +11 -0
  33. package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionModalBody.d.ts +11 -0
  34. package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionModalBodyPassenger.d.ts +13 -0
  35. package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionModalFooter.d.ts +14 -0
  36. package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionModalHeader.d.ts +9 -0
  37. package/react-dist/components/DuffelAncillaries/bags/IncludedBaggageBanner.d.ts +7 -0
  38. package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionCard.d.ts +10 -0
  39. package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModal.d.ts +11 -0
  40. package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBody.d.ts +7 -0
  41. package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBodyListItem.d.ts +4 -0
  42. package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalFooter.d.ts +11 -0
  43. package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalHeader.d.ts +2 -0
  44. package/react-dist/components/DuffelAncillaries/seats/Amenity.d.ts +6 -0
  45. package/react-dist/components/DuffelAncillaries/seats/DeckSelect.d.ts +15 -0
  46. package/react-dist/components/DuffelAncillaries/seats/Element.d.ts +15 -0
  47. package/react-dist/components/DuffelAncillaries/seats/EmptyElement.d.ts +2 -0
  48. package/react-dist/components/DuffelAncillaries/seats/ExitElement.d.ts +6 -0
  49. package/react-dist/components/DuffelAncillaries/seats/Legend.d.ts +12 -0
  50. package/react-dist/components/DuffelAncillaries/seats/Row.d.ts +13 -0
  51. package/react-dist/components/DuffelAncillaries/seats/RowSection.d.ts +17 -0
  52. package/react-dist/components/DuffelAncillaries/seats/SeatElement.d.ts +13 -0
  53. package/react-dist/components/DuffelAncillaries/seats/SeatInfo.d.ts +7 -0
  54. package/react-dist/components/DuffelAncillaries/seats/SeatMap.d.ts +12 -0
  55. package/react-dist/components/DuffelAncillaries/seats/SeatMapUnavailable.d.ts +2 -0
  56. package/react-dist/components/DuffelAncillaries/seats/SeatSelectionCard.d.ts +13 -0
  57. package/react-dist/components/DuffelAncillaries/seats/SeatSelectionModal.d.ts +13 -0
  58. package/react-dist/components/DuffelAncillaries/seats/SeatSelectionModalBody.d.ts +4 -0
  59. package/react-dist/components/DuffelAncillaries/seats/SeatSelectionModalFooter.d.ts +16 -0
  60. package/react-dist/components/DuffelAncillaries/seats/SeatSelectionModalHeader.d.ts +10 -0
  61. package/react-dist/components/DuffelAncillaries/seats/SeatUnavailable.d.ts +5 -0
  62. package/react-dist/components/DuffelPayments/DuffelPayments.d.ts +11 -0
  63. package/react-dist/components/DuffelPayments/DuffelPaymentsCustomElement.d.ts +14 -0
  64. package/react-dist/components/shared/AnimatedLoaderEllipsis.d.ts +2 -0
  65. package/react-dist/components/shared/Button.d.ts +23 -0
  66. package/react-dist/components/shared/ErrorBoundary.d.ts +13 -0
  67. package/react-dist/components/shared/FetchOfferErrorState.d.ts +5 -0
  68. package/react-dist/components/shared/Icon.d.ts +44 -0
  69. package/react-dist/components/shared/IconButton.d.ts +16 -0
  70. package/react-dist/components/shared/Modal.d.ts +11 -0
  71. package/react-dist/components/shared/NonIdealState.d.ts +4 -0
  72. package/react-dist/components/shared/Stamp.d.ts +7 -0
  73. package/react-dist/components/shared/Tabs.d.ts +16 -0
  74. package/react-dist/custom-elements.d.ts +6 -0
  75. package/react-dist/custom-elements.js +37 -0
  76. package/react-dist/custom-elements.js.map +7 -0
  77. package/react-dist/index.d.ts +7 -0
  78. package/react-dist/index.js +37 -0
  79. package/react-dist/index.js.map +7 -0
  80. package/react-dist/lib/captureErrorInSentry.d.ts +1 -0
  81. package/react-dist/lib/compileCreateOrderPayload.d.ts +14 -0
  82. package/react-dist/lib/createPriceFormatters.d.ts +12 -0
  83. package/react-dist/lib/fetchFromDuffelAPI.d.ts +8 -0
  84. package/react-dist/lib/fetchFromFixtures.d.ts +4 -0
  85. package/react-dist/lib/formatAvailableServices.d.ts +12 -0
  86. package/react-dist/lib/formatDate.d.ts +2 -0
  87. package/react-dist/lib/formatSeatMaps.d.ts +4 -0
  88. package/react-dist/lib/getBaggageServiceDescription.d.ts +2 -0
  89. package/react-dist/lib/getCabinsForSegmentAndDeck.d.ts +2 -0
  90. package/react-dist/lib/getCurrencyForSeatMaps.d.ts +10 -0
  91. package/react-dist/lib/getCurrencyForServices.d.ts +11 -0
  92. package/react-dist/lib/getFirstSeatElementMatchingCriteria.d.ts +3 -0
  93. package/react-dist/lib/getPassengerBySegmentList.d.ts +6 -0
  94. package/react-dist/lib/getPassengerInitials.d.ts +1 -0
  95. package/react-dist/lib/getPassengerMapById.d.ts +3 -0
  96. package/react-dist/lib/getPassengerName.d.ts +3 -0
  97. package/react-dist/lib/getRowNumber.d.ts +2 -0
  98. package/react-dist/lib/getSegmentList.d.ts +2 -0
  99. package/react-dist/lib/getServicePriceMapById.d.ts +3 -0
  100. package/react-dist/lib/getSymbols.d.ts +2 -0
  101. package/react-dist/lib/getTotalAmountForServices.d.ts +6 -0
  102. package/react-dist/lib/getTotalQuantity.d.ts +2 -0
  103. package/react-dist/lib/hasService.d.ts +2 -0
  104. package/react-dist/lib/hasServiceOfSameMetadataTypeAlreadyBeenSelected.d.ts +3 -0
  105. package/react-dist/lib/hasWings.d.ts +2 -0
  106. package/react-dist/lib/isBaggageService.d.ts +2 -0
  107. package/react-dist/lib/isCancelForAnyReasonService.d.ts +2 -0
  108. package/react-dist/lib/isFixtureOfferId.d.ts +2 -0
  109. package/react-dist/lib/isPayloadComplete.d.ts +2 -0
  110. package/react-dist/lib/isSeatElement.d.ts +2 -0
  111. package/react-dist/lib/logging.d.ts +46 -0
  112. package/react-dist/lib/moneyStringFormatter.d.ts +8 -0
  113. package/react-dist/lib/offerIsExpired.d.ts +2 -0
  114. package/react-dist/lib/retrieveOffer.d.ts +2 -0
  115. package/react-dist/lib/retrieveOfferFromDuffelAPI.d.ts +1 -0
  116. package/react-dist/lib/retrieveSeatMaps.d.ts +2 -0
  117. package/react-dist/lib/retrieveSeatMapsFromDuffelAPI.d.ts +1 -0
  118. package/react-dist/lib/setBodyScrollability.d.ts +1 -0
  119. package/react-dist/lib/validateProps.d.ts +7 -0
  120. package/react-dist/lib/withPlural.d.ts +1 -0
  121. package/react-dist/types/Aircraft.d.ts +14 -0
  122. package/react-dist/types/Airline.d.ts +14 -0
  123. package/react-dist/types/Airport.d.ts +44 -0
  124. package/react-dist/types/City.d.ts +18 -0
  125. package/react-dist/types/CreateOrderPayload.d.ts +72 -0
  126. package/react-dist/types/CurrencyConversion.d.ts +10 -0
  127. package/react-dist/types/DuffelAncillariesProps.d.ts +70 -0
  128. package/react-dist/types/Offer.d.ts +711 -0
  129. package/react-dist/types/Order.d.ts +8 -0
  130. package/react-dist/types/Place.d.ts +8 -0
  131. package/react-dist/types/SeatMap.d.ts +190 -0
  132. package/react-dist/types/index.d.ts +11 -0
  133. package/scripts/generate-fixture.ts +200 -0
  134. package/scripts/upload-to-cdn.sh +34 -0
  135. package/scripts.tsconfig.json +11 -0
  136. package/src/components/DuffelAncillaries/Card.tsx +126 -0
  137. package/src/components/DuffelAncillaries/Counter.tsx +40 -0
  138. package/src/components/DuffelAncillaries/DuffelAncillaries.tsx +344 -0
  139. package/src/components/DuffelAncillaries/DuffelAncillariesCustomElement.tsx +124 -0
  140. package/src/components/DuffelAncillaries/bags/BaggageSelectionCard.tsx +96 -0
  141. package/src/components/DuffelAncillaries/bags/BaggageSelectionController.tsx +88 -0
  142. package/src/components/DuffelAncillaries/bags/BaggageSelectionModal.tsx +81 -0
  143. package/src/components/DuffelAncillaries/bags/BaggageSelectionModalBody.tsx +60 -0
  144. package/src/components/DuffelAncillaries/bags/BaggageSelectionModalBodyPassenger.tsx +122 -0
  145. package/src/components/DuffelAncillaries/bags/BaggageSelectionModalFooter.tsx +81 -0
  146. package/src/components/DuffelAncillaries/bags/BaggageSelectionModalHeader.tsx +76 -0
  147. package/src/components/DuffelAncillaries/bags/IncludedBaggageBanner.tsx +51 -0
  148. package/src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionCard.tsx +90 -0
  149. package/src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModal.tsx +63 -0
  150. package/src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBody.tsx +56 -0
  151. package/src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBodyListItem.tsx +11 -0
  152. package/src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalFooter.tsx +74 -0
  153. package/src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalHeader.tsx +9 -0
  154. package/src/components/DuffelAncillaries/seats/Amenity.tsx +21 -0
  155. package/src/components/DuffelAncillaries/seats/DeckSelect.tsx +27 -0
  156. package/src/components/DuffelAncillaries/seats/Element.tsx +52 -0
  157. package/src/components/DuffelAncillaries/seats/EmptyElement.tsx +5 -0
  158. package/src/components/DuffelAncillaries/seats/ExitElement.tsx +17 -0
  159. package/src/components/DuffelAncillaries/seats/Legend.tsx +60 -0
  160. package/src/components/DuffelAncillaries/seats/Row.tsx +47 -0
  161. package/src/components/DuffelAncillaries/seats/RowSection.tsx +78 -0
  162. package/src/components/DuffelAncillaries/seats/SeatElement.tsx +120 -0
  163. package/src/components/DuffelAncillaries/seats/SeatInfo.tsx +32 -0
  164. package/src/components/DuffelAncillaries/seats/SeatMap.tsx +81 -0
  165. package/src/components/DuffelAncillaries/seats/SeatMapUnavailable.tsx +21 -0
  166. package/src/components/DuffelAncillaries/seats/SeatSelectionCard.tsx +103 -0
  167. package/src/components/DuffelAncillaries/seats/SeatSelectionModal.tsx +142 -0
  168. package/src/components/DuffelAncillaries/seats/SeatSelectionModalBody.tsx +13 -0
  169. package/src/components/DuffelAncillaries/seats/SeatSelectionModalFooter.tsx +82 -0
  170. package/src/components/DuffelAncillaries/seats/SeatSelectionModalHeader.tsx +87 -0
  171. package/src/components/DuffelAncillaries/seats/SeatUnavailable.tsx +14 -0
  172. package/src/components/DuffelPayments/DuffelPayments.tsx +218 -0
  173. package/src/components/DuffelPayments/DuffelPaymentsCustomElement.tsx +130 -0
  174. package/src/components/shared/AnimatedLoaderEllipsis.tsx +5 -0
  175. package/src/components/shared/Button.tsx +63 -0
  176. package/src/components/shared/ErrorBoundary.tsx +54 -0
  177. package/src/components/shared/FetchOfferErrorState.tsx +35 -0
  178. package/src/components/shared/Icon.tsx +152 -0
  179. package/src/components/shared/IconButton.tsx +42 -0
  180. package/src/components/shared/Modal.tsx +40 -0
  181. package/src/components/shared/NonIdealState.tsx +28 -0
  182. package/src/components/shared/Stamp.tsx +29 -0
  183. package/src/components/shared/Tabs.tsx +36 -0
  184. package/src/custom-elements.ts +13 -0
  185. package/src/examples/client-side/README.md +30 -0
  186. package/src/examples/client-side/index.html +57 -0
  187. package/src/examples/full-stack/README.md +34 -0
  188. package/src/examples/full-stack/index.html +48 -0
  189. package/src/examples/full-stack/server.mjs +158 -0
  190. package/src/examples/just-typescript/README.md +37 -0
  191. package/src/examples/just-typescript/package.json +16 -0
  192. package/src/examples/just-typescript/src/index.html +23 -0
  193. package/src/examples/just-typescript/src/index.ts +36 -0
  194. package/src/examples/just-typescript/yarn.lock +154 -0
  195. package/src/examples/payments-custom-element/README.md +17 -0
  196. package/src/examples/payments-custom-element/index.html +43 -0
  197. package/src/examples/payments-just-typescript/README.md +37 -0
  198. package/src/examples/payments-just-typescript/package.json +16 -0
  199. package/src/examples/payments-just-typescript/src/index.html +23 -0
  200. package/src/examples/payments-just-typescript/src/index.ts +18 -0
  201. package/src/examples/payments-just-typescript/yarn.lock +154 -0
  202. package/src/examples/react-app/README.md +37 -0
  203. package/src/examples/react-app/package.json +20 -0
  204. package/src/examples/react-app/src/index.html +19 -0
  205. package/src/examples/react-app/src/index.tsx +48 -0
  206. package/src/examples/react-app/yarn.lock +219 -0
  207. package/src/fixtures/offers/off_0000AUde3KwTztSRK1cznH.json +497 -0
  208. package/src/fixtures/offers/off_0000AVx4lUFFKW8PsPeQeQ.json +307 -0
  209. package/src/fixtures/offers/off_1.json +497 -0
  210. package/src/fixtures/passengers/mock_passengers.ts +26 -0
  211. package/src/fixtures/seat-maps/off_0000AUde3KwTztSRK1cznH.json +6852 -0
  212. package/src/fixtures/seat-maps/off_0000AVx4lUFFKW8PsPeQeQ.json +1 -0
  213. package/src/fixtures/seat-maps/off_1.json +6852 -0
  214. package/src/index.ts +7 -0
  215. package/src/lib/captureErrorInSentry.ts +42 -0
  216. package/src/lib/compileCreateOrderPayload.ts +63 -0
  217. package/src/lib/createPriceFormatters.ts +73 -0
  218. package/src/lib/fetchFromDuffelAPI.ts +54 -0
  219. package/src/lib/fetchFromFixtures.ts +18 -0
  220. package/src/lib/formatAvailableServices.ts +91 -0
  221. package/src/lib/formatDate.ts +20 -0
  222. package/src/lib/formatSeatMaps.ts +81 -0
  223. package/src/lib/getBaggageServiceDescription.ts +42 -0
  224. package/src/lib/getCabinsForSegmentAndDeck.ts +4 -0
  225. package/src/lib/getCurrencyForSeatMaps.ts +22 -0
  226. package/src/lib/getCurrencyForServices.ts +24 -0
  227. package/src/lib/getFirstSeatElementMatchingCriteria.ts +22 -0
  228. package/src/lib/getPassengerBySegmentList.ts +10 -0
  229. package/src/lib/getPassengerInitials.ts +6 -0
  230. package/src/lib/getPassengerMapById.ts +17 -0
  231. package/src/lib/getPassengerName.ts +37 -0
  232. package/src/lib/getRowNumber.ts +16 -0
  233. package/src/lib/getSegmentList.ts +7 -0
  234. package/src/lib/getServicePriceMapById.ts +20 -0
  235. package/src/lib/getSymbols.ts +22 -0
  236. package/src/lib/getTotalAmountForServices.ts +72 -0
  237. package/src/lib/getTotalQuantity.ts +5 -0
  238. package/src/lib/hasService.ts +24 -0
  239. package/src/lib/hasServiceOfSameMetadataTypeAlreadyBeenSelected.ts +35 -0
  240. package/src/lib/hasWings.ts +8 -0
  241. package/src/lib/isBaggageService.ts +8 -0
  242. package/src/lib/isCancelForAnyReasonService.ts +9 -0
  243. package/src/lib/isFixtureOfferId.ts +4 -0
  244. package/src/lib/isPayloadComplete.ts +11 -0
  245. package/src/lib/isSeatElement.ts +10 -0
  246. package/src/lib/logging.ts +120 -0
  247. package/src/lib/moneyStringFormatter.ts +34 -0
  248. package/src/lib/offerIsExpired.ts +5 -0
  249. package/src/lib/retrieveOffer.ts +54 -0
  250. package/src/lib/retrieveOfferFromDuffelAPI.ts +13 -0
  251. package/src/lib/retrieveSeatMaps.ts +55 -0
  252. package/src/lib/retrieveSeatMapsFromDuffelAPI.ts +13 -0
  253. package/src/lib/setBodyScrollability.ts +7 -0
  254. package/src/lib/validateProps.ts +37 -0
  255. package/src/lib/withPlural.ts +8 -0
  256. package/src/stories/BaggageSelectionModalHeader.stories.tsx +21 -0
  257. package/src/stories/Button.stories.tsx +69 -0
  258. package/src/stories/DuffelAncillaries.stories.tsx +126 -0
  259. package/src/stories/DuffelPayments.stories.tsx +34 -0
  260. package/src/stories/Icon.stories.tsx +35 -0
  261. package/src/stories/IconButton.stories.tsx +25 -0
  262. package/src/styles/colors.css +22 -0
  263. package/src/styles/components/Amenity.css +23 -0
  264. package/src/styles/components/BaggageDisplay.css +25 -0
  265. package/src/styles/components/Button.css +161 -0
  266. package/src/styles/components/Card.css +52 -0
  267. package/src/styles/components/CfarSelectionModal.css +34 -0
  268. package/src/styles/components/Counter.css +18 -0
  269. package/src/styles/components/DuffelPayments.css +42 -0
  270. package/src/styles/components/IconButton.css +63 -0
  271. package/src/styles/components/Legend.css +58 -0
  272. package/src/styles/components/Loader.css +37 -0
  273. package/src/styles/components/LoadingState.css +81 -0
  274. package/src/styles/components/Modal.css +84 -0
  275. package/src/styles/components/PassengerSelect.css +93 -0
  276. package/src/styles/components/PassengersLayout.css +90 -0
  277. package/src/styles/components/Row.css +70 -0
  278. package/src/styles/components/Seat.css +57 -0
  279. package/src/styles/components/SeatInfo.css +61 -0
  280. package/src/styles/components/SeatMap.css +24 -0
  281. package/src/styles/components/SeatSelect.css +92 -0
  282. package/src/styles/components/Segment.css +17 -0
  283. package/src/styles/components/SelectionSegment.css +10 -0
  284. package/src/styles/components/Summary.css +70 -0
  285. package/src/styles/components/Tabs.css +49 -0
  286. package/src/styles/flex.css +5 -0
  287. package/src/styles/font-families.css +47 -0
  288. package/src/styles/global.css +51 -0
  289. package/src/styles/margin.css +3 -0
  290. package/src/styles/spacing.css +18 -0
  291. package/src/styles/transitions.css +3 -0
  292. package/src/styles/typography.css +13 -0
  293. package/src/tests/components/DuffelAncillaries.test.tsx +342 -0
  294. package/src/tests/lib/createPriceFormatters.test.tsx +152 -0
  295. package/src/tests/lib/formatAvailableServices.test.tsx +79 -0
  296. package/src/tests/lib/formatSeatMaps.test.tsx +49 -0
  297. package/src/tests/lib/getCurrencyForServices.test.tsx +44 -0
  298. package/src/tests/lib/hasServiceOfSameMetadataTypeAlreadyBeenSelected.test.ts +86 -0
  299. package/src/tests/lib/logging.test.tsx +32 -0
  300. package/src/tests/lib/moneyStringFormatter.test.tsx +12 -0
  301. package/src/tests/lib/validateProps.test.tsx +57 -0
  302. package/src/types/Aircraft.ts +16 -0
  303. package/src/types/Airline.ts +16 -0
  304. package/src/types/Airport.ts +54 -0
  305. package/src/types/City.ts +21 -0
  306. package/src/types/CreateOrderPayload.ts +99 -0
  307. package/src/types/CurrencyConversion.ts +10 -0
  308. package/src/types/DuffelAncillariesProps.ts +108 -0
  309. package/src/types/Offer.ts +851 -0
  310. package/src/types/Order.ts +6 -0
  311. package/src/types/Place.ts +6 -0
  312. package/src/types/SeatMap.ts +231 -0
  313. package/src/types/index.ts +11 -0
  314. package/tsconfig.json +52 -0
  315. package/LICENSE +0 -21
  316. package/dist/AdditionalBaggage.esm.js +0 -1
  317. package/dist/AdditionalBaggage.js +0 -1
  318. package/dist/AdditionalBaggage.min.css +0 -408
  319. package/dist/AdditionalBaggage.umd.min.js +0 -2
  320. package/dist/AdditionalBaggage.umd.min.js.LICENSE.txt +0 -60
  321. package/dist/AdditionalBaggageSelection.esm.js +0 -1
  322. package/dist/AdditionalBaggageSelection.js +0 -1
  323. package/dist/AdditionalBaggageSelection.min.css +0 -744
  324. package/dist/AdditionalBaggageSelection.umd.min.js +0 -2
  325. package/dist/AdditionalBaggageSelection.umd.min.js.LICENSE.txt +0 -93
  326. package/dist/CardPayment.esm.js +0 -2
  327. package/dist/CardPayment.esm.js.LICENSE.txt +0 -6
  328. package/dist/CardPayment.js +0 -2
  329. package/dist/CardPayment.js.LICENSE.txt +0 -6
  330. package/dist/CardPayment.min.css +0 -233
  331. package/dist/CardPayment.umd.min.js +0 -2
  332. package/dist/CardPayment.umd.min.js.LICENSE.txt +0 -61
  333. package/dist/SeatSelection.esm.js +0 -1
  334. package/dist/SeatSelection.js +0 -1
  335. package/dist/SeatSelection.min.css +0 -1127
  336. package/dist/SeatSelection.umd.min.js +0 -2
  337. package/dist/SeatSelection.umd.min.js.LICENSE.txt +0 -60
  338. package/dist/duffel-components.d.ts +0 -1614
  339. package/dist/duffel-components.esm.js +0 -2
  340. package/dist/duffel-components.esm.js.LICENSE.txt +0 -6
  341. package/dist/duffel-components.js +0 -2
  342. package/dist/duffel-components.js.LICENSE.txt +0 -6
  343. package/dist/duffel-components.min.css +0 -1280
  344. package/dist/duffel-components.umd.min.js +0 -2
  345. package/dist/duffel-components.umd.min.js.LICENSE.txt +0 -102
@@ -1,1614 +0,0 @@
1
- // Generated by dts-bundle-generator v6.12.0
2
-
3
- import { StripeError } from '@stripe/stripe-js';
4
- import * as React from 'react';
5
-
6
- export interface CardPaymentProps {
7
- duffelPaymentIntentClientToken: string;
8
- successfulPaymentHandler: () => void;
9
- errorPaymentHandler: (error: StripeError) => void;
10
- }
11
- export declare const CardPayment: React.FC<CardPaymentProps>;
12
- /**
13
- * Airports are used to identify origins and destinations in journey slices
14
- * @link https://duffel.com/docs/api/airports/schema
15
- */
16
- export interface Airport {
17
- /**
18
- * The metropolitan area where the airport is located.
19
- * Only present for airports which are registered with IATA as belonging to a metropolitan area.
20
- */
21
- city?: City | null;
22
- /**
23
- * The name of the city (or cities separated by a `/`) where the airport is located
24
- */
25
- city_name: string;
26
- /**
27
- * The three-character IATA code for the airport
28
- */
29
- iata_code?: string;
30
- /**
31
- * The ISO 3166-1 alpha-2 code for the country where the city is located
32
- * @link https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
33
- * @example "GB"
34
- */
35
- iata_country_code: string;
36
- /**
37
- * The 3-letter IATA code for the city where the place is located.
38
- * 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).
39
- */
40
- iata_city_code?: string | null;
41
- /**
42
- * The four-character ICAO code for the airport
43
- */
44
- icao_code?: string;
45
- /**
46
- * Duffel's unique identifier for the airport
47
- */
48
- id: string;
49
- /**
50
- * The latitude position of the airport represented in Decimal degrees with 6 decimal points with a range between -90° and 90°
51
- */
52
- latitude: number;
53
- /**
54
- * The longitude position of the airport represented in Decimal degrees with 6 decimal points with a range between -180° and 180°
55
- */
56
- longitude: number;
57
- /**
58
- * The name of the airport
59
- */
60
- name: string;
61
- /**
62
- * The time zone of the airport, specified by name from the [tz database](https://en.wikipedia.org/wiki/Tz_database)
63
- */
64
- time_zone: string;
65
- }
66
- /**
67
- * Airlines are used to identify the air travel companies selling and operating flights
68
- * @link https://duffel.com/docs/api/airlines/schema
69
- */
70
- export interface Airline {
71
- /**
72
- * The three-character IATA code for the airline
73
- */
74
- name: string;
75
- /**
76
- * Duffel's unique identifier for the airline
77
- */
78
- id: string;
79
- iata_code: string;
80
- }
81
- /**
82
- * Aircraft are used to describe what passengers will fly in for a given trip
83
- * @link https://duffel.com/docs/api/aircraft/schema
84
- */
85
- export interface Aircraft {
86
- /**
87
- * The name of the aircraft
88
- */
89
- name: string;
90
- /**
91
- * Duffel's unique identifier for the aircraft
92
- */
93
- id: string;
94
- /**
95
- * The three-character IATA code for the aircraft
96
- */
97
- iata_code: string;
98
- }
99
- export interface CurrencyConversion {
100
- /**
101
- * currency The ISO-4217 currency code to be used
102
- */
103
- currency: string;
104
- /**
105
- * Conversion multiple to be applied to all prices
106
- */
107
- rate: number;
108
- }
109
- /**
110
- * Each offer represents flights you can buy from an airline at a particular price that meet your search criteria.
111
- * @link https://duffel.com/docs/api/offers/schema
112
- */
113
- export interface Offer {
114
- /**
115
- * The types of identity documents that may be provided for the passengers when creating an order based on this offer.
116
- * Currently, the only supported type is `passport`. If this is `[]`, then you must not provide identity documents.
117
- */
118
- allowed_passenger_identity_document_types: PassengerIdentityDocumentType[];
119
- /**
120
- * The services that can be booked along with the offer but are not included by default, for example an additional checked bag.
121
- * This field is only returned in the Get single offer endpoint.
122
- * When there are no services available, or we don't support services for the airline, this list will be empty.
123
- */
124
- available_services: OfferAvailableService[];
125
- /**
126
- * The base price of the offer for all passengers, excluding taxes.
127
- * It does not include the base amount of any service(s) that might be booked with the offer.
128
- */
129
- base_amount: string;
130
- /**
131
- * The currency of the `base_amount`, as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code
132
- */
133
- base_currency: string;
134
- /**
135
- * 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.
136
- * 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`.
137
- * If a particular kind of modification is allowed, you may not always be able to take action through the Duffel API.
138
- * In some cases, you may need to contact the Duffel support team or the airline directly.
139
- */
140
- conditions: FlightsConditions;
141
- /**
142
- * The ISO 8601 datetime at which the offer was created
143
- */
144
- created_at: string;
145
- /**
146
- * The ISO 8601 datetime at which the offer will expire and no longer be usable to create an order
147
- */
148
- expires_at: string;
149
- /**
150
- * Duffel's unique identifier for the offer
151
- */
152
- id: string;
153
- /**
154
- * Whether the offer request was created in live mode.
155
- * 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.
156
- */
157
- live_mode: boolean;
158
- /**
159
- * The airline which provided the offer
160
- */
161
- owner: Airline;
162
- /**
163
- * Whether identity documents must be provided for each of the passengers when creating an order based on this offer.
164
- * If this is `true`, you must provide an identity document for every passenger.
165
- */
166
- passenger_identity_documents_required: boolean;
167
- /**
168
- * The passengers included in the offer
169
- */
170
- passengers: OfferPassenger[];
171
- /**
172
- * The payment requirements for this offer
173
- */
174
- payment_requirements: PaymentRequirements;
175
- /**
176
- * The slices that make up this offer. Each slice will include one or more segments,
177
- * the specific flights that the airline is offering to take the passengers from the slice's `origin` to its `destination`.
178
- */
179
- slices: OfferSlice[];
180
- /**
181
- * The amount of tax payable on the offer for all passengers
182
- */
183
- tax_amount: string | null;
184
- /**
185
- * The currency of the `tax_amount`, as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code
186
- */
187
- tax_currency: string | null;
188
- /**
189
- * The total price of the offer for all passengers, including taxes.
190
- * It does not include the total price of any service(s) that might be booked with the offer.
191
- */
192
- total_amount: string;
193
- /**
194
- * An estimate of the total carbon dioxide (CO₂) emissions when
195
- * all of the passengers fly this offer's itinerary, measured in kilograms
196
- */
197
- total_emissions_kg: string;
198
- /**
199
- * The currency of the `total_amount`, as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code
200
- */
201
- total_currency: string;
202
- /**
203
- * The ISO 8601 datetime at which the offer was last updated
204
- */
205
- updated_at: string;
206
- }
207
- export interface OfferAvailableServiceBaggageMetadata {
208
- /**
209
- * The maximum weight that the baggage can have in kilograms
210
- */
211
- maximum_weight_kg?: number | null;
212
- /**
213
- * The maximum height that the baggage can have in centimetres
214
- */
215
- maximum_height_cm?: number | null;
216
- /**
217
- * The maximum length that the baggage can have in centimetres
218
- */
219
- maximum_length_cm?: number | null;
220
- /**
221
- * The maximum depth that the baggage can have in centimetres
222
- */
223
- maximum_depth_cm?: number | null;
224
- /**
225
- * The type of the baggage
226
- */
227
- type: BaggageType;
228
- }
229
- export interface PaymentRequirements {
230
- /**
231
- * The ISO 8601 datetime by which you must pay for this order.
232
- * At this time, if still unpaid, the reserved space on the flight(s)
233
- * will be released and you will have to create a new order.
234
- * This will be null only for orders where `awaiting_payment` is `false`.
235
- */
236
- payment_required_by?: string | null;
237
- /**
238
- * The ISO 8601 datetime at which the price associated
239
- * with the order will no longer be guaranteed by the airline
240
- * and the order will need to be repriced before payment.
241
- * This can be null when there is no price guarantee.
242
- */
243
- price_guarantee_expires_at?: string | null;
244
- /**
245
- * Whether immediate payment is required or not
246
- */
247
- requires_instant_payment: boolean;
248
- }
249
- export interface OfferAvailableServiceMetadataMap {
250
- baggage: OfferAvailableServiceBaggageMetadata;
251
- }
252
- export declare type OfferAvailableServiceType = keyof OfferAvailableServiceMetadataMap;
253
- export interface OfferAvailableService<T_ServiceType extends OfferAvailableServiceType = "baggage"> {
254
- /**
255
- * Duffel's unique identifier for the service
256
- */
257
- id: string;
258
- /**
259
- * The maximum quantity of this service that can be booked with an order
260
- */
261
- maximum_quantity: number;
262
- /**
263
- * An object containing metadata about the service, like the maximum weight and dimensions of the baggage.
264
- */
265
- metadata: OfferAvailableServiceMetadataMap[T_ServiceType];
266
- /**
267
- * The list of passenger `id`s the service applies to.
268
- * If you add this service to an order it will apply to all the passengers in this list.
269
- * For services where the type is `baggage`, this list will include only a single passenger.
270
- */
271
- passenger_ids: string[];
272
- /**
273
- * The list of segment ids the service applies to.
274
- * If you add this service to an order it will apply to all the segments in this list.
275
- * For services where the type is baggage, depending on the airline,
276
- * this list includes all the segments of all slices or all the segments of a single slice.
277
- */
278
- segment_ids: string[];
279
- /**
280
- * The total price of the service for all passengers and segments it applies to, including taxes
281
- */
282
- total_amount: string;
283
- /**
284
- * The currency of the `total_amount`, as an ISO 4217 currency code
285
- */
286
- total_currency: string;
287
- /**
288
- * The type of the service.
289
- * For now we only return services of type baggage but we will return other types in the future.
290
- * We won't consider adding new service types a break change.
291
- */
292
- type: T_ServiceType;
293
- }
294
- export interface OfferPassenger {
295
- /**
296
- * The age of the passenger on the departure_date of the final slice.
297
- */
298
- age?: number;
299
- /**
300
- * The type of the passenger.
301
- */
302
- type?: "adult";
303
- /**
304
- * The identifier for the passenger, unique within this Offer Request and across all Offer Requests.
305
- * This ID will be generated by Duffel unless you had optionally provided one.
306
- * Optionally providing one has been deprecated.
307
- */
308
- id: string;
309
- }
310
- export interface OfferSlice {
311
- /**
312
- * The type of the destination
313
- */
314
- destination_type: PlaceType;
315
- /**
316
- * The city or airport where this slice ends
317
- */
318
- destination: Place;
319
- /**
320
- * The type of the origin
321
- */
322
- origin_type: PlaceType;
323
- /**
324
- * The city or airport where this slice begins
325
- */
326
- origin: Place;
327
- /**
328
- * The duration of the slice, represented as a ISO 8601 duration
329
- */
330
- duration: string | null;
331
- /**
332
- * The name of the fare brand associated with this slice.
333
- * A fare brand specifies the travel conditions you get on your slice made available
334
- * by the airline. e.g. a British Airways Economy Basic fare will only include a hand baggage allowance.
335
- * It is worth noting that the fare brand names are defined by the airlines themselves and therefore they
336
- * are subject to change without any prior notice. We're in the process of adding support for fare_brand_name across
337
- * all our airlines, so for now, this field may be null in some offers.
338
- * This will become a non-nullable attribute in the near future.
339
- */
340
- fare_brand_name: string | null;
341
- /**
342
- * Duffel's unique identifier for the slice. It identifies the slice of an offer (i.e. the same slice across offers will have different `id`s
343
- */
344
- id: string;
345
- /**
346
- * The segments - that is, specific flights - that the airline is offering to get the passengers from the `origin` to the `destination`
347
- */
348
- segments: OfferSliceSegment[];
349
- /**
350
- * The conditions associated with this slice, describing the kinds of modifications you can make post-booking and any penalties that will apply to those modifications.
351
- * This condition is applied only to this slice and to all the passengers associated with this offer - for information at the offer level (e.g. "what happens if I want to change all the slices?") refer to the conditions at the top level.
352
- * If a particular kind of modification is allowed, you may not always be able to take action through the Duffel API.
353
- * In some cases, you may need to contact the Duffel support team or the airline directly.
354
- */
355
- conditions: FlightsConditions;
356
- }
357
- export interface OfferSliceSegment {
358
- /**
359
- * The aircraft that the operating carrier will use to operate this segment
360
- */
361
- aircraft: Aircraft;
362
- /**
363
- * The ISO 8601 datetime at which the segment is scheduled to arrive
364
- */
365
- arriving_at: string;
366
- /**
367
- * The terminal at the destination airport where the segment is scheduled to arrive
368
- */
369
- destination_terminal: string | null;
370
- /**
371
- * The ISO 8601 datetime at which the segment is scheduled to depart
372
- */
373
- departing_at: string;
374
- /**
375
- * The terminal at the origin airport from which the segment is scheduled to depart
376
- */
377
- origin_terminal: string | null;
378
- /**
379
- * The airport at which the segment is scheduled to arrive
380
- */
381
- destination: Airport;
382
- /**
383
- * The distance of the segment in kilometres
384
- */
385
- distance: string | null;
386
- /**
387
- * The duration of the segment, represented as a ISO 8601 duration
388
- */
389
- duration: string | null;
390
- /**
391
- * 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
392
- */
393
- id: string;
394
- /**
395
- * The airline selling the tickets for this segment.
396
- * This may differ from the `operating_carrier` in the case of a "codeshare", where one airline sells flights operated by another airline.
397
- */
398
- marketing_carrier: Airline;
399
- /**
400
- * The flight number assigned by the marketing carrier
401
- */
402
- marketing_carrier_flight_number: string;
403
- /**
404
- * The airport from which the flight is scheduled to depart
405
- */
406
- origin: Airport;
407
- /**
408
- * The airline actually operating this segment.
409
- * This may differ from the marketing_carrier in the case of a "codeshare", where one airline sells flights operated by another airline.
410
- */
411
- operating_carrier: Airline;
412
- /**
413
- * The flight number assigned by the operating carrier
414
- */
415
- operating_carrier_flight_number: string;
416
- /**
417
- * 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)
418
- */
419
- passengers: OfferSliceSegmentPassenger[];
420
- }
421
- export interface OfferSliceSegmentPassenger {
422
- /**
423
- * The baggage allowances for the passenger on this segment included in the offer.
424
- * Some airlines may allow additional baggage to be booked as a service - see the offer's available_services.
425
- */
426
- baggages: OfferSliceSegmentPassengerBaggage[];
427
- /**
428
- * The cabin class that the passenger will travel in on this segment
429
- */
430
- cabin_class: CabinClass;
431
- /**
432
- * The name that the marketing carrier uses to market this cabin class
433
- */
434
- cabin_class_marketing_name: string;
435
- /**
436
- * The identifier for the passenger.
437
- * You may have specified this ID yourself when creating the offer request, or otherwise, Duffel will have generated its own random ID.
438
- */
439
- passenger_id: string;
440
- /**
441
- * The airline's alphanumeric code for the fare that the passenger is using to travel. Where this is `null`, it means that either the
442
- * fare basis code is not available or the airline does not use fare basis codes.
443
- */
444
- fare_basis_code: string;
445
- }
446
- export declare type BaggageType = "carry_on" | "checked";
447
- export interface OfferSliceSegmentPassengerBaggage {
448
- /**
449
- * The type of the baggage allowance
450
- */
451
- type: BaggageType;
452
- /**
453
- * The number of this type of bag allowed on the segment. Note that this can currently be 0 in some cases.
454
- */
455
- quantity: number;
456
- }
457
- /**
458
- * The metropolitan area where the airport is located.
459
- * Only present for airports which are registered with IATA as belonging to a metropolitan area.
460
- * @link https://portal.iata.org/faq/articles/en_US/FAQ/How-do-I-create-a-new-Metropolitan-Area
461
- */
462
- export interface City {
463
- /**
464
- * The type of the place
465
- */
466
- type?: "city";
467
- /**
468
- * The three-character IATA code for the city
469
- * @example "LON"
470
- */
471
- iata_code: string;
472
- /**
473
- * The ISO 3166-1 alpha-2 code for the country where the city is located
474
- * @link https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
475
- * @example "GB"
476
- */
477
- iata_country_code: string;
478
- /**
479
- * Duffel's unique identifier for the city
480
- * @example "cit_lon_gb"
481
- */
482
- id: string;
483
- /**
484
- * The name of the city
485
- * @example "London"
486
- */
487
- name: string;
488
- /**
489
- * The time zone of the airport, specified by name from the [tz database](https://en.wikipedia.org/wiki/Tz_database)
490
- */
491
- time_zone?: string | null;
492
- /**
493
- * 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°
494
- */
495
- longitude?: number | null;
496
- /**
497
- * 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°
498
- */
499
- latitude?: number | null;
500
- /**
501
- * The 3-letter IATA code for the city where the place is located.
502
- * 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).
503
- */
504
- iata_city_code?: string | null;
505
- /**
506
- * The name of the city (or cities separated by a `/`) where the airport is located
507
- */
508
- city_name?: string | null;
509
- }
510
- /**
511
- * The cabin class that the passenger will travel in on this segment
512
- */
513
- export declare type CabinClass = "first" | "business" | "premium_economy" | "economy";
514
- /**
515
- * The type of the passenger
516
- */
517
- export declare type DuffelPassengerType = "adult" | "child" | "infant_without_seat";
518
- /**
519
- * The passenger's title
520
- */
521
- export declare type DuffelPassengerTitle = "mr" | "ms" | "mrs" | "MR" | "MS" | "MRS";
522
- /**
523
- * The passenger's gender
524
- */
525
- export declare type DuffelPassengerGender = "m" | "f";
526
- /**
527
- * The type of the identity document. Currently, the only supported type is passport.
528
- * This must be one of the `allowed_passenger_identity_document_types` on the offer.
529
- */
530
- export declare type PassengerIdentityDocumentType = "passport";
531
- /**
532
- * The type of the origin or destination
533
- */
534
- export declare type PlaceType = "airport" | "city";
535
- export declare type Place = (Airport & {
536
- type?: "airport";
537
- airports?: Airport[] | null;
538
- }) | (City & {
539
- type?: "city";
540
- });
541
- /**
542
- * 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.
543
- * 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.
544
- * If a particular kind of modification is allowed, you may not always be able to take action through the Duffel API.
545
- * In some cases, you may need to contact the Duffel support team or the airline directly.
546
- */
547
- export declare type FlightsConditions = {
548
- /**
549
- * Whether the whole order or offer can be refunded before the departure of the first slice.
550
- * 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.
551
- * If any of the slices on the order or offer can't be refunded then the `allowed` property will be `false`.
552
- * If the airline hasn't provided any information about whether this order or offer can be refunded then this property will be `null`.
553
- */
554
- refund_before_departure?: {
555
- /**
556
- * The currency of the `penalty_amount` as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.
557
- * This will be in a currency determined by the airline, which is not necessarily the same as the currency of the order or offer.
558
- * If this is `null` then `penalty_amount` will also be `null`.
559
- * @example "GBP"
560
- */
561
- penalty_currency?: string;
562
- /**
563
- * If the modification is `allowed` then this is the amount payable to apply the modification to all passengers.
564
- * 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`.
565
- * If this is `null` then the `penalty_currency` will also be null.
566
- * @example "100.00"
567
- */
568
- penalty_amount?: string;
569
- /**
570
- * Whether this kind of modification is allowed post-booking
571
- *
572
- * @example "true"
573
- */
574
- allowed: boolean;
575
- } | null;
576
- /**
577
- * Whether the whole order or offer can be changed before the departure of the first slice.
578
- * If all of the slices on the order or offer can be changed then the `allowed` property will be `true`.
579
- * Refer to the `slices` for information about change penalties.
580
- * If any of the slices on the order or offer can't be changed then the `allowed` property will be `false`.
581
- * In this case you should refer to the slices conditions to determine if any part of the order or offer is changeable.
582
- * If the airline hasn't provided any information about whether this order or offer can be changed then this property will be `null`.
583
- */
584
- change_before_departure?: {
585
- /**
586
- * The currency of the `penalty_amount` as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.
587
- * This will be in a currency determined by the airline, which is not necessarily the same as the currency of the order or offer.
588
- * If this is `null` then `penalty_amount` will also be `null`.
589
- * @example "GBP"
590
- */
591
- penalty_currency: string;
592
- /**
593
- * If the modification is `allowed` then this is the amount payable to apply the modification to all passengers.
594
- * 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`.
595
- * If this is `null` then the `penalty_currency` will also be null.
596
- * @example "100.00"
597
- */
598
- penalty_amount?: string;
599
- /**
600
- * Whether this kind of modification is allowed post-booking
601
- *
602
- * @example "true"
603
- */
604
- allowed: boolean;
605
- } | null;
606
- };
607
- /**
608
- * The type of payment you want to apply to the order.
609
- * If you are an IATA agent with your own agreements with airlines, in some cases, you can pay using ARC/BSP cash by specifying `arc_bsp_cash`. Otherwise, you must pay using your Duffel account's balance by specifying `balance`.
610
- * In test mode, your balance is unlimited. If you're not sure which of these options applies to you, get in touch with the Duffel support team at [help@duffel.com](mailto:help@duffel.com).
611
- */
612
- export declare type PaymentType = "arc_bsp_cash" | "balance";
613
- export interface LayoutSelectionPassenger {
614
- id: string;
615
- name?: string | null;
616
- }
617
- /**
618
- * Metadata for component usage tracking
619
- */
620
- export interface ComponentUsageMetadata {
621
- duffel_component_used: "additional_baggage" | "additional_baggage_selection" | "seat_selection";
622
- duffel_components_version: string;
623
- }
624
- /**
625
- * Seat maps are used to build a rich experience for your customers so they can select a seat as part of an order.
626
- * A seat map includes the data for rendering seats in the relevant cabins, along with their total cost and other information such as disclosures.
627
- * @link https://duffel.com/docs/api/seat-maps/schema
628
- */
629
- export interface SeatMap {
630
- /**
631
- * Duffel's unique identifier for the seat map
632
- */
633
- id: string;
634
- /**
635
- * 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.)
636
- */
637
- slice_id: string;
638
- /**
639
- * 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).
640
- */
641
- segment_id: string;
642
- /**
643
- * The list of cabins in this seat map.
644
- * Cabins are ordered by deck from lowest to highest, and then within each deck from the front to back of the aircraft.
645
- */
646
- cabins: SeatMapCabin[];
647
- }
648
- export interface SeatMapCabin {
649
- /**
650
- * Level 0 is the main deck and level 1 is the upper deck above that, which is found on some large aircraft.
651
- */
652
- deck: number;
653
- /**
654
- * The cabin class that the passenger will travel in on this segment
655
- */
656
- cabin_class: string;
657
- /**
658
- * Where the wings of the aircraft are in relation to rows in the cabin.
659
- * 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.
660
- * The indices are 0 th-based and are for all rows, not just those that have seats.
661
- * This is null when no rows of the cabin are overwing.
662
- */
663
- wings: {
664
- /**
665
- * The index of the first row which is overwing, starting from the front of the aircraft.
666
- */
667
- first_row_index: number;
668
- /**
669
- * The index of the last row which is overwing, starting from the front of the aircraft.
670
- */
671
- last_row_index: number;
672
- } | null;
673
- /**
674
- * The number of aisles in this cabin.
675
- * 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.
676
- */
677
- aisles: number;
678
- /**
679
- * A list of rows in this cabin.
680
- * Row sections are broken up by aisles. Rows are ordered from front to back of the aircraft.
681
- */
682
- rows: SeatMapCabinRow[];
683
- }
684
- export interface SeatMapCabinRow {
685
- /**
686
- * A list of sections.
687
- * Each row is divided into sections by one or more aisles.
688
- */
689
- sections: SeatMapCabinRowSection[];
690
- }
691
- export interface SeatMapCabinRowSection {
692
- /**
693
- * The elements that make up this section.
694
- */
695
- elements: SeatMapCabinRowSectionElement[];
696
- }
697
- /**
698
- * A seat for a passenger. If the available_services list is empty (which will be represented as an empty list : []), the seat is unavailable.
699
- * For display, all seats should be displayed with the same static width.
700
- */
701
- export interface SeatMapCabinRowSectionElementSeat {
702
- /**
703
- * The type of this element.
704
- */
705
- type: "seat";
706
- /**
707
- * The designator used to uniquely identify the seat, usually made up of a row number and a column letter
708
- */
709
- designator: string;
710
- /**
711
- * A name which describes the type of seat, which you can display in your user interface to help customers to understand its features
712
- */
713
- name?: string;
714
- /**
715
- * 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.
716
- */
717
- disclosures: string[];
718
- /**
719
- * 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.
720
- */
721
- available_services: SeatMapCabinRowSectionAvailableService[];
722
- }
723
- export interface SeatMapCabinRowSectionAvailableService {
724
- /**
725
- * Duffel's unique identifier for the service
726
- */
727
- id: string;
728
- /**
729
- * The passenger that this seat is for
730
- */
731
- passenger_id: string;
732
- /**
733
- * The total price of the seat, including taxes
734
- */
735
- total_amount: string;
736
- /**
737
- * The currency of the total_amount, as an ISO 4217 currency code
738
- */
739
- total_currency: string;
740
- /**
741
- * Metadata for component usage tracking
742
- */
743
- metadata?: ComponentUsageMetadata;
744
- }
745
- /**
746
- * A bassinet is a child's cradle. This element will be aligned with the corresponding seat in the following row.
747
- * For display, this element should have the same width as a seat for proper alignment.
748
- */
749
- export interface SeatMapCabinRowSectionElementBassinet {
750
- /**
751
- * The type of this element.
752
- */
753
- type: "bassinet";
754
- }
755
- /**
756
- * An empty space used for padding in some non-standard seat arrangements.
757
- * For display, this element should have the same dimensions as a seat for proper alignment.
758
- */
759
- export interface SeatMapCabinRowSectionElementEmpty {
760
- /**
761
- * The type of this element.
762
- */
763
- type: "empty";
764
- }
765
- /**
766
- * An exit row represents the extra wide legroom used to reach aircraft exits. There is one exit_row element per row section.
767
- * 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.
768
- */
769
- export interface SeatMapCabinRowSectionElementExitRow {
770
- /**
771
- * The type of this element.
772
- */
773
- type: "exit_row";
774
- }
775
- /**
776
- * A lavatory for use by passengers.
777
- * 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.
778
- */
779
- export interface SeatMapCabinRowSectionElementLavatory {
780
- /**
781
- * The type of this element.
782
- */
783
- type: "lavatory";
784
- }
785
- /**
786
- * A galley is the compartment where food is cooked or prepared. These are conventionally marked with a teacup symbol.
787
- * 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.
788
- */
789
- export interface SeatMapCabinRowSectionElementGalley {
790
- /**
791
- * The type of this element.
792
- */
793
- type: "galley";
794
- }
795
- /**
796
- * A closet used for storage. These are conventionally marked with a clothes hanger symbol.
797
- * 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.
798
- */
799
- export interface SeatMapCabinRowSectionElementCloset {
800
- /**
801
- * The type of this element.
802
- */
803
- type: "closet";
804
- }
805
- /**
806
- * A set of stairs to another deck.
807
- * 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.
808
- */
809
- export interface SeatMapCabinRowSectionElementStairs {
810
- /**
811
- * The type of this element.
812
- */
813
- type: "stairs";
814
- }
815
- export declare type SeatMapCabinRowSectionElement = SeatMapCabinRowSectionElementSeat | SeatMapCabinRowSectionElementBassinet | SeatMapCabinRowSectionElementEmpty | SeatMapCabinRowSectionElementExitRow | SeatMapCabinRowSectionElementLavatory | SeatMapCabinRowSectionElementGalley | SeatMapCabinRowSectionElementCloset | SeatMapCabinRowSectionElementStairs;
816
- export interface SeatSelectionPassenger {
817
- id: string;
818
- name?: string | null;
819
- }
820
- export declare type SeatSelectionContextInterface = {
821
- [segmentId: string]: SeatSelectionForSegment;
822
- };
823
- export declare type SeatSelectionForSegment = {
824
- [passengerId: string]: SeatInformation | null;
825
- };
826
- export declare type SeatInformation = {
827
- designator: string;
828
- service: SeatMapCabinRowSectionAvailableService;
829
- };
830
- export interface SeatSelectionProps {
831
- /**
832
- * The offer we are booking seats for.
833
- */
834
- offer: Offer;
835
- /**
836
- * List of available seat maps
837
- */
838
- seatMaps: SeatMap[];
839
- /**
840
- * List of all passengers that can be assigned seats
841
- */
842
- passengers: SeatSelectionPassenger[];
843
- /**
844
- * What to do when the user presses the Confirm button
845
- */
846
- onSubmit: (seats: SeatSelectionContextInterface) => void;
847
- /**
848
- * Already selected seats to initialize the map with
849
- */
850
- initialSeatSelection?: SeatSelectionContextInterface;
851
- /**
852
- * The segment ID to select upon initialization
853
- */
854
- initialSegmentId?: string;
855
- /**
856
- * Optional currency conversion to enable prices to be shown in an alternative currency
857
- */
858
- currencyConversion?: CurrencyConversion;
859
- }
860
- export declare const SeatSelection: React.FC<SeatSelectionProps>;
861
- export declare type Baggage = {
862
- id: string;
863
- quantity: number;
864
- metadata?: ComponentUsageMetadata;
865
- };
866
- export interface AdditionalBaggageProps {
867
- /**
868
- * List of available services in the offer
869
- */
870
- availableServices: OfferAvailableService[];
871
- /**
872
- * List of current additional baggages
873
- */
874
- additionalBaggages: Baggage[];
875
- /**
876
- * onChange handler responsible to get the services object to send to the API
877
- */
878
- onChange: (updatedBaggages: Baggage[], lastBaggageUpdated: Baggage) => void;
879
- /**
880
- * Optional currency conversion to enable prices to be shown in an alternative currency
881
- */
882
- currencyConversion?: CurrencyConversion;
883
- }
884
- export declare const AdditionalBaggage: React.FC<AdditionalBaggageProps>;
885
- export declare type OrderAvailableService = OfferAvailableService;
886
- export interface TravelAgentTicket {
887
- id: string;
888
- externalTicketId: string;
889
- }
890
- export declare type EmptyObject = Record<string, unknown>;
891
- export declare type OrderAvailableAction = "cancel" | "change" | "update";
892
- export declare type AvailableActionType = "accept" | "cancel" | "change" | "update";
893
- export declare type ActionTakenType = "accepted" | "cancelled" | "changed" | null;
894
- export declare type OfferCondition = OfferConditionModificationAllowed | OfferConditionNoModification;
895
- export interface LoyaltyProgrammeAccount {
896
- /**
897
- * The passenger's account number for this Loyalty Programme Account
898
- */
899
- account_number: string;
900
- /**
901
- * The IATA code for the airline that this Loyalty Programme Account belongs to
902
- */
903
- airline_iata_code: string;
904
- }
905
- export interface OrderService {
906
- /**
907
- * The `id` of the service from the offer's `available_services` that you want to book
908
- */
909
- id: string;
910
- /**
911
- * The quantity of the service to book
912
- */
913
- quantity: number;
914
- }
915
- export interface OrderPassenger {
916
- born_on: string;
917
- family_name: string;
918
- gender: DuffelPassengerGender;
919
- given_name: string;
920
- id: string;
921
- infant_passenger_id?: string | null;
922
- loyalty_programme_accounts?: LoyaltyProgrammeAccount[];
923
- title: DuffelPassengerTitle;
924
- type: DuffelPassengerType;
925
- }
926
- export declare type OrderDocumentsType = "electronic_ticket" | "electronic_miscellaneous_document_associated" | "electronic_miscellaneous_document_standalone";
927
- export declare type OrderDocuments = OrderDocument[];
928
- export interface OrderDocument {
929
- /**
930
- * The list of passenger ids the document applies to.
931
- *
932
- * @example
933
- * ["pas_00009hj8USM7Ncg31cBCLL"]
934
- */
935
- passenger_ids: string[];
936
- /**
937
- * The type of document.
938
- */
939
- type: OrderDocumentsType;
940
- /**
941
- * The identifier for the document, in the case of electronic tickets this
942
- * string represents the payment or the entitlement to fly.
943
- *
944
- * @example
945
- * "1252106312810"
946
- */
947
- unique_identifier: string;
948
- }
949
- export interface OrderPaymentStatus {
950
- /**
951
- * Whether a payment has been made, or the airline is waiting for a payment to be made
952
- */
953
- awaiting_payment: boolean;
954
- /**
955
- * The ISO 8601 datetime by which you must pay for this order.
956
- * At this time, if still unpaid, the reserved space on the flight(s)
957
- * will be released and you will have to create a new order.
958
- * This will be null only for orders where `awaiting_payment` is `false`.
959
- * Payment Required by means it will hold space
960
- */
961
- payment_required_by?: string | null;
962
- /**
963
- * The ISO 8601 datetime at which the price associated
964
- * with the order will no longer be guaranteed by the airline
965
- * and the order will need to be repriced before payment.
966
- * This can be null when there is no price guarantee.
967
- * Price Guarantee means it will hold price
968
- */
969
- price_guarantee_expires_at?: string | null;
970
- /**
971
- * TODO: this is undocumented. Check back on https://duffel.com/docs/api/orders/schema
972
- */
973
- unpaid_guarantees?: any;
974
- /**
975
- * TODO: this is undocumented. Check back on https://duffel.com/docs/api/orders/schema
976
- */
977
- payBy?: string | null;
978
- /**
979
- * The ISO 8601 datetime at which the Order was paid for, if at all
980
- */
981
- paid_at: string | null;
982
- }
983
- export interface OrderChangeRequestOfferSlices {
984
- /**
985
- * The slices to be added
986
- */
987
- add: Array<OrderSlice>;
988
- /**
989
- * The slices to be removed
990
- */
991
- remove: Array<OrderSlice>;
992
- }
993
- export interface OrderChangeRequestOffer {
994
- /**
995
- * The available payment types to complete the order change.
996
- *
997
- * @todo
998
- * Add this field to the API docs.
999
- */
1000
- available_payment_types?: PaymentType[] | null;
1001
- /**
1002
- * The amount that will be charged or returned to the original payment
1003
- * method if refunded, determined according to the fare conditions. This
1004
- * may be negative to reflect a refund.
1005
- *
1006
- * @example
1007
- * "90.80"
1008
- */
1009
- change_total_amount: string;
1010
- /**
1011
- * The currency of the `change_total_amount`, as an ISO 4217 currency
1012
- * code. It will match your organisation's billing currency unless you’re
1013
- * using Duffel as an accredited IATA agent, in which case it will be in
1014
- * the currency provided by the airline (which will usually be based on
1015
- * the country where your IATA agency is registered).
1016
- *
1017
- * @example
1018
- * "GBP"
1019
- */
1020
- change_total_currency: string;
1021
- /**
1022
- * The ISO 8601 datetime at which the offer was created.
1023
- *
1024
- * @example
1025
- * "2020-01-17T10:12:14.545Z"
1026
- */
1027
- created_at: string;
1028
- /**
1029
- * The ISO 8601 datetime at which the offer will expire and no longer be
1030
- * usable to create an order.
1031
- *
1032
- * @example
1033
- * "2020-01-17T10:42:14.545Z"
1034
- *
1035
- */
1036
- expires_at: string;
1037
- /**
1038
- * Duffel's unique identifier for the order change offer.
1039
- *
1040
- * @example
1041
- * "oco_0000A3vUda8dKRtUSQPSXw"
1042
- */
1043
- id: string;
1044
- /**
1045
- * Whether the order change offer was created in live mode. This field
1046
- * will be set to `true` if the order change offer was created in live
1047
- * mode, or `false if it was created in test mode.
1048
- *
1049
- * @example
1050
- * false
1051
- */
1052
- live_mode: boolean;
1053
- /**
1054
- * The price of this offer if it was newly purchased.
1055
- *
1056
- * @example
1057
- * "35.50"
1058
- */
1059
- new_total_amount: string;
1060
- /**
1061
- * The currency of the `new_total_amount`, as an ISO 4217 currency code.
1062
- * It will match your organisation's billing currency unless you’re using
1063
- * Duffel as an accredited IATA agent, in which case it will be in the
1064
- * currency provided by the airline (which will usually be based on the
1065
- * country where your IATA agency is registered).
1066
- *
1067
- * @example
1068
- * "GBP"
1069
- */
1070
- new_total_currency: string;
1071
- /**
1072
- * The ID for an order change if one has already been created from this
1073
- * order change offer.
1074
- *
1075
- * @example
1076
- * "oce_0000A4QasEUIjJ6jHKfhHU"
1077
- */
1078
- order_change_id: string | null;
1079
- /**
1080
- * The penalty price imposed by the airline for making this change.
1081
- *
1082
- * @example
1083
- * "10.50"
1084
- */
1085
- penalty_total_amount: string | null;
1086
- /**
1087
- * The currency of the `penalty_total_amount`, as an ISO 4217 currency
1088
- * code. It will match your organisation's billing currency unless you’re
1089
- * using Duffel as an accredited IATA agent, in which case it will be in
1090
- * the currency provided by the airline (which will usually be based on
1091
- * the country where your IATA agency is registered).
1092
- *
1093
- * @example
1094
- * "GBP"
1095
- */
1096
- penalty_total_currency: string | null;
1097
- /**
1098
- * Where the refund, once confirmed, will be sent. card is currently a
1099
- * restricted feature. `awaiting_payment` is for pay later orders where no
1100
- * payment has been made yet.
1101
- *
1102
- * @todo
1103
- * Align this field with the API docs.
1104
- */
1105
- refund_to: "voucher" | "original_form_of_payment" | null;
1106
- /**
1107
- * The slices within an order change that are being added to and/or
1108
- * removed from the order.
1109
- */
1110
- slices: OrderChangeRequestOfferSlices;
1111
- /**
1112
- * The ISO 8601 datetime at which the offer was last updated.
1113
- *
1114
- * @example
1115
- * "2020-01-17T10:12:14.545Z"
1116
- */
1117
- updated_at: string;
1118
- }
1119
- export interface OrderChange extends Omit<OrderChangeRequestOffer, "orderChangeId"> {
1120
- /**
1121
- * The ISO 8601 datetime that indicates when the order change was
1122
- * confirmed.
1123
- *
1124
- * @example
1125
- * "2020-01-17T11:51:43.114803Z"
1126
- */
1127
- confirmed_at: string | null;
1128
- /**
1129
- * Duffel's unique identifier for the order change.
1130
- *
1131
- * @example
1132
- * "oce_0000A4QasEUIjJ6jHKfhHU"
1133
- */
1134
- id: string;
1135
- }
1136
- export declare type OrderChanges = OrderChange[];
1137
- export interface OfferConditionModificationAllowed {
1138
- /**
1139
- * Allow the modification to the order
1140
- */
1141
- allowed: true;
1142
- /**
1143
- * The penalty of the modification
1144
- */
1145
- penalty_amount: number | null;
1146
- /**
1147
- * The penalty currency of the modification
1148
- */
1149
- penalty_currency: string | null;
1150
- }
1151
- export interface OfferConditionNoModification {
1152
- /**
1153
- * No modification to the order is allowed
1154
- */
1155
- allowed: false;
1156
- /**
1157
- * When the modification to the order is not allowed, both penalty amount and currency should be null
1158
- */
1159
- penalty_amount: null;
1160
- penalty_currency: null;
1161
- }
1162
- export interface OrderSegmentPassengerBaggage {
1163
- quantity: number;
1164
- type: string;
1165
- }
1166
- export interface OrderSegmentPassenger {
1167
- baggages: OrderSegmentPassengerBaggage[];
1168
- cabin_class: CabinClass;
1169
- cabin_class_marketing_name: string;
1170
- passenger_id?: string;
1171
- /**
1172
- * TODO: undocumented. Come back to add the correct type.
1173
- */
1174
- seat?: null;
1175
- }
1176
- export interface OrderSliceSegment {
1177
- /**
1178
- * The aircraft that the operating carrier will use to operate this
1179
- * segment.
1180
- */
1181
- aircraft: Aircraft;
1182
- /**
1183
- * The ISO 8601 datetime at which the segment is scheduled to arrive. You
1184
- * should use the `arrivingAt` attribute instead of this attribute, as this
1185
- * will be removed in the next API version.
1186
- *
1187
- * @deprecated
1188
- * @example
1189
- * "2020-06-13T16:38:02"
1190
- */
1191
- arrival_datetime: string;
1192
- /**
1193
- * The terminal at the destination airport where the segment is scheduled
1194
- * to arrive. You should use the `destinationTerminal` attribute instead
1195
- * of this attribute, as this will be removed in the next API version.
1196
- *
1197
- * @deprecated
1198
- * @example
1199
- * "5"
1200
- */
1201
- arrival_terminal: string | null;
1202
- /**
1203
- * The ISO 8601 datetime at which the segment is scheduled to arrive, in
1204
- * the destination airport timezone (see `destination.timezone`)
1205
- *
1206
- * @example
1207
- * "2020-06-13T16:38:02"
1208
- */
1209
- arriving_at: string;
1210
- /**
1211
- * The ISO 8601 datetime at which the segment is scheduled to depart, in
1212
- * the origin airport timezone (see `origin.timezone`)
1213
- *
1214
- * @example
1215
- * "2020-06-13T16:38:02"
1216
- */
1217
- departing_at: string;
1218
- /**
1219
- * The ISO 8601 datetime at which the segment is scheduled to depart. You
1220
- * should use the `departingAt` attribute instead of this attribute, as
1221
- * this will be removed in the next API version.
1222
- *
1223
- * @deprecated
1224
- * @example
1225
- * "2020-06-13T16:38:02"
1226
- */
1227
- departure_datetime: string;
1228
- /**
1229
- * The terminal at the `origin` airport from which the segment is
1230
- * scheduled to depart. You should use the `origin_terminal` attribute
1231
- * instead of this attribute, as this will be removed in the next API
1232
- * version.
1233
- *
1234
- * @deprecated
1235
- * @example
1236
- * "B"
1237
- */
1238
- departure_terminal: string | null;
1239
- destination: Airport;
1240
- /**
1241
- * The terminal at the destination airport where the segment is scheduled
1242
- * to arrive.
1243
- *
1244
- * @example
1245
- * "5"
1246
- */
1247
- destination_terminal: string;
1248
- /**
1249
- * The distance of the segment in kilometres.
1250
- *
1251
- * @example
1252
- * "424.2"
1253
- */
1254
- distance: string;
1255
- /**
1256
- * The duration of the segment, represented as a ISO 8601 duration.
1257
- *
1258
- * @example
1259
- * "PT02H26M"
1260
- */
1261
- duration: string;
1262
- /**
1263
- * Duffel's unique identifier for the segment. It identifies the segment
1264
- * of an order (i.e. the same segment across orders will have different
1265
- * ids.
1266
- *
1267
- * @example
1268
- * "seg_00009htYpSCXrwaB9Dn456"
1269
- */
1270
- id: string;
1271
- /**
1272
- * The airline selling the tickets for this segment. This may differ from
1273
- * the `operatingCarrier` in the case of a "codeshare", where one airline
1274
- * sells flights operated by another airline.
1275
- */
1276
- marketing_carrier: Airline;
1277
- /**
1278
- * The flight number assigned by the marketing carrier.
1279
- *
1280
- * @example
1281
- * "1234"
1282
- */
1283
- marketing_carrier_flight_number: string;
1284
- /**
1285
- * The airline actually operating this segment. This may differ from the
1286
- * `marketingCarrier` in the case of a "codeshare", where one airline
1287
- * sells flights operated by another airline.
1288
- */
1289
- operating_carrier: Airline;
1290
- /**
1291
- * The flight number assigned by the operating carrier. This may not be
1292
- * present, in which case you should display the `marketingCarrier`'s
1293
- * information and the `marketingCarrierFlightNumber`, and simply state
1294
- * the name of the `operatingCarrier.
1295
- *
1296
- * @example
1297
- * "4321"
1298
- */
1299
- operating_carrier_flight_number: string;
1300
- /**
1301
- * The airport from which the flight is scheduled to depart.
1302
- */
1303
- origin: Airport;
1304
- /**
1305
- * The terminal at the origin airport from which the segment is scheduled
1306
- * to depart.
1307
- *
1308
- * @example
1309
- * "B"
1310
- */
1311
- origin_terminal: string;
1312
- /**
1313
- * Additional segment-specific information about the passengers included
1314
- * in the offer (e.g. their baggage allowance and the cabin class they
1315
- * will be travelling in)
1316
- */
1317
- passengers: OrderSegmentPassenger[];
1318
- }
1319
- export interface OrderSlice {
1320
- id?: string;
1321
- origin: Airport;
1322
- origin_type?: PlaceType | null;
1323
- destination_type?: PlaceType | null;
1324
- destination: Airport;
1325
- segments: OrderSliceSegment[];
1326
- duration?: string | null;
1327
- conditions: {
1328
- change_before_departure: OfferCondition | null;
1329
- };
1330
- }
1331
- export interface AirlineInitiatedChange {
1332
- /**
1333
- * Duffel's unique identifier for the airline-initiated change
1334
- */
1335
- id: string;
1336
- /**
1337
- * Duffel's unique identifier for the order
1338
- */
1339
- order_id: string;
1340
- /**
1341
- * List of updated slices and segments following the change
1342
- */
1343
- added: OrderSlice[];
1344
- /**
1345
- * List of slices and segments as they were before the change
1346
- */
1347
- removed: OrderSlice[];
1348
- /**
1349
- * The action taken in response to this airline-initiated change
1350
- */
1351
- action_taken: ActionTakenType;
1352
- /**
1353
- * The ISO 8601 datetime at which an action was taken
1354
- */
1355
- action_taken_at: string | null;
1356
- /**
1357
- * The available actions you can take on this Airline-Initiated Change through our API.
1358
- * 'update' means that you can use the update endpoint for an Airline-Initiated Change.
1359
- */
1360
- available_actions: AvailableActionType[];
1361
- /**
1362
- * The ISO 8601 datetime at which the Payment Intent was created
1363
- */
1364
- created_at: string;
1365
- /**
1366
- * The ISO 8601 datetime at which the airline-initiated change was last updated
1367
- */
1368
- updated_at: string;
1369
- /**
1370
- * The associated Travel Agent Ticket, if any, for this Airline-Initiated Change.
1371
- * This value will be present for Airline-Initiated changes that take some time to be processed.
1372
- */
1373
- travel_agent_ticket: TravelAgentTicket | EmptyObject | null;
1374
- }
1375
- export declare type AirlineInitiatedChanges = AirlineInitiatedChange[];
1376
- export interface Order {
1377
- /**
1378
- * The airline-initiated changes for this order.
1379
- */
1380
- airline_initiated_changes: AirlineInitiatedChanges;
1381
- /**
1382
- * The available actions you can take on this Order through our API.
1383
- */
1384
- available_actions: OrderAvailableAction[];
1385
- /**
1386
- * The available payment types to complete the order change.
1387
- *
1388
- * @todo
1389
- * Add this field to the API docs.
1390
- */
1391
- available_payment_types?: PaymentType[] | null;
1392
- /**
1393
- * The base price of the order for all flights and services booked,
1394
- * excluding taxes.
1395
- *
1396
- * @example
1397
- * "60.60"
1398
- */
1399
- base_amount: string;
1400
- /**
1401
- * The currency of the `base_amount`, as an ISO 4217 currency code. It
1402
- * will match your organisation's billing currency unless you’re using
1403
- * Duffel as an accredited IATA agent, in which case it will be in the
1404
- * currency provided by the airline (which will usually be based on the
1405
- * country where your IATA agency is registered).
1406
- *
1407
- * @example
1408
- * "GBP"
1409
- */
1410
- base_currency: string;
1411
- /**
1412
- * The airline's reference for the order, sometimes known as a "passenger
1413
- * name record" (PNR) or "record locator". Your customers can use this to
1414
- * check in and manage their booking on the airline's website. Usually,
1415
- * this is made up of six alphanumeric characters, but airlines can have
1416
- * their own formats (for example, easyJet's booking references are 7
1417
- * alphanumeric characters long and LATAM's references are made up of 13
1418
- * alphanumeric characters beginning with `LA`.)
1419
- *
1420
- * @example
1421
- * "RZPNX8"
1422
- */
1423
- booking_reference: string;
1424
- /**
1425
- * The ISO 8601 datetime at which the order was cancelled, if it has been
1426
- * cancelled.
1427
- *
1428
- * @example
1429
- * "2020-04-11T15:48:11.642Z"
1430
- */
1431
- cancelled_at: string | null;
1432
- /**
1433
- * The passenger-initiated changes for this Order.
1434
- */
1435
- changes: OrderChanges;
1436
- /**
1437
- * The conditions associated with this order, describing the kinds of
1438
- * modifications you can make to it and any penalties that will apply to
1439
- * those modifications. This information assumes the condition is applied
1440
- * to all of the slices and passengers associated with this order - for
1441
- * information at the slice level (e.g. "what happens if I just want to
1442
- * change the first slice?") refer to the `slices`. If a particular kind
1443
- * of modification is allowed, you may not always be able to take action
1444
- * through the Duffel API. In some cases, you may need to contact the
1445
- * Duffel support team or the airline directly.
1446
- */
1447
- conditions: {
1448
- change_before_departure: OfferCondition | null;
1449
- refund_before_departure: OfferCondition | null;
1450
- };
1451
- /**
1452
- * Whether the Order is Self-Managed or Managed.
1453
- */
1454
- content: "self_managed" | "managed";
1455
- /**
1456
- * The ISO 8601 datetime at which the order was created.
1457
- *
1458
- * @example
1459
- * "2020-04-11T15:48:11.642Z"
1460
- *
1461
- */
1462
- created_at: string;
1463
- /**
1464
- * The documents issued for this order.
1465
- */
1466
- documents: OrderDocuments;
1467
- /**
1468
- * Duffel's unique identifier for the order.
1469
- */
1470
- id: string;
1471
- /**
1472
- * Whether the order was created in live mode. This field will be set to
1473
- * `true` if the order was created in live mode, or `false` if it was
1474
- * created in test mode.
1475
- *
1476
- * @example
1477
- * false
1478
- */
1479
- live_mode: boolean;
1480
- /**
1481
- * Metadata contains a set of key-value pairs that you can attach to an
1482
- * object. It can be useful for storing additional information about the
1483
- * object, in a structured format. Duffel does not use this information.
1484
- * You should not store sensitive information in this field.
1485
- *
1486
- * @example
1487
- * {"customer_prefs":"window seat","payment_intent_id":"pit_00009htYpSCXrwaB9DnUm2"}
1488
- */
1489
- metadata: Record<string, string>;
1490
- /**
1491
- * The airline who owns the order.
1492
- */
1493
- owner: Airline;
1494
- /**
1495
- * The passengers who are travelling.
1496
- */
1497
- passengers: OrderPassenger[];
1498
- /**
1499
- * The payment status for this order.
1500
- */
1501
- payment_status: OrderPaymentStatus;
1502
- /**
1503
- * The services booked along with this order.
1504
- */
1505
- services?: OrderService[];
1506
- /**
1507
- * The slices that make up the itinerary of this order. One-way journeys
1508
- * can be expressed using one slice, whereas return trips will need two.
1509
- */
1510
- slices: OrderSlice[];
1511
- /**
1512
- * Airlines are always the source of truth for orders. The orders returned
1513
- * in the Duffel API are a view of those orders. This field is the ISO
1514
- * 8601 datetime at which the Order was last synced with the airline. If
1515
- * this datetime is in the last minute you can consider the order up to
1516
- * date.
1517
- *
1518
- * @example
1519
- * "2020-04-11T15:48:11Z"
1520
- */
1521
- synced_at: string;
1522
- /**
1523
- * The amount of tax payable on the order for all the flights booked.
1524
- *
1525
- * @example
1526
- * "30.20"
1527
- */
1528
- tax_amount: string | null;
1529
- /**
1530
- * The currency of the tax_amount, as an ISO 4217 currency code. It will
1531
- * match your organisation's billing currency unless you’re using Duffel
1532
- * as an accredited IATA agent, in which case it will be in the currency
1533
- * provided by the airline (which will usually be based on the country
1534
- * where your IATA agency is registered).
1535
- *
1536
- * @example
1537
- * "GBP"
1538
- */
1539
- tax_currency: string | null;
1540
- /**
1541
- * @todo
1542
- * Add this field to the API docs.
1543
- */
1544
- ticket_by?: string | null;
1545
- /**
1546
- * The total price of the order for all the flights and services booked,
1547
- * including taxes.
1548
- *
1549
- * @example
1550
- * "90.80"
1551
- */
1552
- total_amount: string;
1553
- /**
1554
- * The currency of the `totalAmount`, as an ISO 4217 currency code. It
1555
- * will match your organisation's billing currency unless you're using
1556
- * Duffel as an accredited IATA agent, in which case it will be in the
1557
- * currency provided by the airline (which will usually be based on the
1558
- * country where your IATA agency is registered).
1559
- *
1560
- * @example
1561
- * "GBP"
1562
- */
1563
- total_currency: string;
1564
- }
1565
- export interface AdditionalBaggageSelectionCommonProps {
1566
- /**
1567
- * List of all passengers that will be purchasing baggages
1568
- */
1569
- passengers: LayoutSelectionPassenger[];
1570
- /**
1571
- * What to do when the user presses the Confirm button
1572
- */
1573
- onSubmit: (baggages: Baggage[]) => void;
1574
- /**
1575
- * Already selected baggages to initialize the component with
1576
- */
1577
- initialBaggageSelection?: Baggage[];
1578
- /**
1579
- * Optional currency conversion to enable prices to be shown in an alternative currency
1580
- */
1581
- currencyConversion?: CurrencyConversion;
1582
- }
1583
- export interface AdditionalBaggageSelectionOfferProps extends AdditionalBaggageSelectionCommonProps {
1584
- /**
1585
- * The offer we are selecting additional baggages for
1586
- */
1587
- offer: Offer;
1588
- /**
1589
- * The order we are selecting additional baggages for
1590
- */
1591
- order?: never;
1592
- /**
1593
- * The available services that can be applied to this order
1594
- */
1595
- availableServices?: never;
1596
- }
1597
- export interface AdditionalBaggageSelectionServicesProps extends AdditionalBaggageSelectionCommonProps {
1598
- /**
1599
- * The offer we are selecting additional baggages for
1600
- */
1601
- offer?: never;
1602
- /**
1603
- * The order we are selecting additional baggages for
1604
- */
1605
- order?: Order;
1606
- /**
1607
- * The available services that can be applied to this order
1608
- */
1609
- availableServices: OrderAvailableService[];
1610
- }
1611
- export declare type AdditionalBaggageSelectionProps = AdditionalBaggageSelectionOfferProps | AdditionalBaggageSelectionServicesProps;
1612
- export declare const AdditionalBaggageSelection: React.FC<AdditionalBaggageSelectionProps>;
1613
-
1614
- export {};