Skip to content

Conversation

@luancazarine
Copy link
Collaborator

@luancazarine luancazarine commented Nov 13, 2025

Resolves #19046

Summary by CodeRabbit

  • New Features

    • Delete guests from reservations
    • Retrieve booking details by ID
    • List availabilities (general and by rentable type)
    • Update guest information
    • New selection options for bookings, administration channels, guests, and rentable types
    • New guest-related write endpoints (update, delete)
  • Bug Fixes

    • Fixed action description punctuation
    • Ensured context is forwarded to several booking API calls
  • Chores

    • Package and multiple action/source version bumps
    • Renamed booking list prop to administrationChannelId and aligned API surface

- Added new actions: `getBooking`, `deleteGuest`, `updateGuest`, `listAvailabilities`, and `listRentableTypeAvailabilities`.
- Introduced new properties for administration and booking IDs, guest details, and rentable type availability.
- Updated existing actions to improve functionality and consistency.
- Incremented package version to 0.2.0 and updated action versions accordingly.
@vercel
Copy link

vercel bot commented Nov 13, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
pipedream-docs Ignored Ignored Nov 17, 2025 11:59pm
pipedream-docs-redirect-do-not-edit Ignored Ignored Nov 17, 2025 11:59pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 13, 2025

Walkthrough

Adds multiple Booking Experts actions (get-booking, list-availabilities, list-rentabletype-availabilities, update-guest, delete-guest), extends the booking_experts app with new propDefinitions and API methods (getBooking, listAvailabilities, listRentableTypes, listGuests, updateGuest, deleteGuest, listAdministrationChannels), renames a prop in list-bookings, and bumps several versions including the package.

Changes

Cohort / File(s) Summary
Guest management actions
components/booking_experts/actions/delete-guest/delete-guest.mjs, components/booking_experts/actions/update-guest/update-guest.mjs
New actions to delete and update a reservation guest; props wired to app propDefinitions; run() calls app methods (deleteGuest, updateGuest) and return API responses.
Booking & availability actions
components/booking_experts/actions/get-booking/get-booking.mjs, components/booking_experts/actions/list-availabilities/list-availabilities.mjs, components/booking_experts/actions/list-rentabletype-availabilities/list-rentabletype-availabilities.mjs
New actions to retrieve a booking, list global availabilities, and list rentable-type availabilities (includes channelId, rentableTypeId, optional start/end date validation and date_range param).
Existing action metadata updates
components/booking_experts/actions/add-guest-to-reservation/add-guest-to-reservation.mjs, components/booking_experts/actions/create-agenda-period/create-agenda-period.mjs, components/booking_experts/actions/get-complex-prices/get-complex-prices.mjs, components/booking_experts/actions/list-inventory-objects/list-inventory-objects.mjs, components/booking_experts/actions/search-contacts/search-contacts.mjs
Version bumps (mostly 0.0.20.0.3), added context ($) forwarding in some run calls, readOnlyHint addition in search-contacts, and a minor description fix in add-guest-to-reservation.
list-bookings prop rename & version
components/booking_experts/actions/list-bookings/list-bookings.mjs
Version bumped to 0.0.3 and public prop renamed from channelIdadministrationChannelId; internal references updated to use administration-focused listing.
App module extensions
components/booking_experts/booking_experts.app.mjs
Added propDefinitions (administrationChannelId, bookingId, guestId, rentableTypeId), new methods (getBooking, updateGuest, deleteGuest), new listing endpoints (listAvailabilities, listChannels, listGuests, listRentableTypes, listRentableTypeAvailabilities, listAdministrationChannels), and adjusted option/endpoint wiring.
Sources version bumps
components/booking_experts/sources/...
Source modules version increments (0.0.10.0.2) for booking-updated, inventory-object-updated, new-booking-created, new-inventory-object-created; no logic changes.
Package version
components/booking_experts/package.json
Package version bumped from 0.1.0 to 0.2.0.

Sequence Diagram(s)

sequenceDiagram
  participant Action as Action (user)
  participant App as booking_experts.app
  participant API as BookingExperts API

  rect rgb(235,243,255)
    note right of Action: Update guest
    Action->>App: updateGuest(administrationId, reservationId, guestId, payload, $)
    App->>API: PATCH /administrations/{administrationId}/reservations/{reservationId}/guests/{guestId}
    API-->>App: 200 OK (guest)
    App-->>Action: data & $summary
  end

  rect rgb(255,245,235)
    note right of Action: Delete guest
    Action->>App: deleteGuest(administrationId, reservationId, guestId, $)
    App->>API: DELETE /administrations/{administrationId}/reservations/{reservationId}/guests/{guestId}
    API-->>App: 204 / confirmation
    App-->>Action: confirmation & $summary
  end

  rect rgb(235,255,240)
    note right of Action: Booking & availabilities
    Action->>App: getBooking(administrationId, bookingId, $)
    App->>API: GET /administrations/{administrationId}/bookings/{bookingId}
    API-->>App: 200 OK (booking)
    App-->>Action: booking data & $summary

    Action->>App: listRentableTypeAvailabilities(channelId, rentableTypeId, date_range?, $)
    App->>API: GET /channels/{channelId}/rentable_types/{rentableTypeId}/availabilities?date_range=start..end
    API-->>App: 200 OK (availabilities[])
    App-->>Action: availabilities & $summary
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~30 minutes

  • Areas to focus during review:
    • propDefinition dependency wiring for administrationId → reservationId → guestId and channelId → rentableTypeId
    • API method endpoint paths and parameter formatting in booking_experts.app.mjs (date_range assembly)
    • Consistency of prop rename in list-bookings (administrationChannelId usage)
    • updateGuest payload field mappings to API attribute names (e.g., first_name) and correct forwarding of $ where added

Possibly related PRs

Suggested labels

User submitted

Suggested reviewers

  • michelle0927
  • lcaresia

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description only contains 'Resolves #19046' without substantive detail about the changes, while the template requires a 'WHY' section explaining the rationale. Add a detailed description explaining the purpose and rationale of the changes in the WHY section of the PR description.
Out of Scope Changes check ❓ Inconclusive The PR includes version bumps and minor refactors (e.g., channelId to administrationChannelId, context parameter additions) beyond the five core endpoint implementations, which may represent scope creep. Clarify whether the version bumps and property renames are intentional improvements or unrelated changes that should be separated into a different PR.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main objective of the PR: enhancing the booking_experts component with new actions and properties.
Linked Issues check ✅ Passed The PR implements all five required API endpoints: PATCH/DELETE guests, GET rentable type availabilities, GET availabilities, and GET booking operations with corresponding actions and properties.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 19046-action-booking-experts---availability-extended-endpoints-for-bookings

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 75f1499 and a837505.

📒 Files selected for processing (7)
  • components/booking_experts/actions/add-guest-to-reservation/add-guest-to-reservation.mjs (2 hunks)
  • components/booking_experts/actions/delete-guest/delete-guest.mjs (1 hunks)
  • components/booking_experts/actions/list-availabilities/list-availabilities.mjs (1 hunks)
  • components/booking_experts/actions/list-inventory-objects/list-inventory-objects.mjs (2 hunks)
  • components/booking_experts/actions/search-contacts/search-contacts.mjs (2 hunks)
  • components/booking_experts/actions/update-guest/update-guest.mjs (1 hunks)
  • components/booking_experts/booking_experts.app.mjs (6 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-01-29T22:59:38.825Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 15436
File: components/printful/printful.app.mjs:55-63
Timestamp: 2025-01-29T22:59:38.825Z
Learning: Console.log statements should be removed before merging PRs to maintain code quality and prevent potential security risks from exposing sensitive information in logs.

Applied to files:

  • components/booking_experts/booking_experts.app.mjs
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Lint Code Base
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Publish TypeScript components
  • GitHub Check: pnpm publish
🔇 Additional comments (10)
components/booking_experts/actions/list-inventory-objects/list-inventory-objects.mjs (1)

7-7: LGTM! Version bump and context parameter addition.

The version bump and addition of the $ context parameter to the API call are appropriate changes that enable better logging and error handling within the Pipedream platform.

Also applies to: 48-49

components/booking_experts/actions/search-contacts/search-contacts.mjs (1)

8-12: LGTM! Appropriate annotations and context parameter.

The addition of readOnlyHint: true correctly reflects that this is a read-only search operation, and the $ context parameter enables proper logging integration with the Pipedream platform.

Also applies to: 36-37

components/booking_experts/actions/add-guest-to-reservation/add-guest-to-reservation.mjs (1)

6-7: LGTM! Minor description fix and context parameter addition.

The description punctuation correction and addition of the $ context parameter are appropriate improvements that enhance code quality and platform integration.

Also applies to: 79-80

components/booking_experts/actions/list-availabilities/list-availabilities.mjs (1)

8-11: LGTM! Read-only hint correctly set.

The readOnlyHint: true annotation correctly reflects that this is a read-only GET operation.

components/booking_experts/booking_experts.app.mjs (6)

47-68: LGTM! Clearer naming for administration-scoped channels.

The rename from channelId to administrationChannelId better reflects that this prop lists channels scoped to a specific administration. The dependency on administrationId is correctly implemented.


69-89: LGTM! New bookingId propDefinition correctly implemented.

The new bookingId prop definition correctly fetches bookings from the specified administration and uses booking_nr as the display label, which provides meaningful context for users.


90-107: LGTM! Global channelId propDefinition correctly implemented.

The circular dependency issue noted in previous reviews has been resolved. This propDefinition now correctly fetches channels globally without any circular parameter dependencies.


108-128: LGTM! New rentableTypeId propDefinition correctly implemented.

The prop definition correctly implements the dependency on channelId and fetches rentable types appropriately.


150-175: LGTM! guestId propDefinition correctly implemented with proper label formatting.

The guest label formatting has been correctly implemented with conditional spacing, avoiding the double-space issue noted in previous reviews. The dependencies on both administrationId and reservationId are appropriately declared.


285-292: LGTM! New API methods correctly implement the required endpoints.

All new methods correctly implement the endpoints specified in the PR objectives:

  • getBooking: GET /v3/administrations/{administration_id}/bookings/{id}
  • listAvailabilities: GET /v3/availabilities
  • listRentableTypeAvailabilities: GET /v3/channels/{channel_id}/rentable_types/{rentable_type_id}/availabilities
  • updateGuest: PATCH /v3/administrations/{administration_id}/reservations/{reservation_id}/guests/{id}
  • deleteGuest: DELETE /v3/administrations/{administration_id}/reservations/{reservation_id}/guests/{id}

The implementations follow the consistent pattern established in the codebase and use appropriate HTTP methods.

Also applies to: 317-352, 409-426


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
components/booking_experts/actions/list-bookings/list-bookings.mjs (1)

32-41: Clarify the property name.

The property name listAdministrationChannels is confusing because:

  1. It sounds like a method that lists channels rather than a channel filter parameter
  2. The plural form suggests multiple values, but line 72 uses it as a single filter value
  3. It's inconsistent with other singular-named props in this action (administrationId, ownerId, reservationId)

Consider renaming to channelId or administrationChannelId for clarity and consistency.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d20d528 and 69c2520.

📒 Files selected for processing (9)
  • components/booking_experts/actions/add-guest-to-reservation/add-guest-to-reservation.mjs (1 hunks)
  • components/booking_experts/actions/delete-guest/delete-guest.mjs (1 hunks)
  • components/booking_experts/actions/get-booking/get-booking.mjs (1 hunks)
  • components/booking_experts/actions/list-availabilities/list-availabilities.mjs (1 hunks)
  • components/booking_experts/actions/list-bookings/list-bookings.mjs (3 hunks)
  • components/booking_experts/actions/list-rentabletype-availabilities/list-rentabletype-availabilities.mjs (1 hunks)
  • components/booking_experts/actions/update-guest/update-guest.mjs (1 hunks)
  • components/booking_experts/booking_experts.app.mjs (5 hunks)
  • components/booking_experts/package.json (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2024-12-12T19:23:09.039Z
Learnt from: jcortes
Repo: PipedreamHQ/pipedream PR: 14935
File: components/sailpoint/package.json:15-18
Timestamp: 2024-12-12T19:23:09.039Z
Learning: When developing Pipedream components, do not add built-in Node.js modules like `fs` to `package.json` dependencies, as they are native modules provided by the Node.js runtime.

Applied to files:

  • components/booking_experts/package.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: pnpm publish
  • GitHub Check: Lint Code Base
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Publish TypeScript components
🔇 Additional comments (19)
components/booking_experts/package.json (1)

3-3: LGTM!

The version bump from 0.1.0 to 0.2.0 is appropriate for the addition of new actions and API methods.

components/booking_experts/actions/add-guest-to-reservation/add-guest-to-reservation.mjs (1)

6-7: LGTM!

The typo fix (removing the extra period) and version bump are appropriate.

components/booking_experts/actions/list-bookings/list-bookings.mjs (1)

72-72: Verify the filter parameter usage.

Ensure that the filter[channel] parameter accepts the value returned by the listAdministrationChannels prop definition. If it expects a single channel ID but the prop returns an array or different format, this will cause runtime errors.

components/booking_experts/actions/delete-guest/delete-guest.mjs (1)

26-28: LGTM!

The arrow function syntax for passing administrationId to the prop definition is clean and correct.

components/booking_experts/actions/list-rentabletype-availabilities/list-rentabletype-availabilities.mjs (1)

1-2: LGTM!

Good use of ConfigurationError for validation.

components/booking_experts/actions/get-booking/get-booking.mjs (1)

22-30: LGTM!

The prop definition correctly passes administrationId to scope the booking selection.

components/booking_experts/actions/update-guest/update-guest.mjs (1)

97-112: The review comment is based on an incorrect assumption about how Pipedream's axios handles undefined values.

The booking_experts.app.mjs imports axios from @pipedream/platform (line 1), and the updateGuest method uses Pipedream's axios implementation. As confirmed in the learnings, Pipedream's platform axios automatically excludes undefined values from HTTP requests, so the current code already handles partial updates correctly without manual filtering.

The API requirement to send only changed fields (no undefined values) is already satisfied by Pipedream's axios behavior. No changes are needed.

Likely an incorrect or invalid review comment.

components/booking_experts/booking_experts.app.mjs (12)

47-68: LGTM!

The administrationChannelId propDefinition is well-structured and follows the established pattern for dependent dropdowns in the codebase.


69-89: LGTM!

The bookingId propDefinition correctly fetches bookings and displays the booking number as the label, which provides good UX.


111-131: LGTM!

The rentableTypeId propDefinition correctly depends on channelId and follows the established pattern for cascading dropdowns.


288-295: LGTM!

The getBooking method correctly implements the GET booking endpoint as specified in the PR objectives.


312-319: LGTM!

The listAdministrationChannels method is correctly implemented and properly scoped to a specific administration.


320-325: LGTM!

The listAvailabilities method correctly implements the global availabilities endpoint as specified in the PR objectives.


326-331: LGTM!

The listChannels method correctly implements the global channels endpoint.


332-339: LGTM!

The listGuests method correctly implements the endpoint for fetching guests associated with a reservation.


340-347: LGTM!

The listRentableTypes method correctly implements the endpoint for fetching rentable types for a specific channel.


348-355: LGTM!

The listRentableTypeAvailabilities method correctly implements the rentable type availabilities endpoint as specified in the PR objectives.


412-420: LGTM!

The updateGuest method correctly implements the PATCH guests endpoint as specified in the PR objectives.


421-429: LGTM!

The deleteGuest method correctly implements the DELETE guest endpoint as specified in the PR objectives.

luancazarine and others added 2 commits November 13, 2025 15:48
…0.0.2 respectively

- Incremented version for actions: `create-agenda-period`, `get-complex-prices`, and `list-inventory-objects` to 0.0.3.
- Updated version for sources: `booking-updated`, `inventory-object-updated`, `new-booking-created`, and `new-inventory-object-created` to 0.0.2.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5a4a1ce and 83d39da.

📒 Files selected for processing (1)
  • components/booking_experts/actions/delete-guest/delete-guest.mjs (1 hunks)
🧰 Additional context used
🪛 Biome (2.1.2)
components/booking_experts/actions/delete-guest/delete-guest.mjs

[error] 13-13: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 15-15: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 17-17: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 22-22: Expected an expression but instead found '}'.

Expected an expression here.

(parse)


[error] 22-23: Expected a statement but instead found ',
reservationId:'.

Expected a statement here.

(parse)


[error] 31-31: Expected an expression but instead found '}'.

Expected an expression here.

(parse)


[error] 31-32: Expected a statement but instead found ',
guestId:'.

Expected a statement here.

(parse)


[error] 43-43: Expected an expression but instead found '}'.

Expected an expression here.

(parse)


[error] 43-43: Expected a statement but instead found ','.

Expected a statement here.

(parse)


[error] 44-45: Expected a statement but instead found ',
async run('.

Expected a statement here.

(parse)


[error] 45-45: Expected a statement but instead found ')'.

Expected a statement here.

(parse)


[error] 53-53: Illegal return statement outside of a function

(parse)


[error] 54-55: Expected a statement but instead found ',
}'.

Expected a statement here.

(parse)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: pnpm publish
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Lint Code Base

- Simplified options method in booking_experts.app.mjs by removing unused channelId parameter.
- Updated description in get-booking action to point to the correct documentation link.
- Enhanced list-rentabletype-availabilities action to conditionally include date_range parameter based on start and end dates.
- Removed unnecessary closing brace in delete-guest action for cleaner code.
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 83d39da and de345a2.

📒 Files selected for processing (4)
  • components/booking_experts/actions/delete-guest/delete-guest.mjs (1 hunks)
  • components/booking_experts/actions/get-booking/get-booking.mjs (1 hunks)
  • components/booking_experts/actions/list-rentabletype-availabilities/list-rentabletype-availabilities.mjs (1 hunks)
  • components/booking_experts/booking_experts.app.mjs (6 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: pnpm publish
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Lint Code Base
🔇 Additional comments (6)
components/booking_experts/actions/delete-guest/delete-guest.mjs (1)

1-54: LGTM! Past issues resolved.

The previous concerns about destructiveHint and syntax errors have been addressed. The action is properly configured with destructiveHint: true (appropriate for a delete operation), and the code structure is correct.

components/booking_experts/booking_experts.app.mjs (3)

90-107: LGTM! Circular dependency resolved.

The previous circular logic issue has been fixed. The channelId propDefinition now correctly uses only page as a parameter and calls the global listChannels endpoint without any circular reference.


150-175: LGTM! Label formatting corrected.

The previous double-space issue has been resolved. The label now correctly formats as "First Last (email)" or "First Last" without extra spaces.


47-68: LGTM! New propDefinitions and methods are well-implemented.

The new additions follow consistent patterns:

  • PropDefinitions properly handle dependencies and pagination
  • API methods correctly construct paths and use appropriate HTTP verbs
  • All endpoints align with the Booking Experts API structure

Also applies to: 69-89, 108-128, 285-292, 317-352, 409-426

components/booking_experts/actions/list-rentabletype-availabilities/list-rentabletype-availabilities.mjs (1)

64-67: LGTM! Date range parameter handling corrected.

The previous issue with undefined date_range has been resolved. The parameter is now only included when both dates are provided using a conditional spread operator.

components/booking_experts/actions/get-booking/get-booking.mjs (1)

1-41: LGTM! Documentation link corrected.

The previous issue with the documentation URL has been resolved. The link now correctly points to administration-bookings-show for retrieving a single booking. The action is properly implemented with correct prop wiring and API call.

- Removed the administrationId prop definition and its associated logic from the list-rentabletype-availabilities action for improved clarity and simplicity.
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
components/booking_experts/actions/list-rentabletype-availabilities/list-rentabletype-availabilities.mjs (1)

33-49: Consider adding date format validation.

While the descriptions specify YYYY-MM-DD format for both dates, there's no validation to ensure users provide the correct format. Adding a regex check (e.g., /^\d{4}-\d{2}-\d{2}$/) would improve user experience by catching format errors early rather than letting the API reject invalid dates.

Example validation:

   async run({ $ }) {
+    const dateRegex = /^\d{4}-\d{2}-\d{2}$/;
+    if (this.startDate && !dateRegex.test(this.startDate)) {
+      throw new ConfigurationError("Start date must be in YYYY-MM-DD format.");
+    }
+    if (this.endDate && !dateRegex.test(this.endDate)) {
+      throw new ConfigurationError("End date must be in YYYY-MM-DD format.");
+    }
     if ((!this.startDate && this.endDate) || (this.startDate && !this.endDate)) {
       throw new ConfigurationError("You should provide both the start and end date parameters.");
     }
📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between de345a2 and 07a2ae2.

📒 Files selected for processing (1)
  • components/booking_experts/actions/list-rentabletype-availabilities/list-rentabletype-availabilities.mjs (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: pnpm publish
  • GitHub Check: Lint Code Base
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Verify TypeScript components
🔇 Additional comments (2)
components/booking_experts/actions/list-rentabletype-availabilities/list-rentabletype-availabilities.mjs (2)

47-60: Previous issue resolved: date_range now conditionally included.

The previous concern about sending date_range: "undefined..undefined" to the API has been successfully addressed. The conditional spreading pattern ...(this.startDate && this.endDate && { "date_range": ... }) ensures the parameter is only included when both dates are provided.


1-64: Overall implementation looks solid.

The action correctly implements the rentable type availabilities endpoint with proper prop dependencies (rentableTypeId depends on channelId), clear validation logic, and appropriate error handling. The structure aligns well with other actions in the booking_experts component.

jcortes
jcortes previously approved these changes Nov 14, 2025
Copy link
Collaborator

@jcortes jcortes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @luancazarine lgtm! Ready for QA!

@vunguyenhung
Copy link
Collaborator

Hello everyone, I have tested this PR and there're some test cases failed or needed improvement.

Please check test reports below for more information:

- Added warning alerts to listAvailabilities, deleteGuest, updateGuest, and listRentableTypeAvailabilities actions to inform users about API limitations.
- Updated label formatting in booking_experts.app.mjs to include booking number for better identification.
- Refactored administrationChannelId prop in list-bookings action for clarity.
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
components/booking_experts/actions/list-bookings/list-bookings.mjs (1)

32-41: filter[channel] is wired to the wrong value

In the request params you’re sending:

"filter[channel]": this.listAdministrationChannels,

listAdministrationChannels is a method on the app, not the selected channel value. This means the channel filter will be incorrect (or effectively omitted).

You likely want to pass the selected administrationChannelId instead:

-        "filter[channel]": this.listAdministrationChannels,
+        "filter[channel]": this.administrationChannelId,

This will correctly filter bookings by the chosen administration channel.

Also applies to: 67-78

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 07a2ae2 and 75f1499.

📒 Files selected for processing (6)
  • components/booking_experts/actions/delete-guest/delete-guest.mjs (1 hunks)
  • components/booking_experts/actions/list-availabilities/list-availabilities.mjs (1 hunks)
  • components/booking_experts/actions/list-bookings/list-bookings.mjs (3 hunks)
  • components/booking_experts/actions/list-rentabletype-availabilities/list-rentabletype-availabilities.mjs (1 hunks)
  • components/booking_experts/actions/update-guest/update-guest.mjs (1 hunks)
  • components/booking_experts/booking_experts.app.mjs (5 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: pnpm publish
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Lint Code Base
🔇 Additional comments (1)
components/booking_experts/actions/list-rentabletype-availabilities/list-rentabletype-availabilities.mjs (1)

1-68: Validation and query construction look solid

The date-range validation and conditional "date_range" param construction are correct, and the wiring to channelId / rentableTypeId matches the app methods. readOnlyHint: true is also appropriate here.

No changes needed from my side.

…lity

- Removed unnecessary console log from booking_experts.app.mjs for cleaner code.
- Added missing `$` parameter to addGuestToReservation, deleteGuest, listInventoryObjects, searchContacts, and updateGuest actions for better integration.
- Updated readOnlyHint in listAvailabilities action to true for improved user guidance.
@vunguyenhung
Copy link
Collaborator

Hi everyone, all test cases are passed! Ready for release!

Test reports

@luancazarine
Copy link
Collaborator Author

/approve

@luancazarine luancazarine merged commit b6ee3e0 into master Nov 18, 2025
10 checks passed
@luancazarine luancazarine deleted the 19046-action-booking-experts---availability-extended-endpoints-for-bookings branch November 18, 2025 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ACTION] Booking Experts - availability + extended endpoints for bookings

4 participants