mts-booking-library 1.0.2 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
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
  });
@@ -2,6 +2,7 @@ export type Info = {
2
2
  sellerName: string;
3
3
  minimumTotalPrice: string;
4
4
  remainingSeats?: number;
5
+ totalNumberOfSeats?: number;
5
6
  bookingProcessMessage: string;
6
7
  isBookable: boolean;
7
8
  };
@@ -4,6 +4,7 @@ export type JourneySearch = {
4
4
  destinationStopName: string | undefined;
5
5
  passengersNumber: number;
6
6
  date: Date;
7
+ roundTripDate: Date | null;
7
8
  currency: Booking.Currencies;
8
9
  isRoundtrip: boolean;
9
10
  };
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mts-booking-library",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "Library for use MyTicketSolution Booking API",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",