mts-booking-library 2.4.2 → 2.4.4

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.
@@ -1,6 +1,7 @@
1
1
  import { Booking } from "../../booking/booking";
2
2
  import { Reduction } from "./Reduction";
3
3
  import { Extra } from "./Extra";
4
+ import { PaymentMethods } from "./Payment";
4
5
  export declare enum SellingMethod {
5
6
  LINKAVEL = "LINKAVEL",
6
7
  BACKOFFICE = "BACKOFFICE",
@@ -59,6 +60,8 @@ export type Cart = {
59
60
  sellerEmailLinkavel: string | null;
60
61
  /** The code of the cart */
61
62
  cartCode: string;
63
+ /** If true, the tickets in the cart will be automatically printer after the payment */
64
+ autoPrintOption: boolean;
62
65
  /**
63
66
  * A boolean telling whether the cart has issued tickets.
64
67
  * Note that if this is the case, the cart will be null because it is not
@@ -114,6 +117,11 @@ export type Cart = {
114
117
  * It is expressed in the currency of the cart.
115
118
  */
116
119
  totalAmountToPay: number;
120
+ /**
121
+ * A list of string representing the possible ways to cash in the ticket.
122
+ * The first element of the list is the default cash in method (and the preferred by the seller).
123
+ */
124
+ cashInMethods: PaymentMethods[];
117
125
  };
118
126
  /** The type that {@link Cart.stepsToStatus} assumes once parsed to a map */
119
127
  export type processedStepsToStatus = Map<Booking.BookingSteps, [boolean, boolean, boolean]>;
@@ -26,6 +26,7 @@ export type GetSellerGatewaysResponse = {
26
26
  * @param {string | null} axervE_BANCASELLA_PaymentId The payment id of the Axerve Bancasella gateway
27
27
  * @param {string | null} axervE_BANCASELLA_PaymentToken The payment token of the Axerve Bancasella gateway
28
28
  * @param {string | null} axervE_BANCASELLA_ShopLogin The shop login of the Axerve Bancasella gateway
29
+ * @param {string | null} axervE_BANCASELLA_Link The link of the Axerve Bancasella gateway
29
30
  * @param {string | null} axeptA_BNL_PaymentId The payment id of the Axepta BNL gateway
30
31
  * @param {string | null} axeptA_BNL_EasyCheckoutLicenseKey The easy checkout license key of the Axepta BNL gateway
31
32
  * @param {string | null} paypaL_ClientId The client id of the PayPal gateway
@@ -37,6 +38,7 @@ export type GetPaymentInformationFromGatewayResponse = {
37
38
  axervE_BANCASELLA_PaymentId: string | null;
38
39
  axervE_BANCASELLA_PaymentToken: string | null;
39
40
  axervE_BANCASELLA_ShopLogin: string | null;
41
+ axervE_BANCASELLA_Link: string | null;
40
42
  axeptA_BNL_PaymentId: string | null;
41
43
  axeptA_BNL_EasyCheckoutLicenseKey: string | null;
42
44
  paypaL_ClientId: string | null;
@@ -34,6 +34,16 @@ export type Tariff = {
34
34
  label: string;
35
35
  /** The number of passengers to which this tariff applies */
36
36
  quantity: number;
37
+ /**
38
+ * The maximum quantity of this tariff that can be added to the cart.
39
+ * If this value is null or 0, there is no limit to the quantity of this tariff that can be added to the cart.
40
+ */
41
+ quantityPerCart: number;
42
+ /**
43
+ * Whether there can only be this tariff in the cart, meaning that if the user selects this tariff,
44
+ * it should not be possible to select any other tariff
45
+ */
46
+ onlyThisTariffInCart: boolean;
37
47
  /** The custom code for one-way tickets */
38
48
  oneWayCode: string | null;
39
49
  /** The custom code for round trip tickets */
@@ -75,7 +75,7 @@ var makeRequest = function (method, url, data, options) { return __awaiter(void
75
75
  throw new Error("MTS Library Error! makeRequest: data is not supported for ".concat(method, " calls. url: ").concat(url));
76
76
  debug = (0, config_1.getConfig)().DEBUG;
77
77
  if (debug) {
78
- console.log("".concat(method, "_RequestData"), url);
78
+ console.log("".concat(method, "_RequestData"), url, data);
79
79
  }
80
80
  subKey = (0, config_1.getConfig)().OCP_SUBSCRIPTION_KEY;
81
81
  if ((0, utils_1.isNullOrWhiteSpace)(subKey)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mts-booking-library",
3
- "version": "2.4.2",
3
+ "version": "2.4.4",
4
4
  "description": "Library for using MyTicketSolution Booking API",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -22,7 +22,7 @@
22
22
  "node-localstorage": "^3.0.5",
23
23
  "prettier": "^3.4.2",
24
24
  "ts-jest": "^29.2.5",
25
- "typescript": "^5.7.2"
25
+ "typescript": "^5.7.3"
26
26
  },
27
27
  "files": [
28
28
  "lib/**/*"