Skip to content

Conversation

@jcortes
Copy link
Collaborator

@jcortes jcortes commented Nov 28, 2025

WHY

Resolves #19312

Summary by CodeRabbit

  • New Features

    • Advanced booking filters: reservation IDs, customer IDs, booking number, reference number, created/updated/confirmed timestamps.
    • Customer selection field with async lookup.
    • Booking selector now supports customizable mapping for label/value.
  • Chores

    • Version updates across booking components and related actions/sources.

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

@jcortes jcortes self-assigned this Nov 28, 2025
@vercel
Copy link

vercel bot commented Nov 28, 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 28, 2025 8:35pm
pipedream-docs-redirect-do-not-edit Ignored Ignored Nov 28, 2025 8:35pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 28, 2025

Walkthrough

This PR adds multiple new filters and fields to the list-bookings action, a helper to serialize arrays, and extends the app with a customerId prop plus listCustomers; it also updates several module version numbers and bumps the package version.

Changes

Cohort / File(s) Summary
List Bookings Action Enhancements
components/booking_experts/actions/list-bookings/list-bookings.mjs
Version bumped to 0.0.5. Adds props: reservationIds (string[]), createdAt, updatedAt, filterId, customerIds (string[]), bookingNr, confirmedAt, fieldsBooking (string[]), referenceNr. Adds method commaSeparatedList(value). Updates run({ $ }) to extract new params and pass transformed values to API using keys like filter[ID], filter[reservations], filter[customer], filter[booking_nr], filter[confirmed_at], fields[booking], filter[reference_nr], plus createdAt, updatedAt, page, perPage. Returns data.
Booking Experts App Configuration
components/booking_experts/booking_experts.app.mjs
Adds customerId prop with async options that call new listCustomers() and map customers to { label, value } (label prefers first_name + last_name, otherwise email or id). Adds listCustomers({ administrationId, ...opts }) method. Modifies bookingId options to accept a mapper (default maps booking_nr) and early-returns when administrationId is missing; uses data?.map(mapper).
Package Version
components/booking_experts/package.json
Version bumped from 0.3.0 to 0.3.1.
Minor Action Version Bumps
components/booking_experts/actions/* and components/booking_experts/sources/*
Multiple actions/sources had their exported version metadata incremented (e.g., add-guest-to-reservation, create-agenda-period, delete-guest, get-booking, get-complex-prices, get-reservation, list-availabilities, list-inventory-objects, list-rentabletype-availabilities, list-reservations, search-contacts, update-guest, booking-updated, inventory-object-updated, new-booking-created, new-inventory-object-created). No other logic changes.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Review mapping of each new prop to the exact API parameter keys (bracketed filter/fields syntax).
  • Verify commaSeparatedList() handles arrays, empty arrays, and single string inputs safely.
  • Inspect customerId async options and listCustomers() for error handling and correct label selection.
  • Confirm bookingId mapper default is appropriate and that early-return for missing administrationId is safe.

Possibly related PRs

Suggested labels

User submitted

Suggested reviewers

  • luancazarine
  • michelle0927
  • lcaresia

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Out of Scope Changes check ❓ Inconclusive The PR includes version bumps across multiple files beyond the core list-bookings changes. While these appear related to the release, they are not explicitly required by issue #19312. Clarify whether the version bumps across all action/source files represent a coordinated release or if only list-bookings and booking_experts.app should be bumped.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title refers to adding filters to booking experts actions, which aligns with the main change of adding new filter parameters to the list-bookings endpoint.
Description check ✅ Passed The description references the linked issue #19312 but provides minimal detail about what was implemented. The template only requires a WHY section, which is partially satisfied.
Linked Issues check ✅ Passed The PR implements all requested filters (filter[ID], filter[customer], filter[reservations], filter[booking_nr], filter[confirmed_at], fields[booking], filter[reference_nr]) in the list-bookings action and supporting app infrastructure.
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 booking-experts-improve-list-bookings

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.

@jcortes jcortes force-pushed the booking-experts-improve-list-bookings branch from a8468bf to 23fe25f Compare November 28, 2025 20:33
@jcortes jcortes force-pushed the booking-experts-improve-list-bookings branch from 23fe25f to 4a50028 Compare November 28, 2025 20:35
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 67913bb and 4a50028.

📒 Files selected for processing (19)
  • 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/get-reservation/get-reservation.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-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/list-reservations/list-reservations.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/booking_experts.app.mjs (3 hunks)
  • components/booking_experts/package.json (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 context used
🧬 Code graph analysis (1)
components/booking_experts/actions/list-bookings/list-bookings.mjs (1)
components/booking_experts/booking_experts.app.mjs (11)
  • page (12-16)
  • page (33-38)
  • page (55-60)
  • page (85-90)
  • page (99-103)
  • page (119-124)
  • page (166-172)
  • page (192-197)
  • page (214-219)
  • page (235-241)
  • page (274-279)
⏰ 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). (3)
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Lint Code Base
🔇 Additional comments (24)
components/booking_experts/actions/list-rentabletype-availabilities/list-rentabletype-availabilities.mjs (1)

8-8: Version bump with no functional changes—clarify rationale.

The version is incremented from 0.0.2 to 0.0.3 without any changes to the action's logic, props, or exported interface. While the AI summary indicates this mirrors similar version updates across the PR, it's unclear why a version bump is warranted for a purely cosmetic or dependency-level change.

Confirm whether this version bump should be applied. If it's necessary to reflect dependency updates elsewhere in the codebase, consider adding a comment or release note explaining the rationale.

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

7-7: Version bump is appropriate.

This is a collateral version update (0.0.2 → 0.0.3) as part of the broader PR versioning strategy. The action logic remains unchanged and intact.

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

22-30: The bookingId propDefinition is correctly available and compatible in the updated app.mjs.

Verification confirms:

  • bookingId propDefinition exists in booking_experts.app.mjs (line 69) with async options accepting { page, administrationId }
  • The mapper pattern in get-booking.mjs (lines 26–28) correctly passes administrationId context to filter options
  • getBooking() method exists (line 331–337) and accepts both administrationId and bookingId parameters
  • The integration pattern is consistent across actions (get-booking.mjs, list-bookings.mjs)

No breaking changes detected. The version bump is safe.


33-33: No issues found — getBooking method signature is compatible with current call site.

The getBooking method at line 331 in booking_experts.app.mjs accepts administrationId, bookingId, and ...opts. The call site at lines 33–37 passes administrationId, bookingId, and $, which is correctly captured by the spread operator and forwarded to _makeRequest. No breaking changes detected.

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

8-8: LGTM: Version bump coordinated with package release.

This metadata-only change aligns with the broader version sweep across the booking_experts module.

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

7-7: LGTM: Version bump coordinated with package release.

components/booking_experts/package.json (1)

3-3: LGTM: Package version bump reflects minor enhancements.

The version increment from 0.3.0 to 0.3.1 appropriately signals a patch-level update consistent with the addition of new filter parameters to list-bookings.

components/booking_experts/actions/create-agenda-period/create-agenda-period.mjs (1)

7-7: LGTM: Version bump coordinated with package release.

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

7-7: LGTM: Version bump coordinated with package release.

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

7-7: LGTM: Version bump coordinated with package release.

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

7-7: LGTM: Version bump coordinated with package release.

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

8-8: LGTM: Version bump coordinated with package release.

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

7-7: LGTM! Version bump aligns with package updates.

The metadata version update is consistent with the broader version refresh across booking_experts components in this PR.

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

8-8: LGTM! Version bump is consistent with other sources.

Metadata update aligns with the version increments across the booking_experts package.

components/booking_experts/actions/get-complex-prices/get-complex-prices.mjs (1)

7-7: LGTM! Version bump is appropriate.

The version increment is consistent with the package-wide version updates in this PR.

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

8-8: LGTM! Version update is consistent.

Metadata change aligns with the broader version refresh pattern in this PR.

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

7-7: LGTM! Version increment is appropriate.

The version bump from 0.0.1 to 0.0.2 aligns with the package-wide updates.

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

8-8: LGTM! Version update is consistent.

Metadata change aligns with other sources in this PR.

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

69-92: Excellent enhancement with mapper customization!

The addition of a configurable mapper parameter allows callers to customize how bookings are displayed in dropdowns. The early return guard for !administrationId prevents unnecessary API calls.


263-291: Well-implemented customerId prop with robust label handling!

The label logic gracefully handles missing name fields by falling back to email or ID. The early return guard and async options pattern are consistent with other propDefinitions.


479-486: LGTM! listCustomers method follows established patterns.

The implementation is consistent with other list methods in the app and properly constructs the API path.

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

7-7: LGTM! Version bump reflects feature additions.

The version increment from 0.0.4 to 0.0.5 appropriately reflects the new filter capabilities.


42-130: Excellent implementation of all required filters!

All filters from issue #19312 are properly implemented:

  • filter[ID] via filterId
  • filter[customer] via customerIds
  • filter[reservations] via reservationIds
  • filter[booking_nr] via bookingNr
  • filter[confirmed_at] via confirmedAt
  • fields[booking] via fieldsBooking
  • filter[reference_nr] via referenceNr

The props have appropriate types, descriptions, and leverage propDefinitions for dynamic options.


140-176: LGTM! Run method properly utilizes all new filters.

The destructuring and parameter mapping correctly passes all filter values to the API with the appropriate parameter names. The implementation aligns with the Booking Experts API documentation.

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 - filters

2 participants