Skip to content

Conversation

@tharuniga07
Copy link

@tharuniga07 tharuniga07 commented Nov 20, 2025

Implements a new Booking Experts action to fetch reservations by ID, following API documentation.
Closes #19140.
Please let me know if you’d like any changes.

Summary by CodeRabbit

  • Chores

    • Bumped component and many action/source versions (package and action/source metadata updates).
  • New Features

    • Retrieve an individual reservation by ID.
    • List reservations with pagination and optional administration-scoped listing.

✏️ Tip: You can customize this high-level summary in your review settings.

@adolfo-pd adolfo-pd added the User submitted Submitted by a user label Nov 20, 2025
@vercel
Copy link

vercel bot commented Nov 20, 2025

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

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
pipedream-docs-redirect-do-not-edit Ignored Ignored Nov 20, 2025 11:21pm

@pipedream-component-development
Copy link
Collaborator

Thank you so much for submitting this! We've added it to our backlog to review, and our team has been notified.

@pipedream-component-development
Copy link
Collaborator

Thanks for submitting this PR! When we review PRs, we follow the Pipedream component guidelines. If you're not familiar, here's a quick checklist:

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 20, 2025

Walkthrough

Adds two new actions (Get Reservation, List Reservations) and corresponding app-level API methods (getReservation, listReservations refactor, listReservationsInAdministration). Multiple component versions bumped and several action/source modules had their exported version fields incremented. Package version updated to 0.3.0.

Changes

Cohort / File(s) Summary
Package version
components/booking_experts/package.json
Version bumped from 0.2.00.3.0.
New reservation actions
components/booking_experts/actions/get-reservation/get-reservation.mjs, components/booking_experts/actions/list-reservations/list-reservations.mjs
Added Get Reservation and List Reservations action modules (metadata, props, run methods) that call into the app methods.
App API changes
components/booking_experts/booking_experts.app.mjs
Added getReservation(reservationId, ...opts); refactored listReservations(opts = {}); added listReservationsInAdministration({ administrationId, ...opts }); conditional routing for reservation option fetching based on administrationId.
Action version bumps
components/booking_experts/actions/*/add-guest-to-reservation/add-guest-to-reservation.mjs, .../create-agenda-period/create-agenda-period.mjs, .../delete-guest/delete-guest.mjs, .../get-booking/get-booking.mjs, .../get-complex-prices/get-complex-prices.mjs, .../list-availabilities/list-availabilities.mjs, .../list-bookings/list-bookings.mjs, .../list-inventory-objects/list-inventory-objects.mjs, .../list-rentabletype-availabilities/list-rentabletype-availabilities.mjs, .../search-contacts/search-contacts.mjs, .../update-guest/update-guest.mjs
Incremented version fields in multiple action modules (no logic changes).
Source version bumps
components/booking_experts/sources/booking-updated/booking-updated.mjs, .../inventory-object-updated/inventory-object-updated.mjs, .../new-booking-created/new-booking-created.mjs, .../new-inventory-object-created/new-inventory-object-created.mjs
Incremented version fields in multiple source modules (no logic changes).

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant GetResAction as Get Reservation Action
    participant ListResAction as List Reservations Action
    participant App as booking_experts.app
    participant API as Booking Experts API

    User->>GetResAction: call(reservationId)
    GetResAction->>App: getReservation(reservationId, $)
    App->>API: GET /reservations/{reservationId}
    API-->>App: reservation
    App-->>GetResAction: response
    GetResAction-->>User: summary + data

    User->>ListResAction: call(page, perPage [, administrationId])
    ListResAction->>App: listReservations({ page, perPage, administrationId, $ })
    alt administrationId provided
        App->>API: GET /administrations/{administrationId}/reservations?page=&size=
    else
        App->>API: GET /reservations?page=&size=
    end
    API-->>App: reservations[]
    App-->>ListResAction: response
    ListResAction-->>User: "Found N reservations" + data
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Review new action props and propDefinition references for pagination and bookingExperts prop wiring.
  • Verify app method signatures and HTTP paths: getReservation, listReservations, listReservationsInAdministration.
  • Confirm conditional routing logic for administration-scoped listing and option fetching.
  • Spot-check version bumps to ensure consistency with package manifest.

Possibly related PRs

Suggested reviewers

  • luancazarine
  • jcortes

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR includes version bumps across multiple existing actions and sources beyond the scope of #19140. These version bumps appear to be maintenance updates but are not directly related to implementing the new reservation actions. Separate version bump updates into a dedicated maintenance PR or justify their necessity as part of the feature release cycle.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main change: implementing get reservation functionality for Booking Experts, with specific reference to issue #19140.
Description check ✅ Passed The PR description is minimal but adequate. It states the purpose (implementing get reservation action), references the issue it closes, and invites feedback. However, it lacks detail about the WHY section present in the template.
Linked Issues check ✅ Passed The PR fully implements both API operations required by issue #19140: get-reservation (show) and list-reservations (index) actions, with supporting API methods in the app file.
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

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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: 2

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6f9a2f5 and c255502.

📒 Files selected for processing (1)
  • components/booking_experts/actions/get-reservation.js (1 hunks)
🔇 Additional comments (3)
components/booking_experts/actions/get-reservation.js (3)

1-2: LGTM!

The import statement is correct and follows Pipedream's standard conventions for making HTTP requests.


3-8: LGTM!

The metadata is well-defined with a clear name, description, and appropriate versioning for a new component.


3-30: Verify if "Get Reservations" (list) action is needed.

The linked issue #19140 mentions implementing both "Get reservations" (list endpoint) and "Get reservation" (single endpoint) operations. This PR only implements the singular "Get reservation" action. Please confirm whether the list operation should be included in this PR or will be implemented separately.

Reference from PR objectives:

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 c255502 and 3157e81.

📒 Files selected for processing (1)
  • components/booking_experts/actions/list-reservations.js (1 hunks)
🔇 Additional comments (2)
components/booking_experts/actions/list-reservations.js (2)

3-8: Action metadata and key look consistent

Name, description, key, version, and type follow the usual Pipedream action pattern and look good for a new list reservations action.


23-35: API parameters verified as correct; flagging endpoint mismatch in centralization suggestion for verification

The web search confirms that page[number] and Accept: application/vnd.api+json are correct per JSON:API specification. However, there is a discrepancy with the suggested refactor:

  • The current action calls GET /v3/reservations (no administrationId scope)
  • The app's listReservations() method at booking_experts.app.mjs requires administrationId and calls /administrations/{administrationId}/reservations
  • The action has no administrationId prop

The suggested refactor (this.booking_experts.listReservations($, { page: this.page })) would fail because the method requires administrationId which the action doesn't provide. Verify whether:

  1. The action intentionally calls a different (global) endpoint than the app's scoped method, or
  2. The action is missing an administrationId prop and should be refactored to use it.

The $summary suggestion is optional (no actions currently use it), and return axios(...) would work equivalently to return await axios(...) here.

@GTFalcao GTFalcao moved this from Ready for PR Review to In Review in Component (Source and Action) Backlog Nov 20, 2025
@GTFalcao GTFalcao moved this from In Review to Prioritized in Component (Source and Action) Backlog Nov 20, 2025
@GTFalcao GTFalcao removed their request for review November 20, 2025 22:01
@GTFalcao GTFalcao moved this from Prioritized to Ready for PR Review in Component (Source and Action) Backlog Nov 20, 2025
@michelle0927 michelle0927 moved this from Ready for PR Review to In Review in Component (Source and Action) Backlog Nov 20, 2025
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: 3

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/booking_experts.app.mjs (1)

372-379: Add JSDoc documentation for the public API method.

The implementation correctly follows the pattern of other administration-scoped methods. Consider adding JSDoc documentation.

Apply this diff:

+  /**
+   * Lists reservations within a specific administration.
+   * @param {Object} params - The parameters object
+   * @param {string} params.administrationId - The ID of the administration
+   * @param {Object} params.opts - Additional request options including pagination params
+   * @returns {Promise<Object>} List of reservations for the administration
+   */
   listReservationsInAdministration({
     administrationId, ...opts
   }) {

Based on coding guidelines.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8080059 and 02373bb.

📒 Files selected for processing (3)
  • components/booking_experts/actions/get-reservation/get-reservation.mjs (1 hunks)
  • components/booking_experts/actions/list-reservations/list-reservations.mjs (1 hunks)
  • components/booking_experts/booking_experts.app.mjs (3 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
components/booking_experts/actions/get-reservation/get-reservation.mjs (1)
components/booking_experts/actions/list-reservations/list-reservations.mjs (1)
  • response (31-37)
components/booking_experts/actions/list-reservations/list-reservations.mjs (1)
components/booking_experts/actions/get-reservation/get-reservation.mjs (1)
  • response (24-27)
🔇 Additional comments (2)
components/booking_experts/booking_experts.app.mjs (1)

136-146: LGTM! Clean conditional logic for reservation options.

The implementation correctly handles both administration-scoped and organization-wide reservation listing, providing appropriate fallback behavior when no administration context is available.

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

1-31: LGTM! Well-structured action implementation.

The action follows Pipedream conventions correctly:

  • Component key uses the proper format app_name_slug-slugified-component-name
  • Annotations accurately reflect read-only behavior
  • Props leverage propDefinitions as recommended
  • Documentation link references official API docs
  • Summary message provides clear feedback

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

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)

66-82: Critical: Verified undefined properties cause runtime errors.

The verification confirms all three issues in the original review comment are accurate and will cause runtime failures:

  • Line 72: References this.listAdministrationChannels (undefined), should use this.administrationChannelId
  • Lines 74-75: Reference this.createdAt and this.updatedAt (both undefined)

The proposed fixes are correct and should be applied to prevent TypeError exceptions at runtime.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 02373bb and d765dda.

📒 Files selected for processing (15)
  • components/booking_experts/actions/add-guest-to-reservation/add-guest-to-reservation.mjs (1 hunks)
  • components/booking_experts/actions/create-agenda-period/create-agenda-period.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/get-complex-prices/get-complex-prices.mjs (1 hunks)
  • components/booking_experts/actions/list-availabilities/list-availabilities.mjs (1 hunks)
  • components/booking_experts/actions/list-bookings/list-bookings.mjs (1 hunks)
  • components/booking_experts/actions/list-inventory-objects/list-inventory-objects.mjs (1 hunks)
  • components/booking_experts/actions/list-rentabletype-availabilities/list-rentabletype-availabilities.mjs (1 hunks)
  • components/booking_experts/actions/search-contacts/search-contacts.mjs (1 hunks)
  • components/booking_experts/actions/update-guest/update-guest.mjs (1 hunks)
  • components/booking_experts/sources/booking-updated/booking-updated.mjs (1 hunks)
  • components/booking_experts/sources/inventory-object-updated/inventory-object-updated.mjs (1 hunks)
  • components/booking_experts/sources/new-booking-created/new-booking-created.mjs (1 hunks)
  • components/booking_experts/sources/new-inventory-object-created/new-inventory-object-created.mjs (1 hunks)
🔇 Additional comments (14)
components/booking_experts/actions/get-complex-prices/get-complex-prices.mjs (1)

7-7: Version bump is consistent with PR strategy.

The version update from 0.0.3 to 0.0.4 aligns with the broader coordinated release across Booking Experts actions (package 0.2.0 → 0.3.0) that introduces new reservation actions. The action itself is well-structured with no functional changes needed.

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

7-7: Version bump appears consistent with broader PR versioning strategy.

The metadata-only version change from "0.0.1" to "0.0.2" aligns with the PR's coordinated package version increment (0.2.0 → 0.3.0) mentioned in the summary. The action's functional code is clean and follows Pipedream conventions (proper prop definitions, app delegation, summary export).

Verify that this version bump is intentional as part of the package's coordinated release, particularly since the action itself has no functional changes related to the new reservation operations being added in this PR.

components/booking_experts/actions/list-inventory-objects/list-inventory-objects.mjs (1)

7-7: Verify the rationale for the patch version bump.

The version has been incremented from 0.0.3 to 0.0.4 with no functional code changes to this file. While the PR context shows a coordinated versioning update across multiple booking_experts components as part of the new reservation feature release, clarify whether this patch bump is intentional (e.g., dependency updates or release coordination) or if it should align differently with the package version change.

components/booking_experts/sources/inventory-object-updated/inventory-object-updated.mjs (1)

8-8: LGTM: Version bump is appropriate.

The version bump from 0.0.2 to 0.0.3 aligns with the broader package release (0.2.0 → 0.3.0) and is consistent across all source modules in this PR.

components/booking_experts/sources/new-booking-created/new-booking-created.mjs (1)

8-8: LGTM: Version bump is appropriate.

The version bump from 0.0.2 to 0.0.3 is consistent with the package-wide version update.

components/booking_experts/sources/booking-updated/booking-updated.mjs (1)

8-8: LGTM: Version bump is appropriate.

The version bump from 0.0.2 to 0.0.3 is consistent with the package-wide version update.

components/booking_experts/sources/new-inventory-object-created/new-inventory-object-created.mjs (1)

8-8: LGTM: Version bump is appropriate.

The version bump from 0.0.2 to 0.0.3 is consistent with the package-wide version update.

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

7-7: Version bump looks correct

This is a metadata-only update; the action logic remains unchanged and the new version aligns with the broader Booking Experts release in this PR.

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

8-8: Search Contacts action version bump is fine

Only the version field changed; existing validation and error handling remain intact, so this is a safe metadata update.

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

7-7: List Availabilities version increment is appropriate

This is a straightforward metadata-only version increment with no behavioral changes to the action.

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

8-8: RentableType availabilities action version bump is consistent

Only the version field changed; the existing validation around start/end dates and API call structure is preserved.

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

7-7: Add Guest to Reservation version bump is safe

The update only touches the version metadata; the request payload and action behavior remain the same.

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

7-7: Update Guest action version increment looks good

This is a metadata-only version change; existing props and update logic are unaffected.

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

7-7: LGTM: Version bump is appropriate.

The version increment from "0.0.3" to "0.0.4" aligns with the broader package version update in this PR.

Copy link
Collaborator

@michelle0927 michelle0927 left a comment

Choose a reason for hiding this comment

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

Ready for QA!

@michelle0927 michelle0927 moved this from In Review to Ready for QA in Component (Source and Action) Backlog Nov 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

User submitted Submitted by a user

Projects

Development

Successfully merging this pull request may close these issues.

[ACTION] booking experts - reservations

4 participants