mts-booking-library 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/index.js +1 -1
- package/lib/types/Journeys/JourneySearch.d.ts +1 -0
- package/lib/types/Journeys/JourneySearch.js +1 -0
- package/package.json +1 -1
- package/lib/types/BusMatrix.d.ts +0 -0
- package/lib/types/BusMatrix.js +0 -1
- package/lib/types/Journey.d.ts +0 -8
- package/lib/types/Journey.js +0 -2
- package/lib/types/JourneySearch.d.ts +0 -9
- package/lib/types/JourneySearch.js +0 -2
- package/lib/types/Stop.d.ts +0 -7
- package/lib/types/Stop.js +0 -2
- package/lib/types/Tour.d.ts +0 -18
- package/lib/types/Tour.js +0 -2
- package/lib/types/Tours.d.ts +0 -0
- package/lib/types/Tours.js +0 -1
- package/lib/types/Trip.d.ts +0 -9
- package/lib/types/Trip.js +0 -2
- package/lib/types/TripSearch.d.ts +0 -9
- package/lib/types/TripSearch.js +0 -2
package/lib/index.js
CHANGED
@@ -245,7 +245,7 @@ var Booking = /** @class */ (function () {
|
|
245
245
|
if (params.departureStopName === undefined || params.destinationStopName === undefined) {
|
246
246
|
throw Error("Fields departureStopName and destinationStopName are required");
|
247
247
|
}
|
248
|
-
url = "".concat(this.config.API_ENDPOINT, "/booking/journeys?").concat(new URLSearchParams(__assign(__assign({}, (this.sellerId && { sellerId: this.sellerId.toString() })), { departureStopName: params.departureStopName, destinationStopName: params.destinationStopName, passengersNumber: params.passengersNumber.toString(), date: params.date.toDateString(), currency: params.currency, isRoundtrip: params.isRoundtrip.toString() })));
|
248
|
+
url = "".concat(this.config.API_ENDPOINT, "/booking/journeys?").concat(new URLSearchParams(__assign(__assign({}, (this.sellerId && { sellerId: this.sellerId.toString() })), { departureStopName: params.departureStopName, destinationStopName: params.destinationStopName, passengersNumber: params.passengersNumber.toString(), date: params.date.toDateString(), roundTripDate: params.roundTripDate ? params.roundTripDate.toDateString() : "null", currency: params.currency, isRoundtrip: params.isRoundtrip.toString() })));
|
249
249
|
return [2 /*return*/, (0, apiCall_1.makeGet)(url)];
|
250
250
|
});
|
251
251
|
});
|
@@ -7,6 +7,7 @@ exports.DefaultJourneySearch = {
|
|
7
7
|
destinationStopName: "",
|
8
8
|
passengersNumber: 1,
|
9
9
|
date: new Date(Date.UTC(new Date().getFullYear(), new Date().getMonth(), new Date().getDate(), 0, 1)),
|
10
|
+
roundTripDate: null,
|
10
11
|
currency: __1.Booking.Currencies.EUR,
|
11
12
|
isRoundtrip: false,
|
12
13
|
};
|
package/package.json
CHANGED
package/lib/types/BusMatrix.d.ts
DELETED
File without changes
|
package/lib/types/BusMatrix.js
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";
|
package/lib/types/Journey.d.ts
DELETED
package/lib/types/Journey.js
DELETED
package/lib/types/Stop.d.ts
DELETED
package/lib/types/Stop.js
DELETED
package/lib/types/Tour.d.ts
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
import { Info } from "./Info";
|
2
|
-
import { Line } from "./Line";
|
3
|
-
import { TariffMatrix, TariffType, TermsType } from "./TermsAndTariffs";
|
4
|
-
export type Tour = {
|
5
|
-
id: number;
|
6
|
-
line: Line;
|
7
|
-
info: Info;
|
8
|
-
tariffsMatrix: TariffMatrix;
|
9
|
-
tariffTypes: TariffType[];
|
10
|
-
termsTypes: TermsType[];
|
11
|
-
isDateOptional: boolean;
|
12
|
-
isDateRequired: boolean;
|
13
|
-
isTripMandatory: boolean;
|
14
|
-
};
|
15
|
-
export type TourTrip = {
|
16
|
-
tripId: number;
|
17
|
-
hour: Date;
|
18
|
-
};
|
package/lib/types/Tour.js
DELETED
package/lib/types/Tours.d.ts
DELETED
File without changes
|
package/lib/types/Tours.js
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";
|
package/lib/types/Trip.d.ts
DELETED
package/lib/types/Trip.js
DELETED
package/lib/types/TripSearch.js
DELETED