-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Add guest gender dob #19348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Add guest gender dob #19348
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
Thank you so much for submitting this! We've added it to our backlog to review, and our team has been notified. |
|
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:
|
WalkthroughTwo Booking Experts actions (add-guest-to-reservation and update-guest) gain optional guest fields: gender and dateOfBirth; payload mappings and action versions are updated. package.json version is bumped and Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (1)
🔇 Additional comments (2)
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. Comment |
There was a problem hiding this 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
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis 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/globappears 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:
- Confirm that gender options (
male,female,other) match the Booking Experts API specification.- The
dateOfBirthprop 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).
| 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, | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 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.mjsRepository: 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 2Repository: 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 5Repository: 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 -lRepository: 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:
- Booking Experts API reference (examples showing "date_of_birth": "1983-11-05"). [1]
- 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.
jcortes
left a comment
There was a problem hiding this 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!
package.json
Outdated
| @@ -1,3 +1,3 @@ | |||
| { | |||
| "name": "pipedream", | |||
| "version": "1.2.1", | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| "version": "1.2.2", |
|
Hi everyone, all test cases are passed! Ready for release! Test reports
|
Thank you for the reply @jcortes, I have made the suggested changes |
WHY
Resolves #19336
Summary
Add optional
genderanddateOfBirthfields 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.mjsgenderprop (options:male,female,other)dateOfBirthprop (expectsYYYY-MM-DD)genderanddate_of_birthin the API request attributescomponents/booking_experts/actions/add-guest-to-reservation/add-guest-to-reservation.mjsgenderprop (options:male,female,other)dateOfBirthprop (expectsYYYY-MM-DD)genderanddate_of_birthin the API request attributesSummary by CodeRabbit
New Features
Chores
✏️ Tip: You can customize this high-level summary in your review settings.