@qite/tide-client 1.0.74 → 1.0.77
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 +15 -6
- package/build/index.js.map +1 -1
- package/build/types/offer/booking-v2/request/booking-package-details-request.d.ts +2 -1
- package/build/types/offer/booking-v2/request/index.d.ts +1 -0
- package/build/types/offer/booking-v2/request/selected-flight.d.ts +2 -0
- package/build/types/offer/booking-v2/request/selected-hotel.d.ts +5 -0
- package/build/types/offer/booking-v2/response/booking-package-item.d.ts +2 -0
- package/build/types/offer/booking-v2/response/index.d.ts +1 -0
- package/build/types/offer/booking-v2/response/tide-response.d.ts +8 -0
- package/build/utils/booking-v2-client.d.ts +2 -1
- package/package.json +1 -1
- package/src/types/offer/booking-v2/request/booking-package-details-request.ts +2 -1
- package/src/types/offer/booking-v2/request/index.ts +1 -0
- package/src/types/offer/booking-v2/request/selected-flight.ts +2 -0
- package/src/types/offer/booking-v2/request/selected-hotel.ts +5 -0
- package/src/types/offer/booking-v2/response/booking-package-item.ts +2 -0
- package/src/types/offer/booking-v2/response/index.ts +1 -0
- package/src/types/offer/booking-v2/response/tide-response.ts +6 -0
- package/src/utils/booking-v2-client.ts +2 -1
- package/src/utils/common-client.ts +2 -2
- package/src/utils/member-client.ts +5 -4
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BookingPackageRequestRoom } from "../shared/booking-package-request-room";
|
|
2
2
|
import { SelectedFlight } from "./selected-flight";
|
|
3
|
+
import { SelectedHotel } from "./selected-hotel";
|
|
3
4
|
export interface BookingPackageDetailsRequest {
|
|
4
5
|
catalogueId?: number;
|
|
5
6
|
rooms: BookingPackageRequestRoom[];
|
|
@@ -13,7 +14,7 @@ export interface BookingPackageDetailsRequest {
|
|
|
13
14
|
postNights?: number;
|
|
14
15
|
includeFlights?: boolean;
|
|
15
16
|
checkExternalAvailability?: boolean;
|
|
16
|
-
|
|
17
|
+
hotel?: SelectedHotel;
|
|
17
18
|
outwardFlight?: SelectedFlight;
|
|
18
19
|
returnFlight?: SelectedFlight;
|
|
19
20
|
}
|
|
@@ -14,10 +14,12 @@ export interface BookingPackageItem {
|
|
|
14
14
|
outwardFlightCode?: string;
|
|
15
15
|
outwardFlightNumbers?: string[];
|
|
16
16
|
outwardFlightStartDate?: string;
|
|
17
|
+
outwardFlightEndDate?: string;
|
|
17
18
|
price: number;
|
|
18
19
|
regimeCode?: string;
|
|
19
20
|
returnFlightCode?: string;
|
|
20
21
|
returnFlightNumbers?: string[];
|
|
22
|
+
returnFlightStartDate?: string;
|
|
21
23
|
returnFlightEndDate?: string;
|
|
22
24
|
flightDescription?: string;
|
|
23
25
|
tagIds: number[];
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
BookingPackageSearchRequest,
|
|
13
13
|
BookingPriceDetails,
|
|
14
14
|
BookingTravelAgent,
|
|
15
|
+
TideResponse,
|
|
15
16
|
} from "../types";
|
|
16
17
|
export declare const readPackageSearchList: (
|
|
17
18
|
config: TideClientConfig,
|
|
@@ -27,7 +28,7 @@ export declare const details: (
|
|
|
27
28
|
config: TideClientConfig,
|
|
28
29
|
request: BookingPackageRequest<BookingPackageDetailsRequest>,
|
|
29
30
|
signal?: AbortSignal | undefined
|
|
30
|
-
) => Promise<BookingPackage
|
|
31
|
+
) => Promise<TideResponse<BookingPackage>>;
|
|
31
32
|
export declare const alternateHotels: (
|
|
32
33
|
config: TideClientConfig,
|
|
33
34
|
transactionId: string,
|
package/package.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BookingPackageRequestRoom } from "../shared/booking-package-request-room";
|
|
2
2
|
import { SelectedFlight } from "./selected-flight";
|
|
3
|
+
import { SelectedHotel } from "./selected-hotel";
|
|
3
4
|
|
|
4
5
|
export interface BookingPackageDetailsRequest {
|
|
5
6
|
catalogueId?: number;
|
|
@@ -16,7 +17,7 @@ export interface BookingPackageDetailsRequest {
|
|
|
16
17
|
checkExternalAvailability?: boolean;
|
|
17
18
|
|
|
18
19
|
// lazy loading
|
|
19
|
-
|
|
20
|
+
hotel?: SelectedHotel;
|
|
20
21
|
outwardFlight?: SelectedFlight;
|
|
21
22
|
returnFlight?: SelectedFlight;
|
|
22
23
|
}
|
|
@@ -15,10 +15,12 @@ export interface BookingPackageItem {
|
|
|
15
15
|
outwardFlightCode?: string;
|
|
16
16
|
outwardFlightNumbers?: string[];
|
|
17
17
|
outwardFlightStartDate?: string;
|
|
18
|
+
outwardFlightEndDate?: string;
|
|
18
19
|
price: number;
|
|
19
20
|
regimeCode?: string;
|
|
20
21
|
returnFlightCode?: string;
|
|
21
22
|
returnFlightNumbers?: string[];
|
|
23
|
+
returnFlightStartDate?: string;
|
|
22
24
|
returnFlightEndDate?: string;
|
|
23
25
|
flightDescription?: string;
|
|
24
26
|
tagIds: number[];
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
BookingPackageSearchRequest,
|
|
14
14
|
BookingPriceDetails,
|
|
15
15
|
BookingTravelAgent,
|
|
16
|
+
TideResponse,
|
|
16
17
|
} from "../types";
|
|
17
18
|
import { get, post } from "./common-client";
|
|
18
19
|
|
|
@@ -55,7 +56,7 @@ export const details = (
|
|
|
55
56
|
config: TideClientConfig,
|
|
56
57
|
request: BookingPackageRequest<BookingPackageDetailsRequest>,
|
|
57
58
|
signal?: AbortSignal
|
|
58
|
-
): Promise<BookingPackage
|
|
59
|
+
): Promise<TideResponse<BookingPackage>> => {
|
|
59
60
|
const url = `${config.host}${ENDPOINT_DETAILS}`;
|
|
60
61
|
const apiKey = config.apiKey;
|
|
61
62
|
const body = JSON.stringify(request);
|
|
@@ -12,8 +12,8 @@ export const post = async <T>(
|
|
|
12
12
|
const responseBody = await response.text();
|
|
13
13
|
|
|
14
14
|
const result: T = skipReviver
|
|
15
|
-
? JSON.parse(responseBody)
|
|
16
|
-
: JSON.parse(responseBody, reviver);
|
|
15
|
+
? JSON.parse(responseBody ?? "")
|
|
16
|
+
: JSON.parse(responseBody ?? "", reviver);
|
|
17
17
|
return result;
|
|
18
18
|
};
|
|
19
19
|
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
MemberResetPasswordRequest,
|
|
8
8
|
} from "../types";
|
|
9
9
|
import { post } from "./common-client";
|
|
10
|
+
import { post as apiPost } from "./api";
|
|
10
11
|
|
|
11
12
|
const ENDPOINT = "/api/member";
|
|
12
13
|
const ENDPOINT_LOGIN = `${ENDPOINT}/login`;
|
|
@@ -35,7 +36,7 @@ export const logout = (
|
|
|
35
36
|
const apiKey = config.apiKey;
|
|
36
37
|
const body = "";
|
|
37
38
|
|
|
38
|
-
return
|
|
39
|
+
return apiPost(url, apiKey, body, signal);
|
|
39
40
|
};
|
|
40
41
|
|
|
41
42
|
export const confirm = (
|
|
@@ -47,7 +48,7 @@ export const confirm = (
|
|
|
47
48
|
const apiKey = config.apiKey;
|
|
48
49
|
const body = JSON.stringify(request);
|
|
49
50
|
|
|
50
|
-
return
|
|
51
|
+
return apiPost(url, apiKey, body, signal);
|
|
51
52
|
};
|
|
52
53
|
|
|
53
54
|
export const forgotPassword = (
|
|
@@ -59,7 +60,7 @@ export const forgotPassword = (
|
|
|
59
60
|
const apiKey = config.apiKey;
|
|
60
61
|
const body = JSON.stringify(request);
|
|
61
62
|
|
|
62
|
-
return
|
|
63
|
+
return apiPost(url, apiKey, body, signal);
|
|
63
64
|
};
|
|
64
65
|
|
|
65
66
|
export const resetPassword = (
|
|
@@ -71,5 +72,5 @@ export const resetPassword = (
|
|
|
71
72
|
const apiKey = config.apiKey;
|
|
72
73
|
const body = JSON.stringify(request);
|
|
73
74
|
|
|
74
|
-
return
|
|
75
|
+
return apiPost(url, apiKey, body, signal);
|
|
75
76
|
};
|