-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
New Appointment Trigger for Setmore #15315
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 3 Skipped Deployments
|
WalkthroughThis pull request introduces enhancements to the Setmore Appointments integration in Pipedream. The changes include version updates across multiple files, a new method for listing appointments, and a comprehensive trigger for tracking new appointments. The package has been updated to use a newer version of the Pipedream platform, and a new source has been added to monitor and emit events for newly created appointments. Changes
Sequence DiagramsequenceDiagram
participant Source as New Appointment Source
participant Setmore API as Setmore API
participant DB as Database
Source->>DB: Retrieve last processed date
Source->>Setmore API: Fetch appointments since last date
Setmore API-->>Source: Return appointment list
loop For each appointment
Source->>Source: Generate metadata
Source->>DB: Emit appointment event
end
Source->>DB: Update last processed date
Assessment against linked issues
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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: 2
🧹 Nitpick comments (3)
components/setmoreappointments/sources/new-appointment-created/test-event.mjs (1)
20-21
: Consider using a past or present date for test data.The test event uses a future date (2025-01-16). While this works, using a past or present date might be more intuitive for testing and documentation purposes.
- "start_time": "2025-01-16T12:00Z", - "end_time": "2025-01-16T12:15Z", + "start_time": "2024-01-16T12:00Z", + "end_time": "2024-01-16T12:15Z",components/setmoreappointments/sources/new-appointment-created/new-appointment-created.mjs (2)
9-9
: Consider starting with version 0.1.0.For a new component, it's common practice to start with version 0.1.0 instead of 0.0.1, especially since the parent package is already at 0.2.0.
- version: "0.0.1", + version: "0.1.0",
51-56
: Consider using ISO date format for API compatibility.The current date format (DD-MM-YYYY) might not be compatible with all API implementations. Consider using ISO format (YYYY-MM-DD) which is more widely supported.
formatDate(date) { - const day = String(date.getDate()).padStart(2, "0"); - const month = String(date.getMonth() + 1).padStart(2, "0"); - const year = date.getFullYear(); - return `${day}-${month}-${year}`; + return date.toISOString().split('T')[0]; }
📜 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 (6)
components/setmoreappointments/actions/create-appointment/create-appointment.mjs
(1 hunks)components/setmoreappointments/actions/create-customer/create-customer.mjs
(1 hunks)components/setmoreappointments/package.json
(2 hunks)components/setmoreappointments/setmoreappointments.app.mjs
(2 hunks)components/setmoreappointments/sources/new-appointment-created/new-appointment-created.mjs
(1 hunks)components/setmoreappointments/sources/new-appointment-created/test-event.mjs
(1 hunks)
✅ Files skipped from review due to trivial changes (2)
- components/setmoreappointments/actions/create-appointment/create-appointment.mjs
- components/setmoreappointments/actions/create-customer/create-customer.mjs
🧰 Additional context used
🪛 Gitleaks (8.21.2)
components/setmoreappointments/sources/new-appointment-created/test-event.mjs
2-2: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
5-5: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
10-10: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
22-22: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
23-23: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
24-24: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: pnpm publish
- GitHub Check: Verify TypeScript components
- GitHub Check: Publish TypeScript components
🔇 Additional comments (2)
components/setmoreappointments/sources/new-appointment-created/test-event.mjs (1)
2-24
: Skip false positive API key warnings.The UUIDs and internal identifiers flagged by static analysis are not actual API keys, but rather Setmore's internal identifiers for appointments, customers, staff, and services.
🧰 Tools
🪛 Gitleaks (8.21.2)
2-2: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
5-5: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
10-10: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
22-22: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
23-23: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
24-24: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
components/setmoreappointments/package.json (1)
3-3
: Version updates look appropriate.The package version bump to 0.2.0 and platform dependency update to ^3.0.3 align well with the new functionality being added.
Also applies to: 16-16
components/setmoreappointments/sources/new-appointment-created/new-appointment-created.mjs
Show resolved
Hide resolved
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.
LGTM!
Resolves #15030
Summary by CodeRabbit
New Features
listAppointments
method to retrieve appointment dataChores