mts-booking-library 1.0.2 → 1.0.3

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/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
  });
@@ -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.3",
4
4
  "description": "Library for use MyTicketSolution Booking API",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
File without changes
@@ -1 +0,0 @@
1
- "use strict";
@@ -1,8 +0,0 @@
1
- import { Info } from "./Info";
2
- import { Stop } from "./Stop";
3
- import { Trip } from "./Trip";
4
- export type Journey = {
5
- stops: Stop[];
6
- info: Info;
7
- trips: Trip[];
8
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,9 +0,0 @@
1
- import { Booking } from "..";
2
- export type JourneySearch = {
3
- departureStopName: string;
4
- destinationStopName: string;
5
- passengersNumber: number;
6
- date: Date;
7
- currency: Booking.Currencies;
8
- isRoundtrip: boolean;
9
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,7 +0,0 @@
1
- export type Stop = {
2
- id: number;
3
- departureTime: Date;
4
- destinationTime: Date;
5
- name: string;
6
- address: string;
7
- };
package/lib/types/Stop.js DELETED
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -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
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
File without changes
@@ -1 +0,0 @@
1
- "use strict";
@@ -1,9 +0,0 @@
1
- import { TariffMatrix, TariffType, TermsType } from "./TermsAndTariffs";
2
- export type Trip = {
3
- id: number;
4
- departureStopName: string;
5
- destinationStopName: string;
6
- tariffsMatrix: TariffMatrix;
7
- tariffTypes: TariffType[];
8
- termsTypes: TermsType[];
9
- };
package/lib/types/Trip.js DELETED
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,9 +0,0 @@
1
- import { Booking } from "..";
2
- export type TripSearch = {
3
- departureStopName: string;
4
- destinationStopName: string;
5
- passengersNumber: number;
6
- date: Date;
7
- currency: Booking.Currencies;
8
- isRoundtrip: boolean;
9
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });