@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.
- package/build/index.js +27 -0
- package/build/index.js.map +1 -1
- package/build/types/offer/booking-v2/request/booking-package-details-request.d.ts +4 -0
- package/build/types/offer/booking-v2/request/index.d.ts +1 -0
- package/build/types/offer/booking-v2/request/selected-flight.d.ts +4 -0
- package/build/types/offer/booking-v2/response/booking-package-flight-pool.d.ts +5 -0
- package/build/types/offer/booking-v2/response/booking-package-hotel-pool.d.ts +4 -0
- package/build/types/offer/booking-v2/response/index.d.ts +2 -0
- package/build/types/offer/booking-v2/shared/booking-package-flight-meta-data.d.ts +1 -0
- package/build/utils/booking-v2-client.d.ts +12 -0
- package/package.json +1 -1
- package/src/types/offer/booking-v2/request/booking-package-details-request.ts +6 -0
- package/src/types/offer/booking-v2/request/index.ts +1 -0
- package/src/types/offer/booking-v2/request/selected-flight.ts +4 -0
- package/src/types/offer/booking-v2/response/booking-package-flight-pool.ts +6 -0
- package/src/types/offer/booking-v2/response/booking-package-hotel-pool.ts +5 -0
- package/src/types/offer/booking-v2/response/index.ts +2 -0
- package/src/types/offer/booking-v2/shared/booking-package-flight-meta-data.ts +1 -0
- package/src/utils/booking-v2-client.ts +27 -0
|
@@ -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
|
}
|
|
@@ -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,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
|
}
|
|
@@ -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>,
|