@qite/tide-client 1.0.45 → 1.0.48
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 +60 -0
- package/build/index.js.map +1 -1
- package/build/types/offer/affiliates.d.ts +5 -0
- package/build/types/offer/booking-v2/response/booking-package-item.d.ts +14 -5
- package/build/types/offer/booking-v2/shared/booking-package-hotel-option.d.ts +10 -10
- package/build/types/offer/booking-v2/shared/booking-package-hotel.d.ts +19 -19
- package/build/types/offer/booking-v2/shared/booking-package.d.ts +39 -39
- package/build/types/offer/flight-meta-data.d.ts +14 -14
- package/build/utils/api.d.ts +5 -0
- package/build/utils/common-client.d.ts +6 -0
- package/build/utils/web-client.d.ts +12 -0
- package/build/utils/web-file.d.ts +14 -0
- package/package.json +56 -56
- package/src/types/offer/affiliates.ts +5 -0
- package/src/types/offer/booking-v2/response/booking-package-item.ts +14 -6
- package/src/types/offer/booking-v2/shared/booking-package-hotel-option.ts +10 -10
- package/src/types/offer/booking-v2/shared/booking-package-hotel.ts +24 -24
- package/src/types/offer/booking-v2/shared/booking-package.ts +47 -47
- package/src/types/offer/flight-meta-data.ts +15 -15
- package/src/utils/api.ts +20 -0
- package/src/utils/common-client.ts +16 -1
- package/src/utils/web-client.ts +20 -0
- package/src/utils/web-file.ts +24 -0
package/src/utils/web-client.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { CrmContactRequest, TideClientConfig } from "../types";
|
|
2
|
+
import { Affiliates } from "../types/offer/affiliates";
|
|
2
3
|
|
|
3
4
|
import { post } from "./api";
|
|
5
|
+
import { get } from "./common-client";
|
|
4
6
|
|
|
5
7
|
const ENDPOINT = "/api/web";
|
|
6
8
|
const ENDPOINT_CREATE_CRM_CONTACT = `${ENDPOINT}/crmcontact`;
|
|
9
|
+
const ENDPOINT_CREATE_AFFILIATES = `${ENDPOINT}/affiliates`;
|
|
7
10
|
|
|
8
11
|
/**
|
|
9
12
|
* api/web/crmcontact
|
|
@@ -24,3 +27,20 @@ export const createCrmContact = (
|
|
|
24
27
|
|
|
25
28
|
return post(url, apiKey, body, signal);
|
|
26
29
|
};
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* api/web/affiliates
|
|
33
|
+
* Gets all Affiliates
|
|
34
|
+
* @param config
|
|
35
|
+
* @param signal
|
|
36
|
+
* @returns OK if succeeded.
|
|
37
|
+
*/
|
|
38
|
+
export const getAffiliates = (
|
|
39
|
+
config: TideClientConfig,
|
|
40
|
+
signal?: AbortSignal
|
|
41
|
+
): Promise<[Affiliates]> => {
|
|
42
|
+
const url = `${config.host}${ENDPOINT_CREATE_AFFILIATES}`;
|
|
43
|
+
const apiKey = config.apiKey;
|
|
44
|
+
|
|
45
|
+
return get(url, apiKey, signal);
|
|
46
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { TideClientConfig } from "../types";
|
|
2
|
+
import { get } from "./api";
|
|
3
|
+
|
|
4
|
+
const ENDPOINT = "/api/web/file";
|
|
5
|
+
const ENDPOINT_FEED = `${ENDPOINT}/feed`;
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* api/web/file/feed
|
|
9
|
+
* fetch a xml from blob feed.
|
|
10
|
+
* @param config
|
|
11
|
+
* @param request
|
|
12
|
+
* @param signal
|
|
13
|
+
* @returns OK if succeeded.
|
|
14
|
+
*/
|
|
15
|
+
export const contactForm = (
|
|
16
|
+
config: TideClientConfig,
|
|
17
|
+
request: string,
|
|
18
|
+
signal?: AbortSignal
|
|
19
|
+
): Promise<Response> => {
|
|
20
|
+
const url = `${config.host}${ENDPOINT_FEED}/${request}`;
|
|
21
|
+
const apiKey = config.apiKey;
|
|
22
|
+
|
|
23
|
+
return get(url, apiKey, signal);
|
|
24
|
+
};
|