@qite/tide-client 1.1.5 → 1.1.7
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 +1 -1
- package/build/index.js.map +1 -1
- package/build/types/offer/index.d.ts +1 -0
- package/build/types/offer/page-result.d.ts +5 -0
- package/build/utils/search-client.d.ts +2 -3
- package/package.json +1 -1
- package/src/types/offer/index.ts +1 -0
- package/src/types/offer/page-result.ts +5 -0
- package/src/utils/search-client.ts +3 -4
|
@@ -54,6 +54,7 @@ export * from "./package-search-request-room";
|
|
|
54
54
|
export * from "./package-search-request";
|
|
55
55
|
export * from "./package-search-result";
|
|
56
56
|
export * from "./package-sub-option";
|
|
57
|
+
export * from "./page-result";
|
|
57
58
|
export * from "./pax";
|
|
58
59
|
export * from "./payment";
|
|
59
60
|
export * from "./person-country-preference";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { TideClientConfig } from "../types";
|
|
2
|
-
import { CountryItem } from "../types/offer/country-item";
|
|
1
|
+
import { CountryItem, PageResult, TideClientConfig } from "../types";
|
|
3
2
|
/**
|
|
4
3
|
* api/search/countries
|
|
5
4
|
* Gets all Countries
|
|
@@ -10,4 +9,4 @@ import { CountryItem } from "../types/offer/country-item";
|
|
|
10
9
|
export declare const getCountries: (
|
|
11
10
|
config: TideClientConfig,
|
|
12
11
|
signal?: AbortSignal | undefined
|
|
13
|
-
) => Promise<
|
|
12
|
+
) => Promise<PageResult<CountryItem>>;
|
package/package.json
CHANGED
package/src/types/offer/index.ts
CHANGED
|
@@ -54,6 +54,7 @@ export * from "./package-search-request-room";
|
|
|
54
54
|
export * from "./package-search-request";
|
|
55
55
|
export * from "./package-search-result";
|
|
56
56
|
export * from "./package-sub-option";
|
|
57
|
+
export * from "./page-result";
|
|
57
58
|
export * from "./pax";
|
|
58
59
|
export * from "./payment";
|
|
59
60
|
export * from "./person-country-preference";
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { TideClientConfig } from "../types";
|
|
2
|
-
import { CountryItem } from "../types/offer/country-item";
|
|
1
|
+
import { CountryItem, PageResult, TideClientConfig } from "../types";
|
|
3
2
|
import { get } from "./common-client";
|
|
4
3
|
|
|
5
|
-
const ENDPOINT = "/api/search";
|
|
4
|
+
const ENDPOINT = "/api/web/search";
|
|
6
5
|
const ENDPOINT_COUNTRIES = `${ENDPOINT}/countries`;
|
|
7
6
|
|
|
8
7
|
/**
|
|
@@ -15,7 +14,7 @@ const ENDPOINT_COUNTRIES = `${ENDPOINT}/countries`;
|
|
|
15
14
|
export const getCountries = (
|
|
16
15
|
config: TideClientConfig,
|
|
17
16
|
signal?: AbortSignal
|
|
18
|
-
): Promise<
|
|
17
|
+
): Promise<PageResult<CountryItem>> => {
|
|
19
18
|
const url = `${config.host}${ENDPOINT_COUNTRIES}`;
|
|
20
19
|
const apiKey = config.apiKey;
|
|
21
20
|
|