Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ 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.3",
version: "0.0.4",
annotations: {
destructiveHint: false,
openWorldHint: true,
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.3",
version: "0.0.4",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
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",
version: "0.0.2",
annotations: {
destructiveHint: true,
openWorldHint: true,
Expand All @@ -28,7 +28,7 @@
}),
],
},
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.**",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ 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",
version: "0.0.2",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
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.3",
version: "0.0.4",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import bookingExperts from "../../booking_experts.app.mjs";

export default {
name: "Get Reservation",
description: "Fetches a reservation by ID from Booking Experts. [See the documentation](https://developers.bookingexperts.com/reference/reservations-show)",
key: "booking_experts-get-reservation",
version: "0.0.1",
type: "action",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: true,
},
props: {
bookingExperts,
reservationId: {
propDefinition: [
bookingExperts,
"reservationId",
],
},
},
async run({ $ }) {
const response = await this.bookingExperts.getReservation({
$,
reservationId: this.reservationId,
});
$.export("$summary", `Successfully retrieved reservation with ID ${this.reservationId}`);
return response;
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
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",
version: "0.0.2",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand All @@ -13,7 +13,7 @@
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.**",
Expand Down
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.3",
version: "0.0.4",
annotations: {
destructiveHint: false,
openWorldHint: true,
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.3",
version: "0.0.4",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
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",
version: "0.0.2",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand All @@ -14,7 +14,7 @@
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.**",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import bookingExperts from "../../booking_experts.app.mjs";

export default {
name: "List Reservations",
description: "Lists all reservations for the current organization from Booking Experts. [See the documentation](https://developers.bookingexperts.com/reference/reservations-index)",
key: "booking_experts-list-reservations",
version: "0.0.1",
type: "action",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: true,
},
props: {
bookingExperts,
page: {
type: "integer",
label: "Page Number",
description: "Page number for paginating reservations",
optional: true,
default: 1,
},
perPage: {
propDefinition: [
bookingExperts,
"perPage",
],
},
},
async run({ $ }) {
const response = await this.bookingExperts.listReservations({
$,
params: {
"page[number]": this.page,
"page[size]": this.perPage,
},
});
$.export("$summary", `Found ${response.data.length} reservations`);
return response;
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ 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.3",
version: "0.0.4",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
key: "booking_experts-update-guest",
name: "Update Guest",
description: "Update a guest for a reservation. [See the documentation](https://developers.bookingexperts.com/reference/administration-reservation-guests-update)",
version: "0.0.1",
version: "0.0.2",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand All @@ -28,7 +28,7 @@
}),
],
},
info: {

Check warning on line 31 in components/booking_experts/actions/update-guest/update-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/update-guest/update-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.**",
Expand Down
33 changes: 26 additions & 7 deletions components/booking_experts/booking_experts.app.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,17 @@ export default {
async options({
page, administrationId,
}) {
const { data } = await this.listReservations({
administrationId,
params: {
"page[number]": page + 1,
},
});
const params = {
"page[number]": page + 1,
};
const { data } = administrationId
? await this.listReservationsInAdministration({
administrationId,
params,
})
: await this.listReservations({
params,
});
return data?.map(({
id, attributes,
}) => ({
Expand Down Expand Up @@ -276,6 +281,14 @@ export default {
...opts,
});
},
getReservation({
reservationId, ...opts
}) {
return this._makeRequest({
path: `/reservations/${reservationId}`,
...opts,
});
},
listAdministrations(opts = {}) {
return this._makeRequest({
path: "/administrations",
Expand Down Expand Up @@ -350,7 +363,13 @@ export default {
...opts,
});
},
listReservations({
listReservations(opts = {}) {
return this._makeRequest({
path: "/reservations",
...opts,
});
},
listReservationsInAdministration({
administrationId, ...opts
}) {
return this._makeRequest({
Expand Down
2 changes: 1 addition & 1 deletion components/booking_experts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/booking_experts",
"version": "0.2.0",
"version": "0.3.0",
"description": "Pipedream Booking Experts Components",
"main": "booking_experts.app.mjs",
"keywords": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
export default {
...common,
key: "booking_experts-booking-updated",
name: "Booking Updated",

Check warning on line 6 in components/booking_experts/sources/booking-updated/booking-updated.mjs

View workflow job for this annotation

GitHub Actions / Lint Code Base

Source names should start with "New". See https://pipedream.com/docs/components/guidelines/#source-name
description: "Emit new event for each booking updated. [See the documentation](https://developers.bookingexperts.com/reference/administration-bookings-index)",
version: "0.0.2",
version: "0.0.3",
type: "source",
dedupe: "unique",
props: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
export default {
...common,
key: "booking_experts-inventory-object-updated",
name: "Inventory Object Updated",

Check warning on line 6 in components/booking_experts/sources/inventory-object-updated/inventory-object-updated.mjs

View workflow job for this annotation

GitHub Actions / Lint Code Base

Source names should start with "New". See https://pipedream.com/docs/components/guidelines/#source-name
description: "Emit new event when an inventory object is updated. [See the documentation](https://developers.bookingexperts.com/reference/administration-inventoryobjects-index)",
version: "0.0.2",
version: "0.0.3",
type: "source",
dedupe: "unique",
props: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "booking_experts-new-booking-created",
name: "New Booking Created",
description: "Emit new event for each new booking created. [See the documentation](https://developers.bookingexperts.com/reference/administration-bookings-index)",
version: "0.0.2",
version: "0.0.3",
type: "source",
dedupe: "unique",
props: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "booking_experts-new-inventory-object-created",
name: "New Inventory Object Created",
description: "Emit new event when a new inventory object is created. [See the documentation](https://developers.bookingexperts.com/reference/administration-inventoryobjects-index)",
version: "0.0.2",
version: "0.0.3",
type: "source",
dedupe: "unique",
props: {
Expand Down
Loading