@qite/tide-client 1.0.20 → 1.0.21

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 (186) hide show
  1. package/build/index.d.ts +49 -10
  2. package/build/index.js +541 -437
  3. package/build/types/aapi/accommodation-occupancy.d.ts +9 -9
  4. package/build/types/aapi/accommodation-with-available-places.d.ts +14 -14
  5. package/build/types/aapi/accommodation.d.ts +7 -7
  6. package/build/types/aapi/additional-services.d.ts +6 -6
  7. package/build/types/aapi/alternative-flight-data.d.ts +10 -10
  8. package/build/types/aapi/alternative-flight-leg.d.ts +18 -18
  9. package/build/types/aapi/alternative-flight.d.ts +12 -12
  10. package/build/types/aapi/availability-request.d.ts +12 -12
  11. package/build/types/aapi/availability.d.ts +5 -5
  12. package/build/types/aapi/available-products-request.d.ts +32 -32
  13. package/build/types/aapi/duration.d.ts +4 -4
  14. package/build/types/aapi/flight-leg.d.ts +18 -18
  15. package/build/types/aapi/flight.d.ts +23 -23
  16. package/build/types/aapi/hotel.d.ts +35 -35
  17. package/build/types/aapi/index.d.ts +22 -22
  18. package/build/types/aapi/mollie-payment-request.d.ts +6 -6
  19. package/build/types/aapi/mollie-payment.d.ts +3 -3
  20. package/build/types/aapi/option-pax.d.ts +4 -4
  21. package/build/types/aapi/option.d.ts +28 -21
  22. package/build/types/aapi/pax.d.ts +4 -4
  23. package/build/types/aapi/price-detail.d.ts +8 -8
  24. package/build/types/aapi/regime.d.ts +5 -5
  25. package/build/types/aapi/traveler-grouping.d.ts +5 -5
  26. package/build/types/enums/allotment-type.d.ts +5 -5
  27. package/build/types/enums/availability-search-type.d.ts +4 -4
  28. package/build/types/enums/dossier-type.d.ts +6 -6
  29. package/build/types/enums/entry-line-flag.d.ts +6 -6
  30. package/build/types/enums/entry-line-status.d.ts +19 -19
  31. package/build/types/enums/entry-status.d.ts +8 -8
  32. package/build/types/enums/export-status.d.ts +5 -5
  33. package/build/types/enums/gender.d.ts +5 -5
  34. package/build/types/enums/index.d.ts +15 -15
  35. package/build/types/enums/meta-data-type.d.ts +10 -10
  36. package/build/types/enums/payment-type.d.ts +6 -6
  37. package/build/types/enums/price-chart-type.d.ts +4 -4
  38. package/build/types/enums/requirement-type.d.ts +5 -5
  39. package/build/types/enums/room-type.d.ts +8 -8
  40. package/build/types/enums/sale-type.d.ts +4 -4
  41. package/build/types/enums/service-type.d.ts +26 -26
  42. package/build/types/index.d.ts +26 -4
  43. package/build/types/offer/additional-services.d.ts +6 -6
  44. package/build/types/offer/address.d.ts +11 -11
  45. package/build/types/offer/alternative-flight-data.d.ts +10 -10
  46. package/build/types/offer/alternative-flight-leg.d.ts +18 -18
  47. package/build/types/offer/alternative-flight.d.ts +14 -14
  48. package/build/types/offer/available-package-accommodation.d.ts +7 -7
  49. package/build/types/offer/available-package-flight.d.ts +9 -9
  50. package/build/types/offer/available-package-option.d.ts +17 -12
  51. package/build/types/offer/available-package-pax-price.d.ts +6 -6
  52. package/build/types/offer/available-package-regime.d.ts +4 -4
  53. package/build/types/offer/available-package.d.ts +7 -7
  54. package/build/types/offer/base-price.d.ts +6 -6
  55. package/build/types/offer/base-prices-from-date-request.d.ts +12 -12
  56. package/build/types/offer/base-prices-request.d.ts +12 -12
  57. package/build/types/offer/book-request.d.ts +36 -36
  58. package/build/types/offer/booking-response.d.ts +4 -4
  59. package/build/types/offer/booking-v2/index.d.ts +3 -3
  60. package/build/types/offer/booking-v2/request/booking-package-address.d.ts +13 -13
  61. package/build/types/offer/booking-v2/request/booking-package-book-request.d.ts +12 -12
  62. package/build/types/offer/booking-v2/request/booking-package-details-request.d.ts +12 -12
  63. package/build/types/offer/booking-v2/request/booking-package-request.d.ts +5 -5
  64. package/build/types/offer/booking-v2/request/booking-package-search-request.d.ts +20 -20
  65. package/build/types/offer/booking-v2/request/index.d.ts +5 -5
  66. package/build/types/offer/booking-v2/response/booking-package-allotment-info.d.ts +13 -13
  67. package/build/types/offer/booking-v2/response/booking-package-dossier.d.ts +5 -5
  68. package/build/types/offer/booking-v2/response/booking-package-item.d.ts +12 -12
  69. package/build/types/offer/booking-v2/response/booking-price-detail.d.ts +13 -13
  70. package/build/types/offer/booking-v2/response/booking-price-details.d.ts +6 -6
  71. package/build/types/offer/booking-v2/response/booking-price-per-pax.d.ts +4 -4
  72. package/build/types/offer/booking-v2/response/changed-line.d.ts +4 -4
  73. package/build/types/offer/booking-v2/response/index.d.ts +7 -7
  74. package/build/types/offer/booking-v2/shared/booking-option-group.d.ts +5 -5
  75. package/build/types/offer/booking-v2/shared/booking-option-pax.d.ts +7 -7
  76. package/build/types/offer/booking-v2/shared/booking-option-unit.d.ts +6 -6
  77. package/build/types/offer/booking-v2/shared/booking-package-flight.d.ts +11 -11
  78. package/build/types/offer/booking-v2/shared/booking-package-hotel-option.d.ts +7 -7
  79. package/build/types/offer/booking-v2/shared/booking-package-hotel-room.d.ts +5 -5
  80. package/build/types/offer/booking-v2/shared/booking-package-hotel.d.ts +10 -10
  81. package/build/types/offer/booking-v2/shared/booking-package-line.d.ts +7 -7
  82. package/build/types/offer/booking-v2/shared/booking-package-pax.d.ts +16 -16
  83. package/build/types/offer/booking-v2/shared/booking-package-request-room.d.ts +5 -5
  84. package/build/types/offer/booking-v2/shared/booking-package-room-option.d.ts +9 -7
  85. package/build/types/offer/booking-v2/shared/booking-package-room.d.ts +5 -5
  86. package/build/types/offer/booking-v2/shared/booking-package.d.ts +29 -29
  87. package/build/types/offer/booking-v2/shared/index.d.ts +17 -17
  88. package/build/types/offer/booking-v2/shared/per-booking-package-option.d.ts +9 -9
  89. package/build/types/offer/booking-v2/shared/per-package-option.d.ts +9 -8
  90. package/build/types/offer/booking-v2/shared/per-pax-package-option.d.ts +5 -5
  91. package/build/types/offer/booking-v2/shared/per-unit-package-option.d.ts +7 -7
  92. package/build/types/offer/cached-package-search-result.d.ts +5 -5
  93. package/build/types/offer/confirmed-dossier-check.d.ts +6 -6
  94. package/build/types/offer/crm-contact-request.d.ts +36 -28
  95. package/build/types/offer/customer-request.d.ts +5 -5
  96. package/build/types/offer/dossier-default-product.d.ts +14 -14
  97. package/build/types/offer/entry-check-response.d.ts +8 -8
  98. package/build/types/offer/entry-line-meta-data.d.ts +5 -5
  99. package/build/types/offer/entry-line-pax.d.ts +8 -8
  100. package/build/types/offer/entry-line.d.ts +73 -67
  101. package/build/types/offer/entry-price-line.d.ts +40 -40
  102. package/build/types/offer/entry-room2.d.ts +5 -5
  103. package/build/types/offer/entry.d.ts +59 -49
  104. package/build/types/offer/flight-meta-data-line.d.ts +16 -16
  105. package/build/types/offer/flight-meta-data.d.ts +10 -10
  106. package/build/types/offer/flight-pool.d.ts +5 -5
  107. package/build/types/offer/index.d.ts +65 -65
  108. package/build/types/offer/language.d.ts +5 -5
  109. package/build/types/offer/multiroom-book-request.d.ts +10 -10
  110. package/build/types/offer/note.d.ts +16 -16
  111. package/build/types/offer/other-product.d.ts +13 -13
  112. package/build/types/offer/package-book-request-room.d.ts +5 -5
  113. package/build/types/offer/package-book-request.d.ts +12 -12
  114. package/build/types/offer/package-flight.d.ts +13 -13
  115. package/build/types/offer/package-flights.d.ts +5 -5
  116. package/build/types/offer/package-option.d.ts +22 -22
  117. package/build/types/offer/package-price-details-request-room.d.ts +4 -4
  118. package/build/types/offer/package-price-details-request.d.ts +8 -8
  119. package/build/types/offer/package-room-option.d.ts +10 -10
  120. package/build/types/offer/package-room.d.ts +7 -7
  121. package/build/types/offer/package-search-destination.d.ts +9 -9
  122. package/build/types/offer/package-search-request-date.d.ts +4 -4
  123. package/build/types/offer/package-search-request-room.d.ts +5 -5
  124. package/build/types/offer/package-search-request.d.ts +22 -18
  125. package/build/types/offer/package-search-result.d.ts +12 -12
  126. package/build/types/offer/package-sub-option.d.ts +6 -6
  127. package/build/types/offer/pax.d.ts +29 -29
  128. package/build/types/offer/payment.d.ts +20 -20
  129. package/build/types/offer/person-country-preference.d.ts +7 -7
  130. package/build/types/offer/person-location-preference.d.ts +7 -7
  131. package/build/types/offer/person-oord-preference.d.ts +7 -7
  132. package/build/types/offer/person-period-date-range-preference.d.ts +6 -6
  133. package/build/types/offer/person-period-preference.d.ts +7 -7
  134. package/build/types/offer/person-region-preference.d.ts +7 -7
  135. package/build/types/offer/person-tour-group-preference.d.ts +7 -7
  136. package/build/types/offer/price-detail.d.ts +18 -18
  137. package/build/types/offer/price-per-pax.d.ts +6 -6
  138. package/build/types/offer/product-notification-result.d.ts +9 -9
  139. package/build/types/offer/web-contact-form-request.d.ts +13 -13
  140. package/build/types/offer/web-contact-has-tag-request.d.ts +4 -4
  141. package/build/types/tide-client-config.d.ts +4 -4
  142. package/build/utils/api.d.ts +6 -1
  143. package/build/utils/booking-client.d.ts +169 -102
  144. package/build/utils/booking-v2-client.d.ts +37 -7
  145. package/build/utils/common-client.d.ts +6 -1
  146. package/build/utils/json.d.ts +2 -2
  147. package/build/utils/mollie-client.d.ts +15 -7
  148. package/build/utils/web-client.d.ts +14 -10
  149. package/build/utils/web-contact-client.d.ts +23 -11
  150. package/package.json +54 -54
  151. package/src/index.ts +65 -65
  152. package/src/types/offer/booking-v2/index.ts +3 -3
  153. package/src/types/offer/booking-v2/request/booking-package-address.ts +13 -13
  154. package/src/types/offer/booking-v2/request/booking-package-book-request.ts +14 -14
  155. package/src/types/offer/booking-v2/request/booking-package-details-request.ts +13 -13
  156. package/src/types/offer/booking-v2/request/booking-package-request.ts +5 -5
  157. package/src/types/offer/booking-v2/request/booking-package-search-request.ts +23 -23
  158. package/src/types/offer/booking-v2/request/index.ts +5 -5
  159. package/src/types/offer/booking-v2/response/booking-package-allotment-info.ts +13 -13
  160. package/src/types/offer/booking-v2/response/booking-package-dossier.ts +5 -5
  161. package/src/types/offer/booking-v2/response/booking-package-item.ts +14 -14
  162. package/src/types/offer/booking-v2/response/booking-price-detail.ts +15 -15
  163. package/src/types/offer/booking-v2/response/booking-price-details.ts +7 -7
  164. package/src/types/offer/booking-v2/response/booking-price-per-pax.ts +4 -4
  165. package/src/types/offer/booking-v2/response/changed-line.ts +4 -4
  166. package/src/types/offer/booking-v2/response/index.ts +7 -7
  167. package/src/types/offer/booking-v2/shared/booking-option-group.ts +5 -5
  168. package/src/types/offer/booking-v2/shared/booking-option-pax.ts +8 -8
  169. package/src/types/offer/booking-v2/shared/booking-option-unit.ts +7 -7
  170. package/src/types/offer/booking-v2/shared/booking-package-flight.ts +11 -11
  171. package/src/types/offer/booking-v2/shared/booking-package-hotel-option.ts +7 -7
  172. package/src/types/offer/booking-v2/shared/booking-package-hotel-room.ts +6 -6
  173. package/src/types/offer/booking-v2/shared/booking-package-hotel.ts +13 -13
  174. package/src/types/offer/booking-v2/shared/booking-package-line.ts +7 -7
  175. package/src/types/offer/booking-v2/shared/booking-package-pax.ts +18 -18
  176. package/src/types/offer/booking-v2/shared/booking-package-request-room.ts +6 -6
  177. package/src/types/offer/booking-v2/shared/booking-package-room-option.ts +9 -7
  178. package/src/types/offer/booking-v2/shared/booking-package-room.ts +6 -6
  179. package/src/types/offer/booking-v2/shared/booking-package.ts +36 -36
  180. package/src/types/offer/booking-v2/shared/index.ts +17 -17
  181. package/src/types/offer/booking-v2/shared/per-booking-package-option.ts +10 -10
  182. package/src/types/offer/booking-v2/shared/per-package-option.ts +10 -9
  183. package/src/types/offer/booking-v2/shared/per-pax-package-option.ts +6 -6
  184. package/src/types/offer/booking-v2/shared/per-unit-package-option.ts +8 -8
  185. package/src/types/offer/index.ts +65 -65
  186. package/src/utils/booking-v2-client.ts +81 -81
package/build/index.js CHANGED
@@ -1,466 +1,568 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
4
 
5
- var AllotmentType = {
6
- freeSell: 0,
7
- onRequest: 1,
8
- allotment: 2,
5
+ var AllotmentType = {
6
+ freeSell: 0,
7
+ onRequest: 1,
8
+ allotment: 2,
9
9
  };
10
10
 
11
- var AvailabilitySearchType = {
12
- default: 0,
13
- allotment: 1,
11
+ var AvailabilitySearchType = {
12
+ default: 0,
13
+ allotment: 1,
14
14
  };
15
15
 
16
- var Gender = {
17
- male: 0,
18
- female: 1,
19
- other: 2,
16
+ var Gender = {
17
+ male: 0,
18
+ female: 1,
19
+ other: 2,
20
20
  };
21
21
 
22
- var MetaDataType = {
23
- flight: 0,
24
- publicTransport: 1,
25
- rawHubData: 2,
26
- rawFlightData: 3,
27
- flightInfo: 4,
28
- bookFeedback: 5,
29
- cancelFeedback: 6,
30
- additionalServices: 7,
22
+ var MetaDataType = {
23
+ flight: 0,
24
+ publicTransport: 1,
25
+ rawHubData: 2,
26
+ rawFlightData: 3,
27
+ flightInfo: 4,
28
+ bookFeedback: 5,
29
+ cancelFeedback: 6,
30
+ additionalServices: 7,
31
31
  };
32
32
 
33
- var RequirementType = {
34
- mandatory: 0,
35
- optional: 1,
36
- optionalInGroup: 2,
33
+ var RequirementType = {
34
+ mandatory: 0,
35
+ optional: 1,
36
+ optionalInGroup: 2,
37
37
  };
38
38
 
39
- var ServiceType = {
40
- package: 0,
41
- roundTrip: 1,
42
- singleTrip: 2,
43
- hotel: 3,
44
- excursion: 4,
45
- extraService: 5,
46
- insurance: 6,
47
- flight: 7,
48
- serviceFee: 8,
49
- visum: 9,
50
- charter: 10,
51
- cruise: 11,
52
- ferry: 12,
53
- transfer: 13,
54
- bus: 14,
55
- tax: 15,
56
- fee: 16,
57
- car: 17,
58
- camper: 18,
59
- specialServices: 19,
60
- train: 20,
61
- gift: 21,
62
- rental: 22,
63
- restaurant: 23,
39
+ var ServiceType = {
40
+ package: 0,
41
+ roundTrip: 1,
42
+ singleTrip: 2,
43
+ hotel: 3,
44
+ excursion: 4,
45
+ extraService: 5,
46
+ insurance: 6,
47
+ flight: 7,
48
+ serviceFee: 8,
49
+ visum: 9,
50
+ charter: 10,
51
+ cruise: 11,
52
+ ferry: 12,
53
+ transfer: 13,
54
+ bus: 14,
55
+ tax: 15,
56
+ fee: 16,
57
+ car: 17,
58
+ camper: 18,
59
+ specialServices: 19,
60
+ train: 20,
61
+ gift: 21,
62
+ rental: 22,
63
+ restaurant: 23,
64
64
  };
65
65
 
66
- /*! *****************************************************************************
67
- Copyright (c) Microsoft Corporation.
68
-
69
- Permission to use, copy, modify, and/or distribute this software for any
70
- purpose with or without fee is hereby granted.
71
-
72
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
73
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
74
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
75
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
76
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
77
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
78
- PERFORMANCE OF THIS SOFTWARE.
79
- ***************************************************************************** */
80
-
81
- function __awaiter(thisArg, _arguments, P, generator) {
82
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
83
- return new (P || (P = Promise))(function (resolve, reject) {
84
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
85
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
86
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
87
- step((generator = generator.apply(thisArg, _arguments || [])).next());
88
- });
89
- }
90
-
91
- function __generator(thisArg, body) {
92
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
93
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
94
- function verb(n) { return function (v) { return step([n, v]); }; }
95
- function step(op) {
96
- if (f) throw new TypeError("Generator is already executing.");
97
- while (_) try {
98
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
99
- if (y = 0, t) op = [op[0] & 2, t.value];
100
- switch (op[0]) {
101
- case 0: case 1: t = op; break;
102
- case 4: _.label++; return { value: op[1], done: false };
103
- case 5: _.label++; y = op[1]; op = [0]; continue;
104
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
105
- default:
106
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
107
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
108
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
109
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
110
- if (t[2]) _.ops.pop();
111
- _.trys.pop(); continue;
112
- }
113
- op = body.call(thisArg, _);
114
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
115
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
116
- }
66
+ /*! *****************************************************************************
67
+ Copyright (c) Microsoft Corporation.
68
+
69
+ Permission to use, copy, modify, and/or distribute this software for any
70
+ purpose with or without fee is hereby granted.
71
+
72
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
73
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
74
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
75
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
76
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
77
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
78
+ PERFORMANCE OF THIS SOFTWARE.
79
+ ***************************************************************************** */
80
+
81
+ function __awaiter(thisArg, _arguments, P, generator) {
82
+ function adopt(value) {
83
+ return value instanceof P
84
+ ? value
85
+ : new P(function (resolve) {
86
+ resolve(value);
87
+ });
88
+ }
89
+ return new (P || (P = Promise))(function (resolve, reject) {
90
+ function fulfilled(value) {
91
+ try {
92
+ step(generator.next(value));
93
+ } catch (e) {
94
+ reject(e);
95
+ }
96
+ }
97
+ function rejected(value) {
98
+ try {
99
+ step(generator["throw"](value));
100
+ } catch (e) {
101
+ reject(e);
102
+ }
103
+ }
104
+ function step(result) {
105
+ result.done
106
+ ? resolve(result.value)
107
+ : adopt(result.value).then(fulfilled, rejected);
108
+ }
109
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
110
+ });
117
111
  }
118
112
 
119
- var post$1 = function (url, apiKey, body, signal) { return __awaiter(void 0, void 0, void 0, function () {
120
- var response;
121
- return __generator(this, function (_a) {
122
- switch (_a.label) {
123
- case 0: return [4 /*yield*/, fetch(url, {
124
- method: "POST",
125
- headers: {
126
- "Content-Type": "application/json",
127
- "Api-Key": apiKey,
128
- },
129
- body: body,
130
- signal: signal,
131
- })];
132
- case 1:
133
- response = _a.sent();
134
- if (!response.ok) {
135
- throw new Error(response.statusText);
136
- }
137
- return [2 /*return*/, response];
138
- }
139
- });
140
- }); };
113
+ function __generator(thisArg, body) {
114
+ var _ = {
115
+ label: 0,
116
+ sent: function () {
117
+ if (t[0] & 1) throw t[1];
118
+ return t[1];
119
+ },
120
+ trys: [],
121
+ ops: [],
122
+ },
123
+ f,
124
+ y,
125
+ t,
126
+ g;
127
+ return (
128
+ (g = { next: verb(0), throw: verb(1), return: verb(2) }),
129
+ typeof Symbol === "function" &&
130
+ (g[Symbol.iterator] = function () {
131
+ return this;
132
+ }),
133
+ g
134
+ );
135
+ function verb(n) {
136
+ return function (v) {
137
+ return step([n, v]);
138
+ };
139
+ }
140
+ function step(op) {
141
+ if (f) throw new TypeError("Generator is already executing.");
142
+ while (_)
143
+ try {
144
+ if (
145
+ ((f = 1),
146
+ y &&
147
+ (t =
148
+ op[0] & 2
149
+ ? y["return"]
150
+ : op[0]
151
+ ? y["throw"] || ((t = y["return"]) && t.call(y), 0)
152
+ : y.next) &&
153
+ !(t = t.call(y, op[1])).done)
154
+ )
155
+ return t;
156
+ if (((y = 0), t)) op = [op[0] & 2, t.value];
157
+ switch (op[0]) {
158
+ case 0:
159
+ case 1:
160
+ t = op;
161
+ break;
162
+ case 4:
163
+ _.label++;
164
+ return { value: op[1], done: false };
165
+ case 5:
166
+ _.label++;
167
+ y = op[1];
168
+ op = [0];
169
+ continue;
170
+ case 7:
171
+ op = _.ops.pop();
172
+ _.trys.pop();
173
+ continue;
174
+ default:
175
+ if (
176
+ !((t = _.trys), (t = t.length > 0 && t[t.length - 1])) &&
177
+ (op[0] === 6 || op[0] === 2)
178
+ ) {
179
+ _ = 0;
180
+ continue;
181
+ }
182
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
183
+ _.label = op[1];
184
+ break;
185
+ }
186
+ if (op[0] === 6 && _.label < t[1]) {
187
+ _.label = t[1];
188
+ t = op;
189
+ break;
190
+ }
191
+ if (t && _.label < t[2]) {
192
+ _.label = t[2];
193
+ _.ops.push(op);
194
+ break;
195
+ }
196
+ if (t[2]) _.ops.pop();
197
+ _.trys.pop();
198
+ continue;
199
+ }
200
+ op = body.call(thisArg, _);
201
+ } catch (e) {
202
+ op = [6, e];
203
+ y = 0;
204
+ } finally {
205
+ f = t = 0;
206
+ }
207
+ if (op[0] & 5) throw op[1];
208
+ return { value: op[0] ? op[1] : void 0, done: true };
209
+ }
210
+ }
141
211
 
142
- var reviver = function (_, value) {
143
- if (typeof value === "string") {
144
- if (Date.parse(value)) {
145
- return new Date(value);
146
- }
147
- }
148
- return value;
149
- };
150
- var replacer = function (_, value) {
151
- if (typeof value === "string") {
152
- if (Date.parse(value)) {
153
- var date = new Date(value);
154
- if (date.toISOString() === value) {
155
- var year = date.getFullYear();
156
- var month = date.getMonth() + 1;
157
- var day = date.getDate();
158
- return year + "-" + month + "-" + day;
159
- }
160
- }
161
- }
162
- return value;
212
+ var post$1 = function (url, apiKey, body, signal) {
213
+ return __awaiter(void 0, void 0, void 0, function () {
214
+ var response;
215
+ return __generator(this, function (_a) {
216
+ switch (_a.label) {
217
+ case 0:
218
+ return [
219
+ 4 /*yield*/,
220
+ fetch(url, {
221
+ method: "POST",
222
+ headers: {
223
+ "Content-Type": "application/json",
224
+ "Api-Key": apiKey,
225
+ },
226
+ body: body,
227
+ signal: signal,
228
+ }),
229
+ ];
230
+ case 1:
231
+ response = _a.sent();
232
+ if (!response.ok) {
233
+ throw new Error(response.statusText);
234
+ }
235
+ return [2 /*return*/, response];
236
+ }
237
+ });
238
+ });
163
239
  };
164
240
 
165
- var post = function (url, apiKey, body, signal) { return __awaiter(void 0, void 0, void 0, function () {
166
- var response, responseBody, result;
167
- return __generator(this, function (_a) {
168
- switch (_a.label) {
169
- case 0: return [4 /*yield*/, post$1(url, apiKey, body, signal)];
170
- case 1:
171
- response = _a.sent();
172
- return [4 /*yield*/, response.text()];
173
- case 2:
174
- responseBody = _a.sent();
175
- result = JSON.parse(responseBody, reviver);
176
- return [2 /*return*/, result];
177
- }
178
- });
179
- }); };
241
+ var reviver = function (_, value) {
242
+ if (typeof value === "string") {
243
+ if (Date.parse(value)) {
244
+ return new Date(value);
245
+ }
246
+ }
247
+ return value;
248
+ };
249
+ var replacer = function (_, value) {
250
+ if (typeof value === "string") {
251
+ if (Date.parse(value)) {
252
+ var date = new Date(value);
253
+ if (date.toISOString() === value) {
254
+ var year = date.getFullYear();
255
+ var month = date.getMonth() + 1;
256
+ var day = date.getDate();
257
+ return year + "-" + month + "-" + day;
258
+ }
259
+ }
260
+ }
261
+ return value;
262
+ };
180
263
 
181
- var ENDPOINT$4 = "/api/web/booking";
182
- var ENDPOINT_AVAILABLE_PRODUCTS = ENDPOINT$4 + "/available-products";
183
- var ENDPOINT_PACKAGE_SEARCH = ENDPOINT$4 + "/package-search";
184
- var ENDPOINT_PACKAGE_PRICE_DETAILS = ENDPOINT$4 + "/package-price-details";
185
- var ENDPOINT_CREATE_OFFER = ENDPOINT$4 + "/offer-entry";
186
- var ENDPOINT_CREATE_ENTRY = ENDPOINT$4 + "/entry-multiroom";
187
- var ENDPOINT_CREATE_PACKAGE_OFFER = ENDPOINT$4 + "/package-offer-entry";
188
- var ENDPOINT_CREATE_PACKAGE_ENTRY = ENDPOINT$4 + "/package-entry";
189
- var ENDPOINT_GET_BASE_PRICES = ENDPOINT$4 + "/base-prices";
190
- var ENDPOINT_GET_BASE_PRICES_FROM_DATE = ENDPOINT$4 + "/base-prices-from-date";
191
- /**
192
- * api/web/booking/available-products
193
- * @param config
194
- * @param request
195
- * @returns Availabilities (options) for the specified request.
196
- */
197
- var getAvailableProducts = function (config, request, signal) {
198
- var url = "" + config.host + ENDPOINT_AVAILABLE_PRODUCTS;
199
- var apiKey = config.apiKey;
200
- var body = JSON.stringify(request);
201
- return post(url, apiKey, body, signal);
202
- };
203
- /**
204
- * api/web/booking/package-search
205
- * @param config
206
- * @param request
207
- * @returns Travel options (excursions etc) for a specified product, accommodation and regime.
208
- */
209
- var searchPackages = function (config, request, signal) {
210
- var url = "" + config.host + ENDPOINT_PACKAGE_SEARCH;
211
- var apiKey = config.apiKey;
212
- var body = JSON.stringify(request);
213
- return post(url, apiKey, body, signal);
214
- };
215
- /**
216
- * api/web/booking/package-price-details
217
- * @param config
218
- * @param request
219
- * @returns A price breakdown for a specified Package (= product and selected options).
220
- */
221
- var getPackagePriceDetails = function (config, request, signal) {
222
- var url = "" + config.host + ENDPOINT_PACKAGE_PRICE_DETAILS;
223
- var apiKey = config.apiKey;
224
- var body = JSON.stringify(request);
225
- return post(url, apiKey, body, signal);
226
- };
227
- /**
228
- * api/web/booking/offer-entry
229
- * Creates an Tide Offer, based on the request.
230
- * @param config
231
- * @param request
232
- * @returns The (full) created offer Entry.
233
- */
234
- var createOffer = function (config, request, signal) {
235
- // Update request to use full response
236
- request.useShortResponse = false;
237
- var url = "" + config.host + ENDPOINT_CREATE_OFFER;
238
- var apiKey = config.apiKey;
239
- var body = JSON.stringify(request);
240
- return post(url, apiKey, body, signal);
241
- };
242
- /**
243
- * api/web/booking/offer-entry
244
- * Creates a Tide Offer, based on the request.
245
- * @param config
246
- * @param request
247
- * @returns The (short) created offer Entry.
248
- */
249
- var createOfferWithShortResponse = function (config, request, signal) {
250
- // Update request to use short response
251
- request.useShortResponse = true;
252
- var url = "" + config.host + ENDPOINT_CREATE_OFFER;
253
- var apiKey = config.apiKey;
254
- var body = JSON.stringify(request, replacer);
255
- return post(url, apiKey, body, signal);
256
- };
257
- /**
258
- * api/web/booking/entry-multiroom
259
- * Creates a Tide Booking, based on the request.
260
- * @param config
261
- * @param request
262
- * @returns The (full) created booking Entry.
263
- */
264
- var createEntry = function (config, request, signal) {
265
- // Update request to use full response
266
- request.useShortResponse = false;
267
- var url = "" + config.host + ENDPOINT_CREATE_ENTRY;
268
- var apiKey = config.apiKey;
269
- var body = JSON.stringify(request, replacer);
270
- return post(url, apiKey, body, signal);
271
- };
272
- /**
273
- * api/web/booking/entry-multiroom
274
- * Creates a Tide Booking, based on the request.
275
- * @param config
276
- * @param request
277
- * @returns The (short) created booking Entry.
278
- */
279
- var createEntryWithShortResponse = function (config, request, signal) {
280
- // Update request to use short response
281
- request.useShortResponse = true;
282
- var url = "" + config.host + ENDPOINT_CREATE_ENTRY;
283
- var apiKey = config.apiKey;
284
- var body = JSON.stringify(request, replacer);
285
- return post(url, apiKey, body, signal);
286
- };
287
- /**
288
- * api/web/booking/package-offer-entry
289
- * Creates a Tide Offer, based on the request.
290
- * @param config
291
- * @param request
292
- * @returns The (full) created offer Entry.
293
- */
294
- var createPackageOffer = function (config, request, signal) {
295
- // Update request to use full response
296
- request.useShortResponse = false;
297
- var url = "" + config.host + ENDPOINT_CREATE_PACKAGE_OFFER;
298
- var apiKey = config.apiKey;
299
- var body = JSON.stringify(request, replacer);
300
- return post(url, apiKey, body, signal);
301
- };
302
- /**
303
- * api/web/booking/package-offer-entry
304
- * Creates a Tide Offer, based on the request.
305
- * @param config
306
- * @param request
307
- * @returns The (short) created offer Entry.
308
- */
309
- var createPackageOfferWithShortResponse = function (config, request, signal) {
310
- // Update request to use short response
311
- request.useShortResponse = true;
312
- var url = "" + config.host + ENDPOINT_CREATE_PACKAGE_OFFER;
313
- var apiKey = config.apiKey;
314
- var body = JSON.stringify(request, replacer);
315
- return post(url, apiKey, body, signal);
316
- };
317
- /**
318
- * api/web/booking/package-entry
319
- * Create a Tide Booking, based on the request.
320
- * @param config
321
- * @param request
322
- * @returns The (full) created booking Entry.
323
- */
324
- var createPackageEntry = function (config, request, signal) {
325
- // Update request to use full response
326
- request.useShortResponse = false;
327
- var url = "" + config.host + ENDPOINT_CREATE_PACKAGE_ENTRY;
328
- var apiKey = config.apiKey;
329
- var body = JSON.stringify(request, replacer);
330
- return post(url, apiKey, body, signal);
331
- };
332
- /**
333
- * api/web/booking/package-entry
334
- * Create a Tide Booking, based on the request.
335
- * @param config
336
- * @param request
337
- * @returns The (short) created booking Entry.
338
- */
339
- var createPackageEntryWithShortResponse = function (config, request, signal) {
340
- // Update request to use short response
341
- request.useShortResponse = true;
342
- var url = "" + config.host + ENDPOINT_CREATE_PACKAGE_ENTRY;
343
- var apiKey = config.apiKey;
344
- var body = JSON.stringify(request, replacer);
345
- return post(url, apiKey, body, signal);
346
- };
347
- /**
348
- * api/web/booking/base-prices
349
- * Get base prices of a specific product and accommodation in a defined period.
350
- * @param config
351
- * @param request
352
- * @returns The base prices of a specific product and accommodation during the defined period.
353
- */
354
- var getBasePrices = function (config, request, signal) {
355
- var url = "" + config.host + ENDPOINT_GET_BASE_PRICES;
356
- var apiKey = config.apiKey;
357
- var body = JSON.stringify(request, replacer);
358
- return post(url, apiKey, body, signal);
359
- };
360
- /**
361
- * api/web/booking/base-prices-from-date
362
- * Get base prices of a specific product and accommodation starting from a specific date.
363
- * @param config
364
- * @param request
365
- * @returns The base prices of a specific product and accommodationg starting from a specific date.
366
- */
367
- var getBasePricesFromDate = function (config, request, signal) {
368
- var url = "" + config.host + ENDPOINT_GET_BASE_PRICES_FROM_DATE;
369
- var apiKey = config.apiKey;
370
- var body = JSON.stringify(request, replacer);
371
- return post(url, apiKey, body, signal);
264
+ var post = function (url, apiKey, body, signal) {
265
+ return __awaiter(void 0, void 0, void 0, function () {
266
+ var response, responseBody, result;
267
+ return __generator(this, function (_a) {
268
+ switch (_a.label) {
269
+ case 0:
270
+ return [4 /*yield*/, post$1(url, apiKey, body, signal)];
271
+ case 1:
272
+ response = _a.sent();
273
+ return [4 /*yield*/, response.text()];
274
+ case 2:
275
+ responseBody = _a.sent();
276
+ result = JSON.parse(responseBody, reviver);
277
+ return [2 /*return*/, result];
278
+ }
279
+ });
280
+ });
372
281
  };
373
282
 
374
- var ENDPOINT$3 = "/api/web/booking/v2";
375
- var ENDPOINT_PACKAGE_SEARCH_LIST = ENDPOINT$3 + "/package-search-list";
376
- var ENDPOINT_SEARCH = ENDPOINT$3 + "/search";
377
- var ENDPOINT_DETAILS = ENDPOINT$3 + "/details";
378
- var ENDPOINT_PRICE_DETAILS = ENDPOINT$3 + "/price-details";
379
- var ENDPOINT_BOOK = ENDPOINT$3 + "/book";
380
- var readPackageSearchList = function (config, request, signal) {
381
- var url = "" + config.host + ENDPOINT_PACKAGE_SEARCH_LIST;
382
- var apiKey = config.apiKey;
383
- var body = JSON.stringify(request);
384
- return post(url, apiKey, body, signal);
385
- };
386
- var search = function (config, request, signal) {
387
- var url = "" + config.host + ENDPOINT_SEARCH;
388
- var apiKey = config.apiKey;
389
- var body = JSON.stringify(request);
390
- return post(url, apiKey, body, signal);
391
- };
392
- var details = function (config, request, signal) {
393
- var url = "" + config.host + ENDPOINT_DETAILS;
394
- var apiKey = config.apiKey;
395
- var body = JSON.stringify(request);
396
- return post(url, apiKey, body, signal);
397
- };
398
- var priceDetails = function (config, request, signal) {
399
- var url = "" + config.host + ENDPOINT_PRICE_DETAILS;
400
- var apiKey = config.apiKey;
401
- var body = JSON.stringify(request);
402
- return post(url, apiKey, body, signal);
403
- };
404
- var book = function (config, request, signal) {
405
- var url = "" + config.host + ENDPOINT_BOOK;
406
- var apiKey = config.apiKey;
407
- var body = JSON.stringify(request);
408
- return post(url, apiKey, body, signal);
283
+ var ENDPOINT$4 = "/api/web/booking";
284
+ var ENDPOINT_AVAILABLE_PRODUCTS = ENDPOINT$4 + "/available-products";
285
+ var ENDPOINT_PACKAGE_SEARCH = ENDPOINT$4 + "/package-search";
286
+ var ENDPOINT_PACKAGE_PRICE_DETAILS = ENDPOINT$4 + "/package-price-details";
287
+ var ENDPOINT_CREATE_OFFER = ENDPOINT$4 + "/offer-entry";
288
+ var ENDPOINT_CREATE_ENTRY = ENDPOINT$4 + "/entry-multiroom";
289
+ var ENDPOINT_CREATE_PACKAGE_OFFER = ENDPOINT$4 + "/package-offer-entry";
290
+ var ENDPOINT_CREATE_PACKAGE_ENTRY = ENDPOINT$4 + "/package-entry";
291
+ var ENDPOINT_GET_BASE_PRICES = ENDPOINT$4 + "/base-prices";
292
+ var ENDPOINT_GET_BASE_PRICES_FROM_DATE = ENDPOINT$4 + "/base-prices-from-date";
293
+ /**
294
+ * api/web/booking/available-products
295
+ * @param config
296
+ * @param request
297
+ * @returns Availabilities (options) for the specified request.
298
+ */
299
+ var getAvailableProducts = function (config, request, signal) {
300
+ var url = "" + config.host + ENDPOINT_AVAILABLE_PRODUCTS;
301
+ var apiKey = config.apiKey;
302
+ var body = JSON.stringify(request);
303
+ return post(url, apiKey, body, signal);
304
+ };
305
+ /**
306
+ * api/web/booking/package-search
307
+ * @param config
308
+ * @param request
309
+ * @returns Travel options (excursions etc) for a specified product, accommodation and regime.
310
+ */
311
+ var searchPackages = function (config, request, signal) {
312
+ var url = "" + config.host + ENDPOINT_PACKAGE_SEARCH;
313
+ var apiKey = config.apiKey;
314
+ var body = JSON.stringify(request);
315
+ return post(url, apiKey, body, signal);
316
+ };
317
+ /**
318
+ * api/web/booking/package-price-details
319
+ * @param config
320
+ * @param request
321
+ * @returns A price breakdown for a specified Package (= product and selected options).
322
+ */
323
+ var getPackagePriceDetails = function (config, request, signal) {
324
+ var url = "" + config.host + ENDPOINT_PACKAGE_PRICE_DETAILS;
325
+ var apiKey = config.apiKey;
326
+ var body = JSON.stringify(request);
327
+ return post(url, apiKey, body, signal);
328
+ };
329
+ /**
330
+ * api/web/booking/offer-entry
331
+ * Creates an Tide Offer, based on the request.
332
+ * @param config
333
+ * @param request
334
+ * @returns The (full) created offer Entry.
335
+ */
336
+ var createOffer = function (config, request, signal) {
337
+ // Update request to use full response
338
+ request.useShortResponse = false;
339
+ var url = "" + config.host + ENDPOINT_CREATE_OFFER;
340
+ var apiKey = config.apiKey;
341
+ var body = JSON.stringify(request);
342
+ return post(url, apiKey, body, signal);
343
+ };
344
+ /**
345
+ * api/web/booking/offer-entry
346
+ * Creates a Tide Offer, based on the request.
347
+ * @param config
348
+ * @param request
349
+ * @returns The (short) created offer Entry.
350
+ */
351
+ var createOfferWithShortResponse = function (config, request, signal) {
352
+ // Update request to use short response
353
+ request.useShortResponse = true;
354
+ var url = "" + config.host + ENDPOINT_CREATE_OFFER;
355
+ var apiKey = config.apiKey;
356
+ var body = JSON.stringify(request, replacer);
357
+ return post(url, apiKey, body, signal);
358
+ };
359
+ /**
360
+ * api/web/booking/entry-multiroom
361
+ * Creates a Tide Booking, based on the request.
362
+ * @param config
363
+ * @param request
364
+ * @returns The (full) created booking Entry.
365
+ */
366
+ var createEntry = function (config, request, signal) {
367
+ // Update request to use full response
368
+ request.useShortResponse = false;
369
+ var url = "" + config.host + ENDPOINT_CREATE_ENTRY;
370
+ var apiKey = config.apiKey;
371
+ var body = JSON.stringify(request, replacer);
372
+ return post(url, apiKey, body, signal);
373
+ };
374
+ /**
375
+ * api/web/booking/entry-multiroom
376
+ * Creates a Tide Booking, based on the request.
377
+ * @param config
378
+ * @param request
379
+ * @returns The (short) created booking Entry.
380
+ */
381
+ var createEntryWithShortResponse = function (config, request, signal) {
382
+ // Update request to use short response
383
+ request.useShortResponse = true;
384
+ var url = "" + config.host + ENDPOINT_CREATE_ENTRY;
385
+ var apiKey = config.apiKey;
386
+ var body = JSON.stringify(request, replacer);
387
+ return post(url, apiKey, body, signal);
388
+ };
389
+ /**
390
+ * api/web/booking/package-offer-entry
391
+ * Creates a Tide Offer, based on the request.
392
+ * @param config
393
+ * @param request
394
+ * @returns The (full) created offer Entry.
395
+ */
396
+ var createPackageOffer = function (config, request, signal) {
397
+ // Update request to use full response
398
+ request.useShortResponse = false;
399
+ var url = "" + config.host + ENDPOINT_CREATE_PACKAGE_OFFER;
400
+ var apiKey = config.apiKey;
401
+ var body = JSON.stringify(request, replacer);
402
+ return post(url, apiKey, body, signal);
403
+ };
404
+ /**
405
+ * api/web/booking/package-offer-entry
406
+ * Creates a Tide Offer, based on the request.
407
+ * @param config
408
+ * @param request
409
+ * @returns The (short) created offer Entry.
410
+ */
411
+ var createPackageOfferWithShortResponse = function (config, request, signal) {
412
+ // Update request to use short response
413
+ request.useShortResponse = true;
414
+ var url = "" + config.host + ENDPOINT_CREATE_PACKAGE_OFFER;
415
+ var apiKey = config.apiKey;
416
+ var body = JSON.stringify(request, replacer);
417
+ return post(url, apiKey, body, signal);
418
+ };
419
+ /**
420
+ * api/web/booking/package-entry
421
+ * Create a Tide Booking, based on the request.
422
+ * @param config
423
+ * @param request
424
+ * @returns The (full) created booking Entry.
425
+ */
426
+ var createPackageEntry = function (config, request, signal) {
427
+ // Update request to use full response
428
+ request.useShortResponse = false;
429
+ var url = "" + config.host + ENDPOINT_CREATE_PACKAGE_ENTRY;
430
+ var apiKey = config.apiKey;
431
+ var body = JSON.stringify(request, replacer);
432
+ return post(url, apiKey, body, signal);
433
+ };
434
+ /**
435
+ * api/web/booking/package-entry
436
+ * Create a Tide Booking, based on the request.
437
+ * @param config
438
+ * @param request
439
+ * @returns The (short) created booking Entry.
440
+ */
441
+ var createPackageEntryWithShortResponse = function (config, request, signal) {
442
+ // Update request to use short response
443
+ request.useShortResponse = true;
444
+ var url = "" + config.host + ENDPOINT_CREATE_PACKAGE_ENTRY;
445
+ var apiKey = config.apiKey;
446
+ var body = JSON.stringify(request, replacer);
447
+ return post(url, apiKey, body, signal);
448
+ };
449
+ /**
450
+ * api/web/booking/base-prices
451
+ * Get base prices of a specific product and accommodation in a defined period.
452
+ * @param config
453
+ * @param request
454
+ * @returns The base prices of a specific product and accommodation during the defined period.
455
+ */
456
+ var getBasePrices = function (config, request, signal) {
457
+ var url = "" + config.host + ENDPOINT_GET_BASE_PRICES;
458
+ var apiKey = config.apiKey;
459
+ var body = JSON.stringify(request, replacer);
460
+ return post(url, apiKey, body, signal);
461
+ };
462
+ /**
463
+ * api/web/booking/base-prices-from-date
464
+ * Get base prices of a specific product and accommodation starting from a specific date.
465
+ * @param config
466
+ * @param request
467
+ * @returns The base prices of a specific product and accommodationg starting from a specific date.
468
+ */
469
+ var getBasePricesFromDate = function (config, request, signal) {
470
+ var url = "" + config.host + ENDPOINT_GET_BASE_PRICES_FROM_DATE;
471
+ var apiKey = config.apiKey;
472
+ var body = JSON.stringify(request, replacer);
473
+ return post(url, apiKey, body, signal);
474
+ };
475
+
476
+ var ENDPOINT$3 = "/api/web/booking/v2";
477
+ var ENDPOINT_PACKAGE_SEARCH_LIST = ENDPOINT$3 + "/package-search-list";
478
+ var ENDPOINT_SEARCH = ENDPOINT$3 + "/search";
479
+ var ENDPOINT_DETAILS = ENDPOINT$3 + "/details";
480
+ var ENDPOINT_PRICE_DETAILS = ENDPOINT$3 + "/price-details";
481
+ var ENDPOINT_BOOK = ENDPOINT$3 + "/book";
482
+ var readPackageSearchList = function (config, request, signal) {
483
+ var url = "" + config.host + ENDPOINT_PACKAGE_SEARCH_LIST;
484
+ var apiKey = config.apiKey;
485
+ var body = JSON.stringify(request);
486
+ return post(url, apiKey, body, signal);
487
+ };
488
+ var search = function (config, request, signal) {
489
+ var url = "" + config.host + ENDPOINT_SEARCH;
490
+ var apiKey = config.apiKey;
491
+ var body = JSON.stringify(request);
492
+ return post(url, apiKey, body, signal);
493
+ };
494
+ var details = function (config, request, signal) {
495
+ var url = "" + config.host + ENDPOINT_DETAILS;
496
+ var apiKey = config.apiKey;
497
+ var body = JSON.stringify(request);
498
+ return post(url, apiKey, body, signal);
499
+ };
500
+ var priceDetails = function (config, request, signal) {
501
+ var url = "" + config.host + ENDPOINT_PRICE_DETAILS;
502
+ var apiKey = config.apiKey;
503
+ var body = JSON.stringify(request);
504
+ return post(url, apiKey, body, signal);
505
+ };
506
+ var book = function (config, request, signal) {
507
+ var url = "" + config.host + ENDPOINT_BOOK;
508
+ var apiKey = config.apiKey;
509
+ var body = JSON.stringify(request);
510
+ return post(url, apiKey, body, signal);
409
511
  };
410
512
 
411
- var ENDPOINT$2 = "/api/mollie";
412
- var ENDPOINT_CREATE_PAYMENTS = ENDPOINT$2 + "/create-payment";
413
- /**
414
- * api/mollie/create-payment
415
- * @param request
416
- * @returns mollie payment url
417
- */
418
- var getMolliePayment = function (config, request, signal) {
419
- var url = "" + config.host + ENDPOINT_CREATE_PAYMENTS;
420
- var apiKey = config.apiKey;
421
- var body = JSON.stringify(request);
422
- return post(url, apiKey, body, signal);
513
+ var ENDPOINT$2 = "/api/mollie";
514
+ var ENDPOINT_CREATE_PAYMENTS = ENDPOINT$2 + "/create-payment";
515
+ /**
516
+ * api/mollie/create-payment
517
+ * @param request
518
+ * @returns mollie payment url
519
+ */
520
+ var getMolliePayment = function (config, request, signal) {
521
+ var url = "" + config.host + ENDPOINT_CREATE_PAYMENTS;
522
+ var apiKey = config.apiKey;
523
+ var body = JSON.stringify(request);
524
+ return post(url, apiKey, body, signal);
423
525
  };
424
526
 
425
- var ENDPOINT$1 = "/api/web";
426
- var ENDPOINT_CREATE_CRM_CONTACT = ENDPOINT$1 + "/crmcontact";
427
- /**
428
- * api/web/crmcontact
429
- * Creates a CRM contact.
430
- * @param config
431
- * @param request
432
- * @param signal
433
- * @returns OK if succeeded.
434
- */
435
- var createCrmContact = function (config, request, signal) {
436
- var url = "" + config.host + ENDPOINT_CREATE_CRM_CONTACT;
437
- var apiKey = config.apiKey;
438
- var body = JSON.stringify(request);
439
- return post$1(url, apiKey, body, signal);
527
+ var ENDPOINT$1 = "/api/web";
528
+ var ENDPOINT_CREATE_CRM_CONTACT = ENDPOINT$1 + "/crmcontact";
529
+ /**
530
+ * api/web/crmcontact
531
+ * Creates a CRM contact.
532
+ * @param config
533
+ * @param request
534
+ * @param signal
535
+ * @returns OK if succeeded.
536
+ */
537
+ var createCrmContact = function (config, request, signal) {
538
+ var url = "" + config.host + ENDPOINT_CREATE_CRM_CONTACT;
539
+ var apiKey = config.apiKey;
540
+ var body = JSON.stringify(request);
541
+ return post$1(url, apiKey, body, signal);
440
542
  };
441
543
 
442
- var ENDPOINT = "/api/web/contact";
443
- var ENDPOINT_CONTACT_FORM = ENDPOINT + "/contact-form";
444
- var ENDPOINT_CONTACT_HAS_TAG = ENDPOINT + "/has-tag";
445
- /**
446
- * api/web/contact/contact-form
447
- * Processes a contact form.
448
- * @param config
449
- * @param request
450
- * @param signal
451
- * @returns OK if succeeded.
452
- */
453
- var contactForm = function (config, request, signal) {
454
- var url = "" + config.host + ENDPOINT_CONTACT_FORM;
455
- var apiKey = config.apiKey;
456
- var body = JSON.stringify(request);
457
- return post$1(url, apiKey, body, signal);
458
- };
459
- var contactHasTag = function (config, request, signal) {
460
- var url = "" + config.host + ENDPOINT_CONTACT_HAS_TAG;
461
- var apiKey = config.apiKey;
462
- var body = JSON.stringify(request);
463
- return post$1(url, apiKey, body, signal);
544
+ var ENDPOINT = "/api/web/contact";
545
+ var ENDPOINT_CONTACT_FORM = ENDPOINT + "/contact-form";
546
+ var ENDPOINT_CONTACT_HAS_TAG = ENDPOINT + "/has-tag";
547
+ /**
548
+ * api/web/contact/contact-form
549
+ * Processes a contact form.
550
+ * @param config
551
+ * @param request
552
+ * @param signal
553
+ * @returns OK if succeeded.
554
+ */
555
+ var contactForm = function (config, request, signal) {
556
+ var url = "" + config.host + ENDPOINT_CONTACT_FORM;
557
+ var apiKey = config.apiKey;
558
+ var body = JSON.stringify(request);
559
+ return post$1(url, apiKey, body, signal);
560
+ };
561
+ var contactHasTag = function (config, request, signal) {
562
+ var url = "" + config.host + ENDPOINT_CONTACT_HAS_TAG;
563
+ var apiKey = config.apiKey;
564
+ var body = JSON.stringify(request);
565
+ return post$1(url, apiKey, body, signal);
464
566
  };
465
567
 
466
568
  exports.AllotmentType = AllotmentType;
@@ -478,9 +580,11 @@ exports.createEntryWithShortResponse = createEntryWithShortResponse;
478
580
  exports.createOffer = createOffer;
479
581
  exports.createOfferWithShortResponse = createOfferWithShortResponse;
480
582
  exports.createPackageEntry = createPackageEntry;
481
- exports.createPackageEntryWithShortResponse = createPackageEntryWithShortResponse;
583
+ exports.createPackageEntryWithShortResponse =
584
+ createPackageEntryWithShortResponse;
482
585
  exports.createPackageOffer = createPackageOffer;
483
- exports.createPackageOfferWithShortResponse = createPackageOfferWithShortResponse;
586
+ exports.createPackageOfferWithShortResponse =
587
+ createPackageOfferWithShortResponse;
484
588
  exports.details = details;
485
589
  exports.getAvailableProducts = getAvailableProducts;
486
590
  exports.getBasePrices = getBasePrices;