@qite/tide-client 1.0.69 → 1.0.72

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.
@@ -1,4 +1,5 @@
1
1
  import { BookingPackageRequestRoom } from "../shared/booking-package-request-room";
2
+ import { SelectedFlight } from "./selected-flight";
2
3
  export interface BookingPackageDetailsRequest {
3
4
  catalogueId?: number;
4
5
  rooms: BookingPackageRequestRoom[];
@@ -12,4 +13,7 @@ export interface BookingPackageDetailsRequest {
12
13
  postNights?: number;
13
14
  includeFlights?: boolean;
14
15
  checkExternalAvailability?: boolean;
16
+ hotelCode?: string;
17
+ outwardFlight?: SelectedFlight;
18
+ returnFlight?: SelectedFlight;
15
19
  }
@@ -4,3 +4,4 @@ export * from "./booking-package-destination";
4
4
  export * from "./booking-package-details-request";
5
5
  export * from "./booking-package-request";
6
6
  export * from "./booking-package-search-request";
7
+ export * from "./selected-flight";
@@ -0,0 +1,4 @@
1
+ export interface SelectedFlight {
2
+ flightCode: string;
3
+ flightNumbers: string[];
4
+ }
@@ -0,0 +1,5 @@
1
+ import { BookingPackageFlight } from "../shared";
2
+ export interface BookingPackageFlightPool {
3
+ outwardFlights: BookingPackageFlight[];
4
+ returnFlights: BookingPackageFlight[];
5
+ }
@@ -0,0 +1,4 @@
1
+ import { BookingPackageHotel } from "../shared";
2
+ export interface BookingPackageHotelPool {
3
+ hotels: BookingPackageHotel[];
4
+ }
@@ -6,3 +6,5 @@ export * from "./booking-price-details";
6
6
  export * from "./booking-price-per-pax";
7
7
  export * from "./booking-travel-agent";
8
8
  export * from "./changed-line";
9
+ export * from "./booking-package-flight-pool";
10
+ export * from "./booking-package-hotel-pool";
@@ -6,4 +6,5 @@ export interface BookingPackageFlightMetaData {
6
6
  bagage: string;
7
7
  mealIncluded: boolean;
8
8
  meal: string;
9
+ durationInTicks: number;
9
10
  }
@@ -5,6 +5,8 @@ import {
5
5
  BookingPackageBookRequest,
6
6
  BookingPackageDetailsRequest,
7
7
  BookingPackageDossier,
8
+ BookingPackageFlightPool,
9
+ BookingPackageHotelPool,
8
10
  BookingPackageItem,
9
11
  BookingPackageRequest,
10
12
  BookingPackageSearchRequest,
@@ -26,6 +28,16 @@ export declare const details: (
26
28
  request: BookingPackageRequest<BookingPackageDetailsRequest>,
27
29
  signal?: AbortSignal | undefined
28
30
  ) => Promise<BookingPackage>;
31
+ export declare const alternateHotels: (
32
+ config: TideClientConfig,
33
+ transactionId: string,
34
+ signal?: AbortSignal | undefined
35
+ ) => Promise<BookingPackageHotelPool>;
36
+ export declare const alternateFlights: (
37
+ config: TideClientConfig,
38
+ transactionId: string,
39
+ signal?: AbortSignal | undefined
40
+ ) => Promise<BookingPackageFlightPool>;
29
41
  export declare const priceDetails: (
30
42
  config: TideClientConfig,
31
43
  request: BookingPackageRequest<BookingPackageBookRequest>,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qite/tide-client",
3
- "version": "1.0.69",
3
+ "version": "1.0.72",
4
4
  "description": "Frontend client for Tide",
5
5
  "main": "build/index.js",
6
6
  "scripts": {
@@ -1,4 +1,5 @@
1
1
  import { BookingPackageRequestRoom } from "../shared/booking-package-request-room";
2
+ import { SelectedFlight } from "./selected-flight";
2
3
 
3
4
  export interface BookingPackageDetailsRequest {
4
5
  catalogueId?: number;
@@ -13,4 +14,9 @@ export interface BookingPackageDetailsRequest {
13
14
  postNights?: number;
14
15
  includeFlights?: boolean;
15
16
  checkExternalAvailability?: boolean;
17
+
18
+ // lazy loading
19
+ hotelCode?: string;
20
+ outwardFlight?: SelectedFlight;
21
+ returnFlight?: SelectedFlight;
16
22
  }
@@ -4,3 +4,4 @@ export * from "./booking-package-destination";
4
4
  export * from "./booking-package-details-request";
5
5
  export * from "./booking-package-request";
6
6
  export * from "./booking-package-search-request";
7
+ export * from "./selected-flight";
@@ -0,0 +1,4 @@
1
+ export interface SelectedFlight {
2
+ flightCode: string;
3
+ flightNumbers: string[];
4
+ }
@@ -0,0 +1,6 @@
1
+ import { BookingPackageFlight } from "../shared";
2
+
3
+ export interface BookingPackageFlightPool {
4
+ outwardFlights: BookingPackageFlight[];
5
+ returnFlights: BookingPackageFlight[];
6
+ }
@@ -0,0 +1,5 @@
1
+ import { BookingPackageHotel } from "../shared";
2
+
3
+ export interface BookingPackageHotelPool {
4
+ hotels: BookingPackageHotel[];
5
+ }
@@ -6,3 +6,5 @@ export * from "./booking-price-details";
6
6
  export * from "./booking-price-per-pax";
7
7
  export * from "./booking-travel-agent";
8
8
  export * from "./changed-line";
9
+ export * from "./booking-package-flight-pool";
10
+ export * from "./booking-package-hotel-pool";
@@ -7,4 +7,5 @@ export interface BookingPackageFlightMetaData {
7
7
  bagage: string;
8
8
  mealIncluded: boolean;
9
9
  meal: string;
10
+ durationInTicks: number;
10
11
  }
@@ -6,6 +6,8 @@ import {
6
6
  BookingPackageBookRequest,
7
7
  BookingPackageDetailsRequest,
8
8
  BookingPackageDossier,
9
+ BookingPackageFlightPool,
10
+ BookingPackageHotelPool,
9
11
  BookingPackageItem,
10
12
  BookingPackageRequest,
11
13
  BookingPackageSearchRequest,
@@ -18,6 +20,8 @@ const ENDPOINT = "/api/web/booking/v2";
18
20
  const ENDPOINT_PACKAGE_SEARCH_LIST = `${ENDPOINT}/package-search-list`;
19
21
  const ENDPOINT_SEARCH = `${ENDPOINT}/search`;
20
22
  const ENDPOINT_DETAILS = `${ENDPOINT}/details`;
23
+ const ENDPOINT_ALTERNATE_HOTELS = `/alternate-hotels`;
24
+ const ENDPOINT_ALTERNATE_FLIGHTS = `/alternate-flights`;
21
25
  const ENDPOINT_PRICE_DETAILS = `${ENDPOINT}/price-details`;
22
26
  const ENDPOINT_BOOK = `${ENDPOINT}/book`;
23
27
  const ENDPOINT_AGENTS = `${ENDPOINT}/agents`;
@@ -34,6 +38,7 @@ export const readPackageSearchList = (
34
38
  return post(url, apiKey, body, signal);
35
39
  };
36
40
 
41
+ // PACKAGE SEARCH
37
42
  export const search = (
38
43
  config: TideClientConfig,
39
44
  request: BookingPackageRequest<BookingPackageSearchRequest>,
@@ -58,6 +63,28 @@ export const details = (
58
63
  return post(url, apiKey, body, signal, true);
59
64
  };
60
65
 
66
+ export const alternateHotels = (
67
+ config: TideClientConfig,
68
+ transactionId: string,
69
+ signal?: AbortSignal
70
+ ): Promise<BookingPackageHotelPool> => {
71
+ const url = `${config.host}${ENDPOINT_DETAILS}/${transactionId}${ENDPOINT_ALTERNATE_HOTELS}`;
72
+ const apiKey = config.apiKey;
73
+
74
+ return get(url, apiKey, signal, true);
75
+ };
76
+
77
+ export const alternateFlights = (
78
+ config: TideClientConfig,
79
+ transactionId: string,
80
+ signal?: AbortSignal
81
+ ): Promise<BookingPackageFlightPool> => {
82
+ const url = `${config.host}${ENDPOINT_DETAILS}/${transactionId}${ENDPOINT_ALTERNATE_FLIGHTS}`;
83
+ const apiKey = config.apiKey;
84
+
85
+ return get(url, apiKey, signal, true);
86
+ };
87
+
61
88
  export const priceDetails = (
62
89
  config: TideClientConfig,
63
90
  request: BookingPackageRequest<BookingPackageBookRequest>,