@qite/tide-client 1.0.14 → 1.0.17

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.
Files changed (74) hide show
  1. package/build/index.js +32 -0
  2. package/build/index.js.map +1 -1
  3. package/build/types/offer/booking-v2/index.d.ts +3 -0
  4. package/build/types/offer/booking-v2/request/booking-package-address.d.ts +13 -0
  5. package/build/types/offer/booking-v2/request/booking-package-book-request.d.ts +12 -0
  6. package/build/types/offer/booking-v2/request/booking-package-details-request.d.ts +12 -0
  7. package/build/types/offer/booking-v2/request/booking-package-request.d.ts +5 -0
  8. package/build/types/offer/booking-v2/request/booking-package-search-request.d.ts +20 -0
  9. package/build/types/offer/booking-v2/request/index.d.ts +5 -0
  10. package/build/types/offer/booking-v2/response/booking-package-allotment-info.d.ts +13 -0
  11. package/build/types/offer/booking-v2/response/booking-package-dossier.d.ts +5 -0
  12. package/build/types/offer/booking-v2/response/booking-package-item.d.ts +12 -0
  13. package/build/types/offer/booking-v2/response/booking-price-detail.d.ts +13 -0
  14. package/build/types/offer/booking-v2/response/booking-price-details.d.ts +6 -0
  15. package/build/types/offer/booking-v2/response/booking-price-per-pax.d.ts +4 -0
  16. package/build/types/offer/booking-v2/response/changed-line.d.ts +4 -0
  17. package/build/types/offer/booking-v2/response/index.d.ts +7 -0
  18. package/build/types/offer/booking-v2/shared/booking-option-group.d.ts +5 -0
  19. package/build/types/offer/booking-v2/shared/booking-option-pax.d.ts +7 -0
  20. package/build/types/offer/booking-v2/shared/booking-option-unit.d.ts +6 -0
  21. package/build/types/offer/booking-v2/shared/booking-package-flight.d.ts +11 -0
  22. package/build/types/offer/booking-v2/shared/booking-package-hotel-option.d.ts +7 -0
  23. package/build/types/offer/booking-v2/shared/booking-package-hotel-room.d.ts +5 -0
  24. package/build/types/offer/booking-v2/shared/booking-package-hotel.d.ts +10 -0
  25. package/build/types/offer/booking-v2/shared/booking-package-line.d.ts +7 -0
  26. package/build/types/offer/booking-v2/shared/booking-package-pax.d.ts +16 -0
  27. package/build/types/offer/booking-v2/shared/booking-package-request-room.d.ts +5 -0
  28. package/build/types/offer/booking-v2/shared/booking-package-room-option.d.ts +7 -0
  29. package/build/types/offer/booking-v2/shared/booking-package-room.d.ts +5 -0
  30. package/build/types/offer/booking-v2/shared/booking-package.d.ts +27 -0
  31. package/build/types/offer/booking-v2/shared/index.d.ts +17 -0
  32. package/build/types/offer/booking-v2/shared/per-booking-package-option.d.ts +9 -0
  33. package/build/types/offer/booking-v2/shared/per-package-option.d.ts +8 -0
  34. package/build/types/offer/booking-v2/shared/per-pax-package-option.d.ts +5 -0
  35. package/build/types/offer/booking-v2/shared/per-unit-package-option.d.ts +7 -0
  36. package/build/types/offer/index.d.ts +1 -0
  37. package/build/utils/booking-v2-client.d.ts +5 -1
  38. package/package.json +54 -54
  39. package/src/index.ts +65 -67
  40. package/src/types/offer/booking-v2/index.ts +3 -0
  41. package/src/types/offer/booking-v2/request/booking-package-address.ts +13 -0
  42. package/src/types/offer/booking-v2/request/booking-package-book-request.ts +14 -0
  43. package/src/types/offer/booking-v2/request/booking-package-details-request.ts +13 -0
  44. package/src/types/offer/booking-v2/request/booking-package-request.ts +5 -0
  45. package/src/types/offer/booking-v2/request/booking-package-search-request.ts +23 -0
  46. package/src/types/offer/booking-v2/request/index.ts +5 -0
  47. package/src/types/offer/booking-v2/response/booking-package-allotment-info.ts +13 -0
  48. package/src/types/offer/booking-v2/response/booking-package-dossier.ts +5 -0
  49. package/src/types/offer/booking-v2/response/booking-package-item.ts +14 -0
  50. package/src/types/offer/booking-v2/response/booking-price-detail.ts +15 -0
  51. package/src/types/offer/booking-v2/response/booking-price-details.ts +7 -0
  52. package/src/types/offer/booking-v2/response/booking-price-per-pax.ts +4 -0
  53. package/src/types/offer/booking-v2/response/changed-line.ts +4 -0
  54. package/src/types/offer/booking-v2/response/index.ts +7 -0
  55. package/src/types/offer/booking-v2/shared/booking-option-group.ts +5 -0
  56. package/src/types/offer/booking-v2/shared/booking-option-pax.ts +8 -0
  57. package/src/types/offer/booking-v2/shared/booking-option-unit.ts +7 -0
  58. package/src/types/offer/booking-v2/shared/booking-package-flight.ts +11 -0
  59. package/src/types/offer/booking-v2/shared/booking-package-hotel-option.ts +7 -0
  60. package/src/types/offer/booking-v2/shared/booking-package-hotel-room.ts +6 -0
  61. package/src/types/offer/booking-v2/shared/booking-package-hotel.ts +13 -0
  62. package/src/types/offer/booking-v2/shared/booking-package-line.ts +7 -0
  63. package/src/types/offer/booking-v2/shared/booking-package-pax.ts +18 -0
  64. package/src/types/offer/booking-v2/shared/booking-package-request-room.ts +6 -0
  65. package/src/types/offer/booking-v2/shared/booking-package-room-option.ts +7 -0
  66. package/src/types/offer/booking-v2/shared/booking-package-room.ts +6 -0
  67. package/src/types/offer/booking-v2/shared/booking-package.ts +33 -0
  68. package/src/types/offer/booking-v2/shared/index.ts +17 -0
  69. package/src/types/offer/booking-v2/shared/per-booking-package-option.ts +10 -0
  70. package/src/types/offer/booking-v2/shared/per-package-option.ts +9 -0
  71. package/src/types/offer/booking-v2/shared/per-pax-package-option.ts +6 -0
  72. package/src/types/offer/booking-v2/shared/per-unit-package-option.ts +8 -0
  73. package/src/types/offer/index.ts +65 -64
  74. package/src/utils/booking-v2-client.ts +81 -19
@@ -1,64 +1,65 @@
1
- export * from "./additional-services";
2
- export * from "./address";
3
- export * from "./alternative-flight-data";
4
- export * from "./alternative-flight-leg";
5
- export * from "./alternative-flight";
6
- export * from "./available-package-accommodation";
7
- export * from "./available-package-flight";
8
- export * from "./available-package-option";
9
- export * from "./available-package-pax-price";
10
- export * from "./available-package-regime";
11
- export * from "./available-package";
12
- export * from "./base-price";
13
- export * from "./base-prices-from-date-request";
14
- export * from "./base-prices-request";
15
- export * from "./book-request";
16
- export * from "./booking-response";
17
- export * from "./cached-package-search-result";
18
- export * from "./confirmed-dossier-check";
19
- export * from "./crm-contact-request";
20
- export * from "./customer-request";
21
- export * from "./dossier-default-product";
22
- export * from "./entry-check-response";
23
- export * from "./entry-line-meta-data";
24
- export * from "./entry-line-pax";
25
- export * from "./entry-line";
26
- export * from "./entry-price-line";
27
- export * from "./entry-room2";
28
- export * from "./entry";
29
- export * from "./flight-meta-data-line";
30
- export * from "./flight-meta-data";
31
- export * from "./flight-pool";
32
- export * from "./language";
33
- export * from "./multiroom-book-request";
34
- export * from "./note";
35
- export * from "./other-product";
36
- export * from "./package-book-request-room";
37
- export * from "./package-book-request";
38
- export * from "./package-flight";
39
- export * from "./package-flights";
40
- export * from "./package-option";
41
- export * from "./package-price-details-request-room";
42
- export * from "./package-price-details-request";
43
- export * from "./package-room-option";
44
- export * from "./package-room";
45
- export * from "./package-search-destination";
46
- export * from "./package-search-request-date";
47
- export * from "./package-search-request-room";
48
- export * from "./package-search-request";
49
- export * from "./package-search-result";
50
- export * from "./package-sub-option";
51
- export * from "./pax";
52
- export * from "./payment";
53
- export * from "./person-country-preference";
54
- export * from "./person-location-preference";
55
- export * from "./person-oord-preference";
56
- export * from "./person-period-date-range-preference";
57
- export * from "./person-period-preference";
58
- export * from "./person-region-preference";
59
- export * from "./person-tour-group-preference";
60
- export * from "./price-detail";
61
- export * from "./price-per-pax";
62
- export * from "./product-notification-result";
63
- export * from "./web-contact-form-request";
64
- export * from "./web-contact-has-tag-request";
1
+ export * from "./additional-services";
2
+ export * from "./address";
3
+ export * from "./alternative-flight-data";
4
+ export * from "./alternative-flight-leg";
5
+ export * from "./alternative-flight";
6
+ export * from "./available-package-accommodation";
7
+ export * from "./available-package-flight";
8
+ export * from "./available-package-option";
9
+ export * from "./available-package-pax-price";
10
+ export * from "./available-package-regime";
11
+ export * from "./available-package";
12
+ export * from "./base-price";
13
+ export * from "./base-prices-from-date-request";
14
+ export * from "./base-prices-request";
15
+ export * from "./book-request";
16
+ export * from "./booking-response";
17
+ export * from "./cached-package-search-result";
18
+ export * from "./confirmed-dossier-check";
19
+ export * from "./crm-contact-request";
20
+ export * from "./customer-request";
21
+ export * from "./dossier-default-product";
22
+ export * from "./entry-check-response";
23
+ export * from "./entry-line-meta-data";
24
+ export * from "./entry-line-pax";
25
+ export * from "./entry-line";
26
+ export * from "./entry-price-line";
27
+ export * from "./entry-room2";
28
+ export * from "./entry";
29
+ export * from "./flight-meta-data-line";
30
+ export * from "./flight-meta-data";
31
+ export * from "./flight-pool";
32
+ export * from "./language";
33
+ export * from "./multiroom-book-request";
34
+ export * from "./note";
35
+ export * from "./other-product";
36
+ export * from "./package-book-request-room";
37
+ export * from "./package-book-request";
38
+ export * from "./package-flight";
39
+ export * from "./package-flights";
40
+ export * from "./package-option";
41
+ export * from "./package-price-details-request-room";
42
+ export * from "./package-price-details-request";
43
+ export * from "./package-room-option";
44
+ export * from "./package-room";
45
+ export * from "./package-search-destination";
46
+ export * from "./package-search-request-date";
47
+ export * from "./package-search-request-room";
48
+ export * from "./package-search-request";
49
+ export * from "./package-search-result";
50
+ export * from "./package-sub-option";
51
+ export * from "./pax";
52
+ export * from "./payment";
53
+ export * from "./person-country-preference";
54
+ export * from "./person-location-preference";
55
+ export * from "./person-oord-preference";
56
+ export * from "./person-period-date-range-preference";
57
+ export * from "./person-period-preference";
58
+ export * from "./person-region-preference";
59
+ export * from "./person-tour-group-preference";
60
+ export * from "./price-detail";
61
+ export * from "./price-per-pax";
62
+ export * from "./product-notification-result";
63
+ export * from "./web-contact-form-request";
64
+ export * from "./web-contact-has-tag-request";
65
+ export * from "./booking-v2";
@@ -1,19 +1,81 @@
1
- import { PackageSearchRequest, TideClientConfig } from "..";
2
-
3
- import { AvailablePackage } from "../types";
4
- import { post } from "./common-client";
5
-
6
- const ENDPOINT = "/api/web/booking/v2";
7
- const ENDPOINT_PACKAGE_SEARCH_LIST = `${ENDPOINT}/package-search-list`;
8
-
9
- export const readPackageSearchList = (
10
- config: TideClientConfig,
11
- request: PackageSearchRequest,
12
- signal?: AbortSignal
13
- ): Promise<AvailablePackage[]> => {
14
- const url = `${config.host}${ENDPOINT_PACKAGE_SEARCH_LIST}`;
15
- const apiKey = config.apiKey;
16
- const body = JSON.stringify(request);
17
-
18
- return post(url, apiKey, body, signal);
19
- };
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
+ };