@qite/tide-client 1.0.10 → 1.0.14

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 (136) hide show
  1. package/build/index.d.ts +10 -43
  2. package/build/index.js +412 -489
  3. package/build/index.js.map +1 -1
  4. package/build/types/aapi/accommodation-occupancy.d.ts +9 -9
  5. package/build/types/aapi/accommodation-with-available-places.d.ts +14 -14
  6. package/build/types/aapi/accommodation.d.ts +7 -7
  7. package/build/types/aapi/additional-services.d.ts +6 -6
  8. package/build/types/aapi/alternative-flight-data.d.ts +10 -10
  9. package/build/types/aapi/alternative-flight-leg.d.ts +18 -18
  10. package/build/types/aapi/alternative-flight.d.ts +12 -12
  11. package/build/types/aapi/availability-request.d.ts +12 -12
  12. package/build/types/aapi/availability.d.ts +5 -5
  13. package/build/types/aapi/available-products-request.d.ts +32 -32
  14. package/build/types/aapi/duration.d.ts +4 -4
  15. package/build/types/aapi/flight-leg.d.ts +18 -18
  16. package/build/types/aapi/flight.d.ts +23 -23
  17. package/build/types/aapi/hotel.d.ts +35 -35
  18. package/build/types/aapi/index.d.ts +22 -20
  19. package/build/types/aapi/mollie-payment-request.d.ts +6 -0
  20. package/build/types/aapi/mollie-payment.d.ts +3 -0
  21. package/build/types/aapi/option-pax.d.ts +4 -4
  22. package/build/types/aapi/option.d.ts +21 -28
  23. package/build/types/aapi/pax.d.ts +4 -4
  24. package/build/types/aapi/price-detail.d.ts +8 -8
  25. package/build/types/aapi/regime.d.ts +5 -5
  26. package/build/types/aapi/traveler-grouping.d.ts +5 -5
  27. package/build/types/enums/allotment-type.d.ts +5 -5
  28. package/build/types/enums/availability-search-type.d.ts +4 -4
  29. package/build/types/enums/dossier-type.d.ts +6 -6
  30. package/build/types/enums/entry-line-flag.d.ts +6 -6
  31. package/build/types/enums/entry-line-status.d.ts +19 -19
  32. package/build/types/enums/entry-status.d.ts +8 -8
  33. package/build/types/enums/export-status.d.ts +5 -5
  34. package/build/types/enums/gender.d.ts +5 -5
  35. package/build/types/enums/index.d.ts +15 -15
  36. package/build/types/enums/meta-data-type.d.ts +10 -10
  37. package/build/types/enums/online-payment-type.d.ts +3 -0
  38. package/build/types/enums/payment-type.d.ts +6 -6
  39. package/build/types/enums/price-chart-type.d.ts +4 -4
  40. package/build/types/enums/requirement-type.d.ts +5 -5
  41. package/build/types/enums/room-type.d.ts +8 -8
  42. package/build/types/enums/sale-type.d.ts +4 -4
  43. package/build/types/enums/service-type.d.ts +26 -26
  44. package/build/types/index.d.ts +4 -24
  45. package/build/types/offer/additional-services.d.ts +6 -6
  46. package/build/types/offer/address.d.ts +11 -11
  47. package/build/types/offer/alternative-flight-data.d.ts +10 -10
  48. package/build/types/offer/alternative-flight-leg.d.ts +18 -18
  49. package/build/types/offer/alternative-flight.d.ts +14 -14
  50. package/build/types/offer/available-package-accommodation.d.ts +7 -0
  51. package/build/types/offer/available-package-flight.d.ts +9 -0
  52. package/build/types/offer/available-package-option.d.ts +12 -0
  53. package/build/types/offer/available-package-pax-price.d.ts +6 -0
  54. package/build/types/offer/available-package-regime.d.ts +4 -0
  55. package/build/types/offer/available-package.d.ts +7 -0
  56. package/build/types/offer/base-price.d.ts +6 -6
  57. package/build/types/offer/base-prices-from-date-request.d.ts +12 -12
  58. package/build/types/offer/base-prices-request.d.ts +12 -12
  59. package/build/types/offer/book-request.d.ts +36 -36
  60. package/build/types/offer/booking-response.d.ts +4 -4
  61. package/build/types/offer/cached-package-search-result.d.ts +5 -5
  62. package/build/types/offer/confirmed-dossier-check.d.ts +6 -6
  63. package/build/types/offer/crm-contact-request.d.ts +28 -36
  64. package/build/types/offer/customer-request.d.ts +5 -5
  65. package/build/types/offer/dossier-default-product.d.ts +14 -14
  66. package/build/types/offer/entry-check-response.d.ts +8 -8
  67. package/build/types/offer/entry-line-meta-data.d.ts +5 -5
  68. package/build/types/offer/entry-line-pax.d.ts +8 -8
  69. package/build/types/offer/entry-line.d.ts +67 -73
  70. package/build/types/offer/entry-price-line.d.ts +40 -40
  71. package/build/types/offer/entry-room2.d.ts +5 -5
  72. package/build/types/offer/entry.d.ts +49 -59
  73. package/build/types/offer/flight-meta-data-line.d.ts +16 -0
  74. package/build/types/offer/flight-meta-data.d.ts +10 -0
  75. package/build/types/offer/flight-pool.d.ts +5 -5
  76. package/build/types/offer/index.d.ts +64 -56
  77. package/build/types/offer/language.d.ts +5 -5
  78. package/build/types/offer/multiroom-book-request.d.ts +10 -10
  79. package/build/types/offer/note.d.ts +16 -16
  80. package/build/types/offer/other-product.d.ts +13 -13
  81. package/build/types/offer/package-book-request-room.d.ts +5 -5
  82. package/build/types/offer/package-book-request.d.ts +12 -12
  83. package/build/types/offer/package-flight.d.ts +13 -13
  84. package/build/types/offer/package-flights.d.ts +5 -5
  85. package/build/types/offer/package-option.d.ts +22 -22
  86. package/build/types/offer/package-price-details-request-room.d.ts +4 -4
  87. package/build/types/offer/package-price-details-request.d.ts +8 -8
  88. package/build/types/offer/package-room-option.d.ts +10 -10
  89. package/build/types/offer/package-room.d.ts +7 -7
  90. package/build/types/offer/package-search-destination.d.ts +9 -9
  91. package/build/types/offer/package-search-request-date.d.ts +4 -4
  92. package/build/types/offer/package-search-request-room.d.ts +5 -5
  93. package/build/types/offer/package-search-request.d.ts +18 -22
  94. package/build/types/offer/package-search-result.d.ts +12 -12
  95. package/build/types/offer/package-sub-option.d.ts +6 -6
  96. package/build/types/offer/pax.d.ts +29 -29
  97. package/build/types/offer/payment.d.ts +20 -20
  98. package/build/types/offer/person-country-preference.d.ts +7 -7
  99. package/build/types/offer/person-location-preference.d.ts +7 -7
  100. package/build/types/offer/person-oord-preference.d.ts +7 -7
  101. package/build/types/offer/person-period-date-range-preference.d.ts +6 -6
  102. package/build/types/offer/person-period-preference.d.ts +7 -7
  103. package/build/types/offer/person-region-preference.d.ts +7 -7
  104. package/build/types/offer/person-tour-group-preference.d.ts +7 -7
  105. package/build/types/offer/price-detail.d.ts +18 -18
  106. package/build/types/offer/price-per-pax.d.ts +6 -6
  107. package/build/types/offer/product-notification-result.d.ts +9 -9
  108. package/build/types/offer/web-contact-form-request.d.ts +13 -13
  109. package/build/types/offer/web-contact-has-tag-request.d.ts +4 -4
  110. package/build/types/tide-client-config.d.ts +4 -4
  111. package/build/utils/api.d.ts +1 -6
  112. package/build/utils/booking-client.d.ts +102 -169
  113. package/build/utils/booking-v2-client.d.ts +3 -0
  114. package/build/utils/common-client.d.ts +1 -6
  115. package/build/utils/json.d.ts +2 -2
  116. package/build/utils/mollie-client.d.ts +7 -0
  117. package/build/utils/web-client.d.ts +10 -14
  118. package/build/utils/web-contact-client.d.ts +11 -23
  119. package/package.json +1 -1
  120. package/src/index.ts +10 -0
  121. package/src/types/aapi/index.ts +2 -0
  122. package/src/types/aapi/mollie-payment-request.ts +6 -0
  123. package/src/types/aapi/mollie-payment.ts +3 -0
  124. package/src/types/index.ts +2 -0
  125. package/src/types/offer/available-package-accommodation.ts +8 -0
  126. package/src/types/offer/available-package-flight.ts +10 -0
  127. package/src/types/offer/available-package-option.ts +18 -0
  128. package/src/types/offer/available-package-pax-price.ts +6 -0
  129. package/src/types/offer/available-package-regime.ts +4 -0
  130. package/src/types/offer/available-package.ts +8 -0
  131. package/src/types/offer/flight-meta-data-line.ts +16 -0
  132. package/src/types/offer/flight-meta-data.ts +11 -0
  133. package/src/types/offer/index.ts +8 -0
  134. package/src/utils/booking-v2-client.ts +19 -0
  135. package/src/utils/json.ts +6 -5
  136. package/src/utils/mollie-client.ts +27 -0
package/build/index.js CHANGED
@@ -1,515 +1,438 @@
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) {
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
- });
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
+ }
111
117
  }
112
118
 
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
- }
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
+ }); };
211
141
 
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
- });
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;
239
163
  };
240
164
 
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
- var year = date.getFullYear();
254
- var month = date.getMonth() + 1;
255
- var day = date.getDate();
256
- return year + "-" + month + "-" + day;
257
- }
258
- }
259
- return value;
260
- };
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
+ }); };
261
180
 
262
- var post = function (url, apiKey, body, signal) {
263
- return __awaiter(void 0, void 0, void 0, function () {
264
- var response, responseBody, result;
265
- return __generator(this, function (_a) {
266
- switch (_a.label) {
267
- case 0:
268
- return [4 /*yield*/, post$1(url, apiKey, body, signal)];
269
- case 1:
270
- response = _a.sent();
271
- return [4 /*yield*/, response.text()];
272
- case 2:
273
- responseBody = _a.sent();
274
- result = JSON.parse(responseBody, reviver);
275
- return [2 /*return*/, result];
276
- }
277
- });
278
- });
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);
279
372
  };
280
373
 
281
- var ENDPOINT$2 = "/api/web/booking";
282
- var ENDPOINT_AVAILABLE_PRODUCTS = ENDPOINT$2 + "/available-products";
283
- var ENDPOINT_PACKAGE_SEARCH = ENDPOINT$2 + "/package-search";
284
- var ENDPOINT_PACKAGE_PRICE_DETAILS = ENDPOINT$2 + "/package-price-details";
285
- var ENDPOINT_CREATE_OFFER = ENDPOINT$2 + "/offer-entry";
286
- var ENDPOINT_CREATE_ENTRY = ENDPOINT$2 + "/entry-multiroom";
287
- var ENDPOINT_CREATE_PACKAGE_OFFER = ENDPOINT$2 + "/package-offer-entry";
288
- var ENDPOINT_CREATE_PACKAGE_ENTRY = ENDPOINT$2 + "/package-entry";
289
- var ENDPOINT_GET_BASE_PRICES = ENDPOINT$2 + "/base-prices";
290
- var ENDPOINT_GET_BASE_PRICES_FROM_DATE = ENDPOINT$2 + "/base-prices-from-date";
291
- /**
292
- * api/web/booking/available-products
293
- * @param config
294
- * @param request
295
- * @returns Availabilities (options) for the specified request.
296
- */
297
- var getAvailableProducts = function (config, request, signal) {
298
- var url = "" + config.host + ENDPOINT_AVAILABLE_PRODUCTS;
299
- var apiKey = config.apiKey;
300
- var body = JSON.stringify(request);
301
- return post(url, apiKey, body, signal);
302
- };
303
- /**
304
- * api/web/booking/package-search
305
- * @param config
306
- * @param request
307
- * @returns Travel options (excursions etc) for a specified product, accommodation and regime.
308
- */
309
- var searchPackages = function (config, request, signal) {
310
- var url = "" + config.host + ENDPOINT_PACKAGE_SEARCH;
311
- var apiKey = config.apiKey;
312
- var body = JSON.stringify(request);
313
- return post(url, apiKey, body, signal);
314
- };
315
- /**
316
- * api/web/booking/package-price-details
317
- * @param config
318
- * @param request
319
- * @returns A price breakdown for a specified Package (= product and selected options).
320
- */
321
- var getPackagePriceDetails = function (config, request, signal) {
322
- var url = "" + config.host + ENDPOINT_PACKAGE_PRICE_DETAILS;
323
- var apiKey = config.apiKey;
324
- var body = JSON.stringify(request);
325
- return post(url, apiKey, body, signal);
326
- };
327
- /**
328
- * api/web/booking/offer-entry
329
- * Creates an Tide Offer, based on the request.
330
- * @param config
331
- * @param request
332
- * @returns The (full) created offer Entry.
333
- */
334
- var createOffer = function (config, request, signal) {
335
- // Update request to use full response
336
- request.useShortResponse = false;
337
- var url = "" + config.host + ENDPOINT_CREATE_OFFER;
338
- var apiKey = config.apiKey;
339
- var body = JSON.stringify(request);
340
- return post(url, apiKey, body, signal);
341
- };
342
- /**
343
- * api/web/booking/offer-entry
344
- * Creates a Tide Offer, based on the request.
345
- * @param config
346
- * @param request
347
- * @returns The (short) created offer Entry.
348
- */
349
- var createOfferWithShortResponse = function (config, request, signal) {
350
- // Update request to use short response
351
- request.useShortResponse = true;
352
- var url = "" + config.host + ENDPOINT_CREATE_OFFER;
353
- var apiKey = config.apiKey;
354
- var body = JSON.stringify(request, replacer);
355
- return post(url, apiKey, body, signal);
356
- };
357
- /**
358
- * api/web/booking/entry-multiroom
359
- * Creates a Tide Booking, based on the request.
360
- * @param config
361
- * @param request
362
- * @returns The (full) created booking Entry.
363
- */
364
- var createEntry = function (config, request, signal) {
365
- // Update request to use full response
366
- request.useShortResponse = false;
367
- var url = "" + config.host + ENDPOINT_CREATE_ENTRY;
368
- var apiKey = config.apiKey;
369
- var body = JSON.stringify(request, replacer);
370
- return post(url, apiKey, body, signal);
371
- };
372
- /**
373
- * api/web/booking/entry-multiroom
374
- * Creates a Tide Booking, based on the request.
375
- * @param config
376
- * @param request
377
- * @returns The (short) created booking Entry.
378
- */
379
- var createEntryWithShortResponse = function (config, request, signal) {
380
- // Update request to use short response
381
- request.useShortResponse = true;
382
- var url = "" + config.host + ENDPOINT_CREATE_ENTRY;
383
- var apiKey = config.apiKey;
384
- var body = JSON.stringify(request, replacer);
385
- return post(url, apiKey, body, signal);
386
- };
387
- /**
388
- * api/web/booking/package-offer-entry
389
- * Creates a Tide Offer, based on the request.
390
- * @param config
391
- * @param request
392
- * @returns The (full) created offer Entry.
393
- */
394
- var createPackageOffer = function (config, request, signal) {
395
- // Update request to use full response
396
- request.useShortResponse = false;
397
- var url = "" + config.host + ENDPOINT_CREATE_PACKAGE_OFFER;
398
- var apiKey = config.apiKey;
399
- var body = JSON.stringify(request, replacer);
400
- return post(url, apiKey, body, signal);
401
- };
402
- /**
403
- * api/web/booking/package-offer-entry
404
- * Creates a Tide Offer, based on the request.
405
- * @param config
406
- * @param request
407
- * @returns The (short) created offer Entry.
408
- */
409
- var createPackageOfferWithShortResponse = function (config, request, signal) {
410
- // Update request to use short response
411
- request.useShortResponse = true;
412
- var url = "" + config.host + ENDPOINT_CREATE_PACKAGE_OFFER;
413
- var apiKey = config.apiKey;
414
- var body = JSON.stringify(request, replacer);
415
- return post(url, apiKey, body, signal);
416
- };
417
- /**
418
- * api/web/booking/package-entry
419
- * Create a Tide Booking, based on the request.
420
- * @param config
421
- * @param request
422
- * @returns The (full) created booking Entry.
423
- */
424
- var createPackageEntry = function (config, request, signal) {
425
- // Update request to use full response
426
- request.useShortResponse = false;
427
- var url = "" + config.host + ENDPOINT_CREATE_PACKAGE_ENTRY;
428
- var apiKey = config.apiKey;
429
- var body = JSON.stringify(request, replacer);
430
- return post(url, apiKey, body, signal);
431
- };
432
- /**
433
- * api/web/booking/package-entry
434
- * Create a Tide Booking, based on the request.
435
- * @param config
436
- * @param request
437
- * @returns The (short) created booking Entry.
438
- */
439
- var createPackageEntryWithShortResponse = function (config, request, signal) {
440
- // Update request to use short response
441
- request.useShortResponse = true;
442
- var url = "" + config.host + ENDPOINT_CREATE_PACKAGE_ENTRY;
443
- var apiKey = config.apiKey;
444
- var body = JSON.stringify(request, replacer);
445
- return post(url, apiKey, body, signal);
446
- };
447
- /**
448
- * api/web/booking/base-prices
449
- * Get base prices of a specific product and accommodation in a defined period.
450
- * @param config
451
- * @param request
452
- * @returns The base prices of a specific product and accommodation during the defined period.
453
- */
454
- var getBasePrices = function (config, request, signal) {
455
- var url = "" + config.host + ENDPOINT_GET_BASE_PRICES;
456
- var apiKey = config.apiKey;
457
- var body = JSON.stringify(request, replacer);
458
- return post(url, apiKey, body, signal);
459
- };
460
- /**
461
- * api/web/booking/base-prices-from-date
462
- * Get base prices of a specific product and accommodation starting from a specific date.
463
- * @param config
464
- * @param request
465
- * @returns The base prices of a specific product and accommodationg starting from a specific date.
466
- */
467
- var getBasePricesFromDate = function (config, request, signal) {
468
- var url = "" + config.host + ENDPOINT_GET_BASE_PRICES_FROM_DATE;
469
- var apiKey = config.apiKey;
470
- var body = JSON.stringify(request, replacer);
471
- return post(url, apiKey, body, signal);
374
+ var ENDPOINT$3 = "/api/web/booking/v2";
375
+ var ENDPOINT_PACKAGE_SEARCH_LIST = ENDPOINT$3 + "/package-search-list";
376
+ var readPackageSearchList = function (config, request, signal) {
377
+ var url = "" + config.host + ENDPOINT_PACKAGE_SEARCH_LIST;
378
+ var apiKey = config.apiKey;
379
+ var body = JSON.stringify(request);
380
+ return post(url, apiKey, body, signal);
472
381
  };
473
382
 
474
- var ENDPOINT$1 = "/api/web";
475
- var ENDPOINT_CREATE_CRM_CONTACT = ENDPOINT$1 + "/crmcontact";
476
- /**
477
- * api/web/crmcontact
478
- * Creates a CRM contact.
479
- * @param config
480
- * @param request
481
- * @param signal
482
- * @returns OK if succeeded.
483
- */
484
- var createCrmContact = function (config, request, signal) {
485
- var url = "" + config.host + ENDPOINT_CREATE_CRM_CONTACT;
486
- var apiKey = config.apiKey;
487
- var body = JSON.stringify(request);
488
- return post$1(url, apiKey, body, signal);
383
+ var ENDPOINT$2 = "/api/mollie";
384
+ var ENDPOINT_CREATE_PAYMENTS = ENDPOINT$2 + "/create-payment";
385
+ /**
386
+ * api/mollie/create-payment
387
+ * @param request
388
+ * @returns mollie payment url
389
+ */
390
+ var getMolliePayment = function (config, request, signal) {
391
+ var url = "" + config.host + ENDPOINT_CREATE_PAYMENTS;
392
+ var apiKey = config.apiKey;
393
+ var body = JSON.stringify(request);
394
+ return post(url, apiKey, body, signal);
489
395
  };
490
396
 
491
- var ENDPOINT = "/api/web/contact";
492
- var ENDPOINT_CONTACT_FORM = ENDPOINT + "/contact-form";
493
- var ENDPOINT_CONTACT_HAS_TAG = ENDPOINT + "/has-tag";
494
- /**
495
- * api/web/contact/contact-form
496
- * Processes a contact form.
497
- * @param config
498
- * @param request
499
- * @param signal
500
- * @returns OK if succeeded.
501
- */
502
- var contactForm = function (config, request, signal) {
503
- var url = "" + config.host + ENDPOINT_CONTACT_FORM;
504
- var apiKey = config.apiKey;
505
- var body = JSON.stringify(request);
506
- return post$1(url, apiKey, body, signal);
397
+ var ENDPOINT$1 = "/api/web";
398
+ var ENDPOINT_CREATE_CRM_CONTACT = ENDPOINT$1 + "/crmcontact";
399
+ /**
400
+ * api/web/crmcontact
401
+ * Creates a CRM contact.
402
+ * @param config
403
+ * @param request
404
+ * @param signal
405
+ * @returns OK if succeeded.
406
+ */
407
+ var createCrmContact = function (config, request, signal) {
408
+ var url = "" + config.host + ENDPOINT_CREATE_CRM_CONTACT;
409
+ var apiKey = config.apiKey;
410
+ var body = JSON.stringify(request);
411
+ return post$1(url, apiKey, body, signal);
507
412
  };
508
- var contactHasTag = function (config, request, signal) {
509
- var url = "" + config.host + ENDPOINT_CONTACT_HAS_TAG;
510
- var apiKey = config.apiKey;
511
- var body = JSON.stringify(request);
512
- return post$1(url, apiKey, body, signal);
413
+
414
+ var ENDPOINT = "/api/web/contact";
415
+ var ENDPOINT_CONTACT_FORM = ENDPOINT + "/contact-form";
416
+ var ENDPOINT_CONTACT_HAS_TAG = ENDPOINT + "/has-tag";
417
+ /**
418
+ * api/web/contact/contact-form
419
+ * Processes a contact form.
420
+ * @param config
421
+ * @param request
422
+ * @param signal
423
+ * @returns OK if succeeded.
424
+ */
425
+ var contactForm = function (config, request, signal) {
426
+ var url = "" + config.host + ENDPOINT_CONTACT_FORM;
427
+ var apiKey = config.apiKey;
428
+ var body = JSON.stringify(request);
429
+ return post$1(url, apiKey, body, signal);
430
+ };
431
+ var contactHasTag = function (config, request, signal) {
432
+ var url = "" + config.host + ENDPOINT_CONTACT_HAS_TAG;
433
+ var apiKey = config.apiKey;
434
+ var body = JSON.stringify(request);
435
+ return post$1(url, apiKey, body, signal);
513
436
  };
514
437
 
515
438
  exports.AllotmentType = AllotmentType;
@@ -526,14 +449,14 @@ exports.createEntryWithShortResponse = createEntryWithShortResponse;
526
449
  exports.createOffer = createOffer;
527
450
  exports.createOfferWithShortResponse = createOfferWithShortResponse;
528
451
  exports.createPackageEntry = createPackageEntry;
529
- exports.createPackageEntryWithShortResponse =
530
- createPackageEntryWithShortResponse;
452
+ exports.createPackageEntryWithShortResponse = createPackageEntryWithShortResponse;
531
453
  exports.createPackageOffer = createPackageOffer;
532
- exports.createPackageOfferWithShortResponse =
533
- createPackageOfferWithShortResponse;
454
+ exports.createPackageOfferWithShortResponse = createPackageOfferWithShortResponse;
534
455
  exports.getAvailableProducts = getAvailableProducts;
535
456
  exports.getBasePrices = getBasePrices;
536
457
  exports.getBasePricesFromDate = getBasePricesFromDate;
458
+ exports.getMolliePayment = getMolliePayment;
537
459
  exports.getPackagePriceDetails = getPackagePriceDetails;
460
+ exports.readPackageSearchList = readPackageSearchList;
538
461
  exports.searchPackages = searchPackages;
539
462
  //# sourceMappingURL=index.js.map