@qite/tide-client 1.0.56 → 1.0.57
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.
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
BookingPackageRequest,
|
|
10
10
|
BookingPackageSearchRequest,
|
|
11
11
|
BookingPriceDetails,
|
|
12
|
+
BookingTravelAgent,
|
|
12
13
|
} from "../types";
|
|
13
14
|
export declare const readPackageSearchList: (
|
|
14
15
|
config: TideClientConfig,
|
|
@@ -35,3 +36,7 @@ export declare const book: (
|
|
|
35
36
|
request: BookingPackageRequest<BookingPackageBookRequest>,
|
|
36
37
|
signal?: AbortSignal | undefined
|
|
37
38
|
) => Promise<BookingPackageDossier>;
|
|
39
|
+
export declare const agents: (
|
|
40
|
+
config: TideClientConfig,
|
|
41
|
+
signal?: AbortSignal | undefined
|
|
42
|
+
) => Promise<BookingTravelAgent>;
|
package/package.json
CHANGED
|
@@ -10,8 +10,9 @@ import {
|
|
|
10
10
|
BookingPackageRequest,
|
|
11
11
|
BookingPackageSearchRequest,
|
|
12
12
|
BookingPriceDetails,
|
|
13
|
+
BookingTravelAgent,
|
|
13
14
|
} from "../types";
|
|
14
|
-
import { post } from "./common-client";
|
|
15
|
+
import { get, post } from "./common-client";
|
|
15
16
|
|
|
16
17
|
const ENDPOINT = "/api/web/booking/v2";
|
|
17
18
|
const ENDPOINT_PACKAGE_SEARCH_LIST = `${ENDPOINT}/package-search-list`;
|
|
@@ -19,6 +20,7 @@ const ENDPOINT_SEARCH = `${ENDPOINT}/search`;
|
|
|
19
20
|
const ENDPOINT_DETAILS = `${ENDPOINT}/details`;
|
|
20
21
|
const ENDPOINT_PRICE_DETAILS = `${ENDPOINT}/price-details`;
|
|
21
22
|
const ENDPOINT_BOOK = `${ENDPOINT}/book`;
|
|
23
|
+
const ENDPOINT_AGENTS = `${ENDPOINT}/agents`;
|
|
22
24
|
|
|
23
25
|
export const readPackageSearchList = (
|
|
24
26
|
config: TideClientConfig,
|
|
@@ -79,3 +81,13 @@ export const book = (
|
|
|
79
81
|
|
|
80
82
|
return post(url, apiKey, body, signal, true);
|
|
81
83
|
};
|
|
84
|
+
|
|
85
|
+
export const agents = (
|
|
86
|
+
config: TideClientConfig,
|
|
87
|
+
signal?: AbortSignal
|
|
88
|
+
): Promise<BookingTravelAgent> => {
|
|
89
|
+
const url = `${config.host}${ENDPOINT_AGENTS}`;
|
|
90
|
+
const apiKey = config.apiKey;
|
|
91
|
+
|
|
92
|
+
return get(url, apiKey, signal, true);
|
|
93
|
+
};
|