@qite/tide-client 1.1.60 → 1.1.61
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 +27 -27
- package/build/index.js +6769 -6769
- package/build/services/odata.service.d.ts +8 -8
- package/build/types/booking-v2/index.d.ts +3 -3
- package/build/types/booking-v2/request/available-countries-request.d.ts +4 -4
- package/build/types/booking-v2/request/available-flights-request.d.ts +8 -8
- package/build/types/booking-v2/request/bookable-dates-request.d.ts +4 -4
- package/build/types/booking-v2/request/booking-package-address.d.ts +14 -14
- package/build/types/booking-v2/request/booking-package-book-request.d.ts +24 -24
- package/build/types/booking-v2/request/booking-package-customer-request.d.ts +4 -4
- package/build/types/booking-v2/request/booking-package-destination.d.ts +9 -9
- package/build/types/booking-v2/request/booking-package-details-request.d.ts +21 -21
- package/build/types/booking-v2/request/booking-package-flight-pool-request.d.ts +12 -12
- package/build/types/booking-v2/request/booking-package-request.d.ts +5 -5
- package/build/types/booking-v2/request/booking-package-search-request.d.ts +29 -29
- package/build/types/booking-v2/request/booking-package-update-request.d.ts +4 -4
- package/build/types/booking-v2/request/booking-package-voucher-request.d.ts +4 -4
- package/build/types/booking-v2/request/index.d.ts +18 -18
- package/build/types/booking-v2/request/prices-request.d.ts +17 -17
- package/build/types/booking-v2/request/selected-flight.d.ts +6 -6
- package/build/types/booking-v2/request/selected-hotel.d.ts +5 -5
- package/build/types/booking-v2/request/tour-codes.request.d.ts +3 -3
- package/build/types/booking-v2/request/transport-dates-request.d.ts +14 -14
- package/build/types/booking-v2/response/available-country.d.ts +5 -5
- package/build/types/booking-v2/response/available-flight.d.ts +4 -4
- package/build/types/booking-v2/response/base-price.d.ts +7 -7
- package/build/types/booking-v2/response/bookable-dates.d.ts +4 -4
- package/build/types/booking-v2/response/booking-package-allotment-info.d.ts +17 -17
- package/build/types/booking-v2/response/booking-package-dossier.d.ts +6 -6
- package/build/types/booking-v2/response/booking-package-flight-pool.d.ts +5 -5
- package/build/types/booking-v2/response/booking-package-hotel-pool.d.ts +4 -4
- package/build/types/booking-v2/response/booking-package-item.d.ts +39 -39
- package/build/types/booking-v2/response/booking-price-detail.d.ts +17 -17
- package/build/types/booking-v2/response/booking-price-details.d.ts +14 -14
- package/build/types/booking-v2/response/booking-price-per-pax.d.ts +4 -4
- package/build/types/booking-v2/response/booking-product-notification.d.ts +7 -7
- package/build/types/booking-v2/response/booking-room-status-option.d.ts +5 -5
- package/build/types/booking-v2/response/booking-room-status.d.ts +5 -5
- package/build/types/booking-v2/response/booking-travel-agent.d.ts +7 -7
- package/build/types/booking-v2/response/booking-validity-line.d.ts +4 -4
- package/build/types/booking-v2/response/booking-voucher-result.d.ts +3 -3
- package/build/types/booking-v2/response/changed-line.d.ts +4 -4
- package/build/types/booking-v2/response/index.d.ts +22 -22
- package/build/types/booking-v2/response/tide-response.d.ts +8 -8
- package/build/types/booking-v2/response/tour-codes-response.d.ts +3 -3
- package/build/types/booking-v2/response/transport-dates-response.d.ts +4 -4
- package/build/types/booking-v2/shared/airline-booking-package-option.d.ts +2 -2
- package/build/types/booking-v2/shared/airport-booking-package-option.d.ts +2 -2
- package/build/types/booking-v2/shared/booking-airline-group.d.ts +6 -6
- package/build/types/booking-v2/shared/booking-airport-group.d.ts +6 -6
- package/build/types/booking-v2/shared/booking-option-group.d.ts +5 -5
- package/build/types/booking-v2/shared/booking-option-pax.d.ts +13 -13
- package/build/types/booking-v2/shared/booking-option-unit.d.ts +12 -12
- package/build/types/booking-v2/shared/booking-package-availability.d.ts +9 -9
- package/build/types/booking-v2/shared/booking-package-flight-meta-data-line.d.ts +18 -18
- package/build/types/booking-v2/shared/booking-package-flight-meta-data.d.ts +10 -10
- package/build/types/booking-v2/shared/booking-package-flight.d.ts +15 -15
- package/build/types/booking-v2/shared/booking-package-hotel-option.d.ts +10 -10
- package/build/types/booking-v2/shared/booking-package-hotel-room.d.ts +5 -5
- package/build/types/booking-v2/shared/booking-package-hotel.d.ts +22 -22
- package/build/types/booking-v2/shared/booking-package-line.d.ts +17 -16
- package/build/types/booking-v2/shared/booking-package-option.d.ts +47 -47
- package/build/types/booking-v2/shared/booking-package-pax.d.ts +17 -17
- package/build/types/booking-v2/shared/booking-package-request-room.d.ts +5 -5
- package/build/types/booking-v2/shared/booking-package-room-option.d.ts +21 -21
- package/build/types/booking-v2/shared/booking-package-room.d.ts +5 -5
- package/build/types/booking-v2/shared/booking-package-tag.d.ts +5 -5
- package/build/types/booking-v2/shared/booking-package.d.ts +11 -11
- package/build/types/booking-v2/shared/index.d.ts +27 -27
- package/build/types/booking-v2/shared/per-booking-package-option.d.ts +9 -9
- package/build/types/booking-v2/shared/per-package-option.d.ts +9 -9
- package/build/types/booking-v2/shared/per-pax-package-option.d.ts +5 -5
- package/build/types/booking-v2/shared/per-unit-package-option.d.ts +7 -7
- package/build/types/booking-v2/shared/room-option-pax-type.d.ts +4 -4
- package/build/types/company/agent/agent-invoice-item.d.ts +9 -9
- package/build/types/company/agent/change-entry-agent-surcharge-action.model.d.ts +5 -5
- package/build/types/company/agent/entry-totals.d.ts +7 -7
- package/build/types/company/agent/index.d.ts +3 -3
- package/build/types/company/agent-print-action-request.d.ts +11 -11
- package/build/types/company/agent-print-action.d.ts +6 -6
- package/build/types/company/custom-entry-status-item.d.ts +6 -6
- package/build/types/company/index.d.ts +5 -5
- package/build/types/company/number-string-pair.d.ts +4 -4
- package/build/types/enums/allotment-type.d.ts +5 -5
- package/build/types/enums/availability-search-type.d.ts +4 -4
- package/build/types/enums/data-type.d.ts +14 -14
- package/build/types/enums/dossier-type.d.ts +6 -6
- package/build/types/enums/entry-line-flag.d.ts +6 -6
- package/build/types/enums/entry-line-status.d.ts +19 -19
- package/build/types/enums/entry-status.d.ts +8 -8
- package/build/types/enums/export-status.d.ts +5 -5
- package/build/types/enums/gender.d.ts +5 -5
- package/build/types/enums/index.d.ts +17 -17
- package/build/types/enums/meta-data-type.d.ts +10 -10
- package/build/types/enums/payment-type.d.ts +6 -6
- package/build/types/enums/price-chart-type.d.ts +4 -4
- package/build/types/enums/print-action-group.d.ts +10 -10
- package/build/types/enums/requirement-type.d.ts +5 -5
- package/build/types/enums/room-type.d.ts +8 -8
- package/build/types/enums/sale-type.d.ts +4 -4
- package/build/types/enums/service-type.d.ts +33 -33
- package/build/types/index.d.ts +8 -8
- package/build/types/mollie/index.d.ts +2 -2
- package/build/types/mollie/mollie-payment-request.d.ts +6 -6
- package/build/types/mollie/mollie-payment.d.ts +3 -3
- package/build/types/odata/column.d.ts +8 -8
- package/build/types/odata/filter-item.d.ts +14 -14
- package/build/types/odata/index.d.ts +4 -4
- package/build/types/odata/odata-params.d.ts +3 -3
- package/build/types/odata/page-result.d.ts +5 -5
- package/build/types/offer/additional-services.d.ts +6 -6
- package/build/types/offer/confirmed-dossier-check.d.ts +6 -6
- package/build/types/offer/country-item.d.ts +5 -5
- package/build/types/offer/crm-contact-request.d.ts +36 -36
- package/build/types/offer/customer-request.d.ts +5 -5
- package/build/types/offer/dossier-default-product.d.ts +14 -14
- package/build/types/offer/dossier-pax-item.d.ts +4 -4
- package/build/types/offer/dossier-view-result.d.ts +48 -48
- package/build/types/offer/entry-check-response.d.ts +8 -8
- package/build/types/offer/entry-line-meta-data.d.ts +5 -5
- package/build/types/offer/entry-line-pax.d.ts +8 -8
- package/build/types/offer/entry-line.d.ts +73 -73
- package/build/types/offer/entry-price-line.d.ts +40 -40
- package/build/types/offer/entry-room2.d.ts +5 -5
- package/build/types/offer/entry.d.ts +65 -65
- package/build/types/offer/flight-meta-data-line.d.ts +16 -16
- package/build/types/offer/flight-meta-data.d.ts +13 -13
- package/build/types/offer/flight-pool.d.ts +5 -5
- package/build/types/offer/index.d.ts +39 -39
- package/build/types/offer/item-tag.d.ts +3 -3
- package/build/types/offer/language.d.ts +5 -5
- package/build/types/offer/member-confirmation-request.d.ts +5 -5
- package/build/types/offer/member-forgot-password-request.d.ts +4 -4
- package/build/types/offer/member-info.d.ts +10 -10
- package/build/types/offer/member-login-request.d.ts +4 -4
- package/build/types/offer/member-login-response.d.ts +3 -3
- package/build/types/offer/member-reset-password-request.d.ts +4 -4
- package/build/types/offer/note.d.ts +16 -16
- package/build/types/offer/page-result.d.ts +5 -5
- package/build/types/offer/pax.d.ts +29 -29
- package/build/types/offer/payment.d.ts +20 -20
- package/build/types/offer/person-country-preference.d.ts +7 -7
- package/build/types/offer/person-location-preference.d.ts +7 -7
- package/build/types/offer/person-oord-preference.d.ts +7 -7
- package/build/types/offer/person-period-date-range-preference.d.ts +6 -6
- package/build/types/offer/person-period-preference.d.ts +7 -7
- package/build/types/offer/person-region-preference.d.ts +7 -7
- package/build/types/offer/person-tour-group-preference.d.ts +7 -7
- package/build/types/offer/product-notification-result.d.ts +9 -9
- package/build/types/offer/web-contact-form-request.d.ts +13 -13
- package/build/types/offer/web-contact-has-tag-request.d.ts +4 -4
- package/build/types/tide-client-config.d.ts +5 -5
- package/build/types/web/affiliate.d.ts +5 -5
- package/build/types/web/generate-booking-accommodation-request.d.ts +6 -6
- package/build/types/web/index.d.ts +2 -2
- package/build/utils/api.d.ts +23 -23
- package/build/utils/booking-v2-client.d.ts +139 -139
- package/build/utils/common-client.d.ts +26 -26
- package/build/utils/json.d.ts +2 -2
- package/build/utils/member-client.d.ts +32 -32
- package/build/utils/mollie-client.d.ts +15 -15
- package/build/utils/search-client.d.ts +12 -12
- package/build/utils/web-agent-client.d.ts +72 -72
- package/build/utils/web-client.d.ts +44 -44
- package/build/utils/web-contact-client.d.ts +23 -23
- package/build/utils/web-file.d.ts +29 -29
- package/package.json +64 -64
- package/rollup.config.js +20 -20
- package/src/index.ts +43 -43
- package/src/services/odata.service.ts +158 -158
- package/src/types/booking-v2/index.ts +3 -3
- package/src/types/booking-v2/request/available-countries-request.ts +4 -4
- package/src/types/booking-v2/request/available-flights-request.ts +8 -8
- package/src/types/booking-v2/request/bookable-dates-request.ts +4 -4
- package/src/types/booking-v2/request/booking-package-address.ts +14 -14
- package/src/types/booking-v2/request/booking-package-book-request.ts +26 -26
- package/src/types/booking-v2/request/booking-package-customer-request.ts +4 -4
- package/src/types/booking-v2/request/booking-package-destination.ts +9 -9
- package/src/types/booking-v2/request/booking-package-details-request.ts +24 -24
- package/src/types/booking-v2/request/booking-package-flight-pool-request.ts +13 -13
- package/src/types/booking-v2/request/booking-package-request.ts +5 -5
- package/src/types/booking-v2/request/booking-package-search-request.ts +32 -32
- package/src/types/booking-v2/request/booking-package-update-request.ts +5 -5
- package/src/types/booking-v2/request/booking-package-voucher-request.ts +4 -4
- package/src/types/booking-v2/request/index.ts +18 -18
- package/src/types/booking-v2/request/prices-request.ts +19 -19
- package/src/types/booking-v2/request/selected-flight.ts +6 -6
- package/src/types/booking-v2/request/selected-hotel.ts +5 -5
- package/src/types/booking-v2/request/tour-codes.request.ts +3 -3
- package/src/types/booking-v2/request/transport-dates-request.ts +14 -14
- package/src/types/booking-v2/response/available-country.ts +5 -5
- package/src/types/booking-v2/response/available-flight.ts +4 -4
- package/src/types/booking-v2/response/base-price.ts +7 -7
- package/src/types/booking-v2/response/bookable-dates.ts +4 -4
- package/src/types/booking-v2/response/booking-package-allotment-info.ts +17 -17
- package/src/types/booking-v2/response/booking-package-dossier.ts +6 -6
- package/src/types/booking-v2/response/booking-package-flight-pool.ts +6 -6
- package/src/types/booking-v2/response/booking-package-hotel-pool.ts +5 -5
- package/src/types/booking-v2/response/booking-package-item.ts +40 -40
- package/src/types/booking-v2/response/booking-price-detail.ts +20 -20
- package/src/types/booking-v2/response/booking-price-details.ts +15 -15
- package/src/types/booking-v2/response/booking-price-per-pax.ts +4 -4
- package/src/types/booking-v2/response/booking-product-notification.ts +7 -7
- package/src/types/booking-v2/response/booking-room-status-option.ts +5 -5
- package/src/types/booking-v2/response/booking-room-status.ts +6 -6
- package/src/types/booking-v2/response/booking-travel-agent.ts +7 -7
- package/src/types/booking-v2/response/booking-validity-line.ts +4 -4
- package/src/types/booking-v2/response/booking-voucher-result.ts +3 -3
- package/src/types/booking-v2/response/changed-line.ts +4 -4
- package/src/types/booking-v2/response/index.ts +22 -22
- package/src/types/booking-v2/response/tide-response.ts +6 -6
- package/src/types/booking-v2/response/tour-codes-response.ts +3 -3
- package/src/types/booking-v2/response/transport-dates-response.ts +4 -4
- package/src/types/booking-v2/shared/airline-booking-package-option.ts +3 -3
- package/src/types/booking-v2/shared/airport-booking-package-option.ts +3 -3
- package/src/types/booking-v2/shared/booking-airline-group.ts +7 -7
- package/src/types/booking-v2/shared/booking-airport-group.ts +7 -7
- package/src/types/booking-v2/shared/booking-option-group.ts +5 -5
- package/src/types/booking-v2/shared/booking-option-pax.ts +14 -14
- package/src/types/booking-v2/shared/booking-option-unit.ts +13 -13
- package/src/types/booking-v2/shared/booking-package-availability.ts +9 -9
- package/src/types/booking-v2/shared/booking-package-flight-meta-data-line.ts +18 -18
- package/src/types/booking-v2/shared/booking-package-flight-meta-data.ts +11 -11
- package/src/types/booking-v2/shared/booking-package-flight.ts +16 -16
- package/src/types/booking-v2/shared/booking-package-hotel-option.ts +10 -10
- package/src/types/booking-v2/shared/booking-package-hotel-room.ts +6 -6
- package/src/types/booking-v2/shared/booking-package-hotel.ts +27 -27
- package/src/types/booking-v2/shared/booking-package-line.ts +18 -17
- package/src/types/booking-v2/shared/booking-package-option.ts +55 -55
- package/src/types/booking-v2/shared/booking-package-pax.ts +19 -19
- package/src/types/booking-v2/shared/booking-package-request-room.ts +6 -6
- package/src/types/booking-v2/shared/booking-package-room-option.ts +22 -22
- package/src/types/booking-v2/shared/booking-package-room.ts +6 -6
- package/src/types/booking-v2/shared/booking-package-tag.ts +5 -5
- package/src/types/booking-v2/shared/booking-package.ts +13 -13
- package/src/types/booking-v2/shared/index.ts +27 -27
- package/src/types/booking-v2/shared/per-booking-package-option.ts +10 -10
- package/src/types/booking-v2/shared/per-package-option.ts +10 -10
- package/src/types/booking-v2/shared/per-pax-package-option.ts +6 -6
- package/src/types/booking-v2/shared/per-unit-package-option.ts +8 -8
- package/src/types/booking-v2/shared/room-option-pax-type.ts +4 -4
- package/src/types/company/agent/agent-invoice-item.ts +9 -9
- package/src/types/company/agent/change-entry-agent-surcharge-action.model.ts +5 -5
- package/src/types/company/agent/entry-totals.ts +7 -7
- package/src/types/company/agent/index.ts +3 -3
- package/src/types/company/agent-print-action-request.ts +11 -11
- package/src/types/company/agent-print-action.ts +7 -7
- package/src/types/company/custom-entry-status-item.ts +6 -6
- package/src/types/company/index.ts +5 -5
- package/src/types/company/number-string-pair.ts +4 -4
- package/src/types/enums/allotment-type.ts +5 -5
- package/src/types/enums/availability-search-type.ts +4 -4
- package/src/types/enums/data-type.ts +14 -14
- package/src/types/enums/dossier-type.ts +6 -6
- package/src/types/enums/entry-line-flag.ts +6 -6
- package/src/types/enums/entry-line-status.ts +19 -19
- package/src/types/enums/entry-status.ts +8 -8
- package/src/types/enums/export-status.ts +5 -5
- package/src/types/enums/gender.ts +5 -5
- package/src/types/enums/index.ts +17 -17
- package/src/types/enums/meta-data-type.ts +10 -10
- package/src/types/enums/payment-type.ts +6 -6
- package/src/types/enums/price-chart-type.ts +4 -4
- package/src/types/enums/print-action-group.ts +10 -10
- package/src/types/enums/requirement-type.ts +5 -5
- package/src/types/enums/room-type.ts +8 -8
- package/src/types/enums/sale-type.ts +4 -4
- package/src/types/enums/service-type.ts +33 -33
- package/src/types/index.ts +8 -8
- package/src/types/mollie/index.ts +2 -2
- package/src/types/mollie/mollie-payment-request.ts +6 -6
- package/src/types/mollie/mollie-payment.ts +3 -3
- package/src/types/odata/column.ts +8 -8
- package/src/types/odata/filter-item.ts +14 -14
- package/src/types/odata/index.ts +4 -4
- package/src/types/odata/odata-params.ts +3 -3
- package/src/types/odata/page-result.ts +5 -5
- package/src/types/offer/confirmed-dossier-check.ts +6 -6
- package/src/types/offer/country-item.ts +5 -5
- package/src/types/offer/crm-contact-request.ts +37 -37
- package/src/types/offer/customer-request.ts +5 -5
- package/src/types/offer/dossier-default-product.ts +14 -14
- package/src/types/offer/dossier-view-result.ts +49 -49
- package/src/types/offer/entry-check-response.ts +5 -5
- package/src/types/offer/entry-line-meta-data.ts +5 -5
- package/src/types/offer/entry-line-pax.ts +9 -9
- package/src/types/offer/entry-line.ts +74 -74
- package/src/types/offer/entry-price-line.ts +40 -40
- package/src/types/offer/entry-room2.ts +5 -5
- package/src/types/offer/entry.ts +66 -66
- package/src/types/offer/flight-meta-data-line.ts +16 -16
- package/src/types/offer/flight-meta-data.ts +14 -14
- package/src/types/offer/flight-pool.ts +6 -6
- package/src/types/offer/index.ts +39 -39
- package/src/types/offer/item-tag.ts +3 -3
- package/src/types/offer/language.ts +5 -5
- package/src/types/offer/member-confirmation-request.ts +5 -5
- package/src/types/offer/member-forgot-password-request.ts +4 -4
- package/src/types/offer/member-info.ts +10 -10
- package/src/types/offer/member-login-request.ts +4 -4
- package/src/types/offer/member-login-response.ts +3 -3
- package/src/types/offer/member-reset-password-request.ts +4 -4
- package/src/types/offer/note.ts +16 -16
- package/src/types/offer/pax.ts +30 -30
- package/src/types/offer/payment.ts +20 -20
- package/src/types/offer/person-country-preference.ts +7 -7
- package/src/types/offer/person-location-preference.ts +7 -7
- package/src/types/offer/person-oord-preference.ts +7 -7
- package/src/types/offer/person-period-date-range-preference.ts +6 -6
- package/src/types/offer/person-period-preference.ts +7 -7
- package/src/types/offer/person-region-preference.ts +7 -7
- package/src/types/offer/person-tour-group-preference.ts +7 -7
- package/src/types/offer/product-notification-result.ts +9 -9
- package/src/types/offer/web-contact-form-request.ts +13 -13
- package/src/types/offer/web-contact-has-tag-request.ts +4 -4
- package/src/types/tide-client-config.ts +5 -5
- package/src/types/web/affiliate.ts +5 -5
- package/src/types/web/generate-booking-accommodation-request.ts +6 -6
- package/src/types/web/index.ts +2 -2
- package/src/utils/api.ts +82 -82
- package/src/utils/booking-v2-client.ts +318 -318
- package/src/utils/common-client.ts +69 -69
- package/src/utils/json.ts +26 -26
- package/src/utils/member-client.ts +76 -76
- package/src/utils/mollie-client.ts +27 -27
- package/src/utils/search-client.ts +22 -22
- package/src/utils/web-agent-client.ts +176 -176
- package/src/utils/web-client.ts +74 -74
- package/src/utils/web-contact-client.ts +43 -43
- package/src/utils/web-file.ts +45 -45
- package/tests/webClient.test.ts +38 -38
- package/tests/webContactClient.test.ts +61 -61
- package/tsconfig.json +23 -23
|
@@ -1,318 +1,318 @@
|
|
|
1
|
-
import { TideClientConfig } from "..";
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
AvailableCountriesRequest,
|
|
5
|
-
AvailableCountry,
|
|
6
|
-
AvailableFlight,
|
|
7
|
-
AvailableFlightsRequest,
|
|
8
|
-
BasePrice,
|
|
9
|
-
BookableDates,
|
|
10
|
-
BookableDatesRequest,
|
|
11
|
-
BookingPackage,
|
|
12
|
-
BookingPackageAvailability,
|
|
13
|
-
BookingPackageBookRequest,
|
|
14
|
-
BookingPackageDetailsRequest,
|
|
15
|
-
BookingPackageDossier,
|
|
16
|
-
BookingPackageFlightPool,
|
|
17
|
-
BookingPackageFlightPoolRequest,
|
|
18
|
-
BookingPackageHotelPool,
|
|
19
|
-
BookingPackageItem,
|
|
20
|
-
BookingPackageRequest,
|
|
21
|
-
BookingPackageSearchRequest,
|
|
22
|
-
BookingPackageUpdateRequest,
|
|
23
|
-
BookingPackageVoucherRequest,
|
|
24
|
-
BookingPriceDetails,
|
|
25
|
-
BookingTravelAgent,
|
|
26
|
-
BookingVoucherResult,
|
|
27
|
-
EntryStatus,
|
|
28
|
-
PricesRequest,
|
|
29
|
-
TideResponse,
|
|
30
|
-
TourCodesRequest,
|
|
31
|
-
TourCodesResponse,
|
|
32
|
-
TransportDatesRequest,
|
|
33
|
-
TransportDatesResponse,
|
|
34
|
-
} from "../types";
|
|
35
|
-
import { get, patch, post } from "./common-client";
|
|
36
|
-
|
|
37
|
-
const ENDPOINT = "/api/web/booking/v2";
|
|
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`;
|
|
42
|
-
const ENDPOINT_SEARCH = `${ENDPOINT}/search`;
|
|
43
|
-
const ENDPOINT_SEARCH_WITH_ERROR_MAPPING = `${ENDPOINT}/search-with-error-mapping`;
|
|
44
|
-
// const ENDPOINT_ELASTIC = `${ENDPOINT}/elastic`; // TODO
|
|
45
|
-
const ENDPOINT_DETAILS = `${ENDPOINT}/details`;
|
|
46
|
-
const ENDPOINT_VALIDATE_VOUCHER = `${ENDPOINT}/validate-voucher`;
|
|
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`;
|
|
52
|
-
const ENDPOINT_PRICE_DETAILS = `${ENDPOINT}/price-details`;
|
|
53
|
-
const ENDPOINT_BOOK = `${ENDPOINT}/book`;
|
|
54
|
-
const ENDPOINT_UPDATE = `${ENDPOINT}/update`;
|
|
55
|
-
const ENDPOINT_AGENTS = `${ENDPOINT}/agents`;
|
|
56
|
-
const ENDPOINT_AVAILABLE_ALLOTMENTS = (eventId: string, productCode: string) =>
|
|
57
|
-
`${ENDPOINT}/get-allotment-availability/${eventId}/${productCode}`;
|
|
58
|
-
const ENDPOINT_FLIGHT_POOL = `${ENDPOINT}/flight-pool`;
|
|
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
|
-
};
|
|
78
|
-
|
|
79
|
-
export const transportDates = (
|
|
80
|
-
config: TideClientConfig,
|
|
81
|
-
request: TransportDatesRequest,
|
|
82
|
-
signal?: AbortSignal
|
|
83
|
-
): Promise<TransportDatesResponse> => {
|
|
84
|
-
const url = `${config.host}${ENDPOINT_TRANSPORT_DATES}`;
|
|
85
|
-
const apiKey = config.apiKey;
|
|
86
|
-
const body = JSON.stringify(request);
|
|
87
|
-
|
|
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);
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
// PACKAGE SEARCH
|
|
116
|
-
export const search = (
|
|
117
|
-
config: TideClientConfig,
|
|
118
|
-
request: BookingPackageRequest<BookingPackageSearchRequest>,
|
|
119
|
-
signal?: AbortSignal
|
|
120
|
-
): Promise<BookingPackageItem[]> => {
|
|
121
|
-
const url = `${config.host}${ENDPOINT_SEARCH}`;
|
|
122
|
-
const apiKey = config.apiKey;
|
|
123
|
-
const body = JSON.stringify(request);
|
|
124
|
-
|
|
125
|
-
return post(url, apiKey, body, config.token, signal, true);
|
|
126
|
-
};
|
|
127
|
-
|
|
128
|
-
export const searchWithErrorMapping = (
|
|
129
|
-
config: TideClientConfig,
|
|
130
|
-
request: BookingPackageRequest<BookingPackageSearchRequest>,
|
|
131
|
-
signal?: AbortSignal
|
|
132
|
-
): Promise<TideResponse<BookingPackageItem[]>> => {
|
|
133
|
-
const url = `${config.host}${ENDPOINT_SEARCH_WITH_ERROR_MAPPING}`;
|
|
134
|
-
const apiKey = config.apiKey;
|
|
135
|
-
const body = JSON.stringify(request);
|
|
136
|
-
|
|
137
|
-
return post(url, apiKey, body, config.token, signal, true);
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
export const details = (
|
|
141
|
-
config: TideClientConfig,
|
|
142
|
-
request: BookingPackageRequest<BookingPackageDetailsRequest>,
|
|
143
|
-
signal?: AbortSignal,
|
|
144
|
-
languageCode?: string
|
|
145
|
-
): Promise<TideResponse<BookingPackage>> => {
|
|
146
|
-
const url = `${config.host}${ENDPOINT_DETAILS}`;
|
|
147
|
-
const apiKey = config.apiKey;
|
|
148
|
-
const body = JSON.stringify(request);
|
|
149
|
-
|
|
150
|
-
return post(url, apiKey, body, config.token, signal, true, languageCode);
|
|
151
|
-
};
|
|
152
|
-
|
|
153
|
-
export const validateVoucher = (
|
|
154
|
-
config: TideClientConfig,
|
|
155
|
-
request: BookingPackageRequest<BookingPackageVoucherRequest>,
|
|
156
|
-
signal?: AbortSignal
|
|
157
|
-
): Promise<BookingVoucherResult> => {
|
|
158
|
-
const url = `${config.host}${ENDPOINT_VALIDATE_VOUCHER}`;
|
|
159
|
-
const apiKey = config.apiKey;
|
|
160
|
-
const body = JSON.stringify(request);
|
|
161
|
-
|
|
162
|
-
return post(url, apiKey, body, config.token, signal, true);
|
|
163
|
-
};
|
|
164
|
-
|
|
165
|
-
export const alternateHotels = (
|
|
166
|
-
config: TideClientConfig,
|
|
167
|
-
transactionId: string,
|
|
168
|
-
optionId: string,
|
|
169
|
-
signal?: AbortSignal
|
|
170
|
-
): Promise<BookingPackageHotelPool> => {
|
|
171
|
-
const url = `${config.host}${ENDPOINT_ALTERNATE_HOTELS(
|
|
172
|
-
transactionId,
|
|
173
|
-
optionId
|
|
174
|
-
)}`;
|
|
175
|
-
const apiKey = config.apiKey;
|
|
176
|
-
|
|
177
|
-
return get(url, apiKey, config.token, signal, true);
|
|
178
|
-
};
|
|
179
|
-
|
|
180
|
-
export const alternateFlights = (
|
|
181
|
-
config: TideClientConfig,
|
|
182
|
-
transactionId: string,
|
|
183
|
-
signal?: AbortSignal
|
|
184
|
-
): Promise<BookingPackageFlightPool> => {
|
|
185
|
-
const url = `${config.host}${ENDPOINT_ALTERNATE_FLIGHTS(transactionId)}`;
|
|
186
|
-
const apiKey = config.apiKey;
|
|
187
|
-
|
|
188
|
-
return get(url, apiKey, config.token, signal, true);
|
|
189
|
-
};
|
|
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
|
-
|
|
203
|
-
export const priceDetails = (
|
|
204
|
-
config: TideClientConfig,
|
|
205
|
-
request: BookingPackageRequest<BookingPackageBookRequest>,
|
|
206
|
-
signal?: AbortSignal,
|
|
207
|
-
languageCode?: string
|
|
208
|
-
): Promise<BookingPriceDetails> => {
|
|
209
|
-
const url = `${config.host}${ENDPOINT_PRICE_DETAILS}`;
|
|
210
|
-
const apiKey = config.apiKey;
|
|
211
|
-
const body = JSON.stringify(request);
|
|
212
|
-
|
|
213
|
-
return post(url, apiKey, body, config.token, signal, true, languageCode);
|
|
214
|
-
};
|
|
215
|
-
|
|
216
|
-
export const book = (
|
|
217
|
-
config: TideClientConfig,
|
|
218
|
-
request: BookingPackageRequest<BookingPackageBookRequest>,
|
|
219
|
-
signal?: AbortSignal,
|
|
220
|
-
languageCode?: string
|
|
221
|
-
): Promise<BookingPackageDossier> => {
|
|
222
|
-
const url = `${config.host}${ENDPOINT_BOOK}`;
|
|
223
|
-
const apiKey = config.apiKey;
|
|
224
|
-
const body = JSON.stringify(request);
|
|
225
|
-
|
|
226
|
-
return post(url, apiKey, body, config.token, signal, true, languageCode);
|
|
227
|
-
};
|
|
228
|
-
|
|
229
|
-
export const update = (
|
|
230
|
-
config: TideClientConfig,
|
|
231
|
-
request: BookingPackageRequest<BookingPackageUpdateRequest>,
|
|
232
|
-
signal?: AbortSignal
|
|
233
|
-
): Promise<BookingPackageDossier> => {
|
|
234
|
-
const url = `${config.host}${ENDPOINT_UPDATE}`;
|
|
235
|
-
const apiKey = config.apiKey;
|
|
236
|
-
const body = JSON.stringify(request);
|
|
237
|
-
|
|
238
|
-
return post(url, apiKey, body, config.token, signal, true);
|
|
239
|
-
};
|
|
240
|
-
|
|
241
|
-
export const agents = (
|
|
242
|
-
config: TideClientConfig,
|
|
243
|
-
signal?: AbortSignal
|
|
244
|
-
): Promise<BookingTravelAgent[]> => {
|
|
245
|
-
const url = `${config.host}${ENDPOINT_AGENTS}`;
|
|
246
|
-
const apiKey = config.apiKey;
|
|
247
|
-
|
|
248
|
-
return get(url, apiKey, config.token, signal, true);
|
|
249
|
-
};
|
|
250
|
-
|
|
251
|
-
export const getAllotmentAvailability = (
|
|
252
|
-
config: TideClientConfig,
|
|
253
|
-
eventId: string,
|
|
254
|
-
productCode: string,
|
|
255
|
-
signal?: AbortSignal
|
|
256
|
-
): Promise<BookingPackageAvailability[]> => {
|
|
257
|
-
const url = `${config.host}${ENDPOINT_AVAILABLE_ALLOTMENTS(
|
|
258
|
-
eventId,
|
|
259
|
-
productCode
|
|
260
|
-
)}`;
|
|
261
|
-
const apiKey = config.apiKey;
|
|
262
|
-
|
|
263
|
-
return get(url, apiKey, config.token, signal, true);
|
|
264
|
-
};
|
|
265
|
-
|
|
266
|
-
export const searchFlightPool = (
|
|
267
|
-
config: TideClientConfig,
|
|
268
|
-
request: BookingPackageRequest<BookingPackageFlightPoolRequest>,
|
|
269
|
-
signal?: AbortSignal
|
|
270
|
-
): Promise<BookingPackageFlightPool> => {
|
|
271
|
-
const url = `${config.host}${ENDPOINT_FLIGHT_POOL}`;
|
|
272
|
-
const apiKey = config.apiKey;
|
|
273
|
-
const body = JSON.stringify(request);
|
|
274
|
-
|
|
275
|
-
return post(url, apiKey, body, config.token, signal, true);
|
|
276
|
-
};
|
|
277
|
-
|
|
278
|
-
export const tourCodes = (
|
|
279
|
-
config: TideClientConfig,
|
|
280
|
-
request: TourCodesRequest,
|
|
281
|
-
signal?: AbortSignal
|
|
282
|
-
): Promise<TourCodesResponse> => {
|
|
283
|
-
const url = `${config.host}${ENDPOINT_TOUR_CODES}`;
|
|
284
|
-
const apiKey = config.apiKey;
|
|
285
|
-
const body = JSON.stringify(request);
|
|
286
|
-
|
|
287
|
-
return post(url, apiKey, body, config.token, signal, true);
|
|
288
|
-
};
|
|
289
|
-
|
|
290
|
-
export const setCustomEntryStatus = (
|
|
291
|
-
config: TideClientConfig,
|
|
292
|
-
dossierNumber: string,
|
|
293
|
-
customEntryStatusId: number,
|
|
294
|
-
signal?: AbortSignal
|
|
295
|
-
): Promise<BookingPackageAvailability[]> => {
|
|
296
|
-
const url = `${config.host}${ENDPOINT_CUSTOM_ENTRY_STATUS(
|
|
297
|
-
dossierNumber,
|
|
298
|
-
customEntryStatusId
|
|
299
|
-
)}`;
|
|
300
|
-
const apiKey = config.apiKey;
|
|
301
|
-
|
|
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);
|
|
318
|
-
};
|
|
1
|
+
import { TideClientConfig } from "..";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
AvailableCountriesRequest,
|
|
5
|
+
AvailableCountry,
|
|
6
|
+
AvailableFlight,
|
|
7
|
+
AvailableFlightsRequest,
|
|
8
|
+
BasePrice,
|
|
9
|
+
BookableDates,
|
|
10
|
+
BookableDatesRequest,
|
|
11
|
+
BookingPackage,
|
|
12
|
+
BookingPackageAvailability,
|
|
13
|
+
BookingPackageBookRequest,
|
|
14
|
+
BookingPackageDetailsRequest,
|
|
15
|
+
BookingPackageDossier,
|
|
16
|
+
BookingPackageFlightPool,
|
|
17
|
+
BookingPackageFlightPoolRequest,
|
|
18
|
+
BookingPackageHotelPool,
|
|
19
|
+
BookingPackageItem,
|
|
20
|
+
BookingPackageRequest,
|
|
21
|
+
BookingPackageSearchRequest,
|
|
22
|
+
BookingPackageUpdateRequest,
|
|
23
|
+
BookingPackageVoucherRequest,
|
|
24
|
+
BookingPriceDetails,
|
|
25
|
+
BookingTravelAgent,
|
|
26
|
+
BookingVoucherResult,
|
|
27
|
+
EntryStatus,
|
|
28
|
+
PricesRequest,
|
|
29
|
+
TideResponse,
|
|
30
|
+
TourCodesRequest,
|
|
31
|
+
TourCodesResponse,
|
|
32
|
+
TransportDatesRequest,
|
|
33
|
+
TransportDatesResponse,
|
|
34
|
+
} from "../types";
|
|
35
|
+
import { get, patch, post } from "./common-client";
|
|
36
|
+
|
|
37
|
+
const ENDPOINT = "/api/web/booking/v2";
|
|
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`;
|
|
42
|
+
const ENDPOINT_SEARCH = `${ENDPOINT}/search`;
|
|
43
|
+
const ENDPOINT_SEARCH_WITH_ERROR_MAPPING = `${ENDPOINT}/search-with-error-mapping`;
|
|
44
|
+
// const ENDPOINT_ELASTIC = `${ENDPOINT}/elastic`; // TODO
|
|
45
|
+
const ENDPOINT_DETAILS = `${ENDPOINT}/details`;
|
|
46
|
+
const ENDPOINT_VALIDATE_VOUCHER = `${ENDPOINT}/validate-voucher`;
|
|
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`;
|
|
52
|
+
const ENDPOINT_PRICE_DETAILS = `${ENDPOINT}/price-details`;
|
|
53
|
+
const ENDPOINT_BOOK = `${ENDPOINT}/book`;
|
|
54
|
+
const ENDPOINT_UPDATE = `${ENDPOINT}/update`;
|
|
55
|
+
const ENDPOINT_AGENTS = `${ENDPOINT}/agents`;
|
|
56
|
+
const ENDPOINT_AVAILABLE_ALLOTMENTS = (eventId: string, productCode: string) =>
|
|
57
|
+
`${ENDPOINT}/get-allotment-availability/${eventId}/${productCode}`;
|
|
58
|
+
const ENDPOINT_FLIGHT_POOL = `${ENDPOINT}/flight-pool`;
|
|
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
|
+
};
|
|
78
|
+
|
|
79
|
+
export const transportDates = (
|
|
80
|
+
config: TideClientConfig,
|
|
81
|
+
request: TransportDatesRequest,
|
|
82
|
+
signal?: AbortSignal
|
|
83
|
+
): Promise<TransportDatesResponse> => {
|
|
84
|
+
const url = `${config.host}${ENDPOINT_TRANSPORT_DATES}`;
|
|
85
|
+
const apiKey = config.apiKey;
|
|
86
|
+
const body = JSON.stringify(request);
|
|
87
|
+
|
|
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);
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
// PACKAGE SEARCH
|
|
116
|
+
export const search = (
|
|
117
|
+
config: TideClientConfig,
|
|
118
|
+
request: BookingPackageRequest<BookingPackageSearchRequest>,
|
|
119
|
+
signal?: AbortSignal
|
|
120
|
+
): Promise<BookingPackageItem[]> => {
|
|
121
|
+
const url = `${config.host}${ENDPOINT_SEARCH}`;
|
|
122
|
+
const apiKey = config.apiKey;
|
|
123
|
+
const body = JSON.stringify(request);
|
|
124
|
+
|
|
125
|
+
return post(url, apiKey, body, config.token, signal, true);
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
export const searchWithErrorMapping = (
|
|
129
|
+
config: TideClientConfig,
|
|
130
|
+
request: BookingPackageRequest<BookingPackageSearchRequest>,
|
|
131
|
+
signal?: AbortSignal
|
|
132
|
+
): Promise<TideResponse<BookingPackageItem[]>> => {
|
|
133
|
+
const url = `${config.host}${ENDPOINT_SEARCH_WITH_ERROR_MAPPING}`;
|
|
134
|
+
const apiKey = config.apiKey;
|
|
135
|
+
const body = JSON.stringify(request);
|
|
136
|
+
|
|
137
|
+
return post(url, apiKey, body, config.token, signal, true);
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
export const details = (
|
|
141
|
+
config: TideClientConfig,
|
|
142
|
+
request: BookingPackageRequest<BookingPackageDetailsRequest>,
|
|
143
|
+
signal?: AbortSignal,
|
|
144
|
+
languageCode?: string
|
|
145
|
+
): Promise<TideResponse<BookingPackage>> => {
|
|
146
|
+
const url = `${config.host}${ENDPOINT_DETAILS}`;
|
|
147
|
+
const apiKey = config.apiKey;
|
|
148
|
+
const body = JSON.stringify(request);
|
|
149
|
+
|
|
150
|
+
return post(url, apiKey, body, config.token, signal, true, languageCode);
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
export const validateVoucher = (
|
|
154
|
+
config: TideClientConfig,
|
|
155
|
+
request: BookingPackageRequest<BookingPackageVoucherRequest>,
|
|
156
|
+
signal?: AbortSignal
|
|
157
|
+
): Promise<BookingVoucherResult> => {
|
|
158
|
+
const url = `${config.host}${ENDPOINT_VALIDATE_VOUCHER}`;
|
|
159
|
+
const apiKey = config.apiKey;
|
|
160
|
+
const body = JSON.stringify(request);
|
|
161
|
+
|
|
162
|
+
return post(url, apiKey, body, config.token, signal, true);
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
export const alternateHotels = (
|
|
166
|
+
config: TideClientConfig,
|
|
167
|
+
transactionId: string,
|
|
168
|
+
optionId: string,
|
|
169
|
+
signal?: AbortSignal
|
|
170
|
+
): Promise<BookingPackageHotelPool> => {
|
|
171
|
+
const url = `${config.host}${ENDPOINT_ALTERNATE_HOTELS(
|
|
172
|
+
transactionId,
|
|
173
|
+
optionId
|
|
174
|
+
)}`;
|
|
175
|
+
const apiKey = config.apiKey;
|
|
176
|
+
|
|
177
|
+
return get(url, apiKey, config.token, signal, true);
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
export const alternateFlights = (
|
|
181
|
+
config: TideClientConfig,
|
|
182
|
+
transactionId: string,
|
|
183
|
+
signal?: AbortSignal
|
|
184
|
+
): Promise<BookingPackageFlightPool> => {
|
|
185
|
+
const url = `${config.host}${ENDPOINT_ALTERNATE_FLIGHTS(transactionId)}`;
|
|
186
|
+
const apiKey = config.apiKey;
|
|
187
|
+
|
|
188
|
+
return get(url, apiKey, config.token, signal, true);
|
|
189
|
+
};
|
|
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
|
+
|
|
203
|
+
export const priceDetails = (
|
|
204
|
+
config: TideClientConfig,
|
|
205
|
+
request: BookingPackageRequest<BookingPackageBookRequest>,
|
|
206
|
+
signal?: AbortSignal,
|
|
207
|
+
languageCode?: string
|
|
208
|
+
): Promise<BookingPriceDetails> => {
|
|
209
|
+
const url = `${config.host}${ENDPOINT_PRICE_DETAILS}`;
|
|
210
|
+
const apiKey = config.apiKey;
|
|
211
|
+
const body = JSON.stringify(request);
|
|
212
|
+
|
|
213
|
+
return post(url, apiKey, body, config.token, signal, true, languageCode);
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
export const book = (
|
|
217
|
+
config: TideClientConfig,
|
|
218
|
+
request: BookingPackageRequest<BookingPackageBookRequest>,
|
|
219
|
+
signal?: AbortSignal,
|
|
220
|
+
languageCode?: string
|
|
221
|
+
): Promise<BookingPackageDossier> => {
|
|
222
|
+
const url = `${config.host}${ENDPOINT_BOOK}`;
|
|
223
|
+
const apiKey = config.apiKey;
|
|
224
|
+
const body = JSON.stringify(request);
|
|
225
|
+
|
|
226
|
+
return post(url, apiKey, body, config.token, signal, true, languageCode);
|
|
227
|
+
};
|
|
228
|
+
|
|
229
|
+
export const update = (
|
|
230
|
+
config: TideClientConfig,
|
|
231
|
+
request: BookingPackageRequest<BookingPackageUpdateRequest>,
|
|
232
|
+
signal?: AbortSignal
|
|
233
|
+
): Promise<BookingPackageDossier> => {
|
|
234
|
+
const url = `${config.host}${ENDPOINT_UPDATE}`;
|
|
235
|
+
const apiKey = config.apiKey;
|
|
236
|
+
const body = JSON.stringify(request);
|
|
237
|
+
|
|
238
|
+
return post(url, apiKey, body, config.token, signal, true);
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
export const agents = (
|
|
242
|
+
config: TideClientConfig,
|
|
243
|
+
signal?: AbortSignal
|
|
244
|
+
): Promise<BookingTravelAgent[]> => {
|
|
245
|
+
const url = `${config.host}${ENDPOINT_AGENTS}`;
|
|
246
|
+
const apiKey = config.apiKey;
|
|
247
|
+
|
|
248
|
+
return get(url, apiKey, config.token, signal, true);
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
export const getAllotmentAvailability = (
|
|
252
|
+
config: TideClientConfig,
|
|
253
|
+
eventId: string,
|
|
254
|
+
productCode: string,
|
|
255
|
+
signal?: AbortSignal
|
|
256
|
+
): Promise<BookingPackageAvailability[]> => {
|
|
257
|
+
const url = `${config.host}${ENDPOINT_AVAILABLE_ALLOTMENTS(
|
|
258
|
+
eventId,
|
|
259
|
+
productCode
|
|
260
|
+
)}`;
|
|
261
|
+
const apiKey = config.apiKey;
|
|
262
|
+
|
|
263
|
+
return get(url, apiKey, config.token, signal, true);
|
|
264
|
+
};
|
|
265
|
+
|
|
266
|
+
export const searchFlightPool = (
|
|
267
|
+
config: TideClientConfig,
|
|
268
|
+
request: BookingPackageRequest<BookingPackageFlightPoolRequest>,
|
|
269
|
+
signal?: AbortSignal
|
|
270
|
+
): Promise<BookingPackageFlightPool> => {
|
|
271
|
+
const url = `${config.host}${ENDPOINT_FLIGHT_POOL}`;
|
|
272
|
+
const apiKey = config.apiKey;
|
|
273
|
+
const body = JSON.stringify(request);
|
|
274
|
+
|
|
275
|
+
return post(url, apiKey, body, config.token, signal, true);
|
|
276
|
+
};
|
|
277
|
+
|
|
278
|
+
export const tourCodes = (
|
|
279
|
+
config: TideClientConfig,
|
|
280
|
+
request: TourCodesRequest,
|
|
281
|
+
signal?: AbortSignal
|
|
282
|
+
): Promise<TourCodesResponse> => {
|
|
283
|
+
const url = `${config.host}${ENDPOINT_TOUR_CODES}`;
|
|
284
|
+
const apiKey = config.apiKey;
|
|
285
|
+
const body = JSON.stringify(request);
|
|
286
|
+
|
|
287
|
+
return post(url, apiKey, body, config.token, signal, true);
|
|
288
|
+
};
|
|
289
|
+
|
|
290
|
+
export const setCustomEntryStatus = (
|
|
291
|
+
config: TideClientConfig,
|
|
292
|
+
dossierNumber: string,
|
|
293
|
+
customEntryStatusId: number,
|
|
294
|
+
signal?: AbortSignal
|
|
295
|
+
): Promise<BookingPackageAvailability[]> => {
|
|
296
|
+
const url = `${config.host}${ENDPOINT_CUSTOM_ENTRY_STATUS(
|
|
297
|
+
dossierNumber,
|
|
298
|
+
customEntryStatusId
|
|
299
|
+
)}`;
|
|
300
|
+
const apiKey = config.apiKey;
|
|
301
|
+
|
|
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);
|
|
318
|
+
};
|