-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New Components - acuity_scheduling #17165
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ |
WalkthroughThis update introduces several new actions to the Acuity Scheduling integration, including booking appointments, retrieving appointment types, checking and getting availability times, fetching appointments, and listing products. Supporting methods and property definitions are added to the app module. Some existing actions and sources receive minor version bumps, and dependencies are updated in the package manifest. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant MCP_Server
participant Acuity_App
participant Acuity_API
User->>MCP_Server: Initiate "Book Appointment" action
MCP_Server->>Acuity_App: Prepare appointment data, validate inputs
Acuity_App->>Acuity_API: POST /appointments with booking details
Acuity_API-->>Acuity_App: Appointment confirmation
Acuity_App-->>MCP_Server: Return appointment details
MCP_Server-->>User: Respond with booking confirmation
sequenceDiagram
participant User
participant MCP_Server
participant Acuity_App
participant Acuity_API
User->>MCP_Server: Request "Get Availability Times"
MCP_Server->>Acuity_App: Fetch availability for date/type
Acuity_App->>Acuity_API: GET /availability/times
Acuity_API-->>Acuity_App: Return available times
Acuity_App-->>MCP_Server: Return times
MCP_Server-->>User: Show available times
Assessment against linked issues
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
components/acuity_scheduling/actions/find-appointments-by-client-info/find-appointments-by-client-info.mjsOops! Something went wrong! :( ESLint: 8.57.1 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs components/acuity_scheduling/actions/check-availability-times/check-availability-times.mjsOops! Something went wrong! :( ESLint: 8.57.1 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs components/acuity_scheduling/actions/get-appointment-types/get-appointment-types.mjsOops! Something went wrong! :( ESLint: 8.57.1 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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: 5
🧹 Nitpick comments (9)
components/acuity_scheduling/actions/check-availability-times/check-availability-times.mjs (1)
11-15
: Property label could be clearer
Date
actually expects a date-time string (e.g.2016-02-03T14:00:00-0800
). Consider renaming the prop or clarifying the label to reduce user confusion.components/acuity_scheduling/actions/get-appointments/get-appointments.mjs (1)
80-94
: Provide a default sort directionIf the user omits
direction
, Acuity defaults toASC
. Explicitly listing the default in the UI avoids surprises and documents the behaviour.components/acuity_scheduling/actions/get-availability-times/get-availability-times.mjs (1)
31-36
: Make timezone optional unless strictly required by APIDocs allow omitting
timezone
. Marking the prop as optional provides a smoother DX for users in single-timezone accounts.components/acuity_scheduling/actions/get-products/get-products.mjs (2)
18-25
: Export a summary for consistency with other actionsAll the new actions emit a
$summary
except this one. Aligning behaviour helps users reading workflow logs.const response = await this.acuityScheduling.listProducts({ $, params: { deleted: this.deleted, }, }); + $.export("$summary", `Returned ${response.length} products`); return response;
19-23
: Guard against undefined query paramPass
deleted
only when the user sets it:- params: { - deleted: this.deleted, - }, + params: this.deleted !== undefined ? { deleted: this.deleted } : {},components/acuity_scheduling/actions/get-appointment-types/get-appointment-types.mjs (2)
6-6
: Fix minor typo in description- description: "Return a list ofappointment types. [...] + description: "Return a list of appointment types. [...]
18-24
: Consistent param handlingAs with other actions, wrap
includeDeleted
so it’s omitted when not set:- params: { - includeDeleted: this.includeDeleted, - }, + params: this.includeDeleted !== undefined + ? { includeDeleted: this.includeDeleted } + : {},components/acuity_scheduling/actions/book-appointment/book-appointment.mjs (2)
155-157
: Validation message contradicts conditionThe condition checks for a missing
appointmentTypeId
, yet the error message says “formId
is required…”.
Swap the message (or the condition) to keep them consistent.-throw new ConfigurationError("`formId` is required when booking an appointment with a form"); +throw new ConfigurationError("`appointmentTypeId` is required when booking an appointment with a form");
159-170
: Do not send an emptyfields
arrayThe Acuity API silently rejects unknown parameters; however, sending
fields: []
is unnecessary traffic and may cause future compatibility issues. Only include the property when at least one custom field is present.-const fields = []; +let fields; ... -if (Object.keys(fieldValues).length > 0) { - for (const [fieldId, value] of Object.entries(fieldValues)) { - fields.push({ id: fieldId, value }); - } +const entries = Object.entries(fieldValues); +if (entries.length) { + fields = entries.map(([id, value]) => ({ id, value })); } ... - fields, + ...(fields && { fields }),Also applies to: 196-197
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (12)
components/acuity_scheduling/actions/add-blocked-off-time/add-blocked-off-time.mjs
(1 hunks)components/acuity_scheduling/actions/book-appointment/book-appointment.mjs
(1 hunks)components/acuity_scheduling/actions/check-availability-times/check-availability-times.mjs
(1 hunks)components/acuity_scheduling/actions/find-appointments-by-client-info/find-appointments-by-client-info.mjs
(1 hunks)components/acuity_scheduling/actions/get-appointment-types/get-appointment-types.mjs
(1 hunks)components/acuity_scheduling/actions/get-appointments/get-appointments.mjs
(1 hunks)components/acuity_scheduling/actions/get-availability-times/get-availability-times.mjs
(1 hunks)components/acuity_scheduling/actions/get-products/get-products.mjs
(1 hunks)components/acuity_scheduling/acuity_scheduling.app.mjs
(5 hunks)components/acuity_scheduling/package.json
(2 hunks)components/acuity_scheduling/sources/appointment-canceled-instant/appointment-canceled-instant.mjs
(1 hunks)components/acuity_scheduling/sources/new-appointment-instant/new-appointment-instant.mjs
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: Verify TypeScript components
- GitHub Check: Publish TypeScript components
- GitHub Check: Lint Code Base
- GitHub Check: pnpm publish
🔇 Additional comments (6)
components/acuity_scheduling/sources/appointment-canceled-instant/appointment-canceled-instant.mjs (1)
9-9
: Version bump to 0.0.2 is consistent.
Aligns with other Acuity Scheduling components in this release.components/acuity_scheduling/package.json (2)
3-3
: Package version updated to 0.2.0.
This increment reflects the addition of new actions and sources in the Acuity Scheduling integration.
16-16
: Verify compatibility with @pipedream/platform ^3.1.0.
Upgrading from ^1.5.1 to ^3.1.0 is a major version jump—ensure all propDefinitions and API calls in the app module conform to the v3 platform API.components/acuity_scheduling/sources/new-appointment-instant/new-appointment-instant.mjs (1)
9-9
: Version bump to 0.0.2 is consistent.
Matches version updates across related Acuity Scheduling source components.components/acuity_scheduling/actions/find-appointments-by-client-info/find-appointments-by-client-info.mjs (1)
8-8
: Version bump to 0.0.2 is consistent.
Keeps this action in sync with the overall integration release.components/acuity_scheduling/actions/add-blocked-off-time/add-blocked-off-time.mjs (1)
7-7
: Version bump to 0.0.2 is consistent.
Aligns with other Acuity Scheduling actions’ version updates.
components/acuity_scheduling/actions/check-availability-times/check-availability-times.mjs
Show resolved
Hide resolved
components/acuity_scheduling/actions/get-appointments/get-appointments.mjs
Show resolved
Hide resolved
components/acuity_scheduling/actions/get-availability-times/get-availability-times.mjs
Show resolved
Hide resolved
components/acuity_scheduling/actions/book-appointment/book-appointment.mjs
Show resolved
Hide resolved
* new components * pnpm-lock.yaml
Resolves #17151
Summary by CodeRabbit
New Features
Bug Fixes
Chores