mts-booking-library 3.6.0 → 3.7.0
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/booking/tplBooking.js +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/types/tpl/SuperArea.d.ts +24 -0
- package/package.json +1 -1
|
@@ -253,7 +253,7 @@ var TplBooking = /** @class */ (function (_super) {
|
|
|
253
253
|
return __awaiter(this, void 0, void 0, function () {
|
|
254
254
|
var searchParams, url;
|
|
255
255
|
return __generator(this, function (_a) {
|
|
256
|
-
searchParams = new URLSearchParams(__assign(__assign(__assign({ includeBasicInfo: "true", includeImage: "true", includeAreaIds: "false", includeTariffIds: "false", includeRouteIds: "false", includeMultilingualDescriptions: "false" }, (request.cityId && { cityId: request.cityId.toString() })), (request.tripId && { tripId: request.tripId.toString() })), (request.type && { type: request.type })));
|
|
256
|
+
searchParams = new URLSearchParams(__assign(__assign(__assign({ includeBasicInfo: "true", includeImage: "true", includeAreaIds: "false", includeTariffIds: "false", includeRouteIds: "false", includeMultilingualDescriptions: request.includeMultilingualDescriptions ? "true" : "false" }, (request.cityId && { cityId: request.cityId.toString() })), (request.tripId && { tripId: request.tripId.toString() })), (request.type && { type: request.type })));
|
|
257
257
|
url = "".concat(this.config.API_ENDPOINT, "/v3_resources/superAreas?").concat(searchParams);
|
|
258
258
|
return [2 /*return*/, this.callGetApi(url, options).then(function (response) {
|
|
259
259
|
return (0, ErrorResponse_1.objectIsMTSErrorResponse)(response) ? response : response.superAreas;
|
package/lib/index.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ export { Service, ServiceTrip } from "./types/services/Service";
|
|
|
27
27
|
export { ServiceCart, ServiceBookingType } from "./types/services/ServiceCart";
|
|
28
28
|
export { ServiceInfo } from "./types/services/ServiceInfo";
|
|
29
29
|
export { GetTariffsResponse } from "./types/tpl/GetTariffsResponse";
|
|
30
|
-
export { SuperArea, GetSuperAreasRequest, GetCitiesRequest, SuperAreasTypeFilter } from "./types/tpl/SuperArea";
|
|
30
|
+
export { SuperArea, MTSStringDTO, GetSuperAreasRequest, GetCitiesRequest, SuperAreasTypeFilter } from "./types/tpl/SuperArea";
|
|
31
31
|
export { TplCart, TplBookingType, TplBookingInfo } from "./types/tpl/TplCart";
|
|
32
32
|
export { Subscription } from "./types/subscriptions/Subscriptions";
|
|
33
33
|
export { GetSubscriptionAvailabilityRequest, GetSubscriptionAvailabilityResponse, SubscriptionCalendarDayPeriodInfo } from "./types/subscriptions/SubscriptionAvailabilities";
|
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Multilingual string returned by the backend. Each key holds the
|
|
3
|
+
* translation for that language; consumers should fall back to `it`
|
|
4
|
+
* when the active language is missing, matching the backend's
|
|
5
|
+
* `MTSStringDTO.GetValue` resolution rules.
|
|
6
|
+
*/
|
|
7
|
+
export type MTSStringDTO = {
|
|
8
|
+
en: string | null;
|
|
9
|
+
it: string | null;
|
|
10
|
+
fr: string | null;
|
|
11
|
+
de: string | null;
|
|
12
|
+
es: string | null;
|
|
13
|
+
};
|
|
1
14
|
/** This type represents a super area. It is the return object of the {@link TplBooking.getSuperAreas} method. */
|
|
2
15
|
export type SuperArea = {
|
|
3
16
|
/** The id of the super area in the database */
|
|
@@ -12,6 +25,11 @@ export type SuperArea = {
|
|
|
12
25
|
bookingProcessDescription: string;
|
|
13
26
|
/** The url of the image of the super area */
|
|
14
27
|
imageUrl: string;
|
|
28
|
+
/**
|
|
29
|
+
* LinkAvel-specific multilingual description. Only present when the
|
|
30
|
+
* request is made with `includeMultilingualDescriptions: true`.
|
|
31
|
+
*/
|
|
32
|
+
linkAvelDescription?: MTSStringDTO;
|
|
15
33
|
};
|
|
16
34
|
export declare enum SuperAreasTypeFilter {
|
|
17
35
|
/** No filter applied (default). */
|
|
@@ -33,6 +51,12 @@ export type GetSuperAreasRequest = {
|
|
|
33
51
|
* A super area cannot simultaneously be a tour and a regular super area.
|
|
34
52
|
*/
|
|
35
53
|
type?: SuperAreasTypeFilter;
|
|
54
|
+
/**
|
|
55
|
+
* When true, the response includes the multilingual `linkAvelDescription`
|
|
56
|
+
* field on each super area. Defaults to false to keep payloads minimal
|
|
57
|
+
* for callers that only need basic info.
|
|
58
|
+
*/
|
|
59
|
+
includeMultilingualDescriptions?: boolean;
|
|
36
60
|
};
|
|
37
61
|
/** Request options for {@link TplBooking.getCities}. */
|
|
38
62
|
export type GetCitiesRequest = {
|