Skip to content

Conversation

@manameaaus
Copy link
Contributor

@manameaaus manameaaus commented Dec 2, 2025

WHY

Resolves #19336

Summary

Add optional gender and dateOfBirth fields to Booking Experts guest creation and update actions so components can send these attributes to the Booking Experts API.

This implements support for the Booking Experts guest update endpoint:
https://developers.bookingexperts.com/reference/administration-reservation-guests-update

Changes

  • components/booking_experts/actions/update-guest/update-guest.mjs

    • Added optional gender prop (options: male, female, other)
    • Added optional dateOfBirth prop (expects YYYY-MM-DD)
    • Send gender and date_of_birth in the API request attributes
  • components/booking_experts/actions/add-guest-to-reservation/add-guest-to-reservation.mjs

    • Added optional gender prop (options: male, female, other)
    • Added optional dateOfBirth prop (expects YYYY-MM-DD)
    • Send gender and date_of_birth in the API request attributes

Summary by CodeRabbit

  • New Features

    • Optional Gender field (male, female, other) when adding or updating guest details.
    • Optional Date of Birth field (YYYY-MM-DD) when adding or updating guest details.
  • Chores

    • Package and action versions bumped.
    • Development dependency added for build tooling.

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

@vercel
Copy link

vercel bot commented Dec 2, 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 Dec 3, 2025 1:14pm

@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 Dec 2, 2025

Walkthrough

Two Booking Experts actions (add-guest-to-reservation and update-guest) add optional guest fields: gender and dateOfBirth; their runtime payloads now include gender and date_of_birth, and both action versions were bumped. Top-level package.json adds a devDependency (@types/glob) and the component package.json version under components/booking_experts was bumped.

Changes

Cohort / File(s) Change Summary
Guest management actions
components/booking_experts/actions/add-guest-to-reservation/add-guest-to-reservation.mjs, components/booking_experts/actions/update-guest/update-guest.mjs
Version bumps (0.0.5→0.0.6 and 0.0.3→0.0.4). Added optional props: gender (string; options: male,female,other) and dateOfBirth (string; YYYY-MM-DD). Runtime payloads updated to include gender and date_of_birth. Minor description/formatting tweaks.
Top-level manifest
package.json
Added devDependency @types/glob ^8.1.0 in devDependencies.
Component manifest
components/booking_experts/package.json
Version bumped from 0.3.10.3.2.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Areas to inspect:
    • Accurate mapping: dateOfBirthdate_of_birth and gendergender in all payloads.
    • Ensure optional props are handled when absent (no undefined fields sent if intended).
    • Validate date format expectations/validation (YYYY-MM-DD) where inputs are consumed or documented.
    • Verify version bumps (action and component) align with any release or registry requirements.

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Out of Scope Changes check ❓ Inconclusive The package.json devDependency addition (@types/glob) appears unrelated to the gender/dateOfBirth feature and may represent out-of-scope changes. Clarify the purpose of adding @types/glob devDependency and verify it is necessary for this PR or remove if unrelated to the guest attributes feature.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Add guest gender dob' clearly summarizes the main change: adding gender and date of birth fields to guest-related actions.
Description check ✅ Passed The pull request description provides comprehensive context including issue reference, clear summary, specific changes to files, and implementation details for both actions.
Linked Issues check ✅ Passed The PR implementation fully addresses issue #19336 by adding gender and dateOfBirth support to both guest update and guest creation actions, matching the API documentation requirements.
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: 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 2583778 and 22b7b87.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (3)
  • components/booking_experts/actions/add-guest-to-reservation/add-guest-to-reservation.mjs (3 hunks)
  • components/booking_experts/actions/update-guest/update-guest.mjs (4 hunks)
  • package.json (1 hunks)
🔇 Additional comments (6)
package.json (1)

52-52: Unrelated dependency addition?

The addition of @types/glob appears unrelated to the PR objectives, which focus on adding gender and date of birth fields to Booking Experts actions. This may have been included accidentally.

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

6-8: LGTM!

Version bump and description formatting are appropriate for the addition of new optional fields.


135-136: LGTM!

The payload mapping correctly transforms camelCase prop names to snake_case API fields, consistent with the existing field mappings.

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

6-8: LGTM!

Version bump and description formatting are appropriate.


78-94: Verify gender options and consider date format validation.

Same concerns as in update-guest.mjs:

  1. Confirm that gender options (male, female, other) match the Booking Experts API specification.
  2. The dateOfBirth prop expects YYYY-MM-DD format but lacks validation, which could lead to API errors with invalid input.

Consider adding format validation or at minimum providing an example in the description (e.g., "The date of birth of the guest in YYYY-MM-DD format (e.g., 1990-01-15)").


113-114: LGTM!

The payload mapping is correct and consistent with the existing field transformations (camelCase to snake_case).

Comment on lines +98 to +114
gender: {
type: "string",
label: "Gender",
description: "The gender of the guest",
optional: true,
options: [
"male",
"female",
"other",
],
},
dateOfBirth: {
type: "string",
label: "Date of Birth",
description: "The date of birth of the guest in YYYY-MM-DD format",
optional: true,
},
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

# First, let's examine the full update-guest.mjs file to understand context
wc -l components/booking_experts/actions/update-guest/update-guest.mjs

Repository: PipedreamHQ/pipedream

Length of output: 186


🏁 Script executed:

# Search for date validation patterns in the codebase
rg -n "YYYY-MM-DD|\d{4}-\d{2}-\d{2}|dateOfBirth|date.*format|validate.*date" components/booking_experts/ -A 2

Repository: PipedreamHQ/pipedream

Length of output: 186


🏁 Script executed:

# Search for gender field definitions in the codebase to compare patterns
rg -n "gender" components/booking_experts/ -B 2 -A 5

Repository: PipedreamHQ/pipedream

Length of output: 186


🏁 Script executed:

# Check if there are any validation utilities or patterns in common utils
fd -t f "validat" components/booking_experts/

Repository: PipedreamHQ/pipedream

Length of output: 186


🏁 Script executed:

# Look for API documentation files or references to Booking Experts API specs
rg -n "Booking Experts|booking.?experts" . --type md --type txt -l

Repository: PipedreamHQ/pipedream

Length of output: 186


🌐 Web query:

Booking Experts API guest gender field valid values documentation

💡 Result:

Booking Experts guest "gender" valid values: male, female, unknown. [1][2]

Sources:

  • Booking Experts API docs (guest endpoints / reservations overview). [1]
  • Example API docs showing gender enum (male, female, unknown). [2]

🌐 Web query:

Booking Experts API guest dateOfBirth date_of_birth format requirements

💡 Result:

Use the ISO‑8601 date (date-only) format: "YYYY-MM-DD". Example in the Booking Experts API docs: "date_of_birth": "1983-11-05". [1][2]

Sources:

  1. Booking Experts API reference (examples showing "date_of_birth": "1983-11-05"). [1]
  2. Booking Experts API introduction / OpenAPI spec (JSON API, date conventions). [2]

Change gender option from "other" to "unknown" to match Booking Experts API specification.

The Booking Experts API expects gender values of male, female, and unknown, but the code uses other instead of unknown. Update the gender options accordingly. The dateOfBirth format description is correct (YYYY-MM-DD matches API requirements).

🤖 Prompt for AI Agents
In components/booking_experts/actions/update-guest/update-guest.mjs around lines
98 to 114, the gender options include "other" but the Booking Experts API
requires "unknown"; update the gender.options array to replace "other" with
"unknown" so the allowed values are "male", "female", and "unknown", leaving the
rest of the schema and the dateOfBirth description unchanged.

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 @manameaaus thanks for this great contribution, can you please increase just the version in package.json thanks! This is ready for QA!

@jcortes jcortes moved this from Ready for PR Review to Ready for QA in Component (Source and Action) Backlog Dec 2, 2025
@vunguyenhung
Copy link
Collaborator

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

Test reports

@manameaaus
Copy link
Contributor Author

HI @manameaaus thanks for this great contribution, can you please increase just the version in package.json thanks! This is ready for QA!

Thank you for the reply @jcortes, I have made the suggested changes

@manameaaus manameaaus requested a review from jcortes December 3, 2025 05:42
@jcortes jcortes force-pushed the add-guest-gender-dob branch from d5484d1 to c53ebe7 Compare December 3, 2025 13:14
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

♻️ Duplicate comments (1)
components/booking_experts/actions/update-guest/update-guest.mjs (1)

98-108: Change gender option from "other" to "unknown" to match Booking Experts API.

The Booking Experts API expects gender values of male, female, and unknown, but the code uses other. This issue was previously identified and needs to be addressed.

Apply this diff to fix the gender options:

     gender: {
       type: "string",
       label: "Gender",
       description: "The gender of the guest",
       optional: true,
       options: [
         "male",
         "female",
-        "other",
+        "unknown",
       ],
     },
📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d5484d1 and c53ebe7.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (4)
  • components/booking_experts/actions/add-guest-to-reservation/add-guest-to-reservation.mjs (3 hunks)
  • components/booking_experts/actions/update-guest/update-guest.mjs (4 hunks)
  • components/booking_experts/package.json (1 hunks)
  • package.json (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: Publish TypeScript components
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Lint Code Base
🔇 Additional comments (2)
components/booking_experts/package.json (1)

3-3: LGTM!

The version bump from 0.3.1 to 0.3.2 correctly reflects the addition of new optional fields to the guest actions.

package.json (1)

52-52: Clarify the purpose of adding @types/glob dependency.

This devDependency addition appears unrelated to the PR's stated objective of adding gender and dateOfBirth fields to Booking Experts guest actions. Is this change intentional, or was it accidentally included?

@jcortes jcortes merged commit 62a7d62 into PipedreamHQ:master Dec 3, 2025
9 of 10 checks passed
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

None yet

Development

Successfully merging this pull request may close these issues.

[ACTION] Booking experts - update guests

5 participants