Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import bookingExperts from "../../booking_experts.app.mjs";
export default {
key: "booking_experts-add-guest-to-reservation",
name: "Add Guest to Reservation",
description: "Add a guest to a reservation.. [See the documentation](https://developers.bookingexperts.com/reference/administration-reservation-guests-create)",
version: "0.0.2",
description: "Add a guest to a reservation. [See the documentation](https://developers.bookingexperts.com/reference/administration-reservation-guests-create)",
version: "0.0.3",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down Expand Up @@ -77,6 +77,7 @@ export default {
},
async run({ $ }) {
const { data } = await this.bookingExperts.addGuestToReservation({
$,
administrationId: this.administrationId,
reservationId: this.reservationId,
data: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "booking_experts-create-agenda-period",
name: "Create Agenda Period",
description: "Creates a new agenda period. [See the documentation](https://developers.bookingexperts.com/reference/administration-maintenance-agenda-periods-create)",
version: "0.0.2",
version: "0.0.3",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
60 changes: 60 additions & 0 deletions components/booking_experts/actions/delete-guest/delete-guest.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import bookingExperts from "../../booking_experts.app.mjs";

export default {
key: "booking_experts-delete-guest",
name: "Delete Guest",
description: "Delete a guest for a reservation. [See the documentation](https://developers.bookingexperts.com/reference/administration-reservation-guests-delete)",
version: "0.0.1",
annotations: {
destructiveHint: true,
openWorldHint: true,
readOnlyHint: false,
},
type: "action",
props: {
bookingExperts,
administrationId: {
propDefinition: [
bookingExperts,
"administrationId",
],
},
reservationId: {
propDefinition: [
bookingExperts,
"reservationId",
({ administrationId }) => ({
administrationId,
}),
],
},
info: {

Check warning on line 31 in components/booking_experts/actions/delete-guest/delete-guest.mjs

View workflow job for this annotation

GitHub Actions / Lint Code Base

Component prop info must have a description. See https://pipedream.com/docs/components/guidelines/#props

Check warning on line 31 in components/booking_experts/actions/delete-guest/delete-guest.mjs

View workflow job for this annotation

GitHub Actions / Lint Code Base

Component prop info must have a label. See https://pipedream.com/docs/components/guidelines/#props
type: "alert",
alertType: "warning",
content: "**The API will only list guests created through the Booking Experts API.**",
},
guestId: {
propDefinition: [
bookingExperts,
"guestId",
({
administrationId, reservationId,
}) => ({
administrationId,
reservationId,
}),
],
},
},
async run({ $ }) {
const response = await this.bookingExperts.deleteGuest({
$,
administrationId: this.administrationId,
reservationId: this.reservationId,
guestId: this.guestId,
});

$.export("$summary", `Successfully deleted guest with ID ${this.guestId}`);
return response;
},
};
41 changes: 41 additions & 0 deletions components/booking_experts/actions/get-booking/get-booking.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import bookingExperts from "../../booking_experts.app.mjs";

export default {
key: "booking_experts-get-booking",
name: "Get Booking",
description: "Returns a booking. [See the documentation](https://developers.bookingexperts.com/reference/administration-bookings-show)",
version: "0.0.1",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: false,
},
type: "action",
props: {
bookingExperts,
administrationId: {
propDefinition: [
bookingExperts,
"administrationId",
],
},
bookingId: {
propDefinition: [
bookingExperts,
"bookingId",
({ administrationId }) => ({
administrationId,
}),
],
},
},
async run({ $ }) {
const { data } = await this.bookingExperts.getBooking({
$,
administrationId: this.administrationId,
bookingId: this.bookingId,
});
$.export("$summary", `Successfully retrieved booking with ID ${this.bookingId}`);
return data;
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "booking_experts-get-complex-prices",
name: "Get Complex Prices",
description: "Returns all complex prices of a master price list. [See the documentation](https://developers.bookingexperts.com/reference/administration-masterpricelist-complexprices-index)",
version: "0.0.2",
version: "0.0.3",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import bookingExperts from "../../booking_experts.app.mjs";

export default {
key: "booking_experts-list-availabilities",
name: "List Availabilities",
description: "List availabilities of a channel you have access to. [See the documentation](https://developers.bookingexperts.com/reference/availabilities-index)",
version: "0.0.1",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: true,
},
type: "action",
props: {
bookingExperts,
info: {

Check warning on line 16 in components/booking_experts/actions/list-availabilities/list-availabilities.mjs

View workflow job for this annotation

GitHub Actions / Lint Code Base

Component prop info must have a description. See https://pipedream.com/docs/components/guidelines/#props

Check warning on line 16 in components/booking_experts/actions/list-availabilities/list-availabilities.mjs

View workflow job for this annotation

GitHub Actions / Lint Code Base

Component prop info must have a label. See https://pipedream.com/docs/components/guidelines/#props
type: "alert",
alertType: "warning",
content: "**You must have at least one channel created through the Booking Experts API.**",
},
},
async run({ $ }) {
const { data } = await this.bookingExperts.listAvailabilities({
$,
});
$.export("$summary", `Found ${data.length} availabilities`);
return data;
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "booking_experts-list-bookings",
name: "List Bookings",
description: "Returns a list of bookings for an administration. [See the documentation](https://developers.bookingexperts.com/reference/administration-bookings-index)",
version: "0.0.2",
version: "0.0.3",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand All @@ -29,10 +29,10 @@ export default {
],
description: "Filter by owner",
},
channelId: {
administrationChannelId: {
propDefinition: [
bookingExperts,
"channelId",
"administrationChannelId",
(c) => ({
administrationId: c.administrationId,
}),
Expand Down Expand Up @@ -69,7 +69,7 @@ export default {
administrationId: this.administrationId,
params: {
"filter[owner]": this.ownerId,
"filter[channel]": this.channelId,
"filter[channel]": this.listAdministrationChannels,
"filter[reservations]": this.reservationId,
"filter[created_at]": this.createdAt,
"filter[updated_at]": this.updatedAt,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "booking_experts-list-inventory-objects",
name: "List Inventory Objects",
description: "Returns inventory objects of the administration. [See the documentation](https://developers.bookingexperts.com/reference/administration-inventoryobjects-index)",
version: "0.0.2",
version: "0.0.3",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down Expand Up @@ -46,6 +46,7 @@ export default {
},
async run({ $ }) {
const { data } = await this.bookingExperts.listInventoryObjects({
$,
administrationId: this.administrationId,
params: {
"filter[name]": this.name,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
import { ConfigurationError } from "@pipedream/platform";
import bookingExperts from "../../booking_experts.app.mjs";

export default {
key: "booking_experts-list-rentabletype-availabilities",
name: "List RentableType Availabilities",
description: "List availabilities of a RentableType you have access to. [See the documentation](https://developers.bookingexperts.com/reference/channel-rentabletype-availabilities-index)",
version: "0.0.1",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: true,
},
type: "action",
props: {
bookingExperts,
info: {

Check warning on line 17 in components/booking_experts/actions/list-rentabletype-availabilities/list-rentabletype-availabilities.mjs

View workflow job for this annotation

GitHub Actions / Lint Code Base

Component prop info must have a description. See https://pipedream.com/docs/components/guidelines/#props

Check warning on line 17 in components/booking_experts/actions/list-rentabletype-availabilities/list-rentabletype-availabilities.mjs

View workflow job for this annotation

GitHub Actions / Lint Code Base

Component prop info must have a label. See https://pipedream.com/docs/components/guidelines/#props
type: "alert",
alertType: "warning",
content: "**The API will only list channels created through the Booking Experts API.**",
},
channelId: {
propDefinition: [
bookingExperts,
"channelId",
],
optional: false,
},
rentableTypeId: {
propDefinition: [
bookingExperts,
"rentableTypeId",
({ channelId }) => ({
channelId,
}),
],
},
startDate: {
type: "string",
label: "Start Date",
description: "The start date of the availability. Yields availability for the given date range. Format: `YYYY-MM-DD`",
optional: true,
},
endDate: {
type: "string",
label: "End Date",
description: "The end date of the availability. Will be capped to 2 years in the future. Max LOS is capped to 30. Format: `YYYY-MM-DD`",
optional: true,
},
},
async run({ $ }) {
if ((!this.startDate && this.endDate) || (this.startDate && !this.endDate)) {
throw new ConfigurationError("You should provide both the start and end date parameters.");
}
const { data } = await this.bookingExperts.listRentableTypeAvailabilities({
$,
channelId: this.channelId,
rentableTypeId: this.rentableTypeId,
params: {
...(this.startDate && this.endDate
&& {
"date_range": `${this.startDate}..${this.endDate}`,
}),
},
});
$.export("$summary", `Found ${data.length} rentable type availabilities`);
return data;
},
};
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import bookingExperts from "../../booking_experts.app.mjs";
import { ConfigurationError } from "@pipedream/platform";
import bookingExperts from "../../booking_experts.app.mjs";

export default {
key: "booking_experts-search-contacts",
name: "Search Contacts",
description: "Search for contacts by email or phone. [See the documentation](https://developers.bookingexperts.com/reference/contact-search-first)",
version: "0.0.2",
version: "0.0.3",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down Expand Up @@ -34,6 +34,7 @@ export default {

try {
const { data } = await this.bookingExperts.searchContacts({
$,
params: {
email: this.email,
phone: this.phone,
Expand Down
Loading
Loading