mts-booking-library 1.2.4 → 1.2.5

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.
@@ -19,18 +19,28 @@ export type Person = {
19
19
  };
20
20
  export declare const DEFAULT_PERSON: Person;
21
21
  export declare const initializePerson: (person?: Person | undefined | null) => Person;
22
+ /**
23
+ * @description Represents a passenger in the response of the {@link getPassengersDetails} method. This type extends the {@link Person} type
24
+ * with the `outboundTariffs` and `returnTariffs` properties.
25
+ *
26
+ * @property { Map<number, PassengerTariff>} outboundTariffs - A map containing the outbound tariffs for this passenger. The key is the trip id.
27
+ * For every trip, the first element the value is the suggested tariff. The other elements are the other tariffs, so that the user can adjust
28
+ * the tariff for the passenger.
29
+ * @property { Map<number, PassengerTariff>} returnTariffs - Same of `outboundTariffs`, but for the return trip.
30
+ */
31
+ export type GetPassenger = Person & {
32
+ outboundTariffs: Map<number, PassengerTariff[]>;
33
+ returnTariffs: Map<number, PassengerTariff[]>;
34
+ };
22
35
  /**
23
36
  * @description Represents the response of the {@link getBuyerPassengersDetails} method.
24
37
  *
25
38
  * @property {Person} buyer - The {@link Person} object representing the buyer.
26
- * @property {Person[]} passengers - An array of {@link Person} objects representing the passengers.
27
- * @property {Map<number, PassengerTariff>} tariffs - A map from the trip id to the {@link PassengerTariff} object,
28
- * representing the available tariffs for that trip (from the ones chosen by the user when creating the cart).
39
+ * @property {GetPassenger[]} passengers - An array of {@link GetPassenger} objects representing the passengers.
29
40
  */
30
41
  export type GetBuyerPassengersDetailsResponse = {
31
42
  buyer: Person;
32
- passengers: Person[];
33
- tariffs: Map<number, PassengerTariff>;
43
+ passengers: GetPassenger[];
34
44
  };
35
45
  /**
36
46
  * @description Represents the type of the passengers array in {@link EditPassengersDetailsRequest}.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mts-booking-library",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "description": "Library for use MyTicketSolution Booking API",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",