@qite/tide-client 1.1.1 → 1.1.3
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.
|
@@ -16,6 +16,7 @@ export * from "./book-request";
|
|
|
16
16
|
export * from "./booking-response";
|
|
17
17
|
export * from "./cached-package-search-result";
|
|
18
18
|
export * from "./confirmed-dossier-check";
|
|
19
|
+
export * from "./country-item";
|
|
19
20
|
export * from "./crm-contact-request";
|
|
20
21
|
export * from "./customer-request";
|
|
21
22
|
export * from "./dossier-default-product";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TideClientConfig } from "../types";
|
|
2
|
+
import { CountryItem } from "../types/offer/country-item";
|
|
3
|
+
/**
|
|
4
|
+
* api/search/countries
|
|
5
|
+
* Gets all Countries
|
|
6
|
+
* @param config
|
|
7
|
+
* @param signal
|
|
8
|
+
* @returns OK if succeeded.
|
|
9
|
+
*/
|
|
10
|
+
export declare const getCountries: (
|
|
11
|
+
config: TideClientConfig,
|
|
12
|
+
signal?: AbortSignal | undefined
|
|
13
|
+
) => Promise<[CountryItem]>;
|
package/package.json
CHANGED
package/src/types/offer/index.ts
CHANGED
|
@@ -16,6 +16,7 @@ export * from "./book-request";
|
|
|
16
16
|
export * from "./booking-response";
|
|
17
17
|
export * from "./cached-package-search-result";
|
|
18
18
|
export * from "./confirmed-dossier-check";
|
|
19
|
+
export * from "./country-item";
|
|
19
20
|
export * from "./crm-contact-request";
|
|
20
21
|
export * from "./customer-request";
|
|
21
22
|
export * from "./dossier-default-product";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { TideClientConfig } from "../types";
|
|
2
|
+
import { CountryItem } from "../types/offer/country-item";
|
|
3
|
+
import { get } from "./common-client";
|
|
4
|
+
|
|
5
|
+
const ENDPOINT = "/api/search";
|
|
6
|
+
const ENDPOINT_COUNTRIES = `${ENDPOINT}/countries`;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* api/search/countries
|
|
10
|
+
* Gets all Countries
|
|
11
|
+
* @param config
|
|
12
|
+
* @param signal
|
|
13
|
+
* @returns OK if succeeded.
|
|
14
|
+
*/
|
|
15
|
+
export const getCountries = (
|
|
16
|
+
config: TideClientConfig,
|
|
17
|
+
signal?: AbortSignal
|
|
18
|
+
): Promise<[CountryItem]> => {
|
|
19
|
+
const url = `${config.host}${ENDPOINT_COUNTRIES}`;
|
|
20
|
+
const apiKey = config.apiKey;
|
|
21
|
+
|
|
22
|
+
return get(url, apiKey, signal, true);
|
|
23
|
+
};
|