@qite/tide-client 1.1.63 → 1.1.65
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 +16 -0
- package/build/index.js.map +1 -1
- package/build/types/web/contact-form-request.d.ts +11 -0
- package/build/types/web/index.d.ts +1 -0
- package/build/utils/web-client.d.ts +14 -0
- package/package.json +1 -1
- package/src/types/web/contact-form-request.ts +11 -0
- package/src/types/web/index.ts +1 -0
- package/src/utils/web-client.ts +22 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Affiliate,
|
|
3
|
+
ContactFormRequest,
|
|
3
4
|
CrmContactRequest,
|
|
4
5
|
GenerateBookingAccommodationRequest,
|
|
5
6
|
TideClientConfig,
|
|
@@ -17,6 +18,19 @@ export declare const createCrmContact: (
|
|
|
17
18
|
request: CrmContactRequest,
|
|
18
19
|
signal?: AbortSignal | undefined
|
|
19
20
|
) => Promise<Response>;
|
|
21
|
+
/**
|
|
22
|
+
* api/web/contactform
|
|
23
|
+
* Sends a contact request mail
|
|
24
|
+
* @param config
|
|
25
|
+
* @param request
|
|
26
|
+
* @param signal
|
|
27
|
+
* @returns OK if succeeded.
|
|
28
|
+
*/
|
|
29
|
+
export declare const ContactForm: (
|
|
30
|
+
config: TideClientConfig,
|
|
31
|
+
request: ContactFormRequest,
|
|
32
|
+
signal?: AbortSignal | undefined
|
|
33
|
+
) => Promise<Response>;
|
|
20
34
|
/**
|
|
21
35
|
* api/web/affiliates
|
|
22
36
|
* Gets all Affiliates
|
package/package.json
CHANGED
package/src/types/web/index.ts
CHANGED
package/src/utils/web-client.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Affiliate,
|
|
3
|
+
ContactFormRequest,
|
|
3
4
|
CrmContactRequest,
|
|
4
5
|
GenerateBookingAccommodationRequest,
|
|
5
6
|
TideClientConfig,
|
|
@@ -9,6 +10,7 @@ import { get, post } from "./common-client";
|
|
|
9
10
|
|
|
10
11
|
const ENDPOINT = "/api/web";
|
|
11
12
|
const ENDPOINT_CREATE_CRM_CONTACT = `${ENDPOINT}/crmcontact`;
|
|
13
|
+
const ENDPOINT_CONTACT_FORM = `${ENDPOINT}/contactform`;
|
|
12
14
|
const ENDPOINT_CREATE_AFFILIATES = `${ENDPOINT}/affiliates`;
|
|
13
15
|
const ENDPOINT_TRANSLATION_DICTIONARY = `${ENDPOINT}/translation-dictionary`;
|
|
14
16
|
const ENDPOINT_BOOKING_ACCOMMODATION = `${ENDPOINT}/booking-accommodation`;
|
|
@@ -33,6 +35,26 @@ export const createCrmContact = (
|
|
|
33
35
|
return post(url, apiKey, body, config.token, signal);
|
|
34
36
|
};
|
|
35
37
|
|
|
38
|
+
/**
|
|
39
|
+
* api/web/contactform
|
|
40
|
+
* Sends a contact request mail
|
|
41
|
+
* @param config
|
|
42
|
+
* @param request
|
|
43
|
+
* @param signal
|
|
44
|
+
* @returns OK if succeeded.
|
|
45
|
+
*/
|
|
46
|
+
export const ContactForm = (
|
|
47
|
+
config: TideClientConfig,
|
|
48
|
+
request: ContactFormRequest,
|
|
49
|
+
signal?: AbortSignal
|
|
50
|
+
): Promise<Response> => {
|
|
51
|
+
const url = `${config.host}${ENDPOINT_CONTACT_FORM}`;
|
|
52
|
+
const apiKey = config.apiKey;
|
|
53
|
+
const body = JSON.stringify(request);
|
|
54
|
+
|
|
55
|
+
return post(url, apiKey, body, config.token, signal, true);
|
|
56
|
+
};
|
|
57
|
+
|
|
36
58
|
/**
|
|
37
59
|
* api/web/affiliates
|
|
38
60
|
* Gets all Affiliates
|