Skip to content

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

Merged
merged 2 commits into from
Jun 19, 2025
Merged

New Components - acuity_scheduling #17165

merged 2 commits into from
Jun 19, 2025

Conversation

michelle0927
Copy link
Collaborator

@michelle0927 michelle0927 commented Jun 17, 2025

Resolves #17151

Summary by CodeRabbit

  • New Features

    • Added actions to book appointments, check availability, get appointment types, get appointments, get availability times, and get products for Acuity Scheduling.
    • Enhanced integration with new options for certificates, labels, forms, and timezone selection.
  • Bug Fixes

    • Updated version numbers for several actions and sources to reflect the latest changes.
  • Chores

    • Updated package version and platform dependency.

Copy link

vercel bot commented Jun 17, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Ignored (Inspect) Jun 17, 2025 6:50pm
pipedream-docs ⬜️ Ignored (Inspect) Jun 17, 2025 6:50pm
pipedream-docs-redirect-do-not-edit ⬜️ Ignored (Inspect) Jun 17, 2025 6:50pm

Copy link
Contributor

coderabbitai bot commented Jun 17, 2025

Walkthrough

This 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

File(s) Change Summary
components/acuity_scheduling/actions/book-appointment/book-appointment.mjs New action: Book Appointment with dynamic form fields, admin/client logic, and API call for appointment creation.
components/acuity_scheduling/actions/get-availability-times/get-availability-times.mjs New action: Fetch available appointment times for a date and appointment type.
components/acuity_scheduling/actions/check-availability-times/check-availability-times.mjs New action: Check availability times for a specific date and appointment type.
components/acuity_scheduling/actions/get-appointment-types/get-appointment-types.mjs New action: Fetch list of appointment types, optionally including deleted ones.
components/acuity_scheduling/actions/get-appointments/get-appointments.mjs New action: Retrieve appointments with various filtering options.
components/acuity_scheduling/actions/get-products/get-products.mjs New action: Fetch list of products and packages, with optional inclusion of deleted products.
components/acuity_scheduling/acuity_scheduling.app.mjs Added prop definitions and methods for certificates, labels, forms, products, availability, and appointment creation.
components/acuity_scheduling/actions/add-blocked-off-time/add-blocked-off-time.mjs Version bump: 0.0.1 → 0.0.2
components/acuity_scheduling/actions/find-appointments-by-client-info/find-appointments-by-client-info.mjs Version bump: 0.0.1 → 0.0.2
components/acuity_scheduling/sources/appointment-canceled-instant/appointment-canceled-instant.mjs Version bump: 0.0.1 → 0.0.2
components/acuity_scheduling/sources/new-appointment-instant/new-appointment-instant.mjs Version bump: 0.0.1 → 0.0.2
components/acuity_scheduling/package.json Package version bump (0.1.0 → 0.2.0), dependency update for @pipedream/platform.

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

Assessment against linked issues

Objective Addressed Explanation
Add "book appointment" action (#17151)
Add "get availability/times" and "availability/check-times" actions (#17151)
Add "appointment-types" action (#17151)
Add "get appointments" action (#17151)
Add "products" action (#17151)

Poem

A hop and a skip, new features abound,
Booking and products, appointments found!
With times to check and types to see,
The calendar’s open for you and me.
Acuity’s magic, now more complete—
Rabbit’s delight, a scheduling treat!
🐇⏰✨

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

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

components/acuity_scheduling/actions/find-appointments-by-client-info/find-appointments-by-client-info.mjs

Oops! Something went wrong! :(

ESLint: 8.57.1

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs
at Object.getPackageJSONURL (node:internal/modules/package_json_reader:255:9)
at packageResolve (node:internal/modules/esm/resolve:767:81)
at moduleResolve (node:internal/modules/esm/resolve:853:18)
at defaultResolve (node:internal/modules/esm/resolve:983:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:801:12)
at #cachedDefaultResolve (node:internal/modules/esm/loader:725:25)
at ModuleLoader.resolve (node:internal/modules/esm/loader:708:38)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:309:38)
at #link (node:internal/modules/esm/module_job:201:49)

components/acuity_scheduling/actions/check-availability-times/check-availability-times.mjs

Oops! Something went wrong! :(

ESLint: 8.57.1

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs
at Object.getPackageJSONURL (node:internal/modules/package_json_reader:255:9)
at packageResolve (node:internal/modules/esm/resolve:767:81)
at moduleResolve (node:internal/modules/esm/resolve:853:18)
at defaultResolve (node:internal/modules/esm/resolve:983:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:801:12)
at #cachedDefaultResolve (node:internal/modules/esm/loader:725:25)
at ModuleLoader.resolve (node:internal/modules/esm/loader:708:38)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:309:38)
at #link (node:internal/modules/esm/module_job:201:49)

components/acuity_scheduling/actions/get-appointment-types/get-appointment-types.mjs

Oops! Something went wrong! :(

ESLint: 8.57.1

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs
at Object.getPackageJSONURL (node:internal/modules/package_json_reader:255:9)
at packageResolve (node:internal/modules/esm/resolve:767:81)
at moduleResolve (node:internal/modules/esm/resolve:853:18)
at defaultResolve (node:internal/modules/esm/resolve:983:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:801:12)
at #cachedDefaultResolve (node:internal/modules/esm/loader:725:25)
at ModuleLoader.resolve (node:internal/modules/esm/loader:708:38)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:309:38)
at #link (node:internal/modules/esm/module_job:201:49)

  • 8 others
✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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

If the user omits direction, Acuity defaults to ASC. 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 API

Docs 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 actions

All 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 param

Pass 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 handling

As 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 condition

The 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 empty fields array

The 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

📥 Commits

Reviewing files that changed from the base of the PR and between 3741b91 and 6671a90.

⛔ 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.

@michelle0927 michelle0927 merged commit 256f928 into master Jun 19, 2025
11 checks passed
@michelle0927 michelle0927 deleted the issue-17151 branch June 19, 2025 14:17
joy-chanboop pushed a commit to joy-chanboop/pipedream that referenced this pull request Jun 21, 2025
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.

[FEATURE] Add Additional Acuity Scheduling Actions to MCP Server (Booking, Availability, Appointments)
2 participants