@qite/tide-client 1.0.20 → 1.0.23
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.map +1 -1
- package/build/types/offer/booking-v2/request/booking-package-book-request.d.ts +4 -1
- package/build/types/offer/booking-v2/response/booking-package-dossier.d.ts +1 -0
- package/build/types/offer/booking-v2/response/booking-price-details.d.ts +1 -0
- package/build/types/offer/booking-v2/shared/booking-package-room-option.d.ts +3 -1
- package/build/types/offer/booking-v2/shared/booking-package.d.ts +1 -1
- package/build/types/offer/booking-v2/shared/per-package-option.d.ts +1 -0
- package/package.json +1 -1
- package/src/index.ts +65 -65
- package/src/types/offer/booking-v2/index.ts +3 -3
- package/src/types/offer/booking-v2/request/booking-package-address.ts +13 -13
- package/src/types/offer/booking-v2/request/booking-package-book-request.ts +4 -1
- package/src/types/offer/booking-v2/request/booking-package-details-request.ts +13 -13
- package/src/types/offer/booking-v2/request/booking-package-request.ts +5 -5
- package/src/types/offer/booking-v2/request/booking-package-search-request.ts +23 -23
- package/src/types/offer/booking-v2/request/index.ts +5 -5
- package/src/types/offer/booking-v2/response/booking-package-allotment-info.ts +13 -13
- package/src/types/offer/booking-v2/response/booking-package-dossier.ts +6 -5
- package/src/types/offer/booking-v2/response/booking-price-detail.ts +15 -15
- package/src/types/offer/booking-v2/response/booking-price-details.ts +8 -7
- package/src/types/offer/booking-v2/response/booking-price-per-pax.ts +4 -4
- package/src/types/offer/booking-v2/response/changed-line.ts +4 -4
- package/src/types/offer/booking-v2/response/index.ts +7 -7
- package/src/types/offer/booking-v2/shared/booking-option-group.ts +5 -5
- package/src/types/offer/booking-v2/shared/booking-option-pax.ts +8 -8
- package/src/types/offer/booking-v2/shared/booking-option-unit.ts +7 -7
- package/src/types/offer/booking-v2/shared/booking-package-flight.ts +11 -11
- package/src/types/offer/booking-v2/shared/booking-package-hotel-option.ts +7 -7
- package/src/types/offer/booking-v2/shared/booking-package-hotel-room.ts +6 -6
- package/src/types/offer/booking-v2/shared/booking-package-hotel.ts +13 -13
- package/src/types/offer/booking-v2/shared/booking-package-line.ts +7 -7
- package/src/types/offer/booking-v2/shared/booking-package-pax.ts +18 -18
- package/src/types/offer/booking-v2/shared/booking-package-request-room.ts +6 -6
- package/src/types/offer/booking-v2/shared/booking-package-room-option.ts +3 -1
- package/src/types/offer/booking-v2/shared/booking-package-room.ts +6 -6
- package/src/types/offer/booking-v2/shared/booking-package.ts +2 -2
- package/src/types/offer/booking-v2/shared/index.ts +17 -17
- package/src/types/offer/booking-v2/shared/per-booking-package-option.ts +10 -10
- package/src/types/offer/booking-v2/shared/per-package-option.ts +1 -0
- package/src/types/offer/booking-v2/shared/per-pax-package-option.ts +6 -6
- package/src/types/offer/booking-v2/shared/per-unit-package-option.ts +8 -8
- package/src/types/offer/index.ts +65 -65
- package/src/utils/booking-v2-client.ts +81 -81
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
import { PackageSearchRequest, TideClientConfig } from "..";
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
AvailablePackage,
|
|
5
|
-
BookingPackage,
|
|
6
|
-
BookingPackageBookRequest,
|
|
7
|
-
BookingPackageDetailsRequest,
|
|
8
|
-
BookingPackageDossier,
|
|
9
|
-
BookingPackageItem,
|
|
10
|
-
BookingPackageRequest,
|
|
11
|
-
BookingPackageSearchRequest,
|
|
12
|
-
BookingPriceDetails,
|
|
13
|
-
} from "../types";
|
|
14
|
-
import { post } from "./common-client";
|
|
15
|
-
|
|
16
|
-
const ENDPOINT = "/api/web/booking/v2";
|
|
17
|
-
const ENDPOINT_PACKAGE_SEARCH_LIST = `${ENDPOINT}/package-search-list`;
|
|
18
|
-
const ENDPOINT_SEARCH = `${ENDPOINT}/search`;
|
|
19
|
-
const ENDPOINT_DETAILS = `${ENDPOINT}/details`;
|
|
20
|
-
const ENDPOINT_PRICE_DETAILS = `${ENDPOINT}/price-details`;
|
|
21
|
-
const ENDPOINT_BOOK = `${ENDPOINT}/book`;
|
|
22
|
-
|
|
23
|
-
export const readPackageSearchList = (
|
|
24
|
-
config: TideClientConfig,
|
|
25
|
-
request: PackageSearchRequest,
|
|
26
|
-
signal?: AbortSignal
|
|
27
|
-
): Promise<AvailablePackage[]> => {
|
|
28
|
-
const url = `${config.host}${ENDPOINT_PACKAGE_SEARCH_LIST}`;
|
|
29
|
-
const apiKey = config.apiKey;
|
|
30
|
-
const body = JSON.stringify(request);
|
|
31
|
-
|
|
32
|
-
return post(url, apiKey, body, signal);
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
export const search = (
|
|
36
|
-
config: TideClientConfig,
|
|
37
|
-
request: BookingPackageRequest<BookingPackageSearchRequest>,
|
|
38
|
-
signal?: AbortSignal
|
|
39
|
-
): Promise<BookingPackageItem[]> => {
|
|
40
|
-
const url = `${config.host}${ENDPOINT_SEARCH}`;
|
|
41
|
-
const apiKey = config.apiKey;
|
|
42
|
-
const body = JSON.stringify(request);
|
|
43
|
-
|
|
44
|
-
return post(url, apiKey, body, signal);
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
export const details = (
|
|
48
|
-
config: TideClientConfig,
|
|
49
|
-
request: BookingPackageRequest<BookingPackageDetailsRequest>,
|
|
50
|
-
signal?: AbortSignal
|
|
51
|
-
): Promise<BookingPackage> => {
|
|
52
|
-
const url = `${config.host}${ENDPOINT_DETAILS}`;
|
|
53
|
-
const apiKey = config.apiKey;
|
|
54
|
-
const body = JSON.stringify(request);
|
|
55
|
-
|
|
56
|
-
return post(url, apiKey, body, signal);
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
export const priceDetails = (
|
|
60
|
-
config: TideClientConfig,
|
|
61
|
-
request: BookingPackageRequest<BookingPackageBookRequest>,
|
|
62
|
-
signal?: AbortSignal
|
|
63
|
-
): Promise<BookingPriceDetails> => {
|
|
64
|
-
const url = `${config.host}${ENDPOINT_PRICE_DETAILS}`;
|
|
65
|
-
const apiKey = config.apiKey;
|
|
66
|
-
const body = JSON.stringify(request);
|
|
67
|
-
|
|
68
|
-
return post(url, apiKey, body, signal);
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
export const book = (
|
|
72
|
-
config: TideClientConfig,
|
|
73
|
-
request: BookingPackageRequest<BookingPackageBookRequest>,
|
|
74
|
-
signal?: AbortSignal
|
|
75
|
-
): Promise<BookingPackageDossier> => {
|
|
76
|
-
const url = `${config.host}${ENDPOINT_BOOK}`;
|
|
77
|
-
const apiKey = config.apiKey;
|
|
78
|
-
const body = JSON.stringify(request);
|
|
79
|
-
|
|
80
|
-
return post(url, apiKey, body, signal);
|
|
81
|
-
};
|
|
1
|
+
import { PackageSearchRequest, TideClientConfig } from "..";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
AvailablePackage,
|
|
5
|
+
BookingPackage,
|
|
6
|
+
BookingPackageBookRequest,
|
|
7
|
+
BookingPackageDetailsRequest,
|
|
8
|
+
BookingPackageDossier,
|
|
9
|
+
BookingPackageItem,
|
|
10
|
+
BookingPackageRequest,
|
|
11
|
+
BookingPackageSearchRequest,
|
|
12
|
+
BookingPriceDetails,
|
|
13
|
+
} from "../types";
|
|
14
|
+
import { post } from "./common-client";
|
|
15
|
+
|
|
16
|
+
const ENDPOINT = "/api/web/booking/v2";
|
|
17
|
+
const ENDPOINT_PACKAGE_SEARCH_LIST = `${ENDPOINT}/package-search-list`;
|
|
18
|
+
const ENDPOINT_SEARCH = `${ENDPOINT}/search`;
|
|
19
|
+
const ENDPOINT_DETAILS = `${ENDPOINT}/details`;
|
|
20
|
+
const ENDPOINT_PRICE_DETAILS = `${ENDPOINT}/price-details`;
|
|
21
|
+
const ENDPOINT_BOOK = `${ENDPOINT}/book`;
|
|
22
|
+
|
|
23
|
+
export const readPackageSearchList = (
|
|
24
|
+
config: TideClientConfig,
|
|
25
|
+
request: PackageSearchRequest,
|
|
26
|
+
signal?: AbortSignal
|
|
27
|
+
): Promise<AvailablePackage[]> => {
|
|
28
|
+
const url = `${config.host}${ENDPOINT_PACKAGE_SEARCH_LIST}`;
|
|
29
|
+
const apiKey = config.apiKey;
|
|
30
|
+
const body = JSON.stringify(request);
|
|
31
|
+
|
|
32
|
+
return post(url, apiKey, body, signal);
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export const search = (
|
|
36
|
+
config: TideClientConfig,
|
|
37
|
+
request: BookingPackageRequest<BookingPackageSearchRequest>,
|
|
38
|
+
signal?: AbortSignal
|
|
39
|
+
): Promise<BookingPackageItem[]> => {
|
|
40
|
+
const url = `${config.host}${ENDPOINT_SEARCH}`;
|
|
41
|
+
const apiKey = config.apiKey;
|
|
42
|
+
const body = JSON.stringify(request);
|
|
43
|
+
|
|
44
|
+
return post(url, apiKey, body, signal);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export const details = (
|
|
48
|
+
config: TideClientConfig,
|
|
49
|
+
request: BookingPackageRequest<BookingPackageDetailsRequest>,
|
|
50
|
+
signal?: AbortSignal
|
|
51
|
+
): Promise<BookingPackage> => {
|
|
52
|
+
const url = `${config.host}${ENDPOINT_DETAILS}`;
|
|
53
|
+
const apiKey = config.apiKey;
|
|
54
|
+
const body = JSON.stringify(request);
|
|
55
|
+
|
|
56
|
+
return post(url, apiKey, body, signal);
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export const priceDetails = (
|
|
60
|
+
config: TideClientConfig,
|
|
61
|
+
request: BookingPackageRequest<BookingPackageBookRequest>,
|
|
62
|
+
signal?: AbortSignal
|
|
63
|
+
): Promise<BookingPriceDetails> => {
|
|
64
|
+
const url = `${config.host}${ENDPOINT_PRICE_DETAILS}`;
|
|
65
|
+
const apiKey = config.apiKey;
|
|
66
|
+
const body = JSON.stringify(request);
|
|
67
|
+
|
|
68
|
+
return post(url, apiKey, body, signal);
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export const book = (
|
|
72
|
+
config: TideClientConfig,
|
|
73
|
+
request: BookingPackageRequest<BookingPackageBookRequest>,
|
|
74
|
+
signal?: AbortSignal
|
|
75
|
+
): Promise<BookingPackageDossier> => {
|
|
76
|
+
const url = `${config.host}${ENDPOINT_BOOK}`;
|
|
77
|
+
const apiKey = config.apiKey;
|
|
78
|
+
const body = JSON.stringify(request);
|
|
79
|
+
|
|
80
|
+
return post(url, apiKey, body, signal);
|
|
81
|
+
};
|