@duffel/components 3.1.3--prototype.4 → 3.1.3--prototype.6

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 (352) hide show
  1. package/{react-dist/custom-elements.js → custom-elements.js} +2 -2
  2. package/{react-dist/custom-elements.js.map → custom-elements.js.map} +1 -1
  3. package/{react-dist/index.js → index.js} +2 -2
  4. package/{react-dist/index.js.map → index.js.map} +1 -1
  5. package/package.json +3 -3
  6. package/scripts/generate-fixture.d.ts +3 -0
  7. package/scripts/setup-suggestion-data.d.ts +28 -0
  8. package/tsconfig.tsbuildinfo +1 -0
  9. package/.circleci/config.yml +0 -67
  10. package/.eslintrc.js +0 -47
  11. package/.github/CODEOWNERS +0 -4
  12. package/.github/ISSUE_TEMPLATE/bug_report.md +0 -29
  13. package/.github/renovate.json +0 -12
  14. package/.nvmrc +0 -1
  15. package/.prettierignore +0 -6
  16. package/.storybook/main.ts +0 -33
  17. package/.storybook/preview.tsx +0 -28
  18. package/.tool-versions +0 -1
  19. package/.vscode/extensions.json +0 -7
  20. package/.vscode/settings.json +0 -10
  21. package/.yarn/releases/yarn-4.0.1.cjs +0 -893
  22. package/.yarn/sdks/eslint/bin/eslint.js +0 -20
  23. package/.yarn/sdks/eslint/lib/api.js +0 -20
  24. package/.yarn/sdks/eslint/lib/unsupported-api.js +0 -20
  25. package/.yarn/sdks/eslint/package.json +0 -14
  26. package/.yarn/sdks/integrations.yml +0 -5
  27. package/.yarn/sdks/prettier/bin-prettier.js +0 -20
  28. package/.yarn/sdks/prettier/index.js +0 -20
  29. package/.yarn/sdks/prettier/package.json +0 -7
  30. package/.yarn/sdks/typescript/bin/tsc +0 -20
  31. package/.yarn/sdks/typescript/bin/tsserver +0 -20
  32. package/.yarn/sdks/typescript/lib/tsc.js +0 -20
  33. package/.yarn/sdks/typescript/lib/tsserver.js +0 -225
  34. package/.yarn/sdks/typescript/lib/tsserverlibrary.js +0 -225
  35. package/.yarn/sdks/typescript/lib/typescript.js +0 -20
  36. package/.yarn/sdks/typescript/package.json +0 -10
  37. package/.yarnrc.yml +0 -3
  38. package/CONTRIBUTING.md +0 -83
  39. package/README.md +0 -68
  40. package/__mocks__/styleMock.js +0 -6
  41. package/babel.config.js +0 -20
  42. package/commitlint.config.js +0 -4
  43. package/config/esbuild.base.config.js +0 -18
  44. package/config/esbuild.cdn.config.js +0 -51
  45. package/config/esbuild.dev.config.js +0 -46
  46. package/config/esbuild.react.config.js +0 -42
  47. package/data/airports.csv +0 -9084
  48. package/data/cities.csv +0 -256
  49. package/jest.config.ts +0 -14
  50. package/scripts/build-and-publish.sh +0 -42
  51. package/scripts/generate-fixture.ts +0 -200
  52. package/scripts/setup-suggestion-data.ts +0 -100
  53. package/scripts/upload-to-cdn.sh +0 -34
  54. package/scripts.tsconfig.json +0 -11
  55. package/src/components/DuffelAncillaries/Card.tsx +0 -126
  56. package/src/components/DuffelAncillaries/Counter.tsx +0 -40
  57. package/src/components/DuffelAncillaries/DuffelAncillaries.tsx +0 -350
  58. package/src/components/DuffelAncillaries/DuffelAncillariesCustomElement.tsx +0 -124
  59. package/src/components/DuffelAncillaries/bags/BaggageSelectionCard.tsx +0 -101
  60. package/src/components/DuffelAncillaries/bags/BaggageSelectionController.tsx +0 -88
  61. package/src/components/DuffelAncillaries/bags/BaggageSelectionModal.tsx +0 -81
  62. package/src/components/DuffelAncillaries/bags/BaggageSelectionModalBody.tsx +0 -60
  63. package/src/components/DuffelAncillaries/bags/BaggageSelectionModalBodyPassenger.tsx +0 -122
  64. package/src/components/DuffelAncillaries/bags/BaggageSelectionModalFooter.tsx +0 -88
  65. package/src/components/DuffelAncillaries/bags/BaggageSelectionModalHeader.tsx +0 -82
  66. package/src/components/DuffelAncillaries/bags/IncludedBaggageBanner.tsx +0 -51
  67. package/src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionCard.tsx +0 -90
  68. package/src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModal.tsx +0 -63
  69. package/src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBody.tsx +0 -56
  70. package/src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBodyListItem.tsx +0 -11
  71. package/src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalFooter.tsx +0 -74
  72. package/src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalHeader.tsx +0 -9
  73. package/src/components/DuffelAncillaries/seats/Amenity.tsx +0 -21
  74. package/src/components/DuffelAncillaries/seats/DeckSelect.tsx +0 -27
  75. package/src/components/DuffelAncillaries/seats/Element.tsx +0 -52
  76. package/src/components/DuffelAncillaries/seats/EmptyElement.tsx +0 -5
  77. package/src/components/DuffelAncillaries/seats/ExitElement.tsx +0 -17
  78. package/src/components/DuffelAncillaries/seats/Legend.tsx +0 -60
  79. package/src/components/DuffelAncillaries/seats/Row.tsx +0 -47
  80. package/src/components/DuffelAncillaries/seats/RowSection.tsx +0 -78
  81. package/src/components/DuffelAncillaries/seats/SeatElement.tsx +0 -120
  82. package/src/components/DuffelAncillaries/seats/SeatInfo.tsx +0 -32
  83. package/src/components/DuffelAncillaries/seats/SeatMap.tsx +0 -85
  84. package/src/components/DuffelAncillaries/seats/SeatMapUnavailable.tsx +0 -21
  85. package/src/components/DuffelAncillaries/seats/SeatSelectionCard.tsx +0 -103
  86. package/src/components/DuffelAncillaries/seats/SeatSelectionModal.tsx +0 -142
  87. package/src/components/DuffelAncillaries/seats/SeatSelectionModalBody.tsx +0 -13
  88. package/src/components/DuffelAncillaries/seats/SeatSelectionModalFooter.tsx +0 -89
  89. package/src/components/DuffelAncillaries/seats/SeatSelectionModalHeader.tsx +0 -97
  90. package/src/components/DuffelAncillaries/seats/SeatUnavailable.tsx +0 -14
  91. package/src/components/DuffelPayments/DuffelPayments.tsx +0 -224
  92. package/src/components/DuffelPayments/DuffelPaymentsCustomElement.tsx +0 -130
  93. package/src/components/PlacesLookup/PlacesLookup.tsx +0 -122
  94. package/src/components/shared/AnimatedLoaderEllipsis.tsx +0 -5
  95. package/src/components/shared/Button.tsx +0 -63
  96. package/src/components/shared/ErrorBoundary.tsx +0 -54
  97. package/src/components/shared/FetchOfferErrorState.tsx +0 -35
  98. package/src/components/shared/Icon.tsx +0 -151
  99. package/src/components/shared/IconButton.tsx +0 -42
  100. package/src/components/shared/Modal.tsx +0 -40
  101. package/src/components/shared/NonIdealState.tsx +0 -28
  102. package/src/components/shared/Stamp.tsx +0 -29
  103. package/src/components/shared/Tabs.tsx +0 -36
  104. package/src/custom-elements.ts +0 -13
  105. package/src/examples/client-side/README.md +0 -30
  106. package/src/examples/client-side/index.html +0 -57
  107. package/src/examples/full-stack/README.md +0 -34
  108. package/src/examples/full-stack/index.html +0 -48
  109. package/src/examples/full-stack/server.mjs +0 -158
  110. package/src/examples/just-typescript/.yarn/install-state.gz +0 -0
  111. package/src/examples/just-typescript/README.md +0 -37
  112. package/src/examples/just-typescript/package.json +0 -16
  113. package/src/examples/just-typescript/src/index.html +0 -23
  114. package/src/examples/just-typescript/src/index.ts +0 -36
  115. package/src/examples/just-typescript/yarn.lock +0 -467
  116. package/src/examples/next/README.md +0 -28
  117. package/src/examples/next/next-env.d.ts +0 -5
  118. package/src/examples/next/next.config.js +0 -4
  119. package/src/examples/next/package.json +0 -24
  120. package/src/examples/next/src/app/DuffelComponents.tsx +0 -40
  121. package/src/examples/next/src/app/layout.tsx +0 -18
  122. package/src/examples/next/src/app/page.tsx +0 -9
  123. package/src/examples/next/tsconfig.json +0 -27
  124. package/src/examples/next/yarn.lock +0 -257
  125. package/src/examples/payments-custom-element/README.md +0 -17
  126. package/src/examples/payments-custom-element/index.html +0 -43
  127. package/src/examples/payments-just-typescript/README.md +0 -37
  128. package/src/examples/payments-just-typescript/package.json +0 -16
  129. package/src/examples/payments-just-typescript/src/index.html +0 -23
  130. package/src/examples/payments-just-typescript/src/index.ts +0 -18
  131. package/src/examples/payments-just-typescript/yarn.lock +0 -154
  132. package/src/examples/react-app/README.md +0 -37
  133. package/src/examples/react-app/package.json +0 -20
  134. package/src/examples/react-app/src/index.html +0 -19
  135. package/src/examples/react-app/src/index.tsx +0 -48
  136. package/src/examples/react-app/yarn.lock +0 -219
  137. package/src/fixtures/offers/off_0000AUde3KwTztSRK1cznH.json +0 -497
  138. package/src/fixtures/offers/off_0000AVx4lUFFKW8PsPeQeQ.json +0 -307
  139. package/src/fixtures/offers/off_1.json +0 -488
  140. package/src/fixtures/passengers/mock_passengers.ts +0 -26
  141. package/src/fixtures/seat-maps/off_0000AUde3KwTztSRK1cznH.json +0 -6852
  142. package/src/fixtures/seat-maps/off_0000AVx4lUFFKW8PsPeQeQ.json +0 -1
  143. package/src/fixtures/seat-maps/off_1.json +0 -6852
  144. package/src/index.ts +0 -7
  145. package/src/lib/captureErrorInSentry.ts +0 -42
  146. package/src/lib/compileCreateOrderPayload.ts +0 -63
  147. package/src/lib/createPriceFormatters.ts +0 -73
  148. package/src/lib/fetchFromDuffelAPI.ts +0 -54
  149. package/src/lib/fetchFromFixtures.ts +0 -18
  150. package/src/lib/formatAvailableServices.ts +0 -91
  151. package/src/lib/formatDate.ts +0 -20
  152. package/src/lib/formatSeatMaps.ts +0 -81
  153. package/src/lib/getBaggageServiceDescription.ts +0 -39
  154. package/src/lib/getCabinsForSegmentAndDeck.ts +0 -4
  155. package/src/lib/getCurrencyForSeatMaps.ts +0 -22
  156. package/src/lib/getCurrencyForServices.ts +0 -24
  157. package/src/lib/getFirstSeatElementMatchingCriteria.ts +0 -22
  158. package/src/lib/getPassengerBySegmentList.ts +0 -10
  159. package/src/lib/getPassengerInitials.ts +0 -6
  160. package/src/lib/getPassengerMapById.ts +0 -17
  161. package/src/lib/getPassengerName.ts +0 -41
  162. package/src/lib/getRowNumber.ts +0 -16
  163. package/src/lib/getSegmentList.ts +0 -7
  164. package/src/lib/getServicePriceMapById.ts +0 -20
  165. package/src/lib/getSymbols.ts +0 -22
  166. package/src/lib/getTotalAmountForServices.ts +0 -72
  167. package/src/lib/getTotalQuantity.ts +0 -5
  168. package/src/lib/hasHighLuminance.ts +0 -9
  169. package/src/lib/hasService.ts +0 -24
  170. package/src/lib/hasServiceOfSameMetadataTypeAlreadyBeenSelected.ts +0 -35
  171. package/src/lib/hasWings.ts +0 -8
  172. package/src/lib/isBaggageService.ts +0 -8
  173. package/src/lib/isCancelForAnyReasonService.ts +0 -9
  174. package/src/lib/isFixtureOfferId.ts +0 -4
  175. package/src/lib/isPayloadComplete.ts +0 -11
  176. package/src/lib/isSeatElement.ts +0 -10
  177. package/src/lib/logging.ts +0 -120
  178. package/src/lib/moneyStringFormatter.ts +0 -34
  179. package/src/lib/offerIsExpired.ts +0 -5
  180. package/src/lib/retrieveOffer.ts +0 -56
  181. package/src/lib/retrieveOfferFromDuffelAPI.ts +0 -13
  182. package/src/lib/retrieveSeatMaps.ts +0 -55
  183. package/src/lib/retrieveSeatMapsFromDuffelAPI.ts +0 -13
  184. package/src/lib/setBodyScrollability.ts +0 -7
  185. package/src/lib/validateProps.ts +0 -37
  186. package/src/lib/withPlural.ts +0 -8
  187. package/src/stories/BaggageSelectionModalHeader.stories.tsx +0 -21
  188. package/src/stories/Button.stories.tsx +0 -91
  189. package/src/stories/DuffelAncillaries.stories.tsx +0 -166
  190. package/src/stories/DuffelPayments.stories.tsx +0 -34
  191. package/src/stories/Icon.stories.tsx +0 -35
  192. package/src/stories/IconButton.stories.tsx +0 -25
  193. package/src/stories/PlacesLookup.stories.tsx +0 -22
  194. package/src/styles/colors.css +0 -22
  195. package/src/styles/components/Amenity.css +0 -23
  196. package/src/styles/components/BaggageDisplay.css +0 -25
  197. package/src/styles/components/Button.css +0 -169
  198. package/src/styles/components/Card.css +0 -52
  199. package/src/styles/components/CfarSelectionModal.css +0 -34
  200. package/src/styles/components/Counter.css +0 -18
  201. package/src/styles/components/DuffelPayments.css +0 -42
  202. package/src/styles/components/IconButton.css +0 -63
  203. package/src/styles/components/Legend.css +0 -62
  204. package/src/styles/components/Loader.css +0 -37
  205. package/src/styles/components/LoadingState.css +0 -87
  206. package/src/styles/components/Modal.css +0 -84
  207. package/src/styles/components/PassengerSelect.css +0 -99
  208. package/src/styles/components/PassengersLayout.css +0 -90
  209. package/src/styles/components/PlacesLookup.css +0 -36
  210. package/src/styles/components/Row.css +0 -70
  211. package/src/styles/components/Seat.css +0 -59
  212. package/src/styles/components/SeatInfo.css +0 -61
  213. package/src/styles/components/SeatMap.css +0 -24
  214. package/src/styles/components/SeatSelect.css +0 -92
  215. package/src/styles/components/Segment.css +0 -17
  216. package/src/styles/components/SelectionSegment.css +0 -10
  217. package/src/styles/components/Summary.css +0 -70
  218. package/src/styles/components/Tabs.css +0 -52
  219. package/src/styles/flex.css +0 -5
  220. package/src/styles/font-families.css +0 -47
  221. package/src/styles/global.css +0 -52
  222. package/src/styles/margin.css +0 -3
  223. package/src/styles/spacing.css +0 -18
  224. package/src/styles/transitions.css +0 -3
  225. package/src/styles/typography.css +0 -13
  226. package/src/tests/components/DuffelAncillaries.test.tsx +0 -342
  227. package/src/tests/lib/createPriceFormatters.test.tsx +0 -152
  228. package/src/tests/lib/formatAvailableServices.test.tsx +0 -79
  229. package/src/tests/lib/formatSeatMaps.test.tsx +0 -49
  230. package/src/tests/lib/getCurrencyForServices.test.tsx +0 -44
  231. package/src/tests/lib/hasServiceOfSameMetadataTypeAlreadyBeenSelected.test.ts +0 -86
  232. package/src/tests/lib/logging.test.tsx +0 -32
  233. package/src/tests/lib/moneyStringFormatter.test.tsx +0 -12
  234. package/src/tests/lib/validateProps.test.tsx +0 -57
  235. package/src/types/Aircraft.ts +0 -16
  236. package/src/types/Airline.ts +0 -16
  237. package/src/types/Airport.ts +0 -54
  238. package/src/types/City.ts +0 -21
  239. package/src/types/CreateOrderPayload.ts +0 -99
  240. package/src/types/CurrencyConversion.ts +0 -10
  241. package/src/types/DuffelAncillariesProps.ts +0 -108
  242. package/src/types/Offer.ts +0 -851
  243. package/src/types/Order.ts +0 -6
  244. package/src/types/Place.ts +0 -6
  245. package/src/types/SeatMap.ts +0 -231
  246. package/src/types/index.ts +0 -11
  247. package/tsconfig.json +0 -58
  248. /package/{react-dist/components → components}/DuffelAncillaries/Card.d.ts +0 -0
  249. /package/{react-dist/components → components}/DuffelAncillaries/Counter.d.ts +0 -0
  250. /package/{react-dist/components → components}/DuffelAncillaries/DuffelAncillaries.d.ts +0 -0
  251. /package/{react-dist/components → components}/DuffelAncillaries/DuffelAncillariesCustomElement.d.ts +0 -0
  252. /package/{react-dist/components → components}/DuffelAncillaries/bags/BaggageSelectionCard.d.ts +0 -0
  253. /package/{react-dist/components → components}/DuffelAncillaries/bags/BaggageSelectionController.d.ts +0 -0
  254. /package/{react-dist/components → components}/DuffelAncillaries/bags/BaggageSelectionModal.d.ts +0 -0
  255. /package/{react-dist/components → components}/DuffelAncillaries/bags/BaggageSelectionModalBody.d.ts +0 -0
  256. /package/{react-dist/components → components}/DuffelAncillaries/bags/BaggageSelectionModalBodyPassenger.d.ts +0 -0
  257. /package/{react-dist/components → components}/DuffelAncillaries/bags/BaggageSelectionModalFooter.d.ts +0 -0
  258. /package/{react-dist/components → components}/DuffelAncillaries/bags/BaggageSelectionModalHeader.d.ts +0 -0
  259. /package/{react-dist/components → components}/DuffelAncillaries/bags/IncludedBaggageBanner.d.ts +0 -0
  260. /package/{react-dist/components → components}/DuffelAncillaries/cancel_for_any_reason/CfarSelectionCard.d.ts +0 -0
  261. /package/{react-dist/components → components}/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModal.d.ts +0 -0
  262. /package/{react-dist/components → components}/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBody.d.ts +0 -0
  263. /package/{react-dist/components → components}/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBodyListItem.d.ts +0 -0
  264. /package/{react-dist/components → components}/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalFooter.d.ts +0 -0
  265. /package/{react-dist/components → components}/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalHeader.d.ts +0 -0
  266. /package/{react-dist/components → components}/DuffelAncillaries/seats/Amenity.d.ts +0 -0
  267. /package/{react-dist/components → components}/DuffelAncillaries/seats/DeckSelect.d.ts +0 -0
  268. /package/{react-dist/components → components}/DuffelAncillaries/seats/Element.d.ts +0 -0
  269. /package/{react-dist/components → components}/DuffelAncillaries/seats/EmptyElement.d.ts +0 -0
  270. /package/{react-dist/components → components}/DuffelAncillaries/seats/ExitElement.d.ts +0 -0
  271. /package/{react-dist/components → components}/DuffelAncillaries/seats/Legend.d.ts +0 -0
  272. /package/{react-dist/components → components}/DuffelAncillaries/seats/Row.d.ts +0 -0
  273. /package/{react-dist/components → components}/DuffelAncillaries/seats/RowSection.d.ts +0 -0
  274. /package/{react-dist/components → components}/DuffelAncillaries/seats/SeatElement.d.ts +0 -0
  275. /package/{react-dist/components → components}/DuffelAncillaries/seats/SeatInfo.d.ts +0 -0
  276. /package/{react-dist/components → components}/DuffelAncillaries/seats/SeatMap.d.ts +0 -0
  277. /package/{react-dist/components → components}/DuffelAncillaries/seats/SeatMapUnavailable.d.ts +0 -0
  278. /package/{react-dist/components → components}/DuffelAncillaries/seats/SeatSelectionCard.d.ts +0 -0
  279. /package/{react-dist/components → components}/DuffelAncillaries/seats/SeatSelectionModal.d.ts +0 -0
  280. /package/{react-dist/components → components}/DuffelAncillaries/seats/SeatSelectionModalBody.d.ts +0 -0
  281. /package/{react-dist/components → components}/DuffelAncillaries/seats/SeatSelectionModalFooter.d.ts +0 -0
  282. /package/{react-dist/components → components}/DuffelAncillaries/seats/SeatSelectionModalHeader.d.ts +0 -0
  283. /package/{react-dist/components → components}/DuffelAncillaries/seats/SeatUnavailable.d.ts +0 -0
  284. /package/{react-dist/components → components}/DuffelPayments/DuffelPayments.d.ts +0 -0
  285. /package/{react-dist/components → components}/DuffelPayments/DuffelPaymentsCustomElement.d.ts +0 -0
  286. /package/{react-dist/components → components}/PlacesLookup/PlacesLookup.d.ts +0 -0
  287. /package/{react-dist/components → components}/shared/AnimatedLoaderEllipsis.d.ts +0 -0
  288. /package/{react-dist/components → components}/shared/Button.d.ts +0 -0
  289. /package/{react-dist/components → components}/shared/ErrorBoundary.d.ts +0 -0
  290. /package/{react-dist/components → components}/shared/FetchOfferErrorState.d.ts +0 -0
  291. /package/{react-dist/components → components}/shared/Icon.d.ts +0 -0
  292. /package/{react-dist/components → components}/shared/IconButton.d.ts +0 -0
  293. /package/{react-dist/components → components}/shared/Modal.d.ts +0 -0
  294. /package/{react-dist/components → components}/shared/NonIdealState.d.ts +0 -0
  295. /package/{react-dist/components → components}/shared/Stamp.d.ts +0 -0
  296. /package/{react-dist/components → components}/shared/Tabs.d.ts +0 -0
  297. /package/{react-dist/custom-elements.d.ts → custom-elements.d.ts} +0 -0
  298. /package/{react-dist/index.d.ts → index.d.ts} +0 -0
  299. /package/{react-dist/lib → lib}/captureErrorInSentry.d.ts +0 -0
  300. /package/{react-dist/lib → lib}/compileCreateOrderPayload.d.ts +0 -0
  301. /package/{react-dist/lib → lib}/createPriceFormatters.d.ts +0 -0
  302. /package/{react-dist/lib → lib}/fetchFromDuffelAPI.d.ts +0 -0
  303. /package/{react-dist/lib → lib}/fetchFromFixtures.d.ts +0 -0
  304. /package/{react-dist/lib → lib}/formatAvailableServices.d.ts +0 -0
  305. /package/{react-dist/lib → lib}/formatDate.d.ts +0 -0
  306. /package/{react-dist/lib → lib}/formatSeatMaps.d.ts +0 -0
  307. /package/{react-dist/lib → lib}/getBaggageServiceDescription.d.ts +0 -0
  308. /package/{react-dist/lib → lib}/getCabinsForSegmentAndDeck.d.ts +0 -0
  309. /package/{react-dist/lib → lib}/getCurrencyForSeatMaps.d.ts +0 -0
  310. /package/{react-dist/lib → lib}/getCurrencyForServices.d.ts +0 -0
  311. /package/{react-dist/lib → lib}/getFirstSeatElementMatchingCriteria.d.ts +0 -0
  312. /package/{react-dist/lib → lib}/getPassengerBySegmentList.d.ts +0 -0
  313. /package/{react-dist/lib → lib}/getPassengerInitials.d.ts +0 -0
  314. /package/{react-dist/lib → lib}/getPassengerMapById.d.ts +0 -0
  315. /package/{react-dist/lib → lib}/getPassengerName.d.ts +0 -0
  316. /package/{react-dist/lib → lib}/getRowNumber.d.ts +0 -0
  317. /package/{react-dist/lib → lib}/getSegmentList.d.ts +0 -0
  318. /package/{react-dist/lib → lib}/getServicePriceMapById.d.ts +0 -0
  319. /package/{react-dist/lib → lib}/getSymbols.d.ts +0 -0
  320. /package/{react-dist/lib → lib}/getTotalAmountForServices.d.ts +0 -0
  321. /package/{react-dist/lib → lib}/getTotalQuantity.d.ts +0 -0
  322. /package/{react-dist/lib → lib}/hasHighLuminance.d.ts +0 -0
  323. /package/{react-dist/lib → lib}/hasService.d.ts +0 -0
  324. /package/{react-dist/lib → lib}/hasServiceOfSameMetadataTypeAlreadyBeenSelected.d.ts +0 -0
  325. /package/{react-dist/lib → lib}/hasWings.d.ts +0 -0
  326. /package/{react-dist/lib → lib}/isBaggageService.d.ts +0 -0
  327. /package/{react-dist/lib → lib}/isCancelForAnyReasonService.d.ts +0 -0
  328. /package/{react-dist/lib → lib}/isFixtureOfferId.d.ts +0 -0
  329. /package/{react-dist/lib → lib}/isPayloadComplete.d.ts +0 -0
  330. /package/{react-dist/lib → lib}/isSeatElement.d.ts +0 -0
  331. /package/{react-dist/lib → lib}/logging.d.ts +0 -0
  332. /package/{react-dist/lib → lib}/moneyStringFormatter.d.ts +0 -0
  333. /package/{react-dist/lib → lib}/offerIsExpired.d.ts +0 -0
  334. /package/{react-dist/lib → lib}/retrieveOffer.d.ts +0 -0
  335. /package/{react-dist/lib → lib}/retrieveOfferFromDuffelAPI.d.ts +0 -0
  336. /package/{react-dist/lib → lib}/retrieveSeatMaps.d.ts +0 -0
  337. /package/{react-dist/lib → lib}/retrieveSeatMapsFromDuffelAPI.d.ts +0 -0
  338. /package/{react-dist/lib → lib}/setBodyScrollability.d.ts +0 -0
  339. /package/{react-dist/lib → lib}/validateProps.d.ts +0 -0
  340. /package/{react-dist/lib → lib}/withPlural.d.ts +0 -0
  341. /package/{react-dist/types → types}/Aircraft.d.ts +0 -0
  342. /package/{react-dist/types → types}/Airline.d.ts +0 -0
  343. /package/{react-dist/types → types}/Airport.d.ts +0 -0
  344. /package/{react-dist/types → types}/City.d.ts +0 -0
  345. /package/{react-dist/types → types}/CreateOrderPayload.d.ts +0 -0
  346. /package/{react-dist/types → types}/CurrencyConversion.d.ts +0 -0
  347. /package/{react-dist/types → types}/DuffelAncillariesProps.d.ts +0 -0
  348. /package/{react-dist/types → types}/Offer.d.ts +0 -0
  349. /package/{react-dist/types → types}/Order.d.ts +0 -0
  350. /package/{react-dist/types → types}/Place.d.ts +0 -0
  351. /package/{react-dist/types → types}/SeatMap.d.ts +0 -0
  352. /package/{react-dist/types → types}/index.d.ts +0 -0
@@ -1,851 +0,0 @@
1
- import { Aircraft } from "./Aircraft";
2
- import { Airline } from "./Airline";
3
- import { Airport } from "./Airport";
4
- import { City } from "./City";
5
-
6
- export const CabinClassMap = {
7
- economy: "Economy",
8
- premium_economy: "Premium Economy",
9
- business: "Business",
10
- first: "First",
11
- any: "Any",
12
- };
13
- export type CabinClass = keyof typeof CabinClassMap;
14
-
15
- export type PassengerIdentityDocumentType = "passport";
16
- /**
17
- * Each offer represents flights you can buy from an airline at a particular price that meet your search criteria.
18
- */
19
-
20
- export type PaymentType = "arc_bsp_cash" | "balance" | "payments" | "card";
21
- export type BaggageType = "carry_on" | "checked";
22
-
23
- export const PassengerTypeMap = {
24
- adult: "Adult",
25
- child: "Child",
26
- infant_without_seat: "Infant",
27
- };
28
-
29
- export type PassengerType = keyof typeof PassengerTypeMap;
30
- export type PlaceType = "airport" | "city";
31
-
32
- export interface PaymentRequirements {
33
- /**
34
- * The ISO 8601 datetime by which you must pay for this offer. At this
35
- * time, if still unpaid, the reserved space on the flight(s) will be
36
- * released and you will have to create a new order. This will be `null`
37
- * when the offer requires immediate payment - that is, when
38
- * `requires_instant_payment` is `true`.
39
- *
40
- * @example
41
- * "2020-01-17T10:42:14Z"
42
- */
43
- payment_required_by?: string | null;
44
-
45
- /**
46
- * The ISO 8601 datetime at which the price associated with the order will
47
- * no longer be guaranteed by the airline and may change before payment.
48
- * This will be null when `requires_instant_payment` is `true`.
49
- *
50
- * @example
51
- * "2020-01-17T10:42:14"
52
- */
53
- price_guarantee_expires_at?: string | null;
54
-
55
- /**
56
- * When payment is required at the time of booking this will be `true` and
57
- * `payment_required_by` and `price_guarantee_expires_at` will be `null`.
58
- * When payment can be made at a time after booking, this will be false
59
- * and the time limits on the payment will be provided in
60
- * `payment_required_by` and `price_guarantee_expires_at`.
61
- */
62
- requires_instant_payment: boolean;
63
- }
64
-
65
- export interface OfferAvailableServiceCommon {
66
- /**
67
- * Duffel's unique identifier for the service.
68
- *
69
- * @example
70
- * "ase_00009UhD4ongolulWd9123"
71
- */
72
- id: string;
73
-
74
- /**
75
- * The maximum quantity of this service that can be booked with an order.
76
- *
77
- * @example
78
- * 1
79
- */
80
- maximum_quantity: number;
81
-
82
- /**
83
- * The list of passenger `id`s the service applies to. If you add this
84
- * service to an order it will apply to all the passengers in this list.
85
- * For services where the type is `baggage`, this list will include only a
86
- * single passenger.
87
- *
88
- * @example
89
- * ["pas_00009hj8USM7Ncg31cBCLL"]
90
- */
91
- passenger_ids: string[];
92
-
93
- /**
94
- * The list of segment `id`s the service applies to. If you add this
95
- * service to an order it will apply to all the segments in this list. For
96
- * services where the type is `baggage`, depending on the airline, this
97
- * list includes all the segments of all slices or all the segments of a
98
- * single slice.
99
- *
100
- * @example
101
- * ["seg_00009hj8USM7Ncg31cB456"]
102
- */
103
- segment_ids: string[];
104
-
105
- /**
106
- * The total price of the service for all passengers and segments it
107
- * applies to, including taxes. This price is for a single unit of the
108
- * service.
109
- *
110
- * @example
111
- * "15.00"
112
- */
113
- total_amount: string;
114
-
115
- /**
116
- * The currency of the `totalAmount`, as an ISO 4217 currency code.
117
- */
118
- total_currency: string;
119
- }
120
-
121
- export interface OfferAvailableServiceBaggageMetadata {
122
- /**
123
- * The maximum depth that the baggage can have in centimetres
124
- *
125
- * @example
126
- * 75
127
- */
128
- maximum_depth_cm: number | null;
129
-
130
- /**
131
- * The maximum height that the baggage can have in centimetres
132
- *
133
- * @example
134
- * 90
135
- */
136
- maximum_height_cm: number | null;
137
-
138
- /**
139
- * The maximum length that the baggage can have in centimetres
140
- *
141
- * @example
142
- * 90
143
- */
144
- maximum_length_cm: number | null;
145
-
146
- /**
147
- * The maximum weight that the baggage can have in kilograms
148
- *
149
- * @example
150
- * 23
151
- */
152
- maximum_weight_kg: number | null;
153
-
154
- /**
155
- * The type of the baggage
156
- */
157
- type: BaggageType;
158
- }
159
-
160
- export interface OfferAvailableServiceBaggage
161
- extends OfferAvailableServiceCommon {
162
- /**
163
- * The metadata varies by the type of service. It includes further data
164
- * about the service. For example, for baggages, it may have data about
165
- * size and weight restrictions.
166
- */
167
- metadata: OfferAvailableServiceBaggageMetadata;
168
-
169
- /**
170
- * The type of the service.
171
- */
172
- type: "baggage";
173
- }
174
-
175
- export interface Offer {
176
- /**
177
- * The types of identity documents that may be provided for the passengers when creating an order based on this offer.
178
- * Currently, the only supported type is `passport`. If this is `[]`, then you must not provide identity documents.
179
- */
180
- allowed_passenger_identity_document_types: PassengerIdentityDocumentType[];
181
-
182
- /**
183
- * The services that can be booked along with the offer but are not included by default, for example an additional checked bag.
184
- * This field is only returned in the Get single offer endpoint.
185
- * When there are no services available, or we don't support services for the airline, this list will be empty.
186
- */
187
- available_services: Array<
188
- OfferAvailableBaggageService | OfferAvailableServiceCancelForAnyReason
189
- >;
190
-
191
- /**
192
- * The base price of the offer for all passengers, excluding taxes.
193
- * It does not include the base amount of any service(s) that might be booked with the offer.
194
- */
195
- base_amount: string;
196
-
197
- /**
198
- * The currency of the `base_amount`, as an ISO 4217 currency code
199
- */
200
- base_currency: string;
201
-
202
- /**
203
- * The ISO 8601 datetime at which the offer was created
204
- */
205
- created_at: string;
206
-
207
- /**
208
- * The ISO 8601 datetime at which the offer will expire and no longer be usable to create an order
209
- */
210
- expires_at: string;
211
-
212
- /**
213
- * Duffel's unique identifier for the offer
214
- */
215
- id: string;
216
-
217
- /**
218
- * Whether the offer request was created in live mode.
219
- * 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.
220
- */
221
- live_mode: boolean;
222
-
223
- /**
224
- * The airline which provided the offer
225
- */
226
- owner: Airline;
227
-
228
- /**
229
- * Whether the offer is a partial offer
230
- */
231
- partial?: boolean;
232
-
233
- /**
234
- * Whether identity documents must be provided for each of the passengers when creating an order based on this offer.
235
- * If this is `true`, you must provide an identity document for every passenger.
236
- */
237
- passenger_identity_documents_required: boolean;
238
-
239
- /**
240
- * The passengers included in the offer
241
- */
242
- passengers: OfferPassenger[];
243
-
244
- /**
245
- * The payment requirements for this offer.
246
- */
247
- payment_requirements: PaymentRequirements;
248
-
249
- /**
250
- * The private fares applied on this offer.
251
- */
252
- private_fares: OfferPrivateFare[];
253
-
254
- /**
255
- * The slices that make up this offer. Each slice will include one or more segments,
256
- * the specific flights that the airline is offering to take the passengers from the slice's `origin` to its `destination`.
257
- */
258
- slices: OfferSlice[];
259
-
260
- /**
261
- * The amount of tax payable on the offer for all passengers
262
- */
263
- tax_amount: string | null;
264
-
265
- /**
266
- * The currency of the `tax_amount`, as an ISO 4217 currency code
267
- */
268
- tax_currency: string | null;
269
-
270
- /**
271
- * The total price of the offer for all passengers, including taxes.
272
- * It does not include the total price of any service(s) that might be booked with the offer.
273
- */
274
- total_amount: string;
275
-
276
- /**
277
- * An estimate of the total carbon dioxide (CO₂) emissions when
278
- * all of the passengers fly this offer's itinerary, measured in kilograms
279
- */
280
- total_emissions_kg: string;
281
-
282
- /**
283
- * The currency of the `total_amount`, as an ISO 4217 currency code
284
- */
285
- total_currency: string;
286
-
287
- /**
288
- * List of supported payment types
289
- */
290
- available_payment_types: PaymentType[];
291
-
292
- /**
293
- * The conditions associated with this offer
294
- */
295
- conditions: {
296
- /**
297
- * Whether the whole offer can be changed before the departure of the
298
- * first slice. If the airline hasn't provided any information about
299
- * whether this offer can be changed then this property will be `null`.
300
- */
301
- change_before_departure: OfferCondition | null;
302
-
303
- /**
304
- * Whether the whole offer can be refunded before the departure of the
305
- * first slice. If the airline hasn't provided any information about
306
- * whether this offer can be refunded then this property will be `null`.
307
- */
308
- refund_before_departure: OfferCondition | null;
309
- };
310
-
311
- /* A client key to be used with https://github.com/duffelhq/duffel-checkout */
312
- client_key: string;
313
- }
314
-
315
- export interface OfferPassenger {
316
- /**
317
- * The age of the passenger on the departure_date of the final slice.
318
- *
319
- * @example
320
- * 14
321
- */
322
- age: number;
323
-
324
- /**
325
- * The passenger's family name. Only `space`, `-`, `'`, and letters from
326
- * the `ASCII`, `Latin-1 Supplement` and `Latin Extended-A` (with the
327
- * exceptions of `Æ`, `æ`, `IJ`, `ij`, `Œ`, `œ`, `Þ`, and `ð`) Unicode
328
- * charts are accepted. All other characters will result in a validation
329
- * error. The minimum length is 1 character, and the maximum is 20
330
- * characters.
331
- *
332
- * This is only required if you're also including Loyalty Programme
333
- * Accounts.
334
- *
335
- * @example
336
- * "Earhart"
337
- */
338
- family_name: string | null;
339
-
340
- /**
341
- * The passenger's given name. Only `space`, `-`, `'`, and letters from
342
- * the `ASCII`, `Latin-1 Supplement` and `Latin Extended-A` (with the
343
- * exceptions of `Æ`, `æ`, `IJ`, `ij`, `Œ`, `œ`, `Þ`, and `ð`) Unicode
344
- * charts are accepted. All other characters will result in a validation
345
- * error. The minimum length is 1 character, and the maximum is 20
346
- * characters.
347
- *
348
- * This is only required if you're also including Loyalty Programme
349
- * Accounts.
350
- *
351
- * @example
352
- * "Amelia"
353
- */
354
- given_name: string | null;
355
-
356
- /**
357
- * The identifier for the passenger. This ID will be generated by Duffel.
358
- *
359
- * @example
360
- * "pas_00009hj8USM7Ncg31cBCLx"
361
- */
362
- id: string;
363
-
364
- /**
365
- * The Loyalty Programme Accounts for this passenger.
366
- */
367
- loyalty_programme_accounts?: LoyaltyProgrammeAccount[];
368
-
369
- /**
370
- * The type of the passenger.
371
- */
372
- type: PassengerType;
373
- }
374
-
375
- export interface LoyaltyProgrammeAccount {
376
- /**
377
- * The passenger's account number for this Loyalty Programme Account
378
- */
379
- account_number: string;
380
-
381
- /**
382
- * The IATA code for the airline that this Loyalty Programme Account belongs to
383
- */
384
- airline_iata_code: string;
385
- }
386
-
387
- export interface OfferPrivateFare {
388
- /**
389
- * The corporate code that was applied, if any.
390
- */
391
- corporate_code?: string;
392
-
393
- /**
394
- * The tracking reference that was applied, if any.
395
- */
396
- tracking_reference?: string;
397
-
398
- /**
399
- * The type of private fare applied.
400
- */
401
- type: "corporate" | "leisure" | "negotiated";
402
- }
403
-
404
- export interface OfferSlice {
405
- /**
406
- * The options and conditions to change or cancel this slice. Only
407
- * "changing before departure" is allowed.
408
- */
409
- conditions: {
410
- /**
411
- * Whether this slice can be changed before the departure. If the slice
412
- * can be changed for all of the passengers then the allowed property
413
- * will be `true` and information will be provided about any penalties. If
414
- * none of the passengers on the slice can be changed then the allowed
415
- * property will be `false`. In all other cases this property will be
416
- * `null`indicating we can't provide the information for this slice.
417
- */
418
- change_before_departure: OfferCondition | null;
419
- };
420
-
421
- /**
422
- * The city or airport where this slice ends.
423
- */
424
- destination: OfferSlicePlace;
425
-
426
- /**
427
- * The type of the destination.
428
- */
429
- destination_type: PlaceType;
430
-
431
- /**
432
- * The duration of the slice, represented as a ISO 8601 duration.
433
- *
434
- * @example
435
- * "PT02H26M"
436
- */
437
- duration: string | null;
438
-
439
- /**
440
- * The name of the fare brand associated with this slice. A fare brand
441
- * specifies the travel conditions you get on your slice made available by
442
- * the airline. e.g. a British Airways Economy Basic fare will only
443
- * include a hand baggage allowance. It is worth noting that the fare
444
- * brand names are defined by the airlines themselves and therefore they
445
- * are subject to change without any prior notice. We are in the process
446
- * of adding support for `fare_brand_name` across all our airlines, so for
447
- * now, this field may be `null` in some offers. This will become a
448
- * non-nullable attribute in the near future.
449
- *
450
- * @example
451
- * "Basic"
452
- */
453
- fare_brand_name: string | null;
454
-
455
- /**
456
- * Duffel's unique identifier for the slice. It identifies the slice of
457
- * an offer (i.e. the same slice across offers will have different `id`s).
458
- *
459
- * @example
460
- * "sli_00009htYpSCXrwaB9Dn123"
461
- */
462
- id: string;
463
-
464
- /**
465
- * The city or airport where this slice begins.
466
- */
467
- origin: OfferSlicePlace;
468
-
469
- /**
470
- * The type of the origin
471
- */
472
- origin_type: PlaceType;
473
-
474
- /**
475
- * The segments - that is, specific flights - that the airline is offering
476
- * to get the passengers from the `origin` to the `destination`
477
- */
478
- segments: OfferSliceSegment[];
479
- }
480
-
481
- export interface OfferSlicePlace {
482
- /**
483
- * The 3-letter IATA code for the city where the place is located.
484
- * 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).
485
- */
486
- iata_city_code: string | null;
487
-
488
- /**
489
- * The 3-letter IATA code for the place
490
- */
491
- iata_code: string;
492
-
493
- /**
494
- * Duffel's unique identifier for the place
495
- */
496
- id: string;
497
-
498
- /**
499
- * The name of the place
500
- */
501
- name: string;
502
-
503
- /**
504
- * The type of the place
505
- */
506
- type: PlaceType;
507
-
508
- /**
509
- * The ISO 3166-1 alpha-2 code for the country where the city is located
510
- */
511
- iata_country_code: string;
512
-
513
- /**
514
- * The latitude position of the airport represented in Decimal degrees with 6 decimal points with a range between -90° and 90°
515
- */
516
- latitude: number | null;
517
-
518
- /**
519
- * The longitude position of the airport represented in Decimal degrees with 6 decimal points with a range between -180° and 180°
520
- */
521
- longitude: number | null;
522
-
523
- /**
524
- * The four-character ICAO code for the airport
525
- */
526
- icao_code: string | null;
527
-
528
- /**
529
- * The time zone of the airport, specified by name from the [tz database](https://en.wikipedia.org/wiki/Tz_database)
530
- */
531
- time_zone: string | null;
532
-
533
- /**
534
- * The name of the city (or cities separated by a `/`) where the airport is located
535
- */
536
- city_name: string | null;
537
-
538
- /**
539
- * The metropolitan area where the airport is located.
540
- * Only present for airports which are registered with IATA as belonging to a metropolitan area.
541
- */
542
- city: City;
543
- }
544
-
545
- export interface OfferSliceSegment {
546
- /**
547
- * The aircraft that the operating carrier will use to operate this segment
548
- */
549
- aircraft: Aircraft;
550
-
551
- /**
552
- * The ISO 8601 datetime at which the segment is scheduled to arrive
553
- */
554
- arriving_at: string;
555
-
556
- /**
557
- * The terminal at the destination airport where the segment is scheduled to arrive
558
- */
559
- destination_terminal: string | null;
560
-
561
- /**
562
- * The ISO 8601 datetime at which the segment is scheduled to depart
563
- */
564
- departing_at: string;
565
-
566
- /**
567
- * The terminal at the origin airport from which the segment is scheduled to depart
568
- */
569
- origin_terminal: string | null;
570
-
571
- /**
572
- * The airport at which the segment is scheduled to arrive
573
- */
574
- destination: Airport;
575
-
576
- /**
577
- * The distance of the segment in kilometres
578
- */
579
- distance: string | null;
580
-
581
- /**
582
- * The duration of the segment, represented as a ISO 8601 duration
583
- */
584
- duration: string | null;
585
-
586
- /**
587
- * 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
588
- */
589
- id: string;
590
-
591
- /**
592
- * The airline selling the tickets for this segment.
593
- * This may differ from the `operating_carrier` in the case of a "codeshare", where one airline sells flights operated by another airline.
594
- */
595
- marketing_carrier: Airline;
596
-
597
- /**
598
- * The flight number assigned by the marketing carrier
599
- */
600
- marketing_carrier_flight_number: string;
601
-
602
- /**
603
- * The airport from which the flight is scheduled to depart
604
- */
605
- origin: Airport;
606
-
607
- /**
608
- * The airline actually operating this segment.
609
- * This may differ from the marketing_carrier in the case of a "codeshare", where one airline sells flights operated by another airline.
610
- */
611
- operating_carrier: Airline;
612
-
613
- /**
614
- * The flight number assigned by the operating carrier
615
- */
616
- operating_carrier_flight_number?: string;
617
-
618
- /**
619
- * 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)
620
- */
621
- passengers: OfferSliceSegmentPassenger[];
622
-
623
- /**
624
- * Additional segment-specific information about the stops, if any, included in the segment
625
- */
626
- stops: OfferSliceSegmentStop[];
627
- }
628
-
629
- export interface OfferConditionModificationAllowed {
630
- /**
631
- * Allow the modification to the order
632
- */
633
- allowed: true;
634
- /**
635
- * The penalty of the modification
636
- */
637
- penalty_amount: number | null;
638
- /**
639
- * The penalty currency of the modification
640
- */
641
- penalty_currency: string | null;
642
- }
643
-
644
- export interface OfferConditionNoModification {
645
- /**
646
- * No modification to the order is allowed
647
- */
648
- allowed: false;
649
- /**
650
- * When the modification to the order is not allowed, both penalty amount and currency should be null
651
- */
652
- penalty_amount: null;
653
- penalty_currency: null;
654
- }
655
-
656
- export type OfferCondition =
657
- | OfferConditionModificationAllowed
658
- | OfferConditionNoModification;
659
-
660
- export interface OfferSliceSegmentPassenger {
661
- /**
662
- * The baggage allowances for the passenger on this segment included in the offer.
663
- * Some airlines may allow additional baggage to be booked as a service - see the offer's available_services.
664
- */
665
- baggages: OfferSliceSegmentPassengerBaggage[];
666
-
667
- /**
668
- * The cabin class that the passenger will travel in on this segment
669
- */
670
- cabin_class: CabinClass;
671
-
672
- /**
673
- * The name that the marketing carrier uses to market this cabin class
674
- */
675
- cabin_class_marketing_name: string;
676
-
677
- /**
678
- * The identifier for the passenger.
679
- * You may have specified this ID yourself when creating the offer request, or otherwise, Duffel will have generated its own random ID.
680
- */
681
- passenger_id: string;
682
- }
683
-
684
- export interface OfferSliceSegmentPassengerBaggage {
685
- /**
686
- * The type of the baggage allowance
687
- */
688
- type: BaggageType;
689
-
690
- /**
691
- * The number of this type of bag allowed on the segment. Note that this can currently be 0 in some cases.
692
- */
693
- quantity: number;
694
- }
695
-
696
- export interface OfferSliceSegmentStop {
697
- /**
698
- * Duffel's unique identifier for the Stop
699
- */
700
- id: string;
701
-
702
- /**
703
- * The airport at which the Stop happens
704
- */
705
- airport: Airport;
706
-
707
- /**
708
- * The ISO 8601 datetime at which the Stop is scheduled to arrive, in the airport's timezone (see destination.timezone)
709
- */
710
- arriving_at: string;
711
-
712
- /**
713
- * The ISO 8601 datetime at which the Stop is scheduled to depart, in the airport's timezone (see origin.timezone)
714
- */
715
- departing_at: string;
716
-
717
- /**
718
- * The duration of the Stop, represented as a ISO 8601 duration
719
- */
720
- duration: string;
721
- }
722
-
723
- export interface LayoutSelectionPassenger {
724
- id: string;
725
- name?: string | null;
726
- }
727
-
728
- export interface OfferAvailableServiceSeatMetadata {
729
- /**
730
- * The designator used to uniquely identify the seat, usually made up of a row number and a column letter
731
- */
732
- designator: string;
733
-
734
- /**
735
- * 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.
736
- */
737
- disclosures: string[];
738
-
739
- /**
740
- * A name which describes the type of seat, which you can display in your user interface to help customers to understand its features
741
- */
742
- name: string;
743
- }
744
-
745
- export type OfferAvailableService =
746
- | OfferAvailableBaggageService
747
- | OfferAvailableServiceCancelForAnyReason;
748
-
749
- interface OfferAvailableServiceBase {
750
- /**
751
- * Duffel's unique identifier for the service
752
- */
753
- id: string;
754
-
755
- /**
756
- * The maximum quantity of this service that can be booked with an order
757
- */
758
- maximum_quantity: number;
759
-
760
- /**
761
- * The list of passenger `id`s the service applies to.
762
- * If you add this service to an order it will apply to all the passengers in this list.
763
- * For services where the type is `baggage`, this list will include only a single passenger.
764
- */
765
- passenger_ids: string[];
766
-
767
- /**
768
- * The list of segment ids the service applies to.
769
- * If you add this service to an order it will apply to all the segments in this list.
770
- * For services where the type is baggage, depending on the airline,
771
- * this list includes all the segments of all slices or all the segments of a single slice.
772
- */
773
- segment_ids: string[];
774
-
775
- /**
776
- * The total price of the service for all passengers and segments it applies to, including taxes
777
- */
778
- total_amount: string;
779
-
780
- /**
781
- * The currency of the `total_amount`, as an ISO 4217 currency code
782
- */
783
- total_currency: string;
784
- }
785
-
786
- export interface OfferAvailableBaggageService
787
- extends OfferAvailableServiceBase {
788
- /**
789
- * An object containing metadata about the service, like the maximum weight and dimensions of the baggage.
790
- */
791
- metadata: OfferAvailableServiceBaggageMetadata;
792
-
793
- /**
794
- * The type of the service.
795
- * For now we only return services of type baggage but we will return other types in the future.
796
- * We won't consider adding new service types a break change.
797
- */
798
- type: "baggage";
799
- }
800
-
801
- export interface OfferAvailableServiceCancelForAnyReason
802
- extends OfferAvailableServiceBase {
803
- /**
804
- * An object containing metadata about the service, like the refund amount when cancelling.
805
- */
806
- metadata: OfferAvailableCancelForAnyReasonServiceMetadata;
807
-
808
- /**
809
- * The type of the service.
810
- * For now we only return services of type baggage but we will return other types in the future.
811
- * We won't consider adding new service types a break change.
812
- */
813
- type: "cancel_for_any_reason";
814
- }
815
-
816
- export interface OfferAvailableSeatService extends OfferAvailableServiceBase {
817
- /**
818
- * An object containing metadata about the service, like the maximum weight and dimensions of the baggage.
819
- */
820
- metadata: OfferAvailableServiceSeatMetadata;
821
-
822
- /**
823
- * The type of the service.
824
- * For now we only return services of type baggage but we will return other types in the future.
825
- * We won't consider adding new service types a break change.
826
- */
827
- type: "seats";
828
- }
829
-
830
- export interface OfferAvailableCancelForAnyReasonServiceMetadata {
831
- /**
832
- * The URL where you can find the terms and conditions for this CFAR service
833
- */
834
- terms_and_conditions_url: string;
835
-
836
- /**
837
- * The amount of money that will be returned
838
- */
839
- refund_amount: string;
840
-
841
- /**
842
- * Details of what this CFAR service entails and how it can be used
843
- */
844
- merchant_copy: string;
845
- }
846
-
847
- export type OfferAvailableServiceType = OfferAvailableService["type"];
848
-
849
- export type OfferAvailableServiceMetadata =
850
- | OfferAvailableServiceBaggageMetadata
851
- | OfferAvailableServiceSeatMetadata;