@qite/tide-client 1.0.12 → 1.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.d.ts +10 -46
- package/build/index.js +442 -504
- package/build/index.js.map +1 -1
- package/build/types/aapi/accommodation-occupancy.d.ts +9 -9
- package/build/types/aapi/accommodation-with-available-places.d.ts +14 -14
- package/build/types/aapi/accommodation.d.ts +7 -7
- package/build/types/aapi/additional-services.d.ts +6 -6
- package/build/types/aapi/alternative-flight-data.d.ts +10 -10
- package/build/types/aapi/alternative-flight-leg.d.ts +18 -18
- package/build/types/aapi/alternative-flight.d.ts +12 -12
- package/build/types/aapi/availability-request.d.ts +12 -12
- package/build/types/aapi/availability.d.ts +5 -5
- package/build/types/aapi/available-products-request.d.ts +32 -32
- package/build/types/aapi/duration.d.ts +4 -4
- package/build/types/aapi/flight-leg.d.ts +18 -18
- package/build/types/aapi/flight.d.ts +23 -23
- package/build/types/aapi/hotel.d.ts +35 -35
- package/build/types/aapi/index.d.ts +22 -22
- package/build/types/aapi/mollie-payment-request.d.ts +6 -6
- package/build/types/aapi/mollie-payment.d.ts +3 -3
- package/build/types/aapi/option-pax.d.ts +4 -4
- package/build/types/aapi/option.d.ts +21 -28
- package/build/types/aapi/pax.d.ts +4 -4
- package/build/types/aapi/price-detail.d.ts +8 -8
- package/build/types/aapi/regime.d.ts +5 -5
- package/build/types/aapi/traveler-grouping.d.ts +5 -5
- package/build/types/enums/allotment-type.d.ts +5 -5
- package/build/types/enums/availability-search-type.d.ts +4 -4
- package/build/types/enums/dossier-type.d.ts +6 -6
- package/build/types/enums/entry-line-flag.d.ts +6 -6
- package/build/types/enums/entry-line-status.d.ts +19 -19
- package/build/types/enums/entry-status.d.ts +8 -8
- package/build/types/enums/export-status.d.ts +5 -5
- package/build/types/enums/gender.d.ts +5 -5
- package/build/types/enums/index.d.ts +15 -15
- package/build/types/enums/meta-data-type.d.ts +10 -10
- package/build/types/enums/payment-type.d.ts +6 -6
- package/build/types/enums/price-chart-type.d.ts +4 -4
- package/build/types/enums/requirement-type.d.ts +5 -5
- package/build/types/enums/room-type.d.ts +8 -8
- package/build/types/enums/sale-type.d.ts +4 -4
- package/build/types/enums/service-type.d.ts +26 -26
- package/build/types/index.d.ts +4 -26
- package/build/types/offer/additional-services.d.ts +6 -6
- package/build/types/offer/address.d.ts +11 -11
- package/build/types/offer/alternative-flight-data.d.ts +10 -10
- package/build/types/offer/alternative-flight-leg.d.ts +18 -18
- package/build/types/offer/alternative-flight.d.ts +14 -14
- package/build/types/offer/available-package-accommodation.d.ts +7 -0
- package/build/types/offer/available-package-flight.d.ts +9 -0
- package/build/types/offer/available-package-option.d.ts +12 -0
- package/build/types/offer/available-package-pax-price.d.ts +6 -0
- package/build/types/offer/available-package-regime.d.ts +4 -0
- package/build/types/offer/available-package.d.ts +7 -0
- package/build/types/offer/base-price.d.ts +6 -6
- package/build/types/offer/base-prices-from-date-request.d.ts +12 -12
- package/build/types/offer/base-prices-request.d.ts +12 -12
- package/build/types/offer/book-request.d.ts +36 -36
- package/build/types/offer/booking-response.d.ts +4 -4
- package/build/types/offer/booking-v2/index.d.ts +3 -0
- package/build/types/offer/booking-v2/request/booking-package-address.d.ts +13 -0
- package/build/types/offer/booking-v2/request/booking-package-book-request.d.ts +12 -0
- package/build/types/offer/booking-v2/request/booking-package-details-request.d.ts +11 -0
- package/build/types/offer/booking-v2/request/booking-package-request.d.ts +6 -0
- package/build/types/offer/booking-v2/request/booking-package-search-request.d.ts +19 -0
- package/build/types/offer/booking-v2/request/index.d.ts +5 -0
- package/build/types/offer/booking-v2/response/booking-package-allotment-info.d.ts +13 -0
- package/build/types/offer/booking-v2/response/booking-package-dossier.d.ts +5 -0
- package/build/types/offer/booking-v2/response/booking-package-item.d.ts +11 -0
- package/build/types/offer/booking-v2/response/booking-price-detail.d.ts +13 -0
- package/build/types/offer/booking-v2/response/booking-price-details.d.ts +6 -0
- package/build/types/offer/booking-v2/response/booking-price-per-pax.d.ts +4 -0
- package/build/types/offer/booking-v2/response/changed-line.d.ts +4 -0
- package/build/types/offer/booking-v2/response/index.d.ts +7 -0
- package/build/types/offer/booking-v2/shared/booking-option-group.d.ts +5 -0
- package/build/types/offer/booking-v2/shared/booking-option-pax.d.ts +7 -0
- package/build/types/offer/booking-v2/shared/booking-option-unit.d.ts +6 -0
- package/build/types/offer/booking-v2/shared/booking-package-flight.d.ts +11 -0
- package/build/types/offer/booking-v2/shared/booking-package-hotel-option.d.ts +7 -0
- package/build/types/offer/booking-v2/shared/booking-package-hotel-room.d.ts +5 -0
- package/build/types/offer/booking-v2/shared/booking-package-hotel.d.ts +10 -0
- package/build/types/offer/booking-v2/shared/booking-package-line.d.ts +7 -0
- package/build/types/offer/booking-v2/shared/booking-package-pax.d.ts +16 -0
- package/build/types/offer/booking-v2/shared/booking-package-request-room.d.ts +5 -0
- package/build/types/offer/booking-v2/shared/booking-package-room-option.d.ts +7 -0
- package/build/types/offer/booking-v2/shared/booking-package-room.d.ts +5 -0
- package/build/types/offer/booking-v2/shared/booking-package.d.ts +27 -0
- package/build/types/offer/booking-v2/shared/index.d.ts +17 -0
- package/build/types/offer/booking-v2/shared/per-booking-package-option.d.ts +9 -0
- package/build/types/offer/booking-v2/shared/per-package-option.d.ts +8 -0
- package/build/types/offer/booking-v2/shared/per-pax-package-option.d.ts +5 -0
- package/build/types/offer/booking-v2/shared/per-unit-package-option.d.ts +7 -0
- package/build/types/offer/cached-package-search-result.d.ts +5 -5
- package/build/types/offer/confirmed-dossier-check.d.ts +6 -6
- package/build/types/offer/crm-contact-request.d.ts +28 -36
- package/build/types/offer/customer-request.d.ts +5 -5
- package/build/types/offer/dossier-default-product.d.ts +14 -14
- package/build/types/offer/entry-check-response.d.ts +8 -8
- package/build/types/offer/entry-line-meta-data.d.ts +5 -5
- package/build/types/offer/entry-line-pax.d.ts +8 -8
- package/build/types/offer/entry-line.d.ts +67 -73
- package/build/types/offer/entry-price-line.d.ts +40 -40
- package/build/types/offer/entry-room2.d.ts +5 -5
- package/build/types/offer/entry.d.ts +49 -59
- package/build/types/offer/flight-meta-data-line.d.ts +16 -0
- package/build/types/offer/flight-meta-data.d.ts +10 -0
- package/build/types/offer/flight-pool.d.ts +5 -5
- package/build/types/offer/index.d.ts +65 -56
- package/build/types/offer/language.d.ts +5 -5
- package/build/types/offer/multiroom-book-request.d.ts +10 -10
- package/build/types/offer/note.d.ts +16 -16
- package/build/types/offer/other-product.d.ts +13 -13
- package/build/types/offer/package-book-request-room.d.ts +5 -5
- package/build/types/offer/package-book-request.d.ts +12 -12
- package/build/types/offer/package-flight.d.ts +13 -13
- package/build/types/offer/package-flights.d.ts +5 -5
- package/build/types/offer/package-option.d.ts +22 -22
- package/build/types/offer/package-price-details-request-room.d.ts +4 -4
- package/build/types/offer/package-price-details-request.d.ts +8 -8
- package/build/types/offer/package-room-option.d.ts +10 -10
- package/build/types/offer/package-room.d.ts +7 -7
- package/build/types/offer/package-search-destination.d.ts +9 -9
- package/build/types/offer/package-search-request-date.d.ts +4 -4
- package/build/types/offer/package-search-request-room.d.ts +5 -5
- package/build/types/offer/package-search-request.d.ts +18 -22
- package/build/types/offer/package-search-result.d.ts +12 -12
- package/build/types/offer/package-sub-option.d.ts +6 -6
- package/build/types/offer/pax.d.ts +29 -29
- package/build/types/offer/payment.d.ts +20 -20
- package/build/types/offer/person-country-preference.d.ts +7 -7
- package/build/types/offer/person-location-preference.d.ts +7 -7
- package/build/types/offer/person-oord-preference.d.ts +7 -7
- package/build/types/offer/person-period-date-range-preference.d.ts +6 -6
- package/build/types/offer/person-period-preference.d.ts +7 -7
- package/build/types/offer/person-region-preference.d.ts +7 -7
- package/build/types/offer/person-tour-group-preference.d.ts +7 -7
- package/build/types/offer/price-detail.d.ts +18 -18
- package/build/types/offer/price-per-pax.d.ts +6 -6
- package/build/types/offer/product-notification-result.d.ts +9 -9
- package/build/types/offer/web-contact-form-request.d.ts +13 -13
- package/build/types/offer/web-contact-has-tag-request.d.ts +4 -4
- package/build/types/tide-client-config.d.ts +4 -4
- package/build/utils/api.d.ts +1 -6
- package/build/utils/booking-client.d.ts +102 -169
- package/build/utils/booking-v2-client.d.ts +7 -0
- package/build/utils/common-client.d.ts +1 -6
- package/build/utils/json.d.ts +2 -2
- package/build/utils/mollie-client.d.ts +7 -15
- package/build/utils/web-client.d.ts +10 -14
- package/build/utils/web-contact-client.d.ts +11 -23
- package/package.json +54 -54
- package/src/index.ts +5 -0
- package/src/types/offer/available-package-accommodation.ts +8 -0
- package/src/types/offer/available-package-flight.ts +10 -0
- package/src/types/offer/available-package-option.ts +18 -0
- package/src/types/offer/available-package-pax-price.ts +6 -0
- package/src/types/offer/available-package-regime.ts +4 -0
- package/src/types/offer/available-package.ts +8 -0
- package/src/types/offer/booking-v2/index.ts +3 -0
- package/src/types/offer/booking-v2/request/booking-package-address.ts +13 -0
- package/src/types/offer/booking-v2/request/booking-package-book-request.ts +14 -0
- package/src/types/offer/booking-v2/request/booking-package-details-request.ts +12 -0
- package/src/types/offer/booking-v2/request/booking-package-request.ts +6 -0
- package/src/types/offer/booking-v2/request/booking-package-search-request.ts +22 -0
- package/src/types/offer/booking-v2/request/index.ts +5 -0
- package/src/types/offer/booking-v2/response/booking-package-allotment-info.ts +13 -0
- package/src/types/offer/booking-v2/response/booking-package-dossier.ts +5 -0
- package/src/types/offer/booking-v2/response/booking-package-item.ts +13 -0
- package/src/types/offer/booking-v2/response/booking-price-detail.ts +15 -0
- package/src/types/offer/booking-v2/response/booking-price-details.ts +7 -0
- package/src/types/offer/booking-v2/response/booking-price-per-pax.ts +4 -0
- package/src/types/offer/booking-v2/response/changed-line.ts +4 -0
- package/src/types/offer/booking-v2/response/index.ts +7 -0
- package/src/types/offer/booking-v2/shared/booking-option-group.ts +5 -0
- package/src/types/offer/booking-v2/shared/booking-option-pax.ts +8 -0
- package/src/types/offer/booking-v2/shared/booking-option-unit.ts +7 -0
- package/src/types/offer/booking-v2/shared/booking-package-flight.ts +11 -0
- package/src/types/offer/booking-v2/shared/booking-package-hotel-option.ts +7 -0
- package/src/types/offer/booking-v2/shared/booking-package-hotel-room.ts +6 -0
- package/src/types/offer/booking-v2/shared/booking-package-hotel.ts +13 -0
- package/src/types/offer/booking-v2/shared/booking-package-line.ts +7 -0
- package/src/types/offer/booking-v2/shared/booking-package-pax.ts +18 -0
- package/src/types/offer/booking-v2/shared/booking-package-request-room.ts +6 -0
- package/src/types/offer/booking-v2/shared/booking-package-room-option.ts +7 -0
- package/src/types/offer/booking-v2/shared/booking-package-room.ts +6 -0
- package/src/types/offer/booking-v2/shared/booking-package.ts +33 -0
- package/src/types/offer/booking-v2/shared/index.ts +17 -0
- package/src/types/offer/booking-v2/shared/per-booking-package-option.ts +10 -0
- package/src/types/offer/booking-v2/shared/per-package-option.ts +9 -0
- package/src/types/offer/booking-v2/shared/per-pax-package-option.ts +6 -0
- package/src/types/offer/booking-v2/shared/per-unit-package-option.ts +8 -0
- package/src/types/offer/flight-meta-data-line.ts +16 -0
- package/src/types/offer/flight-meta-data.ts +11 -0
- package/src/types/offer/index.ts +9 -0
- package/src/utils/booking-v2-client.ts +81 -0
package/build/index.js
CHANGED
|
@@ -1,531 +1,466 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports,
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var AllotmentType = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
var AllotmentType = {
|
|
6
|
+
freeSell: 0,
|
|
7
|
+
onRequest: 1,
|
|
8
|
+
allotment: 2,
|
|
9
9
|
};
|
|
10
10
|
|
|
11
|
-
var AvailabilitySearchType = {
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
var AvailabilitySearchType = {
|
|
12
|
+
default: 0,
|
|
13
|
+
allotment: 1,
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
-
var Gender = {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
var Gender = {
|
|
17
|
+
male: 0,
|
|
18
|
+
female: 1,
|
|
19
|
+
other: 2,
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
var MetaDataType = {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
var RequirementType = {
|
|
34
|
+
mandatory: 0,
|
|
35
|
+
optional: 1,
|
|
36
|
+
optionalInGroup: 2,
|
|
37
37
|
};
|
|
38
38
|
|
|
39
|
-
var ServiceType = {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
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
|
-
|
|
83
|
-
return
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
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
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
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
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
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
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
var day = date.getDate();
|
|
257
|
-
return year + "-" + month + "-" + day;
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
return value;
|
|
262
|
-
};
|
|
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
|
+
}); };
|
|
263
180
|
|
|
264
|
-
var
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
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);
|
|
281
372
|
};
|
|
282
373
|
|
|
283
|
-
var ENDPOINT$3 = "/api/web/booking";
|
|
284
|
-
var
|
|
285
|
-
var
|
|
286
|
-
var
|
|
287
|
-
var
|
|
288
|
-
var
|
|
289
|
-
var
|
|
290
|
-
var
|
|
291
|
-
var
|
|
292
|
-
var
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
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);
|
|
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);
|
|
474
409
|
};
|
|
475
410
|
|
|
476
|
-
var ENDPOINT$2 = "/api/mollie";
|
|
477
|
-
var ENDPOINT_CREATE_PAYMENTS = ENDPOINT$2 + "/create-payment";
|
|
478
|
-
/**
|
|
479
|
-
* api/mollie/create-payment
|
|
480
|
-
* @param request
|
|
481
|
-
* @returns mollie payment url
|
|
482
|
-
*/
|
|
483
|
-
var getMolliePayment = function (config, request, signal) {
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
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);
|
|
488
423
|
};
|
|
489
424
|
|
|
490
|
-
var ENDPOINT$1 = "/api/web";
|
|
491
|
-
var ENDPOINT_CREATE_CRM_CONTACT = ENDPOINT$1 + "/crmcontact";
|
|
492
|
-
/**
|
|
493
|
-
* api/web/crmcontact
|
|
494
|
-
* Creates a CRM contact.
|
|
495
|
-
* @param config
|
|
496
|
-
* @param request
|
|
497
|
-
* @param signal
|
|
498
|
-
* @returns OK if succeeded.
|
|
499
|
-
*/
|
|
500
|
-
var createCrmContact = function (config, request, signal) {
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
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);
|
|
505
440
|
};
|
|
506
441
|
|
|
507
|
-
var ENDPOINT = "/api/web/contact";
|
|
508
|
-
var ENDPOINT_CONTACT_FORM = ENDPOINT + "/contact-form";
|
|
509
|
-
var ENDPOINT_CONTACT_HAS_TAG = ENDPOINT + "/has-tag";
|
|
510
|
-
/**
|
|
511
|
-
* api/web/contact/contact-form
|
|
512
|
-
* Processes a contact form.
|
|
513
|
-
* @param config
|
|
514
|
-
* @param request
|
|
515
|
-
* @param signal
|
|
516
|
-
* @returns OK if succeeded.
|
|
517
|
-
*/
|
|
518
|
-
var contactForm = function (config, request, signal) {
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
};
|
|
524
|
-
var contactHasTag = function (config, request, signal) {
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
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);
|
|
529
464
|
};
|
|
530
465
|
|
|
531
466
|
exports.AllotmentType = AllotmentType;
|
|
@@ -534,6 +469,7 @@ exports.Gender = Gender;
|
|
|
534
469
|
exports.MetaDataType = MetaDataType;
|
|
535
470
|
exports.RequirementType = RequirementType;
|
|
536
471
|
exports.ServiceType = ServiceType;
|
|
472
|
+
exports.book = book;
|
|
537
473
|
exports.contactForm = contactForm;
|
|
538
474
|
exports.contactHasTag = contactHasTag;
|
|
539
475
|
exports.createCrmContact = createCrmContact;
|
|
@@ -542,15 +478,17 @@ exports.createEntryWithShortResponse = createEntryWithShortResponse;
|
|
|
542
478
|
exports.createOffer = createOffer;
|
|
543
479
|
exports.createOfferWithShortResponse = createOfferWithShortResponse;
|
|
544
480
|
exports.createPackageEntry = createPackageEntry;
|
|
545
|
-
exports.createPackageEntryWithShortResponse =
|
|
546
|
-
createPackageEntryWithShortResponse;
|
|
481
|
+
exports.createPackageEntryWithShortResponse = createPackageEntryWithShortResponse;
|
|
547
482
|
exports.createPackageOffer = createPackageOffer;
|
|
548
|
-
exports.createPackageOfferWithShortResponse =
|
|
549
|
-
|
|
483
|
+
exports.createPackageOfferWithShortResponse = createPackageOfferWithShortResponse;
|
|
484
|
+
exports.details = details;
|
|
550
485
|
exports.getAvailableProducts = getAvailableProducts;
|
|
551
486
|
exports.getBasePrices = getBasePrices;
|
|
552
487
|
exports.getBasePricesFromDate = getBasePricesFromDate;
|
|
553
488
|
exports.getMolliePayment = getMolliePayment;
|
|
554
489
|
exports.getPackagePriceDetails = getPackagePriceDetails;
|
|
490
|
+
exports.priceDetails = priceDetails;
|
|
491
|
+
exports.readPackageSearchList = readPackageSearchList;
|
|
492
|
+
exports.search = search;
|
|
555
493
|
exports.searchPackages = searchPackages;
|
|
556
494
|
//# sourceMappingURL=index.js.map
|