@qite/tide-client 1.1.62 → 1.1.64
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/booking-v2/request/booking-package-details-request.d.ts +8 -2
- package/build/types/booking-v2/request/selected-flight.d.ts +6 -2
- package/build/types/hubs/index.d.ts +1 -0
- package/build/types/hubs/search/flight-search-finish-response.d.ts +4 -0
- package/build/types/hubs/search/flight-search-request.d.ts +24 -0
- package/build/types/hubs/search/flight-search-response.d.ts +39 -0
- package/build/types/hubs/search/index.d.ts +3 -0
- package/build/types/index.d.ts +2 -0
- package/build/types/shared/date-struct.d.ts +5 -0
- package/build/types/shared/index.d.ts +1 -0
- 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 +2 -2
- package/src/types/booking-v2/request/booking-package-details-request.ts +8 -2
- package/src/types/booking-v2/request/selected-flight.ts +6 -2
- package/src/types/hubs/index.ts +1 -0
- package/src/types/hubs/search/flight-search-finish-response.ts +4 -0
- package/src/types/hubs/search/flight-search-request.ts +26 -0
- package/src/types/hubs/search/flight-search-response.ts +42 -0
- package/src/types/hubs/search/index.ts +3 -0
- package/src/types/index.ts +2 -0
- package/src/types/shared/date-struct.ts +5 -0
- package/src/types/shared/index.ts +1 -0
- 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
|
@@ -10,11 +10,17 @@ export interface BookingPackageDetailsRequest {
|
|
|
10
10
|
tourCode?: string;
|
|
11
11
|
fromDate: string;
|
|
12
12
|
toDate: string;
|
|
13
|
-
preNights?: number;
|
|
14
|
-
postNights?: number;
|
|
13
|
+
preNights?: number | null;
|
|
14
|
+
postNights?: number | null;
|
|
15
15
|
includeFlights?: boolean;
|
|
16
|
+
includeHotels?: boolean;
|
|
17
|
+
includePaxTypes?: boolean;
|
|
16
18
|
checkExternalAvailability?: boolean;
|
|
17
19
|
cachedAllotmentPriceInfos?: number[];
|
|
20
|
+
duration?: number | null;
|
|
21
|
+
expectedPrice?: number | null;
|
|
22
|
+
routeId?: string;
|
|
23
|
+
vendorConfigurationId?: number | null;
|
|
18
24
|
hotel?: SelectedHotel;
|
|
19
25
|
outwardFlight?: SelectedFlight;
|
|
20
26
|
returnFlight?: SelectedFlight;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
export interface SelectedFlight {
|
|
2
2
|
flightCode: string;
|
|
3
3
|
flightNumbers: string[];
|
|
4
|
-
startDateTime: string;
|
|
5
|
-
endDateTime: string;
|
|
4
|
+
startDateTime: string | null;
|
|
5
|
+
endDateTime: string | null;
|
|
6
|
+
departureHourMin: number | null;
|
|
7
|
+
departureHourMax: number | null;
|
|
8
|
+
arrivalHourMin: number | null;
|
|
9
|
+
arrivalHourMax: number | null;
|
|
6
10
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./search";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Pax } from "../../offer";
|
|
2
|
+
import { DateStruct } from "../../shared";
|
|
3
|
+
export interface FlightSearchRequest {
|
|
4
|
+
officeId: number;
|
|
5
|
+
catalogueId: number;
|
|
6
|
+
agentId?: number | null;
|
|
7
|
+
language: string;
|
|
8
|
+
departureAirportCode: string;
|
|
9
|
+
arrivalAirportCode: string;
|
|
10
|
+
outward: FlightSearchRequestTimeSpecification;
|
|
11
|
+
return: FlightSearchRequestTimeSpecification;
|
|
12
|
+
travelClass?: number | null;
|
|
13
|
+
airlineCodes?: string[] | null;
|
|
14
|
+
maxStops?: number | null;
|
|
15
|
+
luggageIncluded?: boolean | null;
|
|
16
|
+
pax: Pax[];
|
|
17
|
+
}
|
|
18
|
+
export interface FlightSearchRequestTimeSpecification {
|
|
19
|
+
date: DateStruct;
|
|
20
|
+
departureHourMin?: number | null;
|
|
21
|
+
departureHourMax?: number | null;
|
|
22
|
+
arrivalHourMin?: number | null;
|
|
23
|
+
arrivalHourMax?: number | null;
|
|
24
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export interface FlightSearchResponse {
|
|
2
|
+
requestId: number;
|
|
3
|
+
sequenceId: number;
|
|
4
|
+
items: FlightSearchResponseItem[];
|
|
5
|
+
}
|
|
6
|
+
export interface FlightSearchResponseItem {
|
|
7
|
+
vendorConfigurationId: number | null;
|
|
8
|
+
flightRouteId: string;
|
|
9
|
+
price: number;
|
|
10
|
+
travelClass: number;
|
|
11
|
+
airlineCode: string;
|
|
12
|
+
airlineName: string;
|
|
13
|
+
outward: FlightSearchResponseFlight;
|
|
14
|
+
return: FlightSearchResponseFlight;
|
|
15
|
+
}
|
|
16
|
+
export interface FlightSearchResponseFlight {
|
|
17
|
+
code: string;
|
|
18
|
+
fareType: number;
|
|
19
|
+
durationInTicks: number;
|
|
20
|
+
segments: FlightSearchResponseFlightSegment[];
|
|
21
|
+
}
|
|
22
|
+
export interface FlightSearchResponseFlightSegment {
|
|
23
|
+
order: number;
|
|
24
|
+
flightNumber: string;
|
|
25
|
+
marketingAirlineCode: string;
|
|
26
|
+
marketingAirlineName: string;
|
|
27
|
+
operatingAirlineCode: string;
|
|
28
|
+
operatingAirlineName: string;
|
|
29
|
+
departureAirportCode: string;
|
|
30
|
+
departureAirportName: string;
|
|
31
|
+
arrivalAirportCode: string;
|
|
32
|
+
arrivalAirportName: string;
|
|
33
|
+
departureDateTime: Date;
|
|
34
|
+
arrivalDateTime: Date;
|
|
35
|
+
transferTimeInTicks?: number;
|
|
36
|
+
bookingClassCode: string;
|
|
37
|
+
travelClass: number;
|
|
38
|
+
durationInTicks: number;
|
|
39
|
+
}
|
package/build/types/index.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export * from "./booking-v2";
|
|
2
2
|
export * from "./company";
|
|
3
3
|
export * from "./enums";
|
|
4
|
+
export * from "./hubs";
|
|
4
5
|
export * from "./mollie";
|
|
5
6
|
export * from "./odata";
|
|
6
7
|
export * from "./offer";
|
|
8
|
+
export * from "./shared";
|
|
7
9
|
export * from "./tide-client-config";
|
|
8
10
|
export * from "./web";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./date-struct";
|
|
@@ -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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qite/tide-client",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.64",
|
|
4
4
|
"description": "Frontend client for Tide",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"dotenv": "^9.0.2",
|
|
34
34
|
"jest": "^26.6.3",
|
|
35
35
|
"jest-fetch-mock": "^3.0.3",
|
|
36
|
-
"
|
|
36
|
+
"moment": "^2.0.0",
|
|
37
37
|
"prettier": "^2.3.0",
|
|
38
38
|
"rollup": "^2.48.0",
|
|
39
39
|
"rollup-plugin-typescript2": "0.36.0",
|
|
@@ -11,11 +11,17 @@ export interface BookingPackageDetailsRequest {
|
|
|
11
11
|
tourCode?: string;
|
|
12
12
|
fromDate: string;
|
|
13
13
|
toDate: string;
|
|
14
|
-
preNights?: number;
|
|
15
|
-
postNights?: number;
|
|
14
|
+
preNights?: number | null;
|
|
15
|
+
postNights?: number | null;
|
|
16
16
|
includeFlights?: boolean;
|
|
17
|
+
includeHotels?: boolean;
|
|
18
|
+
includePaxTypes?: boolean;
|
|
17
19
|
checkExternalAvailability?: boolean;
|
|
18
20
|
cachedAllotmentPriceInfos?: number[];
|
|
21
|
+
duration?: number | null;
|
|
22
|
+
expectedPrice?: number | null;
|
|
23
|
+
routeId?: string;
|
|
24
|
+
vendorConfigurationId?: number | null;
|
|
19
25
|
|
|
20
26
|
// lazy loading
|
|
21
27
|
hotel?: SelectedHotel;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
export interface SelectedFlight {
|
|
2
2
|
flightCode: string;
|
|
3
3
|
flightNumbers: string[];
|
|
4
|
-
startDateTime: string;
|
|
5
|
-
endDateTime: string;
|
|
4
|
+
startDateTime: string | null;
|
|
5
|
+
endDateTime: string | null;
|
|
6
|
+
departureHourMin: number | null;
|
|
7
|
+
departureHourMax: number | null;
|
|
8
|
+
arrivalHourMin: number | null;
|
|
9
|
+
arrivalHourMax: number | null;
|
|
6
10
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./search";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Pax } from "../../offer";
|
|
2
|
+
import { DateStruct } from "../../shared";
|
|
3
|
+
|
|
4
|
+
export interface FlightSearchRequest {
|
|
5
|
+
officeId: number;
|
|
6
|
+
catalogueId: number;
|
|
7
|
+
agentId?: number | null;
|
|
8
|
+
language: string;
|
|
9
|
+
departureAirportCode: string;
|
|
10
|
+
arrivalAirportCode: string;
|
|
11
|
+
outward: FlightSearchRequestTimeSpecification;
|
|
12
|
+
return: FlightSearchRequestTimeSpecification;
|
|
13
|
+
travelClass?: number | null;
|
|
14
|
+
airlineCodes?: string[] | null;
|
|
15
|
+
maxStops?: number | null;
|
|
16
|
+
luggageIncluded?: boolean | null;
|
|
17
|
+
pax: Pax[];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface FlightSearchRequestTimeSpecification {
|
|
21
|
+
date: DateStruct;
|
|
22
|
+
departureHourMin?: number | null;
|
|
23
|
+
departureHourMax?: number | null;
|
|
24
|
+
arrivalHourMin?: number | null;
|
|
25
|
+
arrivalHourMax?: number | null;
|
|
26
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export interface FlightSearchResponse {
|
|
2
|
+
requestId: number;
|
|
3
|
+
sequenceId: number;
|
|
4
|
+
items: FlightSearchResponseItem[];
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export interface FlightSearchResponseItem {
|
|
8
|
+
vendorConfigurationId: number | null;
|
|
9
|
+
flightRouteId: string;
|
|
10
|
+
price: number;
|
|
11
|
+
travelClass: number;
|
|
12
|
+
airlineCode: string;
|
|
13
|
+
airlineName: string;
|
|
14
|
+
outward: FlightSearchResponseFlight;
|
|
15
|
+
return: FlightSearchResponseFlight;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface FlightSearchResponseFlight {
|
|
19
|
+
code: string;
|
|
20
|
+
fareType: number;
|
|
21
|
+
durationInTicks: number;
|
|
22
|
+
segments: FlightSearchResponseFlightSegment[];
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface FlightSearchResponseFlightSegment {
|
|
26
|
+
order: number;
|
|
27
|
+
flightNumber: string;
|
|
28
|
+
marketingAirlineCode: string;
|
|
29
|
+
marketingAirlineName: string;
|
|
30
|
+
operatingAirlineCode: string;
|
|
31
|
+
operatingAirlineName: string;
|
|
32
|
+
departureAirportCode: string;
|
|
33
|
+
departureAirportName: string;
|
|
34
|
+
arrivalAirportCode: string;
|
|
35
|
+
arrivalAirportName: string;
|
|
36
|
+
departureDateTime: Date;
|
|
37
|
+
arrivalDateTime: Date;
|
|
38
|
+
transferTimeInTicks?: number;
|
|
39
|
+
bookingClassCode: string;
|
|
40
|
+
travelClass: number;
|
|
41
|
+
durationInTicks: number;
|
|
42
|
+
}
|
package/src/types/index.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export * from "./booking-v2";
|
|
2
2
|
export * from "./company";
|
|
3
3
|
export * from "./enums";
|
|
4
|
+
export * from "./hubs";
|
|
4
5
|
export * from "./mollie";
|
|
5
6
|
export * from "./odata";
|
|
6
7
|
export * from "./offer";
|
|
8
|
+
export * from "./shared";
|
|
7
9
|
export * from "./tide-client-config";
|
|
8
10
|
export * from "./web";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./date-struct";
|
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);
|
|
56
|
+
};
|
|
57
|
+
|
|
36
58
|
/**
|
|
37
59
|
* api/web/affiliates
|
|
38
60
|
* Gets all Affiliates
|