@qite/tide-client 1.1.55 → 1.1.56
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/build/index.d.ts +1 -28
- package/build/index.js +185 -286
- package/build/index.js.map +1 -1
- package/build/types/booking-v2/request/available-countries-request.d.ts +4 -0
- package/build/types/booking-v2/request/available-flights-request.d.ts +8 -0
- package/build/types/{offer/booking-v2 → booking-v2}/request/index.d.ts +4 -0
- package/build/types/booking-v2/request/prices-request.d.ts +17 -0
- package/build/types/booking-v2/request/transport-dates-request.d.ts +14 -0
- package/build/types/booking-v2/response/available-country.d.ts +5 -0
- package/build/types/booking-v2/response/available-flight.d.ts +4 -0
- package/build/types/{offer → booking-v2/response}/base-price.d.ts +2 -1
- package/build/types/{offer/booking-v2 → booking-v2}/response/index.d.ts +5 -1
- package/build/types/booking-v2/response/transport-dates-response.d.ts +4 -0
- package/build/types/{offer/booking-v2 → booking-v2}/shared/index.d.ts +1 -0
- package/build/types/index.d.ts +4 -24
- package/build/types/mollie/index.d.ts +2 -0
- package/build/types/offer/index.d.ts +3 -39
- package/build/types/web/generate-booking-accommodation-request.d.ts +6 -0
- package/build/types/web/index.d.ts +2 -0
- package/build/utils/api.d.ts +9 -1
- package/build/utils/booking-v2-client.d.ts +47 -11
- package/build/utils/common-client.d.ts +10 -1
- package/build/utils/web-client.d.ts +13 -2
- package/package.json +2 -2
- package/src/index.ts +1 -29
- package/src/types/booking-v2/request/available-countries-request.ts +4 -0
- package/src/types/booking-v2/request/available-flights-request.ts +8 -0
- package/src/types/{offer/booking-v2 → booking-v2}/request/index.ts +4 -0
- package/src/types/booking-v2/request/prices-request.ts +19 -0
- package/src/types/booking-v2/request/transport-dates-request.ts +14 -0
- package/src/types/booking-v2/response/available-country.ts +5 -0
- package/src/types/booking-v2/response/available-flight.ts +4 -0
- package/src/types/{offer → booking-v2/response}/base-price.ts +2 -1
- package/src/types/{offer/booking-v2 → booking-v2}/response/index.ts +5 -1
- package/src/types/booking-v2/response/transport-dates-response.ts +4 -0
- package/src/types/{offer/booking-v2 → booking-v2}/shared/index.ts +1 -0
- package/src/types/index.ts +4 -24
- package/src/types/mollie/index.ts +2 -0
- package/src/types/offer/index.ts +3 -39
- package/src/types/web/generate-booking-accommodation-request.ts +6 -0
- package/src/types/web/index.ts +2 -0
- package/src/utils/api.ts +29 -1
- package/src/utils/booking-v2-client.ts +121 -27
- package/src/utils/common-client.ts +29 -4
- package/src/utils/web-client.ts +20 -4
- package/build/types/aapi/accommodation-occupancy.d.ts +0 -9
- package/build/types/aapi/accommodation-with-available-places.d.ts +0 -14
- package/build/types/aapi/accommodation.d.ts +0 -7
- package/build/types/aapi/additional-services.d.ts +0 -6
- package/build/types/aapi/alternative-flight-data.d.ts +0 -10
- package/build/types/aapi/alternative-flight-leg.d.ts +0 -18
- package/build/types/aapi/alternative-flight.d.ts +0 -12
- package/build/types/aapi/availability-request.d.ts +0 -12
- package/build/types/aapi/availability.d.ts +0 -5
- package/build/types/aapi/available-products-request.d.ts +0 -32
- package/build/types/aapi/duration.d.ts +0 -4
- package/build/types/aapi/flight-leg.d.ts +0 -18
- package/build/types/aapi/flight.d.ts +0 -23
- package/build/types/aapi/hotel.d.ts +0 -35
- package/build/types/aapi/index.d.ts +0 -22
- package/build/types/aapi/option-pax.d.ts +0 -4
- package/build/types/aapi/option.d.ts +0 -28
- package/build/types/aapi/pax.d.ts +0 -4
- package/build/types/aapi/price-detail.d.ts +0 -8
- package/build/types/aapi/regime.d.ts +0 -5
- package/build/types/aapi/traveler-grouping.d.ts +0 -5
- package/build/types/accommodation-occupancy.d.ts +0 -9
- package/build/types/accommodation-with-available-places.d.ts +0 -15
- package/build/types/accommodation.d.ts +0 -7
- package/build/types/additional-services.d.ts +0 -5
- package/build/types/alternative-flight-data.d.ts +0 -10
- package/build/types/alternative-flight-leg.d.ts +0 -18
- package/build/types/alternative-flight.d.ts +0 -12
- package/build/types/availability-request.d.ts +0 -11
- package/build/types/availability.d.ts +0 -5
- package/build/types/available-products-request.d.ts +0 -28
- package/build/types/availablility-request.d.ts +0 -11
- package/build/types/duration.d.ts +0 -4
- package/build/types/entry-line-meta-data.d.ts +0 -5
- package/build/types/enums/online-payment-type.d.ts +0 -3
- package/build/types/enums/print-action-group.enum.d.ts +0 -10
- package/build/types/flight-leg.d.ts +0 -18
- package/build/types/flight.d.ts +0 -23
- package/build/types/hotel.d.ts +0 -34
- package/build/types/offer/address.d.ts +0 -11
- package/build/types/offer/affiliates.d.ts +0 -5
- package/build/types/offer/alternative-flight-data.d.ts +0 -10
- package/build/types/offer/alternative-flight-leg.d.ts +0 -18
- package/build/types/offer/alternative-flight.d.ts +0 -14
- package/build/types/offer/available-package-accommodation.d.ts +0 -7
- package/build/types/offer/available-package-flight.d.ts +0 -9
- package/build/types/offer/available-package-option.d.ts +0 -17
- package/build/types/offer/available-package-pax-price.d.ts +0 -6
- package/build/types/offer/available-package-regime.d.ts +0 -4
- package/build/types/offer/available-package.d.ts +0 -7
- package/build/types/offer/base-prices-from-date-request.d.ts +0 -12
- package/build/types/offer/base-prices-request.d.ts +0 -12
- package/build/types/offer/book-request.d.ts +0 -36
- package/build/types/offer/booking-response.d.ts +0 -4
- package/build/types/offer/booking-v2/request/tour-codes-request.d.ts +0 -3
- package/build/types/offer/cached-package-search-result.d.ts +0 -5
- package/build/types/offer/multiroom-book-request.d.ts +0 -10
- package/build/types/offer/other-product.d.ts +0 -13
- package/build/types/offer/package-book-request-room.d.ts +0 -5
- package/build/types/offer/package-book-request.d.ts +0 -12
- package/build/types/offer/package-flight.d.ts +0 -13
- package/build/types/offer/package-flights.d.ts +0 -5
- package/build/types/offer/package-option.d.ts +0 -22
- package/build/types/offer/package-price-details-request-room.d.ts +0 -4
- package/build/types/offer/package-price-details-request.d.ts +0 -8
- package/build/types/offer/package-room-option.d.ts +0 -10
- package/build/types/offer/package-room.d.ts +0 -7
- package/build/types/offer/package-search-destination.d.ts +0 -9
- package/build/types/offer/package-search-request-date.d.ts +0 -4
- package/build/types/offer/package-search-request-room.d.ts +0 -5
- package/build/types/offer/package-search-request.d.ts +0 -22
- package/build/types/offer/package-search-response.d.ts +0 -4
- package/build/types/offer/package-search-result.d.ts +0 -12
- package/build/types/offer/package-sub-option.d.ts +0 -6
- package/build/types/offer/price-detail.d.ts +0 -18
- package/build/types/offer/price-per-pax.d.ts +0 -6
- package/build/types/option-pax.d.ts +0 -4
- package/build/types/option.d.ts +0 -26
- package/build/types/package-details-request.d.ts +0 -12
- package/build/types/package-flight.d.ts +0 -11
- package/build/types/package-flights.d.ts +0 -5
- package/build/types/package-option.d.ts +0 -19
- package/build/types/package-room-option.d.ts +0 -8
- package/build/types/package-room.d.ts +0 -7
- package/build/types/package-search-destination.d.ts +0 -9
- package/build/types/package-search-request-date.d.ts +0 -4
- package/build/types/package-search-request-room.d.ts +0 -5
- package/build/types/package-search-request.d.ts +0 -21
- package/build/types/package-search-response.d.ts +0 -4
- package/build/types/package-search-result.d.ts +0 -12
- package/build/types/package-sub-option.d.ts +0 -6
- package/build/types/pax.d.ts +0 -4
- package/build/types/regime.d.ts +0 -5
- package/build/types/traveler-grouping.d.ts +0 -5
- package/build/utils/booking-client.d.ts +0 -181
- package/build/utils/bookingClient.d.ts +0 -9
- package/build/utils/client.d.ts +0 -4
- package/src/types/aapi/accommodation-occupancy.ts +0 -9
- package/src/types/aapi/accommodation-with-available-places.ts +0 -15
- package/src/types/aapi/accommodation.ts +0 -8
- package/src/types/aapi/additional-services.ts +0 -6
- package/src/types/aapi/alternative-flight-data.ts +0 -11
- package/src/types/aapi/alternative-flight-leg.ts +0 -18
- package/src/types/aapi/alternative-flight.ts +0 -13
- package/src/types/aapi/availability-request.ts +0 -12
- package/src/types/aapi/availability.ts +0 -6
- package/src/types/aapi/available-products-request.ts +0 -33
- package/src/types/aapi/duration.ts +0 -4
- package/src/types/aapi/flight-leg.ts +0 -18
- package/src/types/aapi/flight.ts +0 -24
- package/src/types/aapi/hotel.ts +0 -36
- package/src/types/aapi/index.ts +0 -22
- package/src/types/aapi/option-pax.ts +0 -4
- package/src/types/aapi/option.ts +0 -29
- package/src/types/aapi/pax.ts +0 -4
- package/src/types/aapi/price-detail.ts +0 -8
- package/src/types/aapi/regime.ts +0 -5
- package/src/types/aapi/traveler-grouping.ts +0 -5
- package/src/types/offer/address.ts +0 -11
- package/src/types/offer/alternative-flight-data.ts +0 -11
- package/src/types/offer/alternative-flight-leg.ts +0 -18
- package/src/types/offer/alternative-flight.ts +0 -15
- package/src/types/offer/available-package-accommodation.ts +0 -8
- package/src/types/offer/available-package-flight.ts +0 -10
- package/src/types/offer/available-package-option.ts +0 -18
- package/src/types/offer/available-package-pax-price.ts +0 -6
- package/src/types/offer/available-package-regime.ts +0 -4
- package/src/types/offer/available-package.ts +0 -8
- package/src/types/offer/base-prices-from-date-request.ts +0 -12
- package/src/types/offer/base-prices-request.ts +0 -12
- package/src/types/offer/book-request.ts +0 -38
- package/src/types/offer/booking-response.ts +0 -4
- package/src/types/offer/cached-package-search-result.ts +0 -6
- package/src/types/offer/multiroom-book-request.ts +0 -11
- package/src/types/offer/other-product.ts +0 -14
- package/src/types/offer/package-book-request-room.ts +0 -6
- package/src/types/offer/package-book-request.ts +0 -13
- package/src/types/offer/package-flight.ts +0 -14
- package/src/types/offer/package-flights.ts +0 -6
- package/src/types/offer/package-option.ts +0 -23
- package/src/types/offer/package-price-details-request-room.ts +0 -4
- package/src/types/offer/package-price-details-request.ts +0 -9
- package/src/types/offer/package-room-option.ts +0 -10
- package/src/types/offer/package-room.ts +0 -8
- package/src/types/offer/package-search-destination.ts +0 -9
- package/src/types/offer/package-search-request-date.ts +0 -4
- package/src/types/offer/package-search-request-room.ts +0 -5
- package/src/types/offer/package-search-request.ts +0 -23
- package/src/types/offer/package-search-result.ts +0 -13
- package/src/types/offer/package-sub-option.ts +0 -6
- package/src/types/offer/price-detail.ts +0 -19
- package/src/types/offer/price-per-pax.ts +0 -6
- package/src/utils/booking-client.ts +0 -310
- package/tests/bookingClient.test.ts +0 -728
- package/tests/mocks/available-products.json +0 -183
- package/tests/mocks/base-prices-from-date.json +0 -74
- package/tests/mocks/base-prices.json +0 -236
- package/tests/mocks/entry-multiroom.json +0 -2043
- package/tests/mocks/entry-multiroom.short.json +0 -4
- package/tests/mocks/offer-entry.json +0 -2043
- package/tests/mocks/offer-entry.short.json +0 -4
- package/tests/mocks/package-entry.json +0 -2043
- package/tests/mocks/package-entry.short.json +0 -4
- package/tests/mocks/package-offer-entry.json +0 -2043
- package/tests/mocks/package-offer-entry.short.json +0 -4
- package/tests/mocks/package-price-details.json +0 -176
- package/tests/mocks/package-search.json +0 -179
- /package/build/types/{offer/booking-v2 → booking-v2}/index.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/request/bookable-dates-request.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/request/booking-package-address.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/request/booking-package-book-request.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/request/booking-package-customer-request.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/request/booking-package-destination.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/request/booking-package-details-request.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/request/booking-package-flight-pool-request.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/request/booking-package-request.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/request/booking-package-search-request.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/request/booking-package-update-request.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/request/booking-package-voucher-request.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/request/selected-flight.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/request/selected-hotel.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/request/tour-codes.request.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/response/bookable-dates.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/response/booking-package-allotment-info.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/response/booking-package-dossier.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/response/booking-package-flight-pool.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/response/booking-package-hotel-pool.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/response/booking-package-item.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/response/booking-price-detail.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/response/booking-price-details.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/response/booking-price-per-pax.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/response/booking-product-notification.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/response/booking-room-status-option.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/response/booking-room-status.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/response/booking-travel-agent.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/response/booking-validity-line.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/response/booking-voucher-result.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/response/changed-line.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/response/tide-response.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/response/tour-codes-response.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/shared/airline-booking-package-option.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/shared/airport-booking-package-option.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/shared/booking-airline-group.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/shared/booking-airport-group.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/shared/booking-option-group.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/shared/booking-option-pax.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/shared/booking-option-unit.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/shared/booking-package-availability.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/shared/booking-package-flight-meta-data-line.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/shared/booking-package-flight-meta-data.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/shared/booking-package-flight.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/shared/booking-package-hotel-option.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/shared/booking-package-hotel-room.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/shared/booking-package-hotel.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/shared/booking-package-line.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/shared/booking-package-option.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/shared/booking-package-pax.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/shared/booking-package-request-room.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/shared/booking-package-room-option.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/shared/booking-package-room.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/shared/booking-package-tag.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/shared/booking-package.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/shared/per-booking-package-option.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/shared/per-package-option.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/shared/per-pax-package-option.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/shared/per-unit-package-option.d.ts +0 -0
- /package/build/types/{offer/booking-v2 → booking-v2}/shared/room-option-pax-type.d.ts +0 -0
- /package/build/types/{aapi → mollie}/mollie-payment-request.d.ts +0 -0
- /package/build/types/{aapi → mollie}/mollie-payment.d.ts +0 -0
- /package/build/types/{offer → web}/affiliate.d.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/index.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/request/bookable-dates-request.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/request/booking-package-address.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/request/booking-package-book-request.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/request/booking-package-customer-request.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/request/booking-package-destination.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/request/booking-package-details-request.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/request/booking-package-flight-pool-request.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/request/booking-package-request.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/request/booking-package-search-request.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/request/booking-package-update-request.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/request/booking-package-voucher-request.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/request/selected-flight.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/request/selected-hotel.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/request/tour-codes.request.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/response/bookable-dates.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/response/booking-package-allotment-info.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/response/booking-package-dossier.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/response/booking-package-flight-pool.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/response/booking-package-hotel-pool.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/response/booking-package-item.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/response/booking-price-detail.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/response/booking-price-details.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/response/booking-price-per-pax.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/response/booking-product-notification.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/response/booking-room-status-option.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/response/booking-room-status.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/response/booking-travel-agent.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/response/booking-validity-line.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/response/booking-voucher-result.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/response/changed-line.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/response/tide-response.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/response/tour-codes-response.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/shared/airline-booking-package-option.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/shared/airport-booking-package-option.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/shared/booking-airline-group.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/shared/booking-airport-group.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/shared/booking-option-group.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/shared/booking-option-pax.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/shared/booking-option-unit.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/shared/booking-package-availability.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/shared/booking-package-flight-meta-data-line.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/shared/booking-package-flight-meta-data.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/shared/booking-package-flight.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/shared/booking-package-hotel-option.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/shared/booking-package-hotel-room.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/shared/booking-package-hotel.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/shared/booking-package-line.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/shared/booking-package-option.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/shared/booking-package-pax.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/shared/booking-package-request-room.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/shared/booking-package-room-option.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/shared/booking-package-room.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/shared/booking-package-tag.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/shared/booking-package.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/shared/per-booking-package-option.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/shared/per-package-option.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/shared/per-pax-package-option.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/shared/per-unit-package-option.ts +0 -0
- /package/src/types/{offer/booking-v2 → booking-v2}/shared/room-option-pax-type.ts +0 -0
- /package/src/types/{aapi → mollie}/mollie-payment-request.ts +0 -0
- /package/src/types/{aapi → mollie}/mollie-payment.ts +0 -0
- /package/src/types/{offer → web}/affiliate.ts +0 -0
package/src/types/offer/index.ts
CHANGED
|
@@ -1,20 +1,4 @@
|
|
|
1
1
|
export * from "./additional-services";
|
|
2
|
-
export * from "./address";
|
|
3
|
-
export * from "./alternative-flight-data";
|
|
4
|
-
export * from "./alternative-flight-leg";
|
|
5
|
-
export * from "./alternative-flight";
|
|
6
|
-
export * from "./available-package-accommodation";
|
|
7
|
-
export * from "./available-package-flight";
|
|
8
|
-
export * from "./available-package-option";
|
|
9
|
-
export * from "./available-package-pax-price";
|
|
10
|
-
export * from "./available-package-regime";
|
|
11
|
-
export * from "./available-package";
|
|
12
|
-
export * from "./base-price";
|
|
13
|
-
export * from "./base-prices-from-date-request";
|
|
14
|
-
export * from "./base-prices-request";
|
|
15
|
-
export * from "./book-request";
|
|
16
|
-
export * from "./booking-response";
|
|
17
|
-
export * from "./cached-package-search-result";
|
|
18
2
|
export * from "./confirmed-dossier-check";
|
|
19
3
|
export * from "./country-item";
|
|
20
4
|
export * from "./crm-contact-request";
|
|
@@ -22,15 +6,15 @@ export * from "./customer-request";
|
|
|
22
6
|
export * from "./dossier-default-product";
|
|
23
7
|
export * from "./dossier-pax-item";
|
|
24
8
|
export * from "./dossier-view-result";
|
|
9
|
+
export * from "./entry";
|
|
25
10
|
export * from "./entry-check-response";
|
|
11
|
+
export * from "./entry-line";
|
|
26
12
|
export * from "./entry-line-meta-data";
|
|
27
13
|
export * from "./entry-line-pax";
|
|
28
|
-
export * from "./entry-line";
|
|
29
14
|
export * from "./entry-price-line";
|
|
30
15
|
export * from "./entry-room2";
|
|
31
|
-
export * from "./entry";
|
|
32
|
-
export * from "./flight-meta-data-line";
|
|
33
16
|
export * from "./flight-meta-data";
|
|
17
|
+
export * from "./flight-meta-data-line";
|
|
34
18
|
export * from "./flight-pool";
|
|
35
19
|
export * from "./item-tag";
|
|
36
20
|
export * from "./language";
|
|
@@ -40,24 +24,7 @@ export * from "./member-info";
|
|
|
40
24
|
export * from "./member-login-request";
|
|
41
25
|
export * from "./member-login-response";
|
|
42
26
|
export * from "./member-reset-password-request";
|
|
43
|
-
export * from "./multiroom-book-request";
|
|
44
27
|
export * from "./note";
|
|
45
|
-
export * from "./other-product";
|
|
46
|
-
export * from "./package-book-request-room";
|
|
47
|
-
export * from "./package-book-request";
|
|
48
|
-
export * from "./package-flight";
|
|
49
|
-
export * from "./package-flights";
|
|
50
|
-
export * from "./package-option";
|
|
51
|
-
export * from "./package-price-details-request-room";
|
|
52
|
-
export * from "./package-price-details-request";
|
|
53
|
-
export * from "./package-room-option";
|
|
54
|
-
export * from "./package-room";
|
|
55
|
-
export * from "./package-search-destination";
|
|
56
|
-
export * from "./package-search-request-date";
|
|
57
|
-
export * from "./package-search-request-room";
|
|
58
|
-
export * from "./package-search-request";
|
|
59
|
-
export * from "./package-search-result";
|
|
60
|
-
export * from "./package-sub-option";
|
|
61
28
|
export * from "./page-result";
|
|
62
29
|
export * from "./pax";
|
|
63
30
|
export * from "./payment";
|
|
@@ -68,9 +35,6 @@ export * from "./person-period-date-range-preference";
|
|
|
68
35
|
export * from "./person-period-preference";
|
|
69
36
|
export * from "./person-region-preference";
|
|
70
37
|
export * from "./person-tour-group-preference";
|
|
71
|
-
export * from "./price-detail";
|
|
72
|
-
export * from "./price-per-pax";
|
|
73
38
|
export * from "./product-notification-result";
|
|
74
39
|
export * from "./web-contact-form-request";
|
|
75
40
|
export * from "./web-contact-has-tag-request";
|
|
76
|
-
export * from "./booking-v2";
|
package/src/utils/api.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export const post = async (
|
|
2
2
|
url: string,
|
|
3
3
|
apiKey: string,
|
|
4
|
-
body
|
|
4
|
+
body?: string | null,
|
|
5
5
|
token?: string,
|
|
6
6
|
signal?: AbortSignal,
|
|
7
7
|
languageCode?: string
|
|
@@ -26,6 +26,34 @@ export const post = async (
|
|
|
26
26
|
return response;
|
|
27
27
|
};
|
|
28
28
|
|
|
29
|
+
export const patch = async (
|
|
30
|
+
url: string,
|
|
31
|
+
apiKey: string,
|
|
32
|
+
body?: string | null,
|
|
33
|
+
token?: string,
|
|
34
|
+
signal?: AbortSignal,
|
|
35
|
+
languageCode?: string
|
|
36
|
+
): Promise<Response> => {
|
|
37
|
+
const response = await fetch(url, {
|
|
38
|
+
method: "PATCH",
|
|
39
|
+
headers: {
|
|
40
|
+
"Content-Type": "application/json",
|
|
41
|
+
"Api-Key": apiKey,
|
|
42
|
+
Language: languageCode || "nl-BE",
|
|
43
|
+
Authorization: token ? `Bearer ${token}` : "",
|
|
44
|
+
},
|
|
45
|
+
credentials: "include",
|
|
46
|
+
body,
|
|
47
|
+
signal,
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
if (!response.ok) {
|
|
51
|
+
throw new Error(response.statusText);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return response;
|
|
55
|
+
};
|
|
56
|
+
|
|
29
57
|
export const get = async (
|
|
30
58
|
url: string,
|
|
31
59
|
apiKey: string,
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TideClientConfig } from "..";
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
|
-
|
|
4
|
+
AvailableCountriesRequest,
|
|
5
|
+
AvailableCountry,
|
|
6
|
+
AvailableFlight,
|
|
7
|
+
AvailableFlightsRequest,
|
|
8
|
+
BasePrice,
|
|
5
9
|
BookableDates,
|
|
6
10
|
BookableDatesRequest,
|
|
7
11
|
BookingPackage,
|
|
12
|
+
BookingPackageAvailability,
|
|
8
13
|
BookingPackageBookRequest,
|
|
9
14
|
BookingPackageDetailsRequest,
|
|
10
15
|
BookingPackageDossier,
|
|
@@ -19,40 +24,92 @@ import {
|
|
|
19
24
|
BookingPriceDetails,
|
|
20
25
|
BookingTravelAgent,
|
|
21
26
|
BookingVoucherResult,
|
|
27
|
+
EntryStatus,
|
|
28
|
+
PricesRequest,
|
|
22
29
|
TideResponse,
|
|
23
30
|
TourCodesRequest,
|
|
24
31
|
TourCodesResponse,
|
|
32
|
+
TransportDatesRequest,
|
|
33
|
+
TransportDatesResponse,
|
|
25
34
|
} from "../types";
|
|
26
|
-
import {
|
|
27
|
-
import { get, post } from "./common-client";
|
|
35
|
+
import { get, patch, post } from "./common-client";
|
|
28
36
|
|
|
29
37
|
const ENDPOINT = "/api/web/booking/v2";
|
|
30
|
-
const
|
|
38
|
+
const ENDPOINT_AVAILABLE_FLIGHTS = `${ENDPOINT}/available-flights`;
|
|
39
|
+
const ENDPOINT_TRANSPORT_DATES = `${ENDPOINT}/transport-dates`;
|
|
40
|
+
const ENDPOINT_PRICES = `${ENDPOINT}/prices`;
|
|
41
|
+
const ENDPOINT_AVAILABLE_COUNTRIES = `${ENDPOINT}/available-countries`;
|
|
31
42
|
const ENDPOINT_SEARCH = `${ENDPOINT}/search`;
|
|
32
43
|
const ENDPOINT_SEARCH_WITH_ERROR_MAPPING = `${ENDPOINT}/search-with-error-mapping`;
|
|
44
|
+
// const ENDPOINT_ELASTIC = `${ENDPOINT}/elastic`; // TODO
|
|
33
45
|
const ENDPOINT_DETAILS = `${ENDPOINT}/details`;
|
|
34
46
|
const ENDPOINT_VALIDATE_VOUCHER = `${ENDPOINT}/validate-voucher`;
|
|
35
|
-
const ENDPOINT_ALTERNATE_HOTELS =
|
|
36
|
-
|
|
47
|
+
const ENDPOINT_ALTERNATE_HOTELS = (transactionId: string, optionId: string) =>
|
|
48
|
+
`${ENDPOINT}/details/${transactionId}/alternate-hotels/${optionId}`;
|
|
49
|
+
const ENDPOINT_ALTERNATE_FLIGHTS = (transactionId: string) =>
|
|
50
|
+
`${ENDPOINT}/details/${transactionId}/alternate-flights`;
|
|
51
|
+
const ENDPOINT_BOOKABLE_DATES = `${ENDPOINT}/bookable-dates`;
|
|
37
52
|
const ENDPOINT_PRICE_DETAILS = `${ENDPOINT}/price-details`;
|
|
38
53
|
const ENDPOINT_BOOK = `${ENDPOINT}/book`;
|
|
39
54
|
const ENDPOINT_UPDATE = `${ENDPOINT}/update`;
|
|
40
55
|
const ENDPOINT_AGENTS = `${ENDPOINT}/agents`;
|
|
41
|
-
const ENDPOINT_AVAILABLE_ALLOTMENTS =
|
|
56
|
+
const ENDPOINT_AVAILABLE_ALLOTMENTS = (eventId: string, productCode: string) =>
|
|
57
|
+
`${ENDPOINT}/get-allotment-availability/${eventId}/${productCode}`;
|
|
42
58
|
const ENDPOINT_FLIGHT_POOL = `${ENDPOINT}/flight-pool`;
|
|
43
|
-
const ENDPOINT_BOOKABLE_DATES = `${ENDPOINT}/bookable-dates`;
|
|
44
59
|
const ENDPOINT_TOUR_CODES = `${ENDPOINT}/tourcodes`;
|
|
60
|
+
const ENDPOINT_CUSTOM_ENTRY_STATUS = (
|
|
61
|
+
dossierNumber: string,
|
|
62
|
+
customEntryStatusId: number
|
|
63
|
+
) => `${ENDPOINT}/custom-entry-status/${dossierNumber}/${customEntryStatusId}`;
|
|
64
|
+
const ENDPOINT_ENTRY_STATUS = (dossierNumber: string, entryStatus: number) =>
|
|
65
|
+
`${ENDPOINT}/custom-entry-status/${dossierNumber}/${entryStatus}`;
|
|
66
|
+
|
|
67
|
+
export const availableFlights = (
|
|
68
|
+
config: TideClientConfig,
|
|
69
|
+
request: AvailableFlightsRequest,
|
|
70
|
+
signal?: AbortSignal
|
|
71
|
+
): Promise<AvailableFlight[]> => {
|
|
72
|
+
const url = `${config.host}${ENDPOINT_AVAILABLE_FLIGHTS}`;
|
|
73
|
+
const apiKey = config.apiKey;
|
|
74
|
+
const body = JSON.stringify(request);
|
|
75
|
+
|
|
76
|
+
return post(url, apiKey, body, config.token, signal, true);
|
|
77
|
+
};
|
|
45
78
|
|
|
46
|
-
export const
|
|
79
|
+
export const transportDates = (
|
|
47
80
|
config: TideClientConfig,
|
|
48
|
-
request:
|
|
81
|
+
request: TransportDatesRequest,
|
|
49
82
|
signal?: AbortSignal
|
|
50
|
-
): Promise<
|
|
51
|
-
const url = `${config.host}${
|
|
83
|
+
): Promise<TransportDatesResponse> => {
|
|
84
|
+
const url = `${config.host}${ENDPOINT_TRANSPORT_DATES}`;
|
|
52
85
|
const apiKey = config.apiKey;
|
|
53
86
|
const body = JSON.stringify(request);
|
|
54
87
|
|
|
55
|
-
return post(url, apiKey, body, config.token, signal);
|
|
88
|
+
return post(url, apiKey, body, config.token, signal, true);
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
export const prices = (
|
|
92
|
+
config: TideClientConfig,
|
|
93
|
+
request: PricesRequest,
|
|
94
|
+
signal?: AbortSignal
|
|
95
|
+
): Promise<BasePrice[]> => {
|
|
96
|
+
const url = `${config.host}${ENDPOINT_PRICES}`;
|
|
97
|
+
const apiKey = config.apiKey;
|
|
98
|
+
const body = JSON.stringify(request);
|
|
99
|
+
|
|
100
|
+
return post(url, apiKey, body, config.token, signal, true);
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
export const availableCountries = (
|
|
104
|
+
config: TideClientConfig,
|
|
105
|
+
request: AvailableCountriesRequest,
|
|
106
|
+
signal?: AbortSignal
|
|
107
|
+
): Promise<AvailableCountry[]> => {
|
|
108
|
+
const url = `${config.host}${ENDPOINT_AVAILABLE_COUNTRIES}`;
|
|
109
|
+
const apiKey = config.apiKey;
|
|
110
|
+
const body = JSON.stringify(request);
|
|
111
|
+
|
|
112
|
+
return post(url, apiKey, body, config.token, signal, true);
|
|
56
113
|
};
|
|
57
114
|
|
|
58
115
|
// PACKAGE SEARCH
|
|
@@ -108,9 +165,13 @@ export const validateVoucher = (
|
|
|
108
165
|
export const alternateHotels = (
|
|
109
166
|
config: TideClientConfig,
|
|
110
167
|
transactionId: string,
|
|
168
|
+
optionId: string,
|
|
111
169
|
signal?: AbortSignal
|
|
112
170
|
): Promise<BookingPackageHotelPool> => {
|
|
113
|
-
const url = `${config.host}${
|
|
171
|
+
const url = `${config.host}${ENDPOINT_ALTERNATE_HOTELS(
|
|
172
|
+
transactionId,
|
|
173
|
+
optionId
|
|
174
|
+
)}`;
|
|
114
175
|
const apiKey = config.apiKey;
|
|
115
176
|
|
|
116
177
|
return get(url, apiKey, config.token, signal, true);
|
|
@@ -121,12 +182,24 @@ export const alternateFlights = (
|
|
|
121
182
|
transactionId: string,
|
|
122
183
|
signal?: AbortSignal
|
|
123
184
|
): Promise<BookingPackageFlightPool> => {
|
|
124
|
-
const url = `${config.host}${
|
|
185
|
+
const url = `${config.host}${ENDPOINT_ALTERNATE_FLIGHTS(transactionId)}`;
|
|
125
186
|
const apiKey = config.apiKey;
|
|
126
187
|
|
|
127
188
|
return get(url, apiKey, config.token, signal, true);
|
|
128
189
|
};
|
|
129
190
|
|
|
191
|
+
export const bookableDates = (
|
|
192
|
+
config: TideClientConfig,
|
|
193
|
+
request: BookableDatesRequest,
|
|
194
|
+
signal?: AbortSignal
|
|
195
|
+
): Promise<BookableDates> => {
|
|
196
|
+
const url = `${config.host}${ENDPOINT_BOOKABLE_DATES}`;
|
|
197
|
+
const apiKey = config.apiKey;
|
|
198
|
+
const body = JSON.stringify(request);
|
|
199
|
+
|
|
200
|
+
return post(url, apiKey, body, config.token, signal, true);
|
|
201
|
+
};
|
|
202
|
+
|
|
130
203
|
export const priceDetails = (
|
|
131
204
|
config: TideClientConfig,
|
|
132
205
|
request: BookingPackageRequest<BookingPackageBookRequest>,
|
|
@@ -181,7 +254,10 @@ export const getAllotmentAvailability = (
|
|
|
181
254
|
productCode: string,
|
|
182
255
|
signal?: AbortSignal
|
|
183
256
|
): Promise<BookingPackageAvailability[]> => {
|
|
184
|
-
const url = `${config.host}${ENDPOINT_AVAILABLE_ALLOTMENTS
|
|
257
|
+
const url = `${config.host}${ENDPOINT_AVAILABLE_ALLOTMENTS(
|
|
258
|
+
eventId,
|
|
259
|
+
productCode
|
|
260
|
+
)}`;
|
|
185
261
|
const apiKey = config.apiKey;
|
|
186
262
|
|
|
187
263
|
return get(url, apiKey, config.token, signal, true);
|
|
@@ -199,26 +275,44 @@ export const searchFlightPool = (
|
|
|
199
275
|
return post(url, apiKey, body, config.token, signal, true);
|
|
200
276
|
};
|
|
201
277
|
|
|
202
|
-
export const
|
|
278
|
+
export const tourCodes = (
|
|
203
279
|
config: TideClientConfig,
|
|
204
|
-
request:
|
|
280
|
+
request: TourCodesRequest,
|
|
205
281
|
signal?: AbortSignal
|
|
206
|
-
): Promise<
|
|
207
|
-
const url = `${config.host}${
|
|
282
|
+
): Promise<TourCodesResponse> => {
|
|
283
|
+
const url = `${config.host}${ENDPOINT_TOUR_CODES}`;
|
|
208
284
|
const apiKey = config.apiKey;
|
|
209
285
|
const body = JSON.stringify(request);
|
|
210
286
|
|
|
211
287
|
return post(url, apiKey, body, config.token, signal, true);
|
|
212
288
|
};
|
|
213
289
|
|
|
214
|
-
export const
|
|
290
|
+
export const setCustomEntryStatus = (
|
|
215
291
|
config: TideClientConfig,
|
|
216
|
-
|
|
292
|
+
dossierNumber: string,
|
|
293
|
+
customEntryStatusId: number,
|
|
217
294
|
signal?: AbortSignal
|
|
218
|
-
): Promise<
|
|
219
|
-
const url = `${config.host}${
|
|
295
|
+
): Promise<BookingPackageAvailability[]> => {
|
|
296
|
+
const url = `${config.host}${ENDPOINT_CUSTOM_ENTRY_STATUS(
|
|
297
|
+
dossierNumber,
|
|
298
|
+
customEntryStatusId
|
|
299
|
+
)}`;
|
|
220
300
|
const apiKey = config.apiKey;
|
|
221
|
-
const body = JSON.stringify(request);
|
|
222
301
|
|
|
223
|
-
return
|
|
302
|
+
return get(url, apiKey, config.token, signal, true);
|
|
303
|
+
};
|
|
304
|
+
|
|
305
|
+
export const setEntryStatus = (
|
|
306
|
+
config: TideClientConfig,
|
|
307
|
+
dossierNumber: string,
|
|
308
|
+
entryStatus: EntryStatus,
|
|
309
|
+
signal?: AbortSignal
|
|
310
|
+
): Promise<BookingPackageAvailability[]> => {
|
|
311
|
+
const url = `${config.host}${ENDPOINT_ENTRY_STATUS(
|
|
312
|
+
dossierNumber,
|
|
313
|
+
entryStatus
|
|
314
|
+
)}`;
|
|
315
|
+
const apiKey = config.apiKey;
|
|
316
|
+
|
|
317
|
+
return patch(url, apiKey, null, config.token, signal, true);
|
|
224
318
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { post as apiPost, get as apiGet } from "./api";
|
|
1
|
+
import { post as apiPost, get as apiGet, patch as apiPatch } from "./api";
|
|
2
2
|
import { reviver } from "./json";
|
|
3
3
|
|
|
4
4
|
export const post = async <T>(
|
|
5
5
|
url: string,
|
|
6
6
|
apiKey: string,
|
|
7
|
-
body
|
|
7
|
+
body?: string | null,
|
|
8
8
|
token?: string,
|
|
9
9
|
signal?: AbortSignal,
|
|
10
10
|
skipReviver?: boolean,
|
|
@@ -21,8 +21,33 @@ export const post = async <T>(
|
|
|
21
21
|
const responseBody = await response.text();
|
|
22
22
|
|
|
23
23
|
const result: T = skipReviver
|
|
24
|
-
? JSON.parse(responseBody
|
|
25
|
-
: JSON.parse(responseBody
|
|
24
|
+
? JSON.parse(responseBody)
|
|
25
|
+
: JSON.parse(responseBody, reviver);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export const patch = async <T>(
|
|
30
|
+
url: string,
|
|
31
|
+
apiKey: string,
|
|
32
|
+
body?: string | null,
|
|
33
|
+
token?: string,
|
|
34
|
+
signal?: AbortSignal,
|
|
35
|
+
skipReviver?: boolean,
|
|
36
|
+
languageCode?: string
|
|
37
|
+
): Promise<T> => {
|
|
38
|
+
const response = await apiPatch(
|
|
39
|
+
url,
|
|
40
|
+
apiKey,
|
|
41
|
+
body,
|
|
42
|
+
token,
|
|
43
|
+
signal,
|
|
44
|
+
languageCode
|
|
45
|
+
);
|
|
46
|
+
const responseBody = await response.text();
|
|
47
|
+
|
|
48
|
+
const result: T = skipReviver
|
|
49
|
+
? JSON.parse(responseBody)
|
|
50
|
+
: JSON.parse(responseBody, reviver);
|
|
26
51
|
return result;
|
|
27
52
|
};
|
|
28
53
|
|
package/src/utils/web-client.ts
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import {
|
|
2
|
+
Affiliate,
|
|
3
|
+
CrmContactRequest,
|
|
4
|
+
GenerateBookingAccommodationRequest,
|
|
5
|
+
TideClientConfig,
|
|
6
|
+
} from "../types";
|
|
3
7
|
|
|
4
|
-
import { post } from "./
|
|
5
|
-
import { get } from "./common-client";
|
|
8
|
+
import { get, post } from "./common-client";
|
|
6
9
|
|
|
7
10
|
const ENDPOINT = "/api/web";
|
|
8
11
|
const ENDPOINT_CREATE_CRM_CONTACT = `${ENDPOINT}/crmcontact`;
|
|
9
12
|
const ENDPOINT_CREATE_AFFILIATES = `${ENDPOINT}/affiliates`;
|
|
10
13
|
const ENDPOINT_TRANSLATION_DICTIONARY = `${ENDPOINT}/translation-dictionary`;
|
|
14
|
+
const ENDPOINT_BOOKING_ACCOMMODATION = `${ENDPOINT}/booking-accommodation`;
|
|
11
15
|
|
|
12
16
|
/**
|
|
13
17
|
* api/web/crmcontact
|
|
@@ -56,3 +60,15 @@ export const getTranslationDictionary = (
|
|
|
56
60
|
|
|
57
61
|
return get(url, apiKey, undefined, signal);
|
|
58
62
|
};
|
|
63
|
+
|
|
64
|
+
export const generateBookingAccommodations = (
|
|
65
|
+
config: TideClientConfig,
|
|
66
|
+
request: GenerateBookingAccommodationRequest,
|
|
67
|
+
signal?: AbortSignal
|
|
68
|
+
): Promise<{ [key: string]: string }> => {
|
|
69
|
+
const url = `${config.host}${ENDPOINT_BOOKING_ACCOMMODATION}`;
|
|
70
|
+
const apiKey = config.apiKey;
|
|
71
|
+
const body = JSON.stringify(request);
|
|
72
|
+
|
|
73
|
+
return post(url, apiKey, body, config.token, signal);
|
|
74
|
+
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Accommodation, Pax } from ".";
|
|
2
|
-
export interface AccommodationWithAvailablePlaces extends Accommodation {
|
|
3
|
-
availablePlaces?: number;
|
|
4
|
-
totalPlaces?: number;
|
|
5
|
-
price?: number;
|
|
6
|
-
pax: Pax[];
|
|
7
|
-
allotmentId?: number;
|
|
8
|
-
inOptionPlaces?: number;
|
|
9
|
-
status?: number;
|
|
10
|
-
subStatus: string;
|
|
11
|
-
startTime: string;
|
|
12
|
-
endTime: string;
|
|
13
|
-
tourCode: string;
|
|
14
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { AdditionalServices, AlternativeFlightLeg } from ".";
|
|
2
|
-
export interface AlternativeFlightData {
|
|
3
|
-
departureDate: Date;
|
|
4
|
-
departureTime: string;
|
|
5
|
-
arrivalDate: Date;
|
|
6
|
-
arrivalTime: string;
|
|
7
|
-
legs: AlternativeFlightLeg[];
|
|
8
|
-
additionalServices: AdditionalServices;
|
|
9
|
-
isLowCost: boolean;
|
|
10
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export interface AlternativeFlightLeg {
|
|
2
|
-
airline: string;
|
|
3
|
-
airlineDescription: string;
|
|
4
|
-
flightNumber: string;
|
|
5
|
-
departureAirport: string;
|
|
6
|
-
departureAirportDescription: string;
|
|
7
|
-
departureCountry: string;
|
|
8
|
-
departureDate: Date;
|
|
9
|
-
departureTime: string;
|
|
10
|
-
arrivalAirport: string;
|
|
11
|
-
arrivalAirportDescription: string;
|
|
12
|
-
arrivalCountry: string;
|
|
13
|
-
arrivalDate: Date;
|
|
14
|
-
arrivalTime: string;
|
|
15
|
-
bookingClassCode: string;
|
|
16
|
-
operatingAirlineCode: string;
|
|
17
|
-
marketingAirlineCode: string;
|
|
18
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { AdditionalServices, AlternativeFlightData } from ".";
|
|
2
|
-
export interface AlternativeFlight {
|
|
3
|
-
id: string;
|
|
4
|
-
luggage: number;
|
|
5
|
-
price: number;
|
|
6
|
-
currency: string;
|
|
7
|
-
totalPriceWithoutTaxes: number;
|
|
8
|
-
taxes: number;
|
|
9
|
-
departureFlight: AlternativeFlightData;
|
|
10
|
-
returnFlight: AlternativeFlightData;
|
|
11
|
-
additionalServices: AdditionalServices;
|
|
12
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export interface AvailabilityRequest {
|
|
2
|
-
officeId: number;
|
|
3
|
-
agentId?: number;
|
|
4
|
-
from: Date;
|
|
5
|
-
to: Date;
|
|
6
|
-
catalogueIds?: number[];
|
|
7
|
-
calculatePrices: boolean;
|
|
8
|
-
preventDifferentAccommodations?: boolean;
|
|
9
|
-
language: string;
|
|
10
|
-
strictAccommodationDuration?: boolean;
|
|
11
|
-
withInPackageDefault?: boolean;
|
|
12
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { AvailabilityRequest, Duration, TravelerGrouping } from ".";
|
|
2
|
-
export interface AvailableProductsRequest extends AvailabilityRequest {
|
|
3
|
-
searchType: number;
|
|
4
|
-
productType: number;
|
|
5
|
-
travelerGroupings: TravelerGrouping[];
|
|
6
|
-
includePriceDetails: boolean;
|
|
7
|
-
includeAllOptions: boolean;
|
|
8
|
-
addDefaultProducts: boolean;
|
|
9
|
-
allotmentType?: number;
|
|
10
|
-
productIds?: number[];
|
|
11
|
-
productCodes?: string[];
|
|
12
|
-
accommodationCodes?: string[];
|
|
13
|
-
regimeCodes?: string[];
|
|
14
|
-
periodOffset?: number;
|
|
15
|
-
duration?: Duration;
|
|
16
|
-
productName?: string;
|
|
17
|
-
countryCodes?: string[];
|
|
18
|
-
locationCode?: string;
|
|
19
|
-
regionId?: number;
|
|
20
|
-
oordId?: number;
|
|
21
|
-
geographicalRegionIds?: number[];
|
|
22
|
-
preferredDepartureAirportCodes?: string[];
|
|
23
|
-
flightsIncluded?: boolean;
|
|
24
|
-
ignorePreferredProducts?: boolean;
|
|
25
|
-
cheapestOption?: boolean;
|
|
26
|
-
useDefaults?: boolean;
|
|
27
|
-
useCachedPrices?: boolean;
|
|
28
|
-
includeClosedAllotments?: boolean;
|
|
29
|
-
includeFullyBookedAllotments?: boolean;
|
|
30
|
-
tagIds?: number[];
|
|
31
|
-
tourCode?: string;
|
|
32
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export interface FlightLeg {
|
|
2
|
-
airline: string;
|
|
3
|
-
airlineDescription: string;
|
|
4
|
-
operatingAirlineCode: string;
|
|
5
|
-
marketingAirlineCode: string;
|
|
6
|
-
flightNumber: string;
|
|
7
|
-
departureAirport: string;
|
|
8
|
-
departureAirportDescription: string;
|
|
9
|
-
departureCountry: string;
|
|
10
|
-
departureDate?: Date;
|
|
11
|
-
departureTime?: string;
|
|
12
|
-
arrivalAirport: string;
|
|
13
|
-
arrivalAirportDescription: string;
|
|
14
|
-
arrivalCountry: string;
|
|
15
|
-
arrivalDate?: Date;
|
|
16
|
-
arrivalTime?: string;
|
|
17
|
-
flightClass: string;
|
|
18
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { AdditionalServices, FlightLeg } from ".";
|
|
2
|
-
export interface Flight {
|
|
3
|
-
flightCode: string;
|
|
4
|
-
flightNumber: string;
|
|
5
|
-
name: string;
|
|
6
|
-
departureDate: Date;
|
|
7
|
-
arrivalDate: Date;
|
|
8
|
-
departureTime: string;
|
|
9
|
-
arrivalTime: string;
|
|
10
|
-
accommodationCode: string;
|
|
11
|
-
regimeCode: string;
|
|
12
|
-
stops: number;
|
|
13
|
-
availablePlaces: number;
|
|
14
|
-
isBagageAllowed: boolean;
|
|
15
|
-
bagage: string;
|
|
16
|
-
isPreferredFlight: boolean;
|
|
17
|
-
legs: FlightLeg[];
|
|
18
|
-
replacedProductCode: string;
|
|
19
|
-
entryLineFlags: number;
|
|
20
|
-
externalFlightGuid?: string;
|
|
21
|
-
additionalServices: AdditionalServices;
|
|
22
|
-
isLowCost: boolean;
|
|
23
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { Accommodation, Regime } from ".";
|
|
2
|
-
export interface Hotel {
|
|
3
|
-
hotelId: number;
|
|
4
|
-
hotelCode: string;
|
|
5
|
-
hotelName: string;
|
|
6
|
-
latitude?: number;
|
|
7
|
-
longitude?: number;
|
|
8
|
-
accommodations: Accommodation[];
|
|
9
|
-
regimes: Regime[];
|
|
10
|
-
hasPackageProduct: boolean;
|
|
11
|
-
hasTransfer: boolean;
|
|
12
|
-
countryId: number;
|
|
13
|
-
regionId?: number;
|
|
14
|
-
oordId?: number;
|
|
15
|
-
locationId?: number;
|
|
16
|
-
countryName: string;
|
|
17
|
-
regionName: string;
|
|
18
|
-
oordName: string;
|
|
19
|
-
locationName: string;
|
|
20
|
-
allotmentDeterminesBookable: boolean;
|
|
21
|
-
isLastMinute: boolean;
|
|
22
|
-
isTopDeal: boolean;
|
|
23
|
-
isEarlyBooking: boolean;
|
|
24
|
-
isThirdPartyProduct: boolean;
|
|
25
|
-
supplierAddressId?: number;
|
|
26
|
-
billingAddressId?: number;
|
|
27
|
-
currencyId?: number;
|
|
28
|
-
financialProductTypeId?: number;
|
|
29
|
-
marginFinancialProductTypeId?: number;
|
|
30
|
-
salesUnitId?: number;
|
|
31
|
-
additionalInfo: string;
|
|
32
|
-
externalProvider: string;
|
|
33
|
-
tagNames: string[];
|
|
34
|
-
catalogueId: number;
|
|
35
|
-
}
|