@qite/tide-client 1.0.97 → 1.1.0
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 +20 -0
- package/build/index.js.map +1 -1
- package/build/types/offer/booking-v2/request/booking-package-voucher-request.d.ts +4 -0
- package/build/types/offer/booking-v2/request/index.d.ts +1 -0
- package/build/types/offer/booking-v2/response/booking-voucher-result.d.ts +3 -0
- package/build/types/offer/booking-v2/response/index.d.ts +1 -0
- package/build/utils/booking-client.d.ts +12 -0
- package/build/utils/booking-v2-client.d.ts +7 -0
- package/package.json +1 -1
- package/src/types/offer/booking-v2/request/booking-package-voucher-request.ts +4 -0
- package/src/types/offer/booking-v2/request/index.ts +1 -0
- package/src/types/offer/booking-v2/response/booking-voucher-result.ts +3 -0
- package/src/types/offer/booking-v2/response/index.ts +1 -0
- package/src/utils/booking-client.ts +12 -0
- package/src/utils/booking-v2-client.ts +15 -0
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
* @param config
|
|
20
20
|
* @param request
|
|
21
21
|
* @returns Availabilities (options) for the specified request.
|
|
22
|
+
* @deprecated Use V2: Search
|
|
22
23
|
*/
|
|
23
24
|
export declare const getAvailableProducts: (
|
|
24
25
|
config: TideClientConfig,
|
|
@@ -30,6 +31,7 @@ export declare const getAvailableProducts: (
|
|
|
30
31
|
* @param config
|
|
31
32
|
* @param request
|
|
32
33
|
* @returns Travel options (excursions etc) for a specified product, accommodation and regime.
|
|
34
|
+
* @depracted Use V2: Search
|
|
33
35
|
*/
|
|
34
36
|
export declare const searchPackages: (
|
|
35
37
|
config: TideClientConfig,
|
|
@@ -41,6 +43,7 @@ export declare const searchPackages: (
|
|
|
41
43
|
* @param config
|
|
42
44
|
* @param request
|
|
43
45
|
* @returns A price breakdown for a specified Package (= product and selected options).
|
|
46
|
+
* @deprecated Use V2: Price details
|
|
44
47
|
*/
|
|
45
48
|
export declare const getPackagePriceDetails: (
|
|
46
49
|
config: TideClientConfig,
|
|
@@ -53,6 +56,7 @@ export declare const getPackagePriceDetails: (
|
|
|
53
56
|
* @param config
|
|
54
57
|
* @param request
|
|
55
58
|
* @returns The (full) created offer Entry.
|
|
59
|
+
* @deprecated Use V2: Book
|
|
56
60
|
*/
|
|
57
61
|
export declare const createOffer: (
|
|
58
62
|
config: TideClientConfig,
|
|
@@ -65,6 +69,7 @@ export declare const createOffer: (
|
|
|
65
69
|
* @param config
|
|
66
70
|
* @param request
|
|
67
71
|
* @returns The (short) created offer Entry.
|
|
72
|
+
* @deprecated Use V2: Book
|
|
68
73
|
*/
|
|
69
74
|
export declare const createOfferWithShortResponse: (
|
|
70
75
|
config: TideClientConfig,
|
|
@@ -77,6 +82,7 @@ export declare const createOfferWithShortResponse: (
|
|
|
77
82
|
* @param config
|
|
78
83
|
* @param request
|
|
79
84
|
* @returns The (full) created booking Entry.
|
|
85
|
+
* @deprecated Use V2: Book
|
|
80
86
|
*/
|
|
81
87
|
export declare const createEntry: (
|
|
82
88
|
config: TideClientConfig,
|
|
@@ -89,6 +95,7 @@ export declare const createEntry: (
|
|
|
89
95
|
* @param config
|
|
90
96
|
* @param request
|
|
91
97
|
* @returns The (short) created booking Entry.
|
|
98
|
+
* @deprecated Use V2: Book
|
|
92
99
|
*/
|
|
93
100
|
export declare const createEntryWithShortResponse: (
|
|
94
101
|
config: TideClientConfig,
|
|
@@ -101,6 +108,7 @@ export declare const createEntryWithShortResponse: (
|
|
|
101
108
|
* @param config
|
|
102
109
|
* @param request
|
|
103
110
|
* @returns The (full) created offer Entry.
|
|
111
|
+
* @depracted Use V2: Book
|
|
104
112
|
*/
|
|
105
113
|
export declare const createPackageOffer: (
|
|
106
114
|
config: TideClientConfig,
|
|
@@ -113,6 +121,7 @@ export declare const createPackageOffer: (
|
|
|
113
121
|
* @param config
|
|
114
122
|
* @param request
|
|
115
123
|
* @returns The (short) created offer Entry.
|
|
124
|
+
* @deprecated Use V2: Book
|
|
116
125
|
*/
|
|
117
126
|
export declare const createPackageOfferWithShortResponse: (
|
|
118
127
|
config: TideClientConfig,
|
|
@@ -125,6 +134,7 @@ export declare const createPackageOfferWithShortResponse: (
|
|
|
125
134
|
* @param config
|
|
126
135
|
* @param request
|
|
127
136
|
* @returns The (full) created booking Entry.
|
|
137
|
+
* @deprecated Use V2: book
|
|
128
138
|
*/
|
|
129
139
|
export declare const createPackageEntry: (
|
|
130
140
|
config: TideClientConfig,
|
|
@@ -137,6 +147,7 @@ export declare const createPackageEntry: (
|
|
|
137
147
|
* @param config
|
|
138
148
|
* @param request
|
|
139
149
|
* @returns The (short) created booking Entry.
|
|
150
|
+
* @deprecated Use V2: Book
|
|
140
151
|
*/
|
|
141
152
|
export declare const createPackageEntryWithShortResponse: (
|
|
142
153
|
config: TideClientConfig,
|
|
@@ -149,6 +160,7 @@ export declare const createPackageEntryWithShortResponse: (
|
|
|
149
160
|
* @param config
|
|
150
161
|
* @param request
|
|
151
162
|
* @returns The base prices of a specific product and accommodation during the defined period.
|
|
163
|
+
* @deprecated Use V2: Prices
|
|
152
164
|
*/
|
|
153
165
|
export declare const getBasePrices: (
|
|
154
166
|
config: TideClientConfig,
|
|
@@ -13,8 +13,10 @@ import {
|
|
|
13
13
|
BookingPackageItem,
|
|
14
14
|
BookingPackageRequest,
|
|
15
15
|
BookingPackageSearchRequest,
|
|
16
|
+
BookingPackageVoucherRequest,
|
|
16
17
|
BookingPriceDetails,
|
|
17
18
|
BookingTravelAgent,
|
|
19
|
+
BookingVoucherResult,
|
|
18
20
|
TideResponse,
|
|
19
21
|
} from "../types";
|
|
20
22
|
import { BookingPackageAvailability } from "../types/offer/booking-v2/shared/booking-package-availability";
|
|
@@ -33,6 +35,11 @@ export declare const details: (
|
|
|
33
35
|
request: BookingPackageRequest<BookingPackageDetailsRequest>,
|
|
34
36
|
signal?: AbortSignal | undefined
|
|
35
37
|
) => Promise<TideResponse<BookingPackage>>;
|
|
38
|
+
export declare const validateVoucher: (
|
|
39
|
+
config: TideClientConfig,
|
|
40
|
+
request: BookingPackageRequest<BookingPackageVoucherRequest>,
|
|
41
|
+
signal?: AbortSignal | undefined
|
|
42
|
+
) => Promise<TideResponse<BookingVoucherResult>>;
|
|
36
43
|
export declare const alternateHotels: (
|
|
37
44
|
config: TideClientConfig,
|
|
38
45
|
transactionId: string,
|
package/package.json
CHANGED
|
@@ -34,6 +34,7 @@ const ENDPOINT_GET_BASE_PRICES_FROM_DATE = `${ENDPOINT}/base-prices-from-date`;
|
|
|
34
34
|
* @param config
|
|
35
35
|
* @param request
|
|
36
36
|
* @returns Availabilities (options) for the specified request.
|
|
37
|
+
* @deprecated Use V2: Search
|
|
37
38
|
*/
|
|
38
39
|
export const getAvailableProducts = (
|
|
39
40
|
config: TideClientConfig,
|
|
@@ -52,6 +53,7 @@ export const getAvailableProducts = (
|
|
|
52
53
|
* @param config
|
|
53
54
|
* @param request
|
|
54
55
|
* @returns Travel options (excursions etc) for a specified product, accommodation and regime.
|
|
56
|
+
* @depracted Use V2: Search
|
|
55
57
|
*/
|
|
56
58
|
export const searchPackages = (
|
|
57
59
|
config: TideClientConfig,
|
|
@@ -70,6 +72,7 @@ export const searchPackages = (
|
|
|
70
72
|
* @param config
|
|
71
73
|
* @param request
|
|
72
74
|
* @returns A price breakdown for a specified Package (= product and selected options).
|
|
75
|
+
* @deprecated Use V2: Price details
|
|
73
76
|
*/
|
|
74
77
|
export const getPackagePriceDetails = (
|
|
75
78
|
config: TideClientConfig,
|
|
@@ -89,6 +92,7 @@ export const getPackagePriceDetails = (
|
|
|
89
92
|
* @param config
|
|
90
93
|
* @param request
|
|
91
94
|
* @returns The (full) created offer Entry.
|
|
95
|
+
* @deprecated Use V2: Book
|
|
92
96
|
*/
|
|
93
97
|
export const createOffer = (
|
|
94
98
|
config: TideClientConfig,
|
|
@@ -111,6 +115,7 @@ export const createOffer = (
|
|
|
111
115
|
* @param config
|
|
112
116
|
* @param request
|
|
113
117
|
* @returns The (short) created offer Entry.
|
|
118
|
+
* @deprecated Use V2: Book
|
|
114
119
|
*/
|
|
115
120
|
export const createOfferWithShortResponse = (
|
|
116
121
|
config: TideClientConfig,
|
|
@@ -133,6 +138,7 @@ export const createOfferWithShortResponse = (
|
|
|
133
138
|
* @param config
|
|
134
139
|
* @param request
|
|
135
140
|
* @returns The (full) created booking Entry.
|
|
141
|
+
* @deprecated Use V2: Book
|
|
136
142
|
*/
|
|
137
143
|
export const createEntry = (
|
|
138
144
|
config: TideClientConfig,
|
|
@@ -155,6 +161,7 @@ export const createEntry = (
|
|
|
155
161
|
* @param config
|
|
156
162
|
* @param request
|
|
157
163
|
* @returns The (short) created booking Entry.
|
|
164
|
+
* @deprecated Use V2: Book
|
|
158
165
|
*/
|
|
159
166
|
export const createEntryWithShortResponse = (
|
|
160
167
|
config: TideClientConfig,
|
|
@@ -177,6 +184,7 @@ export const createEntryWithShortResponse = (
|
|
|
177
184
|
* @param config
|
|
178
185
|
* @param request
|
|
179
186
|
* @returns The (full) created offer Entry.
|
|
187
|
+
* @depracted Use V2: Book
|
|
180
188
|
*/
|
|
181
189
|
export const createPackageOffer = (
|
|
182
190
|
config: TideClientConfig,
|
|
@@ -199,6 +207,7 @@ export const createPackageOffer = (
|
|
|
199
207
|
* @param config
|
|
200
208
|
* @param request
|
|
201
209
|
* @returns The (short) created offer Entry.
|
|
210
|
+
* @deprecated Use V2: Book
|
|
202
211
|
*/
|
|
203
212
|
export const createPackageOfferWithShortResponse = (
|
|
204
213
|
config: TideClientConfig,
|
|
@@ -221,6 +230,7 @@ export const createPackageOfferWithShortResponse = (
|
|
|
221
230
|
* @param config
|
|
222
231
|
* @param request
|
|
223
232
|
* @returns The (full) created booking Entry.
|
|
233
|
+
* @deprecated Use V2: book
|
|
224
234
|
*/
|
|
225
235
|
export const createPackageEntry = (
|
|
226
236
|
config: TideClientConfig,
|
|
@@ -243,6 +253,7 @@ export const createPackageEntry = (
|
|
|
243
253
|
* @param config
|
|
244
254
|
* @param request
|
|
245
255
|
* @returns The (short) created booking Entry.
|
|
256
|
+
* @deprecated Use V2: Book
|
|
246
257
|
*/
|
|
247
258
|
export const createPackageEntryWithShortResponse = (
|
|
248
259
|
config: TideClientConfig,
|
|
@@ -265,6 +276,7 @@ export const createPackageEntryWithShortResponse = (
|
|
|
265
276
|
* @param config
|
|
266
277
|
* @param request
|
|
267
278
|
* @returns The base prices of a specific product and accommodation during the defined period.
|
|
279
|
+
* @deprecated Use V2: Prices
|
|
268
280
|
*/
|
|
269
281
|
export const getBasePrices = (
|
|
270
282
|
config: TideClientConfig,
|
|
@@ -14,8 +14,10 @@ import {
|
|
|
14
14
|
BookingPackageItem,
|
|
15
15
|
BookingPackageRequest,
|
|
16
16
|
BookingPackageSearchRequest,
|
|
17
|
+
BookingPackageVoucherRequest,
|
|
17
18
|
BookingPriceDetails,
|
|
18
19
|
BookingTravelAgent,
|
|
20
|
+
BookingVoucherResult,
|
|
19
21
|
TideResponse,
|
|
20
22
|
} from "../types";
|
|
21
23
|
import { BookingPackageAvailability } from "../types/offer/booking-v2/shared/booking-package-availability";
|
|
@@ -25,6 +27,7 @@ const ENDPOINT = "/api/web/booking/v2";
|
|
|
25
27
|
const ENDPOINT_PACKAGE_SEARCH_LIST = `${ENDPOINT}/package-search-list`;
|
|
26
28
|
const ENDPOINT_SEARCH = `${ENDPOINT}/search`;
|
|
27
29
|
const ENDPOINT_DETAILS = `${ENDPOINT}/details`;
|
|
30
|
+
const ENDPOINT_VALIDATE_VOUCHER = `${ENDPOINT}/validate-voucher`;
|
|
28
31
|
const ENDPOINT_ALTERNATE_HOTELS = `/alternate-hotels`;
|
|
29
32
|
const ENDPOINT_ALTERNATE_FLIGHTS = `/alternate-flights`;
|
|
30
33
|
const ENDPOINT_PRICE_DETAILS = `${ENDPOINT}/price-details`;
|
|
@@ -71,6 +74,18 @@ export const details = (
|
|
|
71
74
|
return post(url, apiKey, body, signal, true);
|
|
72
75
|
};
|
|
73
76
|
|
|
77
|
+
export const validateVoucher = (
|
|
78
|
+
config: TideClientConfig,
|
|
79
|
+
request: BookingPackageRequest<BookingPackageVoucherRequest>,
|
|
80
|
+
signal?: AbortSignal
|
|
81
|
+
): Promise<TideResponse<BookingVoucherResult>> => {
|
|
82
|
+
const url = `${config.host}${ENDPOINT_VALIDATE_VOUCHER}`;
|
|
83
|
+
const apiKey = config.apiKey;
|
|
84
|
+
const body = JSON.stringify(request);
|
|
85
|
+
|
|
86
|
+
return post(url, apiKey, body, signal, true);
|
|
87
|
+
};
|
|
88
|
+
|
|
74
89
|
export const alternateHotels = (
|
|
75
90
|
config: TideClientConfig,
|
|
76
91
|
transactionId: string,
|