@qite/tide-client 1.0.83 → 1.0.85
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 +9 -0
- package/build/index.js.map +1 -1
- package/build/types/offer/booking-v2/request/booking-package-flight-pool-request.d.ts +12 -0
- package/build/types/offer/booking-v2/request/index.d.ts +1 -0
- package/build/utils/booking-v2-client.d.ts +6 -0
- package/package.json +1 -1
- package/src/types/offer/booking-v2/request/booking-package-flight-pool-request.ts +13 -0
- package/src/types/offer/booking-v2/request/index.ts +1 -0
- package/src/utils/api.ts +1 -0
- package/src/utils/booking-v2-client.ts +14 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BookingPackageRequestRoom } from "../shared";
|
|
2
|
+
import { BookingPackageDestination } from "./booking-package-destination";
|
|
3
|
+
export interface BookingPackageFlightPoolRequest {
|
|
4
|
+
catalogueIds: number[];
|
|
5
|
+
rooms: BookingPackageRequestRoom[];
|
|
6
|
+
destination?: BookingPackageDestination;
|
|
7
|
+
fromDate: string;
|
|
8
|
+
toDate: string;
|
|
9
|
+
productCode: string;
|
|
10
|
+
tourCode: string;
|
|
11
|
+
realTime: boolean;
|
|
12
|
+
}
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
BookingPackageDetailsRequest,
|
|
7
7
|
BookingPackageDossier,
|
|
8
8
|
BookingPackageFlightPool,
|
|
9
|
+
BookingPackageFlightPoolRequest,
|
|
9
10
|
BookingPackageHotelPool,
|
|
10
11
|
BookingPackageItem,
|
|
11
12
|
BookingPackageRequest,
|
|
@@ -59,3 +60,8 @@ export declare const getAllotmentAvailability: (
|
|
|
59
60
|
eventId: string,
|
|
60
61
|
signal?: AbortSignal | undefined
|
|
61
62
|
) => Promise<BookingPackageAvailability[]>;
|
|
63
|
+
export declare const searchFlightPool: (
|
|
64
|
+
config: TideClientConfig,
|
|
65
|
+
request: BookingPackageRequest<BookingPackageFlightPoolRequest>,
|
|
66
|
+
signal?: AbortSignal | undefined
|
|
67
|
+
) => Promise<BookingPackageFlightPool>;
|
package/package.json
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BookingPackageRequestRoom } from "../shared";
|
|
2
|
+
import { BookingPackageDestination } from "./booking-package-destination";
|
|
3
|
+
|
|
4
|
+
export interface BookingPackageFlightPoolRequest {
|
|
5
|
+
catalogueIds: number[];
|
|
6
|
+
rooms: BookingPackageRequestRoom[];
|
|
7
|
+
destination?: BookingPackageDestination;
|
|
8
|
+
fromDate: string;
|
|
9
|
+
toDate: string;
|
|
10
|
+
productCode: string;
|
|
11
|
+
tourCode: string;
|
|
12
|
+
realTime: boolean;
|
|
13
|
+
}
|
package/src/utils/api.ts
CHANGED
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
BookingPackageDetailsRequest,
|
|
8
8
|
BookingPackageDossier,
|
|
9
9
|
BookingPackageFlightPool,
|
|
10
|
+
BookingPackageFlightPoolRequest,
|
|
10
11
|
BookingPackageHotelPool,
|
|
11
12
|
BookingPackageItem,
|
|
12
13
|
BookingPackageRequest,
|
|
@@ -28,6 +29,7 @@ const ENDPOINT_PRICE_DETAILS = `${ENDPOINT}/price-details`;
|
|
|
28
29
|
const ENDPOINT_BOOK = `${ENDPOINT}/book`;
|
|
29
30
|
const ENDPOINT_AGENTS = `${ENDPOINT}/agents`;
|
|
30
31
|
const ENDPOINT_AVAILABLE_ALLOTMENTS = `${ENDPOINT}/get-allotment-availability`;
|
|
32
|
+
const ENDPOINT_FLIGHT_POOL = `${ENDPOINT}/flight-pool`;
|
|
31
33
|
|
|
32
34
|
export const readPackageSearchList = (
|
|
33
35
|
config: TideClientConfig,
|
|
@@ -132,3 +134,15 @@ export const getAllotmentAvailability = (
|
|
|
132
134
|
|
|
133
135
|
return get(url, apiKey, signal, true);
|
|
134
136
|
};
|
|
137
|
+
|
|
138
|
+
export const searchFlightPool = (
|
|
139
|
+
config: TideClientConfig,
|
|
140
|
+
request: BookingPackageRequest<BookingPackageFlightPoolRequest>,
|
|
141
|
+
signal?: AbortSignal
|
|
142
|
+
): Promise<BookingPackageFlightPool> => {
|
|
143
|
+
const url = `${config.host}${ENDPOINT_FLIGHT_POOL}`;
|
|
144
|
+
const apiKey = config.apiKey;
|
|
145
|
+
const body = JSON.stringify(request);
|
|
146
|
+
|
|
147
|
+
return post(url, apiKey, body, signal, true);
|
|
148
|
+
};
|