Skip to content

Commit eb06345

Browse files
luancazarinejcortes
authored andcommitted
Add new option for including semantic segment counts and fix multibook safety margin naming in availabilities actions
- Introduced `includeSemanticSegmentCounts` option to enhance metadata results. - Renamed `multibookSsafetyMargin` to `multibookSafetyMargin` for consistency in rentable type availabilities. - Updated parsing logic for `wday` filter to handle undefined values correctly.
1 parent 2d2af5c commit eb06345

File tree

17 files changed

+29
-21
lines changed

17 files changed

+29
-21
lines changed

components/booking_experts/actions/add-guest-to-reservation/add-guest-to-reservation.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
name: "Add Guest to Reservation",
66
description:
77
"Add a guest to a reservation. [See the documentation](https://developers.bookingexperts.com/reference/administration-reservation-guests-create)",
8-
version: "0.0.6",
8+
version: "0.0.7",
99
annotations: {
1010
destructiveHint: false,
1111
openWorldHint: true,

components/booking_experts/actions/create-agenda-period/create-agenda-period.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "booking_experts-create-agenda-period",
55
name: "Create Agenda Period",
66
description: "Creates a new agenda period. [See the documentation](https://developers.bookingexperts.com/reference/administration-maintenance-agenda-periods-create)",
7-
version: "0.0.5",
7+
version: "0.0.6",
88
annotations: {
99
destructiveHint: false,
1010
openWorldHint: true,

components/booking_experts/actions/delete-guest/delete-guest.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "booking_experts-delete-guest",
55
name: "Delete Guest",
66
description: "Delete a guest for a reservation. [See the documentation](https://developers.bookingexperts.com/reference/administration-reservation-guests-delete)",
7-
version: "0.0.3",
7+
version: "0.0.4",
88
annotations: {
99
destructiveHint: true,
1010
openWorldHint: true,

components/booking_experts/actions/get-booking/get-booking.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "booking_experts-get-booking",
55
name: "Get Booking",
66
description: "Returns a booking. [See the documentation](https://developers.bookingexperts.com/reference/administration-bookings-show)",
7-
version: "0.0.3",
7+
version: "0.0.4",
88
annotations: {
99
destructiveHint: false,
1010
openWorldHint: true,

components/booking_experts/actions/get-complex-prices/get-complex-prices.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "booking_experts-get-complex-prices",
55
name: "Get Complex Prices",
66
description: "Returns all complex prices of a master price list. [See the documentation](https://developers.bookingexperts.com/reference/administration-masterpricelist-complexprices-index)",
7-
version: "0.0.5",
7+
version: "0.0.6",
88
annotations: {
99
destructiveHint: false,
1010
openWorldHint: true,

components/booking_experts/actions/get-reservation/get-reservation.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
name: "Get Reservation",
55
description: "Fetches a reservation by ID from Booking Experts. [See the documentation](https://developers.bookingexperts.com/reference/reservations-show)",
66
key: "booking_experts-get-reservation",
7-
version: "0.0.2",
7+
version: "0.0.3",
88
type: "action",
99
annotations: {
1010
destructiveHint: false,

components/booking_experts/actions/list-availabilities/list-availabilities.mjs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default {
1010
key: "booking_experts-list-availabilities",
1111
name: "List Availabilities",
1212
description: "List availabilities of a channel you have access to. [See the documentation](https://developers.bookingexperts.com/reference/availabilities-index)",
13-
version: "0.0.3",
13+
version: "0.0.4",
1414
annotations: {
1515
destructiveHint: false,
1616
openWorldHint: true,
@@ -46,10 +46,16 @@ export default {
4646
description: "Specify a list of channel IDs to be used for searching availability. By default, all accessible channels associated to your app will be used. Overriding this may be useful when you have access to multiple channels of the same administration.",
4747
optional: true,
4848
},
49+
includeSemanticSegmentCounts: {
50+
type: "boolean",
51+
label: "Include Semantic Segment Counts",
52+
description: "When `true`, the amount of results per semantic segment will be added to the metadata",
53+
optional: true,
54+
},
4955
includeAmenityCounts: {
5056
type: "boolean",
5157
label: "Include Amenity Counts",
52-
description: "When true, the amount of results per amenity will be added to the metadata",
58+
description: "When `true`, the amount of results per amenity will be added to the metadata",
5359
optional: true,
5460
},
5561
referrer: {
@@ -475,7 +481,9 @@ export default {
475481
"filter[includes_date]": this.includesDate,
476482
"filter[arrangement]": this.arrangement,
477483
"filter[los]": this.los,
478-
"filter[wday]": parseInt(this.wday),
484+
"filter[wday]": this.wday
485+
? parseInt(this.wday)
486+
: undefined,
479487
"filter[administration_ids]": parseObject(this.administrationIds)?.join(","),
480488
"filter[rentable_type_ids]": parseObject(this.rentableTypeIds)?.join(","),
481489
"filter[-rentable_type_ids]": parseObject(this.excludeRentableTypeIds)?.join(","),

components/booking_experts/actions/list-bookings/list-bookings.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "booking_experts-list-bookings",
55
name: "List Bookings",
66
description: "Returns a list of bookings for an administration. [See the documentation](https://developers.bookingexperts.com/reference/administration-bookings-index)",
7-
version: "0.0.5",
7+
version: "0.0.6",
88
annotations: {
99
destructiveHint: false,
1010
openWorldHint: true,

components/booking_experts/actions/list-inventory-objects/list-inventory-objects.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "booking_experts-list-inventory-objects",
55
name: "List Inventory Objects",
66
description: "Returns inventory objects of the administration. [See the documentation](https://developers.bookingexperts.com/reference/administration-inventoryobjects-index)",
7-
version: "0.0.5",
7+
version: "0.0.6",
88
annotations: {
99
destructiveHint: false,
1010
openWorldHint: true,

components/booking_experts/actions/list-rentabletype-availabilities/list-rentabletype-availabilities.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default {
77
key: "booking_experts-list-rentabletype-availabilities",
88
name: "List RentableType Availabilities",
99
description: "List availabilities of a RentableType you have access to. [See the documentation](https://developers.bookingexperts.com/reference/channel-rentabletype-availabilities-index)",
10-
version: "0.0.3",
10+
version: "0.0.4",
1111
annotations: {
1212
destructiveHint: false,
1313
openWorldHint: true,
@@ -62,7 +62,7 @@ export default {
6262
description: "Includes list. A list of resources to include. [See the documentation](https://developers.bookingexperts.com/reference/channel-rentabletype-availabilities-index)",
6363
optional: true,
6464
},
65-
multibookSsafetyMargin: {
65+
multibookSafetyMargin: {
6666
type: "integer",
6767
label: "Multi-book Safety Margin",
6868
description: "Specifies a custom multibook safety margin (must be a positive number). A common problem that occurs when dealing with accommodations instead of hotelrooms is that a single accommodation must be available for all consecutive days for a given start date and LOS. The safety margin helps to prevent overbookings by transforming the available stock. When specified, the safety margin is subtracted from the actual stock. It is only applied to RentableType availabilities with capacity of 3 or more, as this issue cannot occur otherwise.",
@@ -84,7 +84,7 @@ export default {
8484
}),
8585
"fields[rentable_type_availability]": parseObject(this.fields)?.join(","),
8686
"include": parseObject(this.include)?.join(","),
87-
"multibook_safety_margin": this.multibookSsafetyMargin,
87+
"multibook_safety_margin": this.multibookSafetyMargin,
8888
},
8989
});
9090
$.export("$summary", `Found ${data.length} rentable type availabilities`);

0 commit comments

Comments
 (0)