@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.
@@ -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,3 +6,4 @@ export * from "./booking-package-request";
6
6
  export * from "./booking-package-search-request";
7
7
  export * from "./selected-flight";
8
8
  export * from "./selected-hotel";
9
+ export * from "./booking-package-flight-pool-request";
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qite/tide-client",
3
- "version": "1.0.83",
3
+ "version": "1.0.85",
4
4
  "description": "Frontend client for Tide",
5
5
  "main": "build/index.js",
6
6
  "scripts": {
@@ -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
+ }
@@ -6,3 +6,4 @@ export * from "./booking-package-request";
6
6
  export * from "./booking-package-search-request";
7
7
  export * from "./selected-flight";
8
8
  export * from "./selected-hotel";
9
+ export * from "./booking-package-flight-pool-request";
package/src/utils/api.ts CHANGED
@@ -10,6 +10,7 @@ export const post = async (
10
10
  "Content-Type": "application/json",
11
11
  "Api-Key": apiKey,
12
12
  },
13
+ credentials: "include",
13
14
  body,
14
15
  signal,
15
16
  });
@@ -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
+ };