@duffel/components 3.1.3--prototype.3 → 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.
- package/{react-dist/custom-elements.js → custom-elements.js} +2 -2
- package/{react-dist/custom-elements.js.map → custom-elements.js.map} +1 -1
- package/{react-dist/index.js → index.js} +2 -2
- package/{react-dist/index.js.map → index.js.map} +1 -1
- package/package.json +3 -7
- package/scripts/generate-fixture.d.ts +3 -0
- package/scripts/setup-suggestion-data.d.ts +28 -0
- package/tsconfig.tsbuildinfo +1 -0
- package/.circleci/config.yml +0 -67
- package/.eslintrc.js +0 -47
- package/.github/CODEOWNERS +0 -4
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -29
- package/.github/renovate.json +0 -12
- package/.nvmrc +0 -1
- package/.prettierignore +0 -6
- package/.storybook/main.ts +0 -33
- package/.storybook/preview.tsx +0 -28
- package/.tool-versions +0 -1
- package/.vscode/extensions.json +0 -7
- package/.vscode/settings.json +0 -10
- package/.yarn/releases/yarn-4.0.1.cjs +0 -893
- package/.yarn/sdks/eslint/bin/eslint.js +0 -20
- package/.yarn/sdks/eslint/lib/api.js +0 -20
- package/.yarn/sdks/eslint/lib/unsupported-api.js +0 -20
- package/.yarn/sdks/eslint/package.json +0 -14
- package/.yarn/sdks/integrations.yml +0 -5
- package/.yarn/sdks/prettier/bin-prettier.js +0 -20
- package/.yarn/sdks/prettier/index.js +0 -20
- package/.yarn/sdks/prettier/package.json +0 -7
- package/.yarn/sdks/typescript/bin/tsc +0 -20
- package/.yarn/sdks/typescript/bin/tsserver +0 -20
- package/.yarn/sdks/typescript/lib/tsc.js +0 -20
- package/.yarn/sdks/typescript/lib/tsserver.js +0 -225
- package/.yarn/sdks/typescript/lib/tsserverlibrary.js +0 -225
- package/.yarn/sdks/typescript/lib/typescript.js +0 -20
- package/.yarn/sdks/typescript/package.json +0 -10
- package/.yarnrc.yml +0 -3
- package/CONTRIBUTING.md +0 -83
- package/README.md +0 -68
- package/__mocks__/styleMock.js +0 -6
- package/babel.config.js +0 -20
- package/commitlint.config.js +0 -4
- package/config/esbuild.base.config.js +0 -18
- package/config/esbuild.cdn.config.js +0 -51
- package/config/esbuild.dev.config.js +0 -46
- package/config/esbuild.react.config.js +0 -42
- package/data/airports.csv +0 -9084
- package/data/cities.csv +0 -256
- package/jest.config.ts +0 -14
- package/scripts/build-and-publish.sh +0 -42
- package/scripts/generate-fixture.ts +0 -200
- package/scripts/setup-suggestion-data.ts +0 -100
- package/scripts/upload-to-cdn.sh +0 -34
- package/scripts.tsconfig.json +0 -11
- package/src/components/DuffelAncillaries/Card.tsx +0 -126
- package/src/components/DuffelAncillaries/Counter.tsx +0 -40
- package/src/components/DuffelAncillaries/DuffelAncillaries.tsx +0 -350
- package/src/components/DuffelAncillaries/DuffelAncillariesCustomElement.tsx +0 -124
- package/src/components/DuffelAncillaries/bags/BaggageSelectionCard.tsx +0 -101
- package/src/components/DuffelAncillaries/bags/BaggageSelectionController.tsx +0 -88
- package/src/components/DuffelAncillaries/bags/BaggageSelectionModal.tsx +0 -81
- package/src/components/DuffelAncillaries/bags/BaggageSelectionModalBody.tsx +0 -60
- package/src/components/DuffelAncillaries/bags/BaggageSelectionModalBodyPassenger.tsx +0 -122
- package/src/components/DuffelAncillaries/bags/BaggageSelectionModalFooter.tsx +0 -88
- package/src/components/DuffelAncillaries/bags/BaggageSelectionModalHeader.tsx +0 -82
- package/src/components/DuffelAncillaries/bags/IncludedBaggageBanner.tsx +0 -51
- package/src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionCard.tsx +0 -90
- package/src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModal.tsx +0 -63
- package/src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBody.tsx +0 -56
- package/src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBodyListItem.tsx +0 -11
- package/src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalFooter.tsx +0 -74
- package/src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalHeader.tsx +0 -9
- package/src/components/DuffelAncillaries/seats/Amenity.tsx +0 -21
- package/src/components/DuffelAncillaries/seats/DeckSelect.tsx +0 -27
- package/src/components/DuffelAncillaries/seats/Element.tsx +0 -52
- package/src/components/DuffelAncillaries/seats/EmptyElement.tsx +0 -5
- package/src/components/DuffelAncillaries/seats/ExitElement.tsx +0 -17
- package/src/components/DuffelAncillaries/seats/Legend.tsx +0 -60
- package/src/components/DuffelAncillaries/seats/Row.tsx +0 -47
- package/src/components/DuffelAncillaries/seats/RowSection.tsx +0 -78
- package/src/components/DuffelAncillaries/seats/SeatElement.tsx +0 -120
- package/src/components/DuffelAncillaries/seats/SeatInfo.tsx +0 -32
- package/src/components/DuffelAncillaries/seats/SeatMap.tsx +0 -85
- package/src/components/DuffelAncillaries/seats/SeatMapUnavailable.tsx +0 -21
- package/src/components/DuffelAncillaries/seats/SeatSelectionCard.tsx +0 -103
- package/src/components/DuffelAncillaries/seats/SeatSelectionModal.tsx +0 -142
- package/src/components/DuffelAncillaries/seats/SeatSelectionModalBody.tsx +0 -13
- package/src/components/DuffelAncillaries/seats/SeatSelectionModalFooter.tsx +0 -89
- package/src/components/DuffelAncillaries/seats/SeatSelectionModalHeader.tsx +0 -97
- package/src/components/DuffelAncillaries/seats/SeatUnavailable.tsx +0 -14
- package/src/components/DuffelPayments/DuffelPayments.tsx +0 -224
- package/src/components/DuffelPayments/DuffelPaymentsCustomElement.tsx +0 -130
- package/src/components/PlacesLookup/PlacesLookup.tsx +0 -122
- package/src/components/shared/AnimatedLoaderEllipsis.tsx +0 -5
- package/src/components/shared/Button.tsx +0 -63
- package/src/components/shared/ErrorBoundary.tsx +0 -54
- package/src/components/shared/FetchOfferErrorState.tsx +0 -35
- package/src/components/shared/Icon.tsx +0 -151
- package/src/components/shared/IconButton.tsx +0 -42
- package/src/components/shared/Modal.tsx +0 -40
- package/src/components/shared/NonIdealState.tsx +0 -28
- package/src/components/shared/Stamp.tsx +0 -29
- package/src/components/shared/Tabs.tsx +0 -36
- package/src/custom-elements.ts +0 -13
- package/src/examples/client-side/README.md +0 -30
- package/src/examples/client-side/index.html +0 -57
- package/src/examples/full-stack/README.md +0 -34
- package/src/examples/full-stack/index.html +0 -48
- package/src/examples/full-stack/server.mjs +0 -158
- package/src/examples/just-typescript/.yarn/install-state.gz +0 -0
- package/src/examples/just-typescript/README.md +0 -37
- package/src/examples/just-typescript/package.json +0 -16
- package/src/examples/just-typescript/src/index.html +0 -23
- package/src/examples/just-typescript/src/index.ts +0 -36
- package/src/examples/just-typescript/yarn.lock +0 -467
- package/src/examples/next/README.md +0 -28
- package/src/examples/next/next-env.d.ts +0 -5
- package/src/examples/next/next.config.js +0 -4
- package/src/examples/next/package.json +0 -24
- package/src/examples/next/src/app/DuffelComponents.tsx +0 -40
- package/src/examples/next/src/app/layout.tsx +0 -18
- package/src/examples/next/src/app/page.tsx +0 -9
- package/src/examples/next/tsconfig.json +0 -27
- package/src/examples/next/yarn.lock +0 -257
- package/src/examples/payments-custom-element/README.md +0 -17
- package/src/examples/payments-custom-element/index.html +0 -43
- package/src/examples/payments-just-typescript/README.md +0 -37
- package/src/examples/payments-just-typescript/package.json +0 -16
- package/src/examples/payments-just-typescript/src/index.html +0 -23
- package/src/examples/payments-just-typescript/src/index.ts +0 -18
- package/src/examples/payments-just-typescript/yarn.lock +0 -154
- package/src/examples/react-app/README.md +0 -37
- package/src/examples/react-app/package.json +0 -20
- package/src/examples/react-app/src/index.html +0 -19
- package/src/examples/react-app/src/index.tsx +0 -48
- package/src/examples/react-app/yarn.lock +0 -219
- package/src/fixtures/offers/off_0000AUde3KwTztSRK1cznH.json +0 -497
- package/src/fixtures/offers/off_0000AVx4lUFFKW8PsPeQeQ.json +0 -307
- package/src/fixtures/offers/off_1.json +0 -488
- package/src/fixtures/passengers/mock_passengers.ts +0 -26
- package/src/fixtures/seat-maps/off_0000AUde3KwTztSRK1cznH.json +0 -6852
- package/src/fixtures/seat-maps/off_0000AVx4lUFFKW8PsPeQeQ.json +0 -1
- package/src/fixtures/seat-maps/off_1.json +0 -6852
- package/src/index.ts +0 -7
- package/src/lib/captureErrorInSentry.ts +0 -42
- package/src/lib/compileCreateOrderPayload.ts +0 -63
- package/src/lib/createPriceFormatters.ts +0 -73
- package/src/lib/fetchFromDuffelAPI.ts +0 -54
- package/src/lib/fetchFromFixtures.ts +0 -18
- package/src/lib/formatAvailableServices.ts +0 -91
- package/src/lib/formatDate.ts +0 -20
- package/src/lib/formatSeatMaps.ts +0 -81
- package/src/lib/getBaggageServiceDescription.ts +0 -39
- package/src/lib/getCabinsForSegmentAndDeck.ts +0 -4
- package/src/lib/getCurrencyForSeatMaps.ts +0 -22
- package/src/lib/getCurrencyForServices.ts +0 -24
- package/src/lib/getFirstSeatElementMatchingCriteria.ts +0 -22
- package/src/lib/getPassengerBySegmentList.ts +0 -10
- package/src/lib/getPassengerInitials.ts +0 -6
- package/src/lib/getPassengerMapById.ts +0 -17
- package/src/lib/getPassengerName.ts +0 -41
- package/src/lib/getRowNumber.ts +0 -16
- package/src/lib/getSegmentList.ts +0 -7
- package/src/lib/getServicePriceMapById.ts +0 -20
- package/src/lib/getSymbols.ts +0 -22
- package/src/lib/getTotalAmountForServices.ts +0 -72
- package/src/lib/getTotalQuantity.ts +0 -5
- package/src/lib/hasHighLuminance.ts +0 -9
- package/src/lib/hasService.ts +0 -24
- package/src/lib/hasServiceOfSameMetadataTypeAlreadyBeenSelected.ts +0 -35
- package/src/lib/hasWings.ts +0 -8
- package/src/lib/isBaggageService.ts +0 -8
- package/src/lib/isCancelForAnyReasonService.ts +0 -9
- package/src/lib/isFixtureOfferId.ts +0 -4
- package/src/lib/isPayloadComplete.ts +0 -11
- package/src/lib/isSeatElement.ts +0 -10
- package/src/lib/logging.ts +0 -120
- package/src/lib/moneyStringFormatter.ts +0 -34
- package/src/lib/offerIsExpired.ts +0 -5
- package/src/lib/retrieveOffer.ts +0 -56
- package/src/lib/retrieveOfferFromDuffelAPI.ts +0 -13
- package/src/lib/retrieveSeatMaps.ts +0 -55
- package/src/lib/retrieveSeatMapsFromDuffelAPI.ts +0 -13
- package/src/lib/setBodyScrollability.ts +0 -7
- package/src/lib/validateProps.ts +0 -37
- package/src/lib/withPlural.ts +0 -8
- package/src/stories/BaggageSelectionModalHeader.stories.tsx +0 -21
- package/src/stories/Button.stories.tsx +0 -91
- package/src/stories/DuffelAncillaries.stories.tsx +0 -166
- package/src/stories/DuffelPayments.stories.tsx +0 -34
- package/src/stories/Icon.stories.tsx +0 -35
- package/src/stories/IconButton.stories.tsx +0 -25
- package/src/stories/PlacesLookup.stories.tsx +0 -22
- package/src/styles/colors.css +0 -22
- package/src/styles/components/Amenity.css +0 -23
- package/src/styles/components/BaggageDisplay.css +0 -25
- package/src/styles/components/Button.css +0 -169
- package/src/styles/components/Card.css +0 -52
- package/src/styles/components/CfarSelectionModal.css +0 -34
- package/src/styles/components/Counter.css +0 -18
- package/src/styles/components/DuffelPayments.css +0 -42
- package/src/styles/components/IconButton.css +0 -63
- package/src/styles/components/Legend.css +0 -62
- package/src/styles/components/Loader.css +0 -37
- package/src/styles/components/LoadingState.css +0 -87
- package/src/styles/components/Modal.css +0 -84
- package/src/styles/components/PassengerSelect.css +0 -99
- package/src/styles/components/PassengersLayout.css +0 -90
- package/src/styles/components/PlacesLookup.css +0 -36
- package/src/styles/components/Row.css +0 -70
- package/src/styles/components/Seat.css +0 -59
- package/src/styles/components/SeatInfo.css +0 -61
- package/src/styles/components/SeatMap.css +0 -24
- package/src/styles/components/SeatSelect.css +0 -92
- package/src/styles/components/Segment.css +0 -17
- package/src/styles/components/SelectionSegment.css +0 -10
- package/src/styles/components/Summary.css +0 -70
- package/src/styles/components/Tabs.css +0 -52
- package/src/styles/flex.css +0 -5
- package/src/styles/font-families.css +0 -47
- package/src/styles/global.css +0 -52
- package/src/styles/margin.css +0 -3
- package/src/styles/spacing.css +0 -18
- package/src/styles/transitions.css +0 -3
- package/src/styles/typography.css +0 -13
- package/src/tests/components/DuffelAncillaries.test.tsx +0 -342
- package/src/tests/lib/createPriceFormatters.test.tsx +0 -152
- package/src/tests/lib/formatAvailableServices.test.tsx +0 -79
- package/src/tests/lib/formatSeatMaps.test.tsx +0 -49
- package/src/tests/lib/getCurrencyForServices.test.tsx +0 -44
- package/src/tests/lib/hasServiceOfSameMetadataTypeAlreadyBeenSelected.test.ts +0 -86
- package/src/tests/lib/logging.test.tsx +0 -32
- package/src/tests/lib/moneyStringFormatter.test.tsx +0 -12
- package/src/tests/lib/validateProps.test.tsx +0 -57
- package/src/types/Aircraft.ts +0 -16
- package/src/types/Airline.ts +0 -16
- package/src/types/Airport.ts +0 -54
- package/src/types/City.ts +0 -21
- package/src/types/CreateOrderPayload.ts +0 -99
- package/src/types/CurrencyConversion.ts +0 -10
- package/src/types/DuffelAncillariesProps.ts +0 -108
- package/src/types/Offer.ts +0 -851
- package/src/types/Order.ts +0 -6
- package/src/types/Place.ts +0 -6
- package/src/types/SeatMap.ts +0 -231
- package/src/types/index.ts +0 -11
- package/tsconfig.json +0 -58
- /package/{react-dist/components → components}/DuffelAncillaries/Card.d.ts +0 -0
- /package/{react-dist/components → components}/DuffelAncillaries/Counter.d.ts +0 -0
- /package/{react-dist/components → components}/DuffelAncillaries/DuffelAncillaries.d.ts +0 -0
- /package/{react-dist/components → components}/DuffelAncillaries/DuffelAncillariesCustomElement.d.ts +0 -0
- /package/{react-dist/components → components}/DuffelAncillaries/bags/BaggageSelectionCard.d.ts +0 -0
- /package/{react-dist/components → components}/DuffelAncillaries/bags/BaggageSelectionController.d.ts +0 -0
- /package/{react-dist/components → components}/DuffelAncillaries/bags/BaggageSelectionModal.d.ts +0 -0
- /package/{react-dist/components → components}/DuffelAncillaries/bags/BaggageSelectionModalBody.d.ts +0 -0
- /package/{react-dist/components → components}/DuffelAncillaries/bags/BaggageSelectionModalBodyPassenger.d.ts +0 -0
- /package/{react-dist/components → components}/DuffelAncillaries/bags/BaggageSelectionModalFooter.d.ts +0 -0
- /package/{react-dist/components → components}/DuffelAncillaries/bags/BaggageSelectionModalHeader.d.ts +0 -0
- /package/{react-dist/components → components}/DuffelAncillaries/bags/IncludedBaggageBanner.d.ts +0 -0
- /package/{react-dist/components → components}/DuffelAncillaries/cancel_for_any_reason/CfarSelectionCard.d.ts +0 -0
- /package/{react-dist/components → components}/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModal.d.ts +0 -0
- /package/{react-dist/components → components}/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBody.d.ts +0 -0
- /package/{react-dist/components → components}/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBodyListItem.d.ts +0 -0
- /package/{react-dist/components → components}/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalFooter.d.ts +0 -0
- /package/{react-dist/components → components}/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalHeader.d.ts +0 -0
- /package/{react-dist/components → components}/DuffelAncillaries/seats/Amenity.d.ts +0 -0
- /package/{react-dist/components → components}/DuffelAncillaries/seats/DeckSelect.d.ts +0 -0
- /package/{react-dist/components → components}/DuffelAncillaries/seats/Element.d.ts +0 -0
- /package/{react-dist/components → components}/DuffelAncillaries/seats/EmptyElement.d.ts +0 -0
- /package/{react-dist/components → components}/DuffelAncillaries/seats/ExitElement.d.ts +0 -0
- /package/{react-dist/components → components}/DuffelAncillaries/seats/Legend.d.ts +0 -0
- /package/{react-dist/components → components}/DuffelAncillaries/seats/Row.d.ts +0 -0
- /package/{react-dist/components → components}/DuffelAncillaries/seats/RowSection.d.ts +0 -0
- /package/{react-dist/components → components}/DuffelAncillaries/seats/SeatElement.d.ts +0 -0
- /package/{react-dist/components → components}/DuffelAncillaries/seats/SeatInfo.d.ts +0 -0
- /package/{react-dist/components → components}/DuffelAncillaries/seats/SeatMap.d.ts +0 -0
- /package/{react-dist/components → components}/DuffelAncillaries/seats/SeatMapUnavailable.d.ts +0 -0
- /package/{react-dist/components → components}/DuffelAncillaries/seats/SeatSelectionCard.d.ts +0 -0
- /package/{react-dist/components → components}/DuffelAncillaries/seats/SeatSelectionModal.d.ts +0 -0
- /package/{react-dist/components → components}/DuffelAncillaries/seats/SeatSelectionModalBody.d.ts +0 -0
- /package/{react-dist/components → components}/DuffelAncillaries/seats/SeatSelectionModalFooter.d.ts +0 -0
- /package/{react-dist/components → components}/DuffelAncillaries/seats/SeatSelectionModalHeader.d.ts +0 -0
- /package/{react-dist/components → components}/DuffelAncillaries/seats/SeatUnavailable.d.ts +0 -0
- /package/{react-dist/components → components}/DuffelPayments/DuffelPayments.d.ts +0 -0
- /package/{react-dist/components → components}/DuffelPayments/DuffelPaymentsCustomElement.d.ts +0 -0
- /package/{react-dist/components → components}/PlacesLookup/PlacesLookup.d.ts +0 -0
- /package/{react-dist/components → components}/shared/AnimatedLoaderEllipsis.d.ts +0 -0
- /package/{react-dist/components → components}/shared/Button.d.ts +0 -0
- /package/{react-dist/components → components}/shared/ErrorBoundary.d.ts +0 -0
- /package/{react-dist/components → components}/shared/FetchOfferErrorState.d.ts +0 -0
- /package/{react-dist/components → components}/shared/Icon.d.ts +0 -0
- /package/{react-dist/components → components}/shared/IconButton.d.ts +0 -0
- /package/{react-dist/components → components}/shared/Modal.d.ts +0 -0
- /package/{react-dist/components → components}/shared/NonIdealState.d.ts +0 -0
- /package/{react-dist/components → components}/shared/Stamp.d.ts +0 -0
- /package/{react-dist/components → components}/shared/Tabs.d.ts +0 -0
- /package/{react-dist/custom-elements.d.ts → custom-elements.d.ts} +0 -0
- /package/{react-dist/index.d.ts → index.d.ts} +0 -0
- /package/{react-dist/lib → lib}/captureErrorInSentry.d.ts +0 -0
- /package/{react-dist/lib → lib}/compileCreateOrderPayload.d.ts +0 -0
- /package/{react-dist/lib → lib}/createPriceFormatters.d.ts +0 -0
- /package/{react-dist/lib → lib}/fetchFromDuffelAPI.d.ts +0 -0
- /package/{react-dist/lib → lib}/fetchFromFixtures.d.ts +0 -0
- /package/{react-dist/lib → lib}/formatAvailableServices.d.ts +0 -0
- /package/{react-dist/lib → lib}/formatDate.d.ts +0 -0
- /package/{react-dist/lib → lib}/formatSeatMaps.d.ts +0 -0
- /package/{react-dist/lib → lib}/getBaggageServiceDescription.d.ts +0 -0
- /package/{react-dist/lib → lib}/getCabinsForSegmentAndDeck.d.ts +0 -0
- /package/{react-dist/lib → lib}/getCurrencyForSeatMaps.d.ts +0 -0
- /package/{react-dist/lib → lib}/getCurrencyForServices.d.ts +0 -0
- /package/{react-dist/lib → lib}/getFirstSeatElementMatchingCriteria.d.ts +0 -0
- /package/{react-dist/lib → lib}/getPassengerBySegmentList.d.ts +0 -0
- /package/{react-dist/lib → lib}/getPassengerInitials.d.ts +0 -0
- /package/{react-dist/lib → lib}/getPassengerMapById.d.ts +0 -0
- /package/{react-dist/lib → lib}/getPassengerName.d.ts +0 -0
- /package/{react-dist/lib → lib}/getRowNumber.d.ts +0 -0
- /package/{react-dist/lib → lib}/getSegmentList.d.ts +0 -0
- /package/{react-dist/lib → lib}/getServicePriceMapById.d.ts +0 -0
- /package/{react-dist/lib → lib}/getSymbols.d.ts +0 -0
- /package/{react-dist/lib → lib}/getTotalAmountForServices.d.ts +0 -0
- /package/{react-dist/lib → lib}/getTotalQuantity.d.ts +0 -0
- /package/{react-dist/lib → lib}/hasHighLuminance.d.ts +0 -0
- /package/{react-dist/lib → lib}/hasService.d.ts +0 -0
- /package/{react-dist/lib → lib}/hasServiceOfSameMetadataTypeAlreadyBeenSelected.d.ts +0 -0
- /package/{react-dist/lib → lib}/hasWings.d.ts +0 -0
- /package/{react-dist/lib → lib}/isBaggageService.d.ts +0 -0
- /package/{react-dist/lib → lib}/isCancelForAnyReasonService.d.ts +0 -0
- /package/{react-dist/lib → lib}/isFixtureOfferId.d.ts +0 -0
- /package/{react-dist/lib → lib}/isPayloadComplete.d.ts +0 -0
- /package/{react-dist/lib → lib}/isSeatElement.d.ts +0 -0
- /package/{react-dist/lib → lib}/logging.d.ts +0 -0
- /package/{react-dist/lib → lib}/moneyStringFormatter.d.ts +0 -0
- /package/{react-dist/lib → lib}/offerIsExpired.d.ts +0 -0
- /package/{react-dist/lib → lib}/retrieveOffer.d.ts +0 -0
- /package/{react-dist/lib → lib}/retrieveOfferFromDuffelAPI.d.ts +0 -0
- /package/{react-dist/lib → lib}/retrieveSeatMaps.d.ts +0 -0
- /package/{react-dist/lib → lib}/retrieveSeatMapsFromDuffelAPI.d.ts +0 -0
- /package/{react-dist/lib → lib}/setBodyScrollability.d.ts +0 -0
- /package/{react-dist/lib → lib}/validateProps.d.ts +0 -0
- /package/{react-dist/lib → lib}/withPlural.d.ts +0 -0
- /package/{react-dist/types → types}/Aircraft.d.ts +0 -0
- /package/{react-dist/types → types}/Airline.d.ts +0 -0
- /package/{react-dist/types → types}/Airport.d.ts +0 -0
- /package/{react-dist/types → types}/City.d.ts +0 -0
- /package/{react-dist/types → types}/CreateOrderPayload.d.ts +0 -0
- /package/{react-dist/types → types}/CurrencyConversion.d.ts +0 -0
- /package/{react-dist/types → types}/DuffelAncillariesProps.d.ts +0 -0
- /package/{react-dist/types → types}/Offer.d.ts +0 -0
- /package/{react-dist/types → types}/Order.d.ts +0 -0
- /package/{react-dist/types → types}/Place.d.ts +0 -0
- /package/{react-dist/types → types}/SeatMap.d.ts +0 -0
- /package/{react-dist/types → types}/index.d.ts +0 -0
package/data/cities.csv
DELETED
|
@@ -1,256 +0,0 @@
|
|
|
1
|
-
id,iata_code,iata_country_code,name,inserted_at,updated_at,metropolitan_area
|
|
2
|
-
cit_abi_us,ABI,US,Abilene,2019-07-30T16:35:27.760998,2019-07-30T16:35:27.760998,
|
|
3
|
-
cit_act_us,ACT,US,Waco,2019-07-30T16:35:27.766898,2019-07-30T16:35:27.766898,
|
|
4
|
-
cit_adm_us,ADM,US,Ardmore,2019-07-30T16:35:27.772089,2019-07-30T16:35:27.772089,
|
|
5
|
-
cit_adq_us,ADQ,US,Kodiak,2019-07-30T16:35:27.777404,2019-07-30T16:35:27.777404,
|
|
6
|
-
cit_aex_us,AEX,US,Alexandria,2019-07-30T16:35:27.782213,2019-07-30T16:35:27.782213,
|
|
7
|
-
cit_akl_nz,AKL,NZ,Auckland,2019-07-30T16:35:27.796521,2019-07-30T16:35:27.796521,
|
|
8
|
-
cit_alm_us,ALM,US,Alamogordo,2019-07-30T16:35:27.801901,2019-07-30T16:35:27.801901,
|
|
9
|
-
cit_aly_eg,ALY,EG,Alexandria,2019-07-30T16:35:27.805963,2019-07-30T16:35:27.805963,
|
|
10
|
-
cit_ama_us,AMA,US,Amarillo,2019-07-30T16:35:27.810747,2019-07-30T16:35:27.810747,
|
|
11
|
-
cit_amm_jo,AMM,JO,Amman,2019-07-30T16:35:27.815397,2019-07-30T16:35:27.815397,
|
|
12
|
-
cit_anc_us,ANC,US,Anchorage,2019-07-30T16:35:27.819929,2019-07-30T16:35:27.819929,
|
|
13
|
-
cit_ank_tr,ANK,TR,Ankara,2019-07-30T16:35:27.824413,2019-07-30T16:35:27.824413,
|
|
14
|
-
cit_apw_ws,APW,WS,Apia,2019-07-30T16:35:27.828042,2019-07-30T16:35:27.828042,
|
|
15
|
-
cit_atl_us,ATL,US,Atlanta,2019-07-30T16:35:27.831288,2019-07-30T16:35:27.831288,
|
|
16
|
-
cit_atp_pg,ATP,PG,Aitape,2019-07-30T16:35:27.834478,2019-07-30T16:35:27.834478,
|
|
17
|
-
cit_auh_ae,AUH,AE,Abu Dhabi,2019-07-30T16:35:27.836891,2019-07-30T16:35:27.836891,
|
|
18
|
-
cit_aus_us,AUS,US,Austin,2019-07-30T16:35:27.839385,2019-07-30T16:35:27.839385,
|
|
19
|
-
cit_auw_us,AUW,US,Wausau,2019-07-30T16:35:27.849474,2019-07-30T16:35:27.849474,
|
|
20
|
-
cit_bak_az,BAK,AZ,Baku,2019-07-30T16:35:27.852329,2019-07-30T16:35:27.852329,
|
|
21
|
-
cit_beg_rs,BEG,RS,Belgrade,2019-07-30T16:35:27.854678,2019-07-30T16:35:27.854678,
|
|
22
|
-
cit_ber_de,BER,DE,Berlin,2019-07-30T16:35:27.85705,2019-07-30T16:35:27.85705,
|
|
23
|
-
cit_bet_us,BET,US,Bethel,2019-07-30T16:35:27.859457,2019-07-30T16:35:27.859457,
|
|
24
|
-
cit_bfs_gb,BFS,GB,Belfast,2019-07-30T16:35:27.862034,2019-07-30T16:35:27.862034,
|
|
25
|
-
cit_bjs_cn,BJS,CN,Beijing,2019-07-30T16:35:27.867348,2019-07-30T16:35:27.867348,
|
|
26
|
-
cit_bkk_th,BKK,TH,Bangkok,2019-07-30T16:35:27.869696,2019-07-30T16:35:27.869696,
|
|
27
|
-
cit_bos_us,BOS,US,Boston,2019-07-30T16:35:27.872691,2019-07-30T16:35:27.872691,
|
|
28
|
-
cit_bpt_us,BPT,US,Beaumont/Port Arthur,2019-07-30T16:35:27.87592,2019-07-30T16:35:27.87592,
|
|
29
|
-
cit_bru_be,BRU,BE,Brussels,2019-07-30T16:35:27.878396,2019-07-30T16:35:27.878396,
|
|
30
|
-
cit_bue_ar,BUE,AR,Buenos Aires,2019-07-30T16:35:27.880843,2019-07-30T16:35:27.880843,
|
|
31
|
-
cit_buh_ro,BUH,RO,Bucharest,2019-07-30T16:35:27.883367,2019-07-30T16:35:27.883367,
|
|
32
|
-
cit_bwi_us,BWI,US,Baltimore,2019-07-30T16:35:27.885917,2019-07-30T16:35:27.885917,
|
|
33
|
-
cit_byh_us,BYH,US,Blytheville,2019-07-30T16:35:27.88829,2019-07-30T16:35:27.88829,
|
|
34
|
-
cit_bze_bz,BZE,BZ,Belize City,2019-07-30T16:35:27.890504,2019-07-30T16:35:27.890504,
|
|
35
|
-
cit_cae_us,CAE,US,Columbia,2019-07-30T16:35:27.892715,2019-07-30T16:35:27.892715,
|
|
36
|
-
cit_cai_eg,CAI,EG,Cairo,2019-07-30T16:35:27.894795,2019-07-30T16:35:27.894795,
|
|
37
|
-
cit_cak_us,CAK,US,Akron/Canton,2019-07-30T16:35:27.897254,2019-07-30T16:35:27.897254,
|
|
38
|
-
cit_cas_ma,CAS,MA,Casablanca,2019-07-30T16:35:27.899959,2019-07-30T16:35:27.899959,
|
|
39
|
-
cit_cdv_us,CDV,US,Cordova,2019-07-30T16:35:27.902889,2019-07-30T16:35:27.902889,
|
|
40
|
-
cit_ceq_fr,CEQ,FR,Cannes,2019-07-30T16:35:27.905666,2019-07-30T16:35:27.905666,
|
|
41
|
-
cit_chi_us,CHI,US,Chicago,2019-07-30T16:35:27.908308,2019-07-30T16:35:27.908308,
|
|
42
|
-
cit_cle_us,CLE,US,Cleveland,2019-07-30T16:35:27.910611,2019-07-30T16:35:27.910611,
|
|
43
|
-
cit_clt_us,CLT,US,Charlotte,2019-07-30T16:35:27.913296,2019-07-30T16:35:27.913296,
|
|
44
|
-
cit_cmb_lk,CMB,LK,Colombo,2019-07-30T16:35:27.915474,2019-07-30T16:35:27.915474,
|
|
45
|
-
cit_cos_us,COS,US,Colorado Springs,2019-07-30T16:35:27.920429,2019-07-30T16:35:27.920429,
|
|
46
|
-
cit_cph_dk,CPH,DK,Copenhagen,2019-07-30T16:35:27.922737,2019-07-30T16:35:27.922737,
|
|
47
|
-
cit_crp_us,CRP,US,Corpus Christi,2019-07-30T16:35:27.925266,2019-07-30T16:35:27.925266,
|
|
48
|
-
cit_csg_us,CSG,US,Columbus,2019-07-30T16:35:27.927723,2019-07-30T16:35:27.927723,
|
|
49
|
-
cit_csm_us,CSM,US,Clinton,2019-07-30T16:35:27.930158,2019-07-30T16:35:27.930158,
|
|
50
|
-
cit_cvg_us,CVG,US,Cincinnati,2019-07-30T16:35:27.9324,2019-07-30T16:35:27.9324,
|
|
51
|
-
cit_cvn_us,CVN,US,Clovis,2019-07-30T16:35:27.934843,2019-07-30T16:35:27.934843,
|
|
52
|
-
cit_cys_us,CYS,US,Cheyenne,2019-07-30T16:35:27.937264,2019-07-30T16:35:27.937264,
|
|
53
|
-
cit_day_us,DAY,US,Dayton,2019-07-30T16:35:27.939697,2019-07-30T16:35:27.939697,
|
|
54
|
-
cit_den_us,DEN,US,Denver,2019-07-30T16:35:27.942587,2019-07-30T16:35:27.942587,
|
|
55
|
-
cit_dfw_us,DFW,US,Dallas,2019-07-30T16:35:27.945301,2019-07-30T16:35:27.945301,
|
|
56
|
-
cit_dkr_sn,DKR,SN,Dakar,2019-07-30T16:35:27.947426,2019-07-30T16:35:27.947426,
|
|
57
|
-
cit_dom_dm,DOM,DM,Dominica,2019-07-30T16:35:27.949608,2019-07-30T16:35:27.949608,
|
|
58
|
-
cit_dro_us,DRO,US,Durango,2019-07-30T16:35:27.951755,2019-07-30T16:35:27.951755,
|
|
59
|
-
cit_drt_us,DRT,US,Del Rio,2019-07-30T16:35:27.953849,2019-07-30T16:35:27.953849,
|
|
60
|
-
cit_dtt_us,DTT,US,Detroit,2019-07-30T16:35:27.955737,2019-07-30T16:35:27.955737,
|
|
61
|
-
cit_dur_za,DUR,ZA,Durban,2019-07-30T16:35:27.95997,2019-07-30T16:35:27.95997,
|
|
62
|
-
cit_dus_de,DUS,DE,Duesseldorf,2019-07-30T16:35:27.962103,2019-07-30T16:35:27.962103,
|
|
63
|
-
cit_dxb_ae,DXB,AE,Dubai,2019-07-30T16:35:27.96434,2019-07-30T16:35:27.96434,
|
|
64
|
-
cit_eap_ch,EAP,CH,Basel/Mulhouse,2019-07-30T16:35:27.966726,2019-07-30T16:35:27.966726,
|
|
65
|
-
cit_ecp_us,ECP,US,Panama City,2019-07-30T16:35:27.968764,2019-07-30T16:35:27.968764,
|
|
66
|
-
cit_elp_us,ELP,US,El Paso,2019-07-30T16:35:27.971002,2019-07-30T16:35:27.971002,
|
|
67
|
-
cit_eyw_us,EYW,US,Key West,2019-07-30T16:35:27.973326,2019-07-30T16:35:27.973326,
|
|
68
|
-
cit_fai_us,FAI,US,Fairbanks,2019-07-30T16:35:27.975632,2019-07-30T16:35:27.975632,
|
|
69
|
-
cit_fat_us,FAT,US,Fresno,2019-07-30T16:35:27.978097,2019-07-30T16:35:27.978097,
|
|
70
|
-
cit_fih_cd,FIH,CD,Kinshasa,2019-07-30T16:35:27.986518,2019-07-30T16:35:27.986518,
|
|
71
|
-
cit_fll_us,FLL,US,Fort Lauderdale,2019-07-30T16:35:27.988981,2019-07-30T16:35:27.988981,
|
|
72
|
-
cit_fmy_us,FMY,US,Fort Myers,2019-07-30T16:35:27.991102,2019-07-30T16:35:27.991102,
|
|
73
|
-
cit_fna_sl,FNA,SL,Freetown,2019-07-30T16:35:27.993294,2019-07-30T16:35:27.993294,
|
|
74
|
-
cit_fra_de,FRA,DE,Frankfurt,2019-07-30T16:35:27.995649,2019-07-30T16:35:27.995649,
|
|
75
|
-
cit_frd_us,FRD,US,Friday Harbor,2019-07-30T16:35:27.998145,2019-07-30T16:35:27.998145,
|
|
76
|
-
cit_fwa_us,FWA,US,Fort Wayne,2019-07-30T16:35:28.00091,2019-07-30T16:35:28.00091,
|
|
77
|
-
cit_fyv_us,FYV,US,Fayetteville/Springd.,2019-07-30T16:35:28.003331,2019-07-30T16:35:28.003331,
|
|
78
|
-
cit_gcn_us,GCN,US,Grand Canyon,2019-07-30T16:35:28.005754,2019-07-30T16:35:28.005754,
|
|
79
|
-
cit_geg_us,GEG,US,Spokane,2019-07-30T16:35:28.008182,2019-07-30T16:35:28.008182,
|
|
80
|
-
cit_gla_gb,GLA,GB,Glasgow,2019-07-30T16:35:28.010348,2019-07-30T16:35:28.010348,
|
|
81
|
-
cit_got_se,GOT,SE,Goteborg,2019-07-30T16:35:28.012704,2019-07-30T16:35:28.012704,
|
|
82
|
-
cit_gst_us,GST,US,Gustavus,2019-07-30T16:35:28.017834,2019-07-30T16:35:28.017834,
|
|
83
|
-
cit_gtf_us,GTF,US,Great Falls,2019-07-30T16:35:28.020268,2019-07-30T16:35:28.020268,
|
|
84
|
-
cit_gum_gu,GUM,GU,Guam,2019-07-30T16:35:28.022739,2019-07-30T16:35:28.022739,
|
|
85
|
-
cit_ham_de,HAM,DE,Hamburg,2019-07-30T16:35:28.025008,2019-07-30T16:35:28.025008,
|
|
86
|
-
cit_har_us,HAR,US,Harrisburg,2019-07-30T16:35:28.027378,2019-07-30T16:35:28.027378,
|
|
87
|
-
cit_hel_fi,HEL,FI,Helsinki,2019-07-30T16:35:28.02987,2019-07-30T16:35:28.02987,
|
|
88
|
-
cit_hfd_us,HFD,US,Hartford,2019-07-30T16:35:28.032282,2019-07-30T16:35:28.032282,
|
|
89
|
-
cit_hkg_hk,HKG,HK,Hong Kong,2019-07-30T16:35:28.034485,2019-07-30T16:35:28.034485,
|
|
90
|
-
cit_hob_us,HOB,US,Hobbs,2019-07-30T16:35:28.036661,2019-07-30T16:35:28.036661,
|
|
91
|
-
cit_hou_us,HOU,US,Houston,2019-07-30T16:35:28.038899,2019-07-30T16:35:28.038899,
|
|
92
|
-
cit_hsv_us,HSV,US,Huntsville,2019-07-30T16:35:28.041203,2019-07-30T16:35:28.041203,
|
|
93
|
-
cit_hyd_in,HYD,IN,Hyderabad,2019-07-30T16:35:28.044006,2019-07-30T16:35:28.044006,
|
|
94
|
-
cit_ict_us,ICT,US,Wichita,2019-07-30T16:35:28.046299,2019-07-30T16:35:28.046299,
|
|
95
|
-
cit_iev_ua,IEV,UA,Kiev,2019-07-30T16:35:28.04845,2019-07-30T16:35:28.04845,
|
|
96
|
-
cit_ile_us,ILE,US,Killeen/Fort Hood,2019-07-30T16:35:28.050743,2019-07-30T16:35:28.050743,
|
|
97
|
-
cit_ipl_us,IPL,US,Imperial/El Centro,2019-07-30T16:35:28.052986,2019-07-30T16:35:28.052986,
|
|
98
|
-
cit_isc_gb,ISC,GB,Isles of Scilly,2019-07-30T16:35:28.055172,2019-07-30T16:35:28.055172,
|
|
99
|
-
cit_ist_tr,IST,TR,Istanbul,2019-07-30T16:35:28.057388,2019-07-30T16:35:28.057388,
|
|
100
|
-
cit_izm_tr,IZM,TR,Izmir,2019-07-30T16:35:28.059742,2019-07-30T16:35:28.059742,
|
|
101
|
-
cit_jan_us,JAN,US,Jackson,2019-07-30T16:35:28.062079,2019-07-30T16:35:28.062079,
|
|
102
|
-
cit_jax_us,JAX,US,Jacksonville,2019-07-30T16:35:28.064407,2019-07-30T16:35:28.064407,
|
|
103
|
-
cit_jnb_za,JNB,ZA,Johannesburg,2019-07-30T16:35:28.069474,2019-07-30T16:35:28.069474,
|
|
104
|
-
cit_kcl_us,KCL,US,Chignik,2019-07-30T16:35:28.072063,2019-07-30T16:35:28.072063,
|
|
105
|
-
cit_kin_jm,KIN,JM,Kingston,2019-07-30T16:35:28.074206,2019-07-30T16:35:28.074206,
|
|
106
|
-
cit_ktn_us,KTN,US,Ketchikan,2019-07-30T16:35:28.076443,2019-07-30T16:35:28.076443,
|
|
107
|
-
cit_kul_my,KUL,MY,Kuala Lumpur,2019-07-30T16:35:28.07866,2019-07-30T16:35:28.07866,
|
|
108
|
-
cit_las_us,LAS,US,Las Vegas,2019-07-30T16:35:28.082491,2019-07-30T16:35:28.082491,
|
|
109
|
-
cit_lbb_us,LBB,US,Lubbock,2019-07-30T16:35:28.088717,2019-07-30T16:35:28.088717,
|
|
110
|
-
cit_led_ru,LED,RU,St Petersburg,2019-07-30T16:35:28.091197,2019-07-30T16:35:28.091197,
|
|
111
|
-
cit_lex_us,LEX,US,Lexington,2019-07-30T16:35:28.093495,2019-07-30T16:35:28.093495,
|
|
112
|
-
cit_lon_gb,LON,GB,London,2019-07-30T16:35:28.095803,2019-07-30T16:35:28.095803,
|
|
113
|
-
cit_lpc_us,LPC,US,Lompoc,2019-07-30T16:35:28.098121,2019-07-30T16:35:28.098121,
|
|
114
|
-
cit_lts_us,LTS,US,Altus,2019-07-30T16:35:28.100265,2019-07-30T16:35:28.100265,
|
|
115
|
-
cit_lul_us,LUL,US,Hattiesburg/Laurel,2019-07-30T16:35:28.102582,2019-07-30T16:35:28.102582,
|
|
116
|
-
cit_lys_fr,LYS,FR,Lyon,2019-07-30T16:35:28.10446,2019-07-30T16:35:28.10446,
|
|
117
|
-
cit_mad_es,MAD,ES,Madrid,2019-07-30T16:35:28.106523,2019-07-30T16:35:28.106523,
|
|
118
|
-
cit_maf_us,MAF,US,Midland,2019-07-30T16:35:28.108779,2019-07-30T16:35:28.108779,
|
|
119
|
-
cit_mce_us,MCE,US,Merced,2019-07-30T16:35:28.111347,2019-07-30T16:35:28.111347,
|
|
120
|
-
cit_mcn_us,MCN,US,Macon,2019-07-30T16:35:28.114343,2019-07-30T16:35:28.114343,
|
|
121
|
-
cit_mde_co,MDE,CO,Medellin,2019-07-30T16:35:28.116761,2019-07-30T16:35:28.116761,
|
|
122
|
-
cit_mel_au,MEL,AU,Melbourne,2019-07-30T16:35:28.125825,2019-07-30T16:35:28.125825,
|
|
123
|
-
cit_mex_mx,MEX,MX,Mexico City,2019-07-30T16:35:28.128501,2019-07-30T16:35:28.128501,
|
|
124
|
-
cit_mgm_us,MGM,US,Montgomery,2019-07-30T16:35:28.130989,2019-07-30T16:35:28.130989,
|
|
125
|
-
cit_mgr_us,MGR,US,Moultrie,2019-07-30T16:35:28.133348,2019-07-30T16:35:28.133348,
|
|
126
|
-
cit_mia_us,MIA,US,Miami,2019-07-30T16:35:28.135751,2019-07-30T16:35:28.135751,
|
|
127
|
-
cit_mil_it,MIL,IT,Milan,2019-07-30T16:35:28.138308,2019-07-30T16:35:28.138308,
|
|
128
|
-
cit_mke_us,MKE,US,Milwaukee,2019-07-30T16:35:28.143067,2019-07-30T16:35:28.143067,
|
|
129
|
-
cit_mlw_lr,MLW,LR,Monrovia,2019-07-30T16:35:28.145316,2019-07-30T16:35:28.145316,
|
|
130
|
-
cit_mma_se,MMA,SE,Malmo,2019-07-30T16:35:28.147418,2019-07-30T16:35:28.147418,
|
|
131
|
-
cit_mnl_ph,MNL,PH,Manila,2019-07-30T16:35:28.149794,2019-07-30T16:35:28.149794,
|
|
132
|
-
cit_mob_us,MOB,US,Mobile,2019-07-30T16:35:28.15227,2019-07-30T16:35:28.15227,
|
|
133
|
-
cit_mon_nz,MON,NZ,Mount Cook,2019-07-30T16:35:28.154646,2019-07-30T16:35:28.154646,
|
|
134
|
-
cit_mot_us,MOT,US,Minot,2019-07-30T16:35:28.157126,2019-07-30T16:35:28.157126,
|
|
135
|
-
cit_mow_ru,MOW,RU,Moscow,2019-07-30T16:35:28.159772,2019-07-30T16:35:28.159772,
|
|
136
|
-
cit_mry_us,MRY,US,Monterey/Carmel,2019-07-30T16:35:28.162118,2019-07-30T16:35:28.162118,
|
|
137
|
-
cit_msp_us,MSP,US,Minneapolis/St Paul,2019-07-30T16:35:28.164657,2019-07-30T16:35:28.164657,
|
|
138
|
-
cit_msq_by,MSQ,BY,Minsk,2019-07-30T16:35:28.167147,2019-07-30T16:35:28.167147,
|
|
139
|
-
cit_msy_us,MSY,US,New Orleans,2019-07-30T16:35:28.169488,2019-07-30T16:35:28.169488,
|
|
140
|
-
cit_mty_mx,MTY,MX,Monterrey,2019-07-30T16:35:28.171834,2019-07-30T16:35:28.171834,
|
|
141
|
-
cit_muc_de,MUC,DE,Munich,2019-07-30T16:35:28.174069,2019-07-30T16:35:28.174069,
|
|
142
|
-
cit_myr_us,MYR,US,Myrtle Beach,2019-07-30T16:35:28.176349,2019-07-30T16:35:28.176349,
|
|
143
|
-
cit_myv_us,MYV,US,Marysville,2019-07-30T16:35:28.178777,2019-07-30T16:35:28.178777,
|
|
144
|
-
cit_nbo_ke,NBO,KE,Nairobi,2019-07-30T16:35:28.181185,2019-07-30T16:35:28.181185,
|
|
145
|
-
cit_ngo_jp,NGO,JP,Nagoya,2019-07-30T16:35:28.185703,2019-07-30T16:35:28.185703,
|
|
146
|
-
cit_nha_vn,NHA,VN,Nha Trang,2019-07-30T16:35:28.187796,2019-07-30T16:35:28.187796,
|
|
147
|
-
cit_nou_nc,NOU,NC,Noumea,2019-07-30T16:35:28.190781,2019-07-30T16:35:28.190781,
|
|
148
|
-
cit_nqt_gb,NQT,GB,Nottingham,2019-07-30T16:35:28.192873,2019-07-30T16:35:28.192873,
|
|
149
|
-
cit_ntl_au,NTL,AU,Newcastle,2019-07-30T16:35:28.194922,2019-07-30T16:35:28.194922,
|
|
150
|
-
cit_nyc_us,NYC,US,New York,2019-07-30T16:35:28.197132,2019-07-30T16:35:28.197132,
|
|
151
|
-
cit_oak_us,OAK,US,Oakland,2019-07-30T16:35:28.19928,2019-07-30T16:35:28.19928,
|
|
152
|
-
cit_ogd_us,OGD,US,Ogden,2019-07-30T16:35:28.2013,2019-07-30T16:35:28.2013,
|
|
153
|
-
cit_oka_jp,OKA,JP,Okinawa,2019-07-30T16:35:28.203361,2019-07-30T16:35:28.203361,
|
|
154
|
-
cit_okc_us,OKC,US,Oklahoma City,2019-07-30T16:35:28.205367,2019-07-30T16:35:28.205367,
|
|
155
|
-
cit_oma_us,OMA,US,Omaha,2019-07-30T16:35:28.208019,2019-07-30T16:35:28.208019,
|
|
156
|
-
cit_orf_us,ORF,US,Norfolk,2019-07-30T16:35:28.210209,2019-07-30T16:35:28.210209,
|
|
157
|
-
cit_orl_us,ORL,US,Orlando,2019-07-30T16:35:28.212213,2019-07-30T16:35:28.212213,
|
|
158
|
-
cit_orn_dz,ORN,DZ,Oran,2019-07-30T16:35:28.214298,2019-07-30T16:35:28.214298,
|
|
159
|
-
cit_osa_jp,OSA,JP,Osaka,2019-07-30T16:35:28.216476,2019-07-30T16:35:28.216476,
|
|
160
|
-
cit_osl_no,OSL,NO,Oslo,2019-07-30T16:35:28.218778,2019-07-30T16:35:28.218778,
|
|
161
|
-
cit_par_fr,PAR,FR,Paris,2019-07-30T16:35:28.22369,2019-07-30T16:35:28.22369,
|
|
162
|
-
cit_pbi_us,PBI,US,West Palm Beach,2019-07-30T16:35:28.225706,2019-07-30T16:35:28.225706,
|
|
163
|
-
cit_pbm_sr,PBM,SR,Paramaribo,2019-07-30T16:35:28.227938,2019-07-30T16:35:28.227938,
|
|
164
|
-
cit_phl_us,PHL,US,Philadelphia,2019-07-30T16:35:28.230328,2019-07-30T16:35:28.230328,
|
|
165
|
-
cit_phx_us,PHX,US,Phoenix,2019-07-30T16:35:28.232488,2019-07-30T16:35:28.232488,
|
|
166
|
-
cit_pip_us,PIP,US,Pilot Point,2019-07-30T16:35:28.234637,2019-07-30T16:35:28.234637,
|
|
167
|
-
cit_pit_us,PIT,US,Pittsburgh,2019-07-30T16:35:28.23701,2019-07-30T16:35:28.23701,
|
|
168
|
-
cit_pns_us,PNS,US,Pensacola,2019-07-30T16:35:28.23953,2019-07-30T16:35:28.23953,
|
|
169
|
-
cit_prg_cz,PRG,CZ,Prague,2019-07-30T16:35:28.242116,2019-07-30T16:35:28.242116,
|
|
170
|
-
cit_pry_za,PRY,ZA,Pretoria,2019-07-30T16:35:28.244528,2019-07-30T16:35:28.244528,
|
|
171
|
-
cit_psp_us,PSP,US,Palm Springs,2019-07-30T16:35:28.24722,2019-07-30T16:35:28.24722,
|
|
172
|
-
cit_pty_pa,PTY,PA,Panama City,2019-07-30T16:35:28.24995,2019-07-30T16:35:28.24995,
|
|
173
|
-
cit_ral_us,RAL,US,Riverside,2019-07-30T16:35:28.252154,2019-07-30T16:35:28.252154,
|
|
174
|
-
cit_rap_us,RAP,US,Rapid City,2019-07-30T16:35:28.259408,2019-07-30T16:35:28.259408,
|
|
175
|
-
cit_rek_is,REK,IS,Reykjavik,2019-07-30T16:35:28.261964,2019-07-30T16:35:28.261964,
|
|
176
|
-
cit_rio_br,RIO,BR,Rio de Janeiro,2019-07-30T16:35:28.265259,2019-07-30T16:35:28.265259,
|
|
177
|
-
cit_rom_it,ROM,IT,Rome,2019-07-30T16:35:28.267452,2019-07-30T16:35:28.267452,
|
|
178
|
-
cit_sac_us,SAC,US,Sacramento,2019-07-30T16:35:28.269625,2019-07-30T16:35:28.269625,
|
|
179
|
-
cit_san_us,SAN,US,San Diego,2019-07-30T16:35:28.272312,2019-07-30T16:35:28.272312,
|
|
180
|
-
cit_sao_br,SAO,BR,Sao Paulo,2019-07-30T16:35:28.274511,2019-07-30T16:35:28.274511,
|
|
181
|
-
cit_sat_us,SAT,US,San Antonio,2019-07-30T16:35:28.276997,2019-07-30T16:35:28.276997,
|
|
182
|
-
cit_sav_us,SAV,US,Savannah,2019-07-30T16:35:28.279255,2019-07-30T16:35:28.279255,
|
|
183
|
-
cit_sdf_us,SDF,US,Louisville,2019-07-30T16:35:28.283597,2019-07-30T16:35:28.283597,
|
|
184
|
-
cit_sdq_do,SDQ,DO,Santo Domingo,2019-07-30T16:35:28.286787,2019-07-30T16:35:28.286787,
|
|
185
|
-
cit_sdz_gb,SDZ,GB,Shetland Islands,2019-07-30T16:35:28.28945,2019-07-30T16:35:28.28945,
|
|
186
|
-
cit_sea_us,SEA,US,Seattle,2019-07-30T16:35:28.291765,2019-07-30T16:35:28.291765,
|
|
187
|
-
cit_sel_kr,SEL,KR,Seoul,2019-07-30T16:35:28.29397,2019-07-30T16:35:28.29397,
|
|
188
|
-
cit_sfy_us,SFY,US,Springfield,2019-07-30T16:35:28.296146,2019-07-30T16:35:28.296146,
|
|
189
|
-
cit_sgi_pk,SGI,PK,Sargodha,2019-07-30T16:35:28.298529,2019-07-30T16:35:28.298529,
|
|
190
|
-
cit_sha_cn,SHA,CN,Shanghai,2019-07-30T16:35:28.300806,2019-07-30T16:35:28.300806,
|
|
191
|
-
cit_shv_us,SHV,US,Shreveport,2019-07-30T16:35:28.303098,2019-07-30T16:35:28.303098,
|
|
192
|
-
cit_sia_cn,SIA,CN,Xi'an,2019-07-30T16:35:28.30552,2019-07-30T16:35:28.30552,
|
|
193
|
-
cit_sin_sg,SIN,SG,Singapore,2019-07-30T16:35:28.307759,2019-07-30T16:35:28.307759,
|
|
194
|
-
cit_siy_us,SIY,US,Montague/Yreka,2019-07-30T16:35:28.310213,2019-07-30T16:35:28.310213,
|
|
195
|
-
cit_sjc_us,SJC,US,San Jose,2019-07-30T16:35:28.312713,2019-07-30T16:35:28.312713,
|
|
196
|
-
cit_sju_pr,SJU,PR,San Juan,2019-07-30T16:35:28.315254,2019-07-30T16:35:28.315254,
|
|
197
|
-
cit_slu_lc,SLU,LC,St Lucia,2019-07-30T16:35:28.317491,2019-07-30T16:35:28.317491,
|
|
198
|
-
cit_spk_jp,SPK,JP,Sapporo,2019-07-30T16:35:28.320091,2019-07-30T16:35:28.320091,
|
|
199
|
-
cit_sps_us,SPS,US,Wichita Falls,2019-07-30T16:35:28.32235,2019-07-30T16:35:28.32235,
|
|
200
|
-
cit_srz_bo,SRZ,BO,Santa Cruz,2019-07-30T16:35:28.324493,2019-07-30T16:35:28.324493,
|
|
201
|
-
cit_ssi_us,SSI,US,Brunswick,2019-07-30T16:35:28.3299,2019-07-30T16:35:28.3299,
|
|
202
|
-
cit_ssm_us,SSM,US,Sault Ste Marie,2019-07-30T16:35:28.332112,2019-07-30T16:35:28.332112,
|
|
203
|
-
cit_stl_us,STL,US,St Louis,2019-07-30T16:35:28.334873,2019-07-30T16:35:28.334873,
|
|
204
|
-
cit_ags_us,AGS,US,Augusta,2019-07-30T16:35:27.78731,2019-07-30T16:35:27.78731,
|
|
205
|
-
cit_bhz_br,BHZ,BR,Belo Horizonte,2019-07-30T16:35:27.864477,2019-07-30T16:35:27.864477,
|
|
206
|
-
cit_cmh_us,CMH,US,Columbus,2019-07-30T16:35:27.917884,2019-07-30T16:35:27.917884,
|
|
207
|
-
cit_dug_us,DUG,US,Douglas/Bisbee,2019-07-30T16:35:27.957721,2019-07-30T16:35:27.957721,
|
|
208
|
-
cit_gsp_us,GSP,US,Greenville/Spartanburg,2019-07-30T16:35:28.015295,2019-07-30T16:35:28.015295,
|
|
209
|
-
cit_jkt_id,JKT,ID,Jakarta,2019-07-30T16:35:28.066839,2019-07-30T16:35:28.066839,
|
|
210
|
-
cit_lax_us,LAX,US,Los Angeles,2019-07-30T16:35:28.084963,2019-07-30T16:35:28.084963,
|
|
211
|
-
cit_mkc_us,MKC,US,Kansas City,2019-07-30T16:35:28.140824,2019-07-30T16:35:28.140824,
|
|
212
|
-
cit_nfl_us,NFL,US,Fallon,2019-07-30T16:35:28.183394,2019-07-30T16:35:28.183394,
|
|
213
|
-
cit_ozr_us,OZR,US,Fort Rucker/Ozark,2019-07-30T16:35:28.221024,2019-07-30T16:35:28.221024,
|
|
214
|
-
cit_scn_de,SCN,DE,Saarbruecken,2019-07-30T16:35:28.281404,2019-07-30T16:35:28.281404,
|
|
215
|
-
cit_ssc_us,SSC,US,Sumter,2019-07-30T16:35:28.327299,2019-07-30T16:35:28.327299,
|
|
216
|
-
cit_sto_se,STO,SE,Stockholm,2019-07-30T16:35:28.337171,2019-07-30T16:35:28.337171,
|
|
217
|
-
cit_stt_vi,STT,VI,St Thomas Island,2019-07-30T16:35:28.339513,2019-07-30T16:35:28.339513,
|
|
218
|
-
cit_stx_vi,STX,VI,St Croix Island,2019-07-30T16:35:28.341983,2019-07-30T16:35:28.341983,
|
|
219
|
-
cit_syd_au,SYD,AU,Sydney,2019-07-30T16:35:28.344272,2019-07-30T16:35:28.344272,
|
|
220
|
-
cit_tci_es,TCI,ES,Tenerife,2019-07-30T16:35:28.346421,2019-07-30T16:35:28.346421,
|
|
221
|
-
cit_thr_ir,THR,IR,Tehran,2019-07-30T16:35:28.348821,2019-07-30T16:35:28.348821,
|
|
222
|
-
cit_tiw_us,TIW,US,Tacoma,2019-07-30T16:35:28.351296,2019-07-30T16:35:28.351296,
|
|
223
|
-
cit_tlv_il,TLV,IL,Tel Aviv-Yafo,2019-07-30T16:35:28.35383,2019-07-30T16:35:28.35383,
|
|
224
|
-
cit_tol_us,TOL,US,Toledo,2019-07-30T16:35:28.35637,2019-07-30T16:35:28.35637,
|
|
225
|
-
cit_top_us,TOP,US,Topeka,2019-07-30T16:35:28.35897,2019-07-30T16:35:28.35897,
|
|
226
|
-
cit_tov_vg,TOV,VG,Tortola,2019-07-30T16:35:28.361386,2019-07-30T16:35:28.361386,
|
|
227
|
-
cit_tpa_us,TPA,US,Tampa,2019-07-30T16:35:28.363828,2019-07-30T16:35:28.363828,
|
|
228
|
-
cit_tpe_tw,TPE,TW,Taipei,2019-07-30T16:35:28.366045,2019-07-30T16:35:28.366045,
|
|
229
|
-
cit_tph_us,TPH,US,Tonopah,2019-07-30T16:35:28.368111,2019-07-30T16:35:28.368111,
|
|
230
|
-
cit_tul_us,TUL,US,Tulsa,2019-07-30T16:35:28.370236,2019-07-30T16:35:28.370236,
|
|
231
|
-
cit_tus_us,TUS,US,Tucson,2019-07-30T16:35:28.372305,2019-07-30T16:35:28.372305,
|
|
232
|
-
cit_twb_au,TWB,AU,Toowoomba,2019-07-30T16:35:28.374305,2019-07-30T16:35:28.374305,
|
|
233
|
-
cit_tyo_jp,TYO,JP,Tokyo,2019-07-30T16:35:28.376867,2019-07-30T16:35:28.376867,
|
|
234
|
-
cit_ubs_us,UBS,US,Columbus,2019-07-30T16:35:28.379246,2019-07-30T16:35:28.379246,
|
|
235
|
-
cit_vce_it,VCE,IT,Venice,2019-07-30T16:35:28.381646,2019-07-30T16:35:28.381646,
|
|
236
|
-
cit_vld_us,VLD,US,Valdosta,2019-07-30T16:35:28.383928,2019-07-30T16:35:28.383928,
|
|
237
|
-
cit_vps_us,VPS,US,Destin/Ft Walton Beach,2019-07-30T16:35:28.386376,2019-07-30T16:35:28.386376,
|
|
238
|
-
cit_vrn_it,VRN,IT,Verona,2019-07-30T16:35:28.388796,2019-07-30T16:35:28.388796,
|
|
239
|
-
cit_was_us,WAS,US,Washington,2019-07-30T16:35:28.39134,2019-07-30T16:35:28.39134,
|
|
240
|
-
cit_wdg_us,WDG,US,Enid,2019-07-30T16:35:28.399852,2019-07-30T16:35:28.399852,
|
|
241
|
-
cit_wdh_na,WDH,NA,Windhoek,2019-07-30T16:35:28.402296,2019-07-30T16:35:28.402296,
|
|
242
|
-
cit_yao_cm,YAO,CM,Yaounde,2019-07-30T16:35:28.404753,2019-07-30T16:35:28.404753,
|
|
243
|
-
cit_yaz_ca,YAZ,CA,Tofino,2019-07-30T16:35:28.407024,2019-07-30T16:35:28.407024,
|
|
244
|
-
cit_ybl_ca,YBL,CA,Campbell River,2019-07-30T16:35:28.409287,2019-07-30T16:35:28.409287,
|
|
245
|
-
cit_ycd_ca,YCD,CA,Nanaimo,2019-07-30T16:35:28.411629,2019-07-30T16:35:28.411629,
|
|
246
|
-
cit_yea_ca,YEA,CA,Edmonton,2019-07-30T16:35:28.413937,2019-07-30T16:35:28.413937,
|
|
247
|
-
cit_yhz_ca,YHZ,CA,Halifax,2019-07-30T16:35:28.416146,2019-07-30T16:35:28.416146,
|
|
248
|
-
cit_ykm_us,YKM,US,Yakima,2019-07-30T16:35:28.41853,2019-07-30T16:35:28.41853,
|
|
249
|
-
cit_ymq_ca,YMQ,CA,Montreal,2019-07-30T16:35:28.42084,2019-07-30T16:35:28.42084,
|
|
250
|
-
cit_yow_ca,YOW,CA,Ottawa,2019-07-30T16:35:28.423094,2019-07-30T16:35:28.423094,
|
|
251
|
-
cit_ypr_ca,YPR,CA,Prince Rupert,2019-07-30T16:35:28.425155,2019-07-30T16:35:28.425155,
|
|
252
|
-
cit_yto_ca,YTO,CA,Toronto,2019-07-30T16:35:28.427312,2019-07-30T16:35:28.427312,
|
|
253
|
-
cit_yum_us,YUM,US,Yuma,2019-07-30T16:35:28.429298,2019-07-30T16:35:28.429298,
|
|
254
|
-
cit_yva_km,YVA,KM,Moroni,2019-07-30T16:35:28.431299,2019-07-30T16:35:28.431299,
|
|
255
|
-
cit_yvr_ca,YVR,CA,Vancouver,2019-07-30T16:35:28.43345,2019-07-30T16:35:28.43345,
|
|
256
|
-
cit_yyj_ca,YYJ,CA,Victoria,2019-07-30T16:35:28.435995,2019-07-30T16:35:28.435995,
|
package/jest.config.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { Config } from "jest";
|
|
2
|
-
|
|
3
|
-
const config: Config = {
|
|
4
|
-
silent: true,
|
|
5
|
-
testEnvironment: "jsdom",
|
|
6
|
-
roots: ["<rootDir>/src/tests"],
|
|
7
|
-
moduleNameMapper: {
|
|
8
|
-
"\\.css$": "<rootDir>/__mocks__/styleMock.js",
|
|
9
|
-
"@lib/(.*)$": "<rootDir>/src/lib/$1",
|
|
10
|
-
"@components/(.*)$": "<rootDir>/src/components/$1",
|
|
11
|
-
},
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export default config;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
if [[ "$@" == *"--help"* ]]; then
|
|
2
|
-
echo ""
|
|
3
|
-
echo "Builds and publishes the package to npm and CDN."
|
|
4
|
-
echo ""
|
|
5
|
-
echo "Usage:"
|
|
6
|
-
echo " build-and-publish.sh [--dry-run] [--help]"
|
|
7
|
-
echo ""
|
|
8
|
-
echo "Options:"
|
|
9
|
-
echo " ‣ --help Show this help message"
|
|
10
|
-
echo " ‣ --dry-run Build and test, but do not publish"
|
|
11
|
-
echo ""
|
|
12
|
-
|
|
13
|
-
exit 0
|
|
14
|
-
fi
|
|
15
|
-
|
|
16
|
-
# Cleanup the old builds:
|
|
17
|
-
rm -rf ./cdn-dist
|
|
18
|
-
rm -rf ./react-dist
|
|
19
|
-
|
|
20
|
-
# Build for distribution
|
|
21
|
-
|
|
22
|
-
## For those that rely on <script></script>
|
|
23
|
-
node config/esbuild.cdn.config.js
|
|
24
|
-
|
|
25
|
-
## For those that rely on `npm i`
|
|
26
|
-
node config/esbuild.react.config.js
|
|
27
|
-
|
|
28
|
-
## For those that use typescript
|
|
29
|
-
tsc --project tsconfig.json
|
|
30
|
-
|
|
31
|
-
# Only upload to CDN and publish to npm if it's not a dry run
|
|
32
|
-
if [[ "$@" != *"--dry-run"* ]]; then
|
|
33
|
-
# Upload css, js and fixtures to CDN
|
|
34
|
-
bash ./scripts/upload-to-cdn.sh
|
|
35
|
-
|
|
36
|
-
# Publish to npm with tag
|
|
37
|
-
npm publish --tag igorp1-prototype
|
|
38
|
-
else
|
|
39
|
-
echo ""
|
|
40
|
-
echo "Dry run. @duffel/components not published."
|
|
41
|
-
echo ""
|
|
42
|
-
fi
|
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
import { config } from "dotenv";
|
|
2
|
-
import fs from "fs";
|
|
3
|
-
import prompts from "prompts";
|
|
4
|
-
import { withPlural } from "../src/lib/withPlural";
|
|
5
|
-
import { Offer } from "../src/types/Offer";
|
|
6
|
-
|
|
7
|
-
config({ path: ".env.local" });
|
|
8
|
-
|
|
9
|
-
const DUFFEL_API_TOKEN = process.env.DUFFEL_API_TOKEN || "";
|
|
10
|
-
const DUFFEL_API_URL = process.env.DUFFEL_API_URL || "";
|
|
11
|
-
const VERBOSE = process.env.VERBOSE === "true";
|
|
12
|
-
|
|
13
|
-
// eslint-disable-next-line
|
|
14
|
-
const log = console.log;
|
|
15
|
-
|
|
16
|
-
if (DUFFEL_API_URL.includes("localhost"))
|
|
17
|
-
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
|
|
18
|
-
|
|
19
|
-
const duffelHeaders = {
|
|
20
|
-
"Duffel-Version": "v1",
|
|
21
|
-
"Accept-Encoding": "gzip",
|
|
22
|
-
Accept: "application/json",
|
|
23
|
-
"Content-Type": "application/json",
|
|
24
|
-
Authorization: `Bearer ${DUFFEL_API_TOKEN}`,
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export const makeMockDateInTheFuture = (daysAhead: number) => {
|
|
28
|
-
const now = new Date(Date.now());
|
|
29
|
-
now.setDate(now.getDate() + daysAhead);
|
|
30
|
-
return now;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
const createOfferRequest = async (
|
|
34
|
-
sliceInput: [string, string][],
|
|
35
|
-
adults: number,
|
|
36
|
-
requestedSources?: string[]
|
|
37
|
-
) => {
|
|
38
|
-
const data = {
|
|
39
|
-
slices: sliceInput.map(([origin, destination], index) => ({
|
|
40
|
-
origin,
|
|
41
|
-
destination,
|
|
42
|
-
departure_date: makeMockDateInTheFuture(7 * (index + 1))
|
|
43
|
-
.toISOString()
|
|
44
|
-
.split("T")[0],
|
|
45
|
-
})),
|
|
46
|
-
passengers: Array(adults).fill({ type: "adult" }),
|
|
47
|
-
...(requestedSources && { requested_sources: requestedSources }),
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
const response = await fetch(
|
|
51
|
-
DUFFEL_API_URL + "/air/offer_requests?return_offers=true",
|
|
52
|
-
{
|
|
53
|
-
method: "POST",
|
|
54
|
-
headers: duffelHeaders,
|
|
55
|
-
body: JSON.stringify({ data }),
|
|
56
|
-
}
|
|
57
|
-
);
|
|
58
|
-
|
|
59
|
-
return await response.json();
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
const getOffer = async (offerId: string): Promise<{ data: Offer }> => {
|
|
63
|
-
const response = await fetch(
|
|
64
|
-
process.env.DUFFEL_API_URL +
|
|
65
|
-
`/air/offers/${offerId}/?return_available_services=true`,
|
|
66
|
-
{ headers: duffelHeaders }
|
|
67
|
-
);
|
|
68
|
-
|
|
69
|
-
return await response.json();
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
const getSeatMaps = async (offerId: string) => {
|
|
73
|
-
const response = await fetch(
|
|
74
|
-
process.env.DUFFEL_API_URL + `/air/seat_maps?offer_id=${offerId}`,
|
|
75
|
-
{ headers: duffelHeaders }
|
|
76
|
-
);
|
|
77
|
-
|
|
78
|
-
return await response.json();
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
const main = async () => {
|
|
82
|
-
try {
|
|
83
|
-
// prompt user for how many slices they want
|
|
84
|
-
const { sliceCount } = await prompts({
|
|
85
|
-
type: "number",
|
|
86
|
-
name: "sliceCount",
|
|
87
|
-
message: "How many slices do you want?",
|
|
88
|
-
initial: 2,
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
// for each slice, prompt for origin and destination
|
|
92
|
-
const sliceInput = new Array<[string, string]>(sliceCount);
|
|
93
|
-
for (let i = 0; i < sliceCount; i++) {
|
|
94
|
-
let origin = sliceInput[i - 1]?.[0];
|
|
95
|
-
|
|
96
|
-
log(`\nSlice #${i + 1}`);
|
|
97
|
-
const { value } = await prompts({
|
|
98
|
-
type: "text",
|
|
99
|
-
name: "value",
|
|
100
|
-
message: "What is the origin?",
|
|
101
|
-
limit: 3,
|
|
102
|
-
});
|
|
103
|
-
origin = value;
|
|
104
|
-
|
|
105
|
-
const { destination } = await prompts({
|
|
106
|
-
type: "text",
|
|
107
|
-
name: "destination",
|
|
108
|
-
message: "What is the destination?",
|
|
109
|
-
limit: 3,
|
|
110
|
-
});
|
|
111
|
-
sliceInput[i] = [origin, destination];
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
// ask how many adults
|
|
115
|
-
log(`\n`);
|
|
116
|
-
const { adultCount } = await prompts({
|
|
117
|
-
type: "number",
|
|
118
|
-
name: "adultCount",
|
|
119
|
-
message: "How many adults traveling?",
|
|
120
|
-
initial: 1,
|
|
121
|
-
});
|
|
122
|
-
|
|
123
|
-
// ask for requested sources
|
|
124
|
-
log(`\n`);
|
|
125
|
-
const { requestedSources } = await prompts({
|
|
126
|
-
type: "text",
|
|
127
|
-
name: "requestedSources",
|
|
128
|
-
message: "What sources do you want to request?",
|
|
129
|
-
initial: "duffel_airways",
|
|
130
|
-
});
|
|
131
|
-
|
|
132
|
-
// run search
|
|
133
|
-
const { data: offerRequest } = await createOfferRequest(
|
|
134
|
-
sliceInput,
|
|
135
|
-
adultCount,
|
|
136
|
-
requestedSources ? requestedSources.split(",") : undefined
|
|
137
|
-
);
|
|
138
|
-
if (VERBOSE) {
|
|
139
|
-
const airlines = new Set(
|
|
140
|
-
offerRequest.offers.map((offer: Offer) => offer.owner.iata_code)
|
|
141
|
-
);
|
|
142
|
-
log(
|
|
143
|
-
`Received ${withPlural(
|
|
144
|
-
offerRequest.offers.length,
|
|
145
|
-
"offer",
|
|
146
|
-
"offers"
|
|
147
|
-
)} back ` +
|
|
148
|
-
`from ${withPlural(
|
|
149
|
-
airlines.size,
|
|
150
|
-
"airline",
|
|
151
|
-
"airlines"
|
|
152
|
-
)}(${Array.from(airlines.values()).join(",")})`
|
|
153
|
-
);
|
|
154
|
-
log(
|
|
155
|
-
`Search completed, offer request ID: ${offerRequest.id}.\nUsing first offer to get services: ${offerRequest.offers[0].id}\n`
|
|
156
|
-
);
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
// get offer
|
|
160
|
-
const { data: firstOffer } = await getOffer(offerRequest.offers[0].id);
|
|
161
|
-
|
|
162
|
-
// save to src/fixtures/offer
|
|
163
|
-
const _description =
|
|
164
|
-
`This fixture was generated by scripts/generate-fixture.ts. ` +
|
|
165
|
-
`It includes an offer with ${withPlural(
|
|
166
|
-
adultCount,
|
|
167
|
-
"passenger",
|
|
168
|
-
"passengers"
|
|
169
|
-
)} and ` +
|
|
170
|
-
`${withPlural(sliceCount, "slice", "slices")}: ${sliceInput.join(" ⇢ ")}`;
|
|
171
|
-
|
|
172
|
-
// Set offer to expire in 10 years so that this fixture won't trigger the
|
|
173
|
-
// "expired" error in the future.
|
|
174
|
-
const expires_at = makeMockDateInTheFuture(365 * 10).toISOString();
|
|
175
|
-
|
|
176
|
-
fs.writeFileSync(
|
|
177
|
-
`src/fixtures/offers/${firstOffer.id}.json`,
|
|
178
|
-
JSON.stringify({ _description, ...firstOffer, expires_at }, null, 2)
|
|
179
|
-
);
|
|
180
|
-
|
|
181
|
-
// get seat maps
|
|
182
|
-
const { data: seatMaps } = await getSeatMaps(firstOffer.id);
|
|
183
|
-
|
|
184
|
-
// save to src/fixtures/seat-maps
|
|
185
|
-
fs.writeFileSync(
|
|
186
|
-
`src/fixtures/seat-maps/${firstOffer.id}.json`,
|
|
187
|
-
JSON.stringify(seatMaps, null, 2)
|
|
188
|
-
);
|
|
189
|
-
|
|
190
|
-
log(`\n🐄 Fixtures saved for ${firstOffer.id}`);
|
|
191
|
-
log(` ↳ /src/fixtures/offer/${firstOffer.id}.json`);
|
|
192
|
-
log(` ↳ /src/fixtures/seat-maps/${firstOffer.id}.json\n`);
|
|
193
|
-
} catch (err) {
|
|
194
|
-
// eslint-disable-next-line
|
|
195
|
-
console.error(err);
|
|
196
|
-
process.exit(1);
|
|
197
|
-
}
|
|
198
|
-
};
|
|
199
|
-
|
|
200
|
-
export default main();
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import fs from "fs";
|
|
2
|
-
import readline from "readline";
|
|
3
|
-
|
|
4
|
-
async function readCSVIntoMatrix(
|
|
5
|
-
filePath: string,
|
|
6
|
-
linePrefix: string,
|
|
7
|
-
keys: string[]
|
|
8
|
-
): Promise<string[]> {
|
|
9
|
-
const rl = readline.createInterface({
|
|
10
|
-
input: fs.createReadStream(filePath),
|
|
11
|
-
crlfDelay: Infinity,
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
// this will map a key into the index
|
|
15
|
-
let keyNameToIndexMap: Record<string, number> = {};
|
|
16
|
-
const matrix = new Array<string>();
|
|
17
|
-
|
|
18
|
-
rl.on("line", (line) => {
|
|
19
|
-
if (Object.keys(keyNameToIndexMap).length === 0) {
|
|
20
|
-
// it's the header line
|
|
21
|
-
keyNameToIndexMap = line
|
|
22
|
-
.split(",")
|
|
23
|
-
.reduce((acc, key, index) => ({ ...acc, [key]: index }), {});
|
|
24
|
-
} else {
|
|
25
|
-
// it's a data line
|
|
26
|
-
const row = line.split(",");
|
|
27
|
-
const rowObject =
|
|
28
|
-
linePrefix +
|
|
29
|
-
keys
|
|
30
|
-
.map((key) => {
|
|
31
|
-
const index = keyNameToIndexMap[key];
|
|
32
|
-
return row[index];
|
|
33
|
-
})
|
|
34
|
-
.join(`,`);
|
|
35
|
-
matrix.push(rowObject);
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
await new Promise((res) => rl.once("close", res));
|
|
40
|
-
return matrix;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export interface CityCsvRow {
|
|
44
|
-
id: string;
|
|
45
|
-
iata_code: string;
|
|
46
|
-
iata_country_code: string;
|
|
47
|
-
name: string;
|
|
48
|
-
inserted_at: string;
|
|
49
|
-
updated_at: string;
|
|
50
|
-
metropolitan_area: string;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
async function loadCities() {
|
|
54
|
-
return await readCSVIntoMatrix("./data/cities.csv", "C,", [
|
|
55
|
-
"name",
|
|
56
|
-
"iata_code",
|
|
57
|
-
]);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export interface AirportCsvRow {
|
|
61
|
-
id: string;
|
|
62
|
-
iata_code: string;
|
|
63
|
-
iata_city_code: string;
|
|
64
|
-
iata_country_code: string;
|
|
65
|
-
name: string;
|
|
66
|
-
inserted_at: string;
|
|
67
|
-
updated_at: string;
|
|
68
|
-
source_type: string;
|
|
69
|
-
alternative_names: string;
|
|
70
|
-
icao_code: string;
|
|
71
|
-
disabled_at: string;
|
|
72
|
-
city_name: string;
|
|
73
|
-
latitude: string;
|
|
74
|
-
longitude: string;
|
|
75
|
-
time_zone: string;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
async function loadAirports() {
|
|
79
|
-
return await readCSVIntoMatrix("./data/airports.csv", "A,", [
|
|
80
|
-
"name",
|
|
81
|
-
"iata_code",
|
|
82
|
-
"latitude",
|
|
83
|
-
"longitude",
|
|
84
|
-
]);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
async function main() {
|
|
88
|
-
// load airports csv
|
|
89
|
-
const airports = await loadAirports();
|
|
90
|
-
|
|
91
|
-
// load cities csv
|
|
92
|
-
const cities = await loadCities();
|
|
93
|
-
|
|
94
|
-
fs.writeFileSync(
|
|
95
|
-
"./data/__generated__iata-lookup.json",
|
|
96
|
-
JSON.stringify([...cities, ...airports])
|
|
97
|
-
);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
export default main();
|
package/scripts/upload-to-cdn.sh
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
|
|
3
|
-
# Exit if a command fails
|
|
4
|
-
set -e
|
|
5
|
-
|
|
6
|
-
# Define where to upload files too
|
|
7
|
-
GCP_PREFIX=gs://duffel-assets/components
|
|
8
|
-
|
|
9
|
-
# Gets current version from package.json
|
|
10
|
-
VERSION=$(jq '.version' package.json -r)
|
|
11
|
-
|
|
12
|
-
# Check if version is empty
|
|
13
|
-
if [ -z "$VERSION" ]; then
|
|
14
|
-
echo "Error: version is empty"
|
|
15
|
-
exit 1
|
|
16
|
-
fi
|
|
17
|
-
|
|
18
|
-
# Check if folder exists
|
|
19
|
-
if gsutil -q stat "$GCP_PREFIX/$VERSION/duffel-ancillaries.js"; then
|
|
20
|
-
# Confirm with user before overriding
|
|
21
|
-
read -p "Version \`$VERSION\` already exists. Do you want to override it? (\`Y\` to continue) " -n 1 -r
|
|
22
|
-
echo
|
|
23
|
-
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
|
24
|
-
# Delete old version from GCP
|
|
25
|
-
gcloud storage rm -r "$GCP_PREFIX/$VERSION"
|
|
26
|
-
else
|
|
27
|
-
echo "Aborting script."
|
|
28
|
-
exit 1
|
|
29
|
-
fi
|
|
30
|
-
fi
|
|
31
|
-
|
|
32
|
-
# Uploads fixtures
|
|
33
|
-
gcloud storage cp -r cdn-dist "$GCP_PREFIX/$VERSION"
|
|
34
|
-
|
package/scripts.tsconfig.json
DELETED