mts-booking-library 1.3.0 → 1.3.1

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.
@@ -93,10 +93,10 @@ export declare class ServiceBooking extends Booking {
93
93
  * and/or a specific hour for the tour.
94
94
  * You should call this method only if {@link Service.isDateOptional} or {@link Service.isDateRequired} is true for the selected tour.
95
95
  * @param {number} serviceId The id of the selected tour (can be retrieved in the object {@link Service} returned by {@link getTours})
96
- * @param {Date} date The date on which to get the tours
96
+ * @param {string} date The date on which to get the tours, in ISO string format
97
97
  * @returns {ServiceTrip[]} The returned information about the tour (tripId and hour)
98
98
  */
99
- getServiceTrips(serviceId: number, date: Date): Promise<ErrorResponse | ServiceTrip[]>;
99
+ getServiceTrips(serviceId: number, date: string): Promise<ErrorResponse | ServiceTrip[]>;
100
100
  createServiceCart(serviceCart: CreateServiceCartRequest): Promise<ErrorResponse | ServiceCart>;
101
101
  /**
102
102
  * @description This method shall be called when the user wants to retrieve information about the buyer and the passengers.
@@ -239,14 +239,14 @@ var ServiceBooking = /** @class */ (function (_super) {
239
239
  * and/or a specific hour for the tour.
240
240
  * You should call this method only if {@link Service.isDateOptional} or {@link Service.isDateRequired} is true for the selected tour.
241
241
  * @param {number} serviceId The id of the selected tour (can be retrieved in the object {@link Service} returned by {@link getTours})
242
- * @param {Date} date The date on which to get the tours
242
+ * @param {string} date The date on which to get the tours, in ISO string format
243
243
  * @returns {ServiceTrip[]} The returned information about the tour (tripId and hour)
244
244
  */
245
245
  ServiceBooking.prototype.getServiceTrips = function (serviceId, date) {
246
246
  return __awaiter(this, void 0, void 0, function () {
247
247
  var searchParams, url;
248
248
  return __generator(this, function (_a) {
249
- searchParams = new URLSearchParams({ date: date.toDateString() });
249
+ searchParams = new URLSearchParams({ date: date });
250
250
  url = "".concat(this.config.API_ENDPOINT, "/v3_booking/services/").concat(serviceId, "/trips?").concat(searchParams);
251
251
  return [2 /*return*/, this.callGetApi(url).then(function (response) {
252
252
  return (0, ErrorResponse_1.objectIsMTSErrorResponse)(response) ? response : response.trips;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mts-booking-library",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "Library for using MyTicketSolution Booking API",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",