- 
                Notifications
    You must be signed in to change notification settings 
- Fork 5.5k
15214 action calendly list user availability schedules #15923
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
15214 action calendly list user availability schedules #15923
Conversation
| The latest updates on your projects. Learn more about Vercel for Git ↗︎ 3 Skipped Deployments
 | 
| WalkthroughThis pull request updates version numbers across multiple Calendly modules, reorders certain import statements, and introduces new functionality. A new asynchronous method for listing user availability schedules has been added to the main app module, along with a new action module that calls this method. Package metadata is updated to reflect the new release version. The changes are limited to version bumps, import reordering, and the addition of a new feature for retrieving user availability schedules. Changes
 Sequence Diagram(s)sequenceDiagram
    participant User
    participant Action as ListUserAvailabilitySchedules Action
    participant App as calendly_v2.app
    participant API as Axios/Calendly API
    User->>Action: Trigger availability schedule action
    Action->>App: Call listUserAvailabilitySchedules(uuid, $)
    App->>API: Request /user_availability_schedules with user URI
    API-->>App: Return availability data
    App-->>Action: Pass returned data
    Action-->>User: Deliver availability schedules
Assessment against linked issues
 Suggested labels
 Suggested reviewers
 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/line_messaging_api/line_messaging_api.app.mjsOops! Something went wrong! :( ESLint: 8.57.1 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs Tip ⚡🧪 Multi-step agentic review comment chat (experimental)
 📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (1)
 📒 Files selected for processing (1)
 ✅ Files skipped from review due to trivial changes (1)
 ⏰ Context from checks skipped due to timeout of 90000ms (3)
 🪧 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: 7
🔭 Outside diff range comments (1)
components/calendly_v2/sources/new-event-scheduled/new-event-scheduled.mjs (1)
55-57: 🛠️ Refactor suggestionEnsure proper binding for the
emitEventcallback.Using
events.forEach(this.emitEvent);may lose the correct context forthiswithinemitEvent. To maintain the proper binding, consider using an arrow function. For example:- events.forEach(this.emitEvent); + events.forEach(event => this.emitEvent(event));
🧹 Nitpick comments (13)
components/calendly_v2/calendly_v2.app.mjs (1)
258-271: Fix method name capitalization.The method name has a capitalization inconsistency -
listUSerAvailabilitySchedulesshould belistUserAvailabilitySchedules(the 'S' in "User" should not be capitalized).- async listUSerAvailabilitySchedules(uuid, $) { + async listUserAvailabilitySchedules(uuid, $) { const user = this._buildUserUri(uuid); const opts = { path: "/user_availability_schedules", params: { user, }, }; return axios( $ ?? this, this._makeRequestOpts(opts), ); },This would provide better consistency with other method names in the codebase, which follow camelCase convention.
components/neo4j_auradb/common/constants.mjs (1)
3-16: Fix spelling error in ORDER_TYPE_OPTIONS.There's a spelling error in one of the options: "Sequencial" should be "Sequential".
export const ORDER_TYPE_OPTIONS = [ { label: "DateTime", value: "datetime", }, { - label: "Sequencial (integer)", + label: "Sequential (integer)", value: "sequencial", }, { label: "Other", value: "other", }, ];Additionally, consider updating the value "sequencial" to "sequential" for consistency, but check if this value is used elsewhere in the codebase first.
components/neo4j_auradb/actions/create-relationship/create-relationship.mjs (1)
42-45: Enhance the summary message with node detailsThe current summary message only mentions the relationship type but doesn't include any details about which nodes were connected. This makes it harder to identify the specific relationship that was created.
Consider enhancing the summary message to include identifiers for the connected nodes:
$.export( "$summary", - `Created relationship '${this.relationshipType}' between nodes`, + `Created relationship '${this.relationshipType}' between nodes with identifiers ${JSON.stringify(Object.keys(this.startNode)[0])}:${JSON.stringify(this.startNode[Object.keys(this.startNode)[0]])} and ${JSON.stringify(Object.keys(this.endNode)[0])}:${JSON.stringify(this.endNode[Object.keys(this.endNode)[0]])}`, );Or a simpler version:
$.export( "$summary", - `Created relationship '${this.relationshipType}' between nodes`, + `Created relationship '${this.relationshipType}' between nodes (${JSON.stringify(this.startNode)} → ${JSON.stringify(this.endNode)})`, );components/neo4j_auradb/common/utils.mjs (1)
1-24: Add JSDoc documentation to the parseObject utilityThis utility function serves an important purpose in normalizing different types of input, but lacks documentation explaining its intended use and behavior.
Consider adding JSDoc documentation:
+/** + * Parses various input types into their object representation. + * - Returns undefined for null/undefined inputs + * - For arrays, maps over items and parses strings as JSON when possible + * - For strings, attempts to parse as JSON + * - Returns other types as-is + * + * @param {any} obj - The input to parse + * @returns {any} The parsed object or the original input if parsing is not applicable + */ export const parseObject = (obj) => { if (!obj) return undefined; if (Array.isArray(obj)) { // ...components/neo4j_auradb/sources/new-node/new-node.mjs (2)
22-25: Add validation for orderBy format before splittingThe
getBaseQuerymethod assumes thatthis.orderBycontains a dot (.) character that can be split to extract a variable name. IforderBydoesn't contain a dot, this could lead to unexpected behavior.Consider adding validation:
getBaseQuery(whereClause) { - const variable = this.orderBy.split(".")[0]; + // Default to 'n' if orderBy doesn't contain a dot + const variable = this.orderBy.includes(".") + ? this.orderBy.split(".")[0] + : "n"; return `MATCH (${variable}:${this.nodeLabel}) ${whereClause} RETURN ${variable} `; },
26-36: Add error handling for date parsingThe
emitmethod attempts to parse a date from item properties whenorderTypeis "dateTime", but doesn't handle the case where the date string might be invalid.Consider adding error handling:
emit(item) { - const ts = (this.orderType === "dateTime") - ? Date.parse(item.properties[this.orderBy]) - : new Date(); + let ts = new Date(); + + if (this.orderType === "dateTime") { + try { + const parsedDate = Date.parse(item.properties[this.orderBy]); + if (!isNaN(parsedDate)) { + ts = parsedDate; + } + } catch (error) { + console.log(`Error parsing date from ${this.orderBy}: ${error.message}`); + } + } this.$emit(item, { id: item.elementId, summary: `New node created with label ${this.nodeLabel}`, ts, }); },components/neo4j_auradb/sources/new-query-result/new-query-result.mjs (1)
25-35: Handle potential missing or malformed data gracefully.The call to
Date.parse(item[1].properties[this.orderBy])and usage ofitem[1].elementIdassume the array has an element at[1]with valid date properties. Consider verifying thatitem[1]anditem[1].properties[this.orderBy]exist to avoid runtime errors. You might add a fallback if parsing fails or if the property isn’t present.components/neo4j_auradb/sources/common/base.mjs (2)
70-72: Remove or utilize thegetVarName()method.This method always returns an empty string. If it’s intentionally a placeholder, consider adding a comment explaining its purpose; otherwise, remove it to reduce clutter.
95-97: Check for missing array elements before accessing nested properties.
responseArray[0][1]andresponseArray[0]?.propertiesassume the first entry is an array containing at least two elements. Add a safety check in case the item has a different structure or to handle empty arrays. This helps prevent runtime errors.components/neo4j_auradb/neo4j_auradb.app.mjs (4)
9-17: Consider validating$authfields.
_baseUrl()and_auth()directly rely onthis.$auth.api_url,this.$auth.username, andthis.$auth.password. If these fields are missing or malformed, subsequent calls will fail. Adding minimal checks or validations in these methods could help catch misconfigurations early.
18-26: Consider handling and surfacing errors more explicitly.
Currently,_makeRequestdelegates error handling to the caller or to default Axios behavior. If needed, wrapping this request in try/catch blocks (or using Axios interceptors) can provide friendlier error messages or fallback logic for downstream functionality.
70-80: Surface query results or error states inexecuteCypherQuery.
executeCypherQuerysimply returns the Axios call. If you need a standardized format or additional error handling (e.g., partial failures), consider parsing and validating the result here.
81-106: Improve pagination stability.
Thepaginatemethod relies on a basicSKIP ... LIMIT ...approach without forcing anORDER BY. This can lead to inconsistent or out-of-order results across pages for large data sets if the underlying dataset changes or if no ordering is specified. Consider requiring users to include a stableORDER BYin the input query.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
- pnpm-lock.yamlis excluded by- !**/pnpm-lock.yaml
📒 Files selected for processing (27)
- components/calendly_v2/actions/create-invitee-no-show/create-invitee-no-show.mjs(1 hunks)
- components/calendly_v2/actions/create-scheduling-link/create-scheduling-link.mjs(1 hunks)
- components/calendly_v2/actions/get-event/get-event.mjs(1 hunks)
- components/calendly_v2/actions/list-event-invitees/list-event-invitees.mjs(1 hunks)
- components/calendly_v2/actions/list-events/list-events.mjs(1 hunks)
- components/calendly_v2/actions/list-user-availability-schecdules/list-user-availability-schecdules.mjs(1 hunks)
- components/calendly_v2/actions/list-webhook-subscriptions/list-webhook-subscriptions.mjs(1 hunks)
- components/calendly_v2/calendly_v2.app.mjs(1 hunks)
- components/calendly_v2/package.json(1 hunks)
- components/calendly_v2/sources/invitee-canceled/invitee-canceled.mjs(1 hunks)
- components/calendly_v2/sources/invitee-created/invitee-created.mjs(1 hunks)
- components/calendly_v2/sources/new-event-scheduled/new-event-scheduled.mjs(1 hunks)
- components/calendly_v2/sources/routing-form-submission-created/routing-form-submission-created.mjs(1 hunks)
- components/neo4j_auradb/actions/create-node/create-node.mjs(1 hunks)
- components/neo4j_auradb/actions/create-relationship/create-relationship.mjs(1 hunks)
- components/neo4j_auradb/actions/run-query/run-query.mjs(1 hunks)
- components/neo4j_auradb/common/constants.mjs(1 hunks)
- components/neo4j_auradb/common/utils.mjs(1 hunks)
- components/neo4j_auradb/neo4j_auradb.app.mjs(1 hunks)
- components/neo4j_auradb/package.json(2 hunks)
- components/neo4j_auradb/sources/common/base.mjs(1 hunks)
- components/neo4j_auradb/sources/new-node/new-node.mjs(1 hunks)
- components/neo4j_auradb/sources/new-node/test-event.mjs(1 hunks)
- components/neo4j_auradb/sources/new-query-result/new-query-result.mjs(1 hunks)
- components/neo4j_auradb/sources/new-query-result/test-event.mjs(1 hunks)
- components/neo4j_auradb/sources/new-relationship/new-relationship.mjs(1 hunks)
- components/neo4j_auradb/sources/new-relationship/test-event.mjs(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: Verify TypeScript components
- GitHub Check: pnpm publish
- GitHub Check: Publish TypeScript components
🔇 Additional comments (26)
components/calendly_v2/package.json (1)
3-3: Version bump to "1.3.0" confirmed.The version has been updated correctly to match the coordinated release strategy across the Calendly V2 components.
components/calendly_v2/sources/invitee-created/invitee-created.mjs (1)
8-8: Updated version to "0.0.4".The version increment is consistent with other components in this module. Ensure that any external integrations referencing this source update their version expectations accordingly.
components/calendly_v2/sources/routing-form-submission-created/routing-form-submission-created.mjs (1)
8-8: Incremented version to "0.0.3".The version bump is in line with the overall versioning update for Calendly V2 sources. No further action is needed.
components/calendly_v2/sources/invitee-canceled/invitee-canceled.mjs (1)
8-8: Version update to "0.0.3".This change maintains consistent versioning across the related sources. The update is straightforward and correct.
components/calendly_v2/sources/new-event-scheduled/new-event-scheduled.mjs (2)
1-1: Optimized import order for clarity.Moving the import for
DEFAULT_POLLING_SOURCE_TIMER_INTERVALto the top improves dependency visibility and avoids potential duplicate import issues.
9-9: Version bump to "0.0.7" noted.The version update is consistent with the overall release strategy applied across the Calendly V2 components.
components/calendly_v2/actions/get-event/get-event.mjs (1)
9-9: Version Bump VerificationThe version number has been updated from "0.1.4" to "0.1.5". This change is consistent with the coordinated versioning across similar Calendly actions.
components/calendly_v2/actions/list-events/list-events.mjs (1)
7-7: Version Bump VerificationThe version field has been updated from "0.0.4" to "0.0.5", aligning with the overall release strategy for Calendly V2 components.
components/calendly_v2/actions/list-webhook-subscriptions/list-webhook-subscriptions.mjs (1)
8-8: Version Bump ConfirmationThe version number change from "0.1.4" to "0.1.5" is correctly applied and maintains consistency with the updated release versioning across the module.
components/calendly_v2/actions/create-scheduling-link/create-scheduling-link.mjs (1)
7-7: Version Update VerificationThe version number has been updated from "0.0.4" to "0.0.5". This version bump is in line with the overall update strategy and does not affect the functionality of the scheduling link action.
components/calendly_v2/actions/list-event-invitees/list-event-invitees.mjs (1)
7-7: Version Update ConfirmationThe version field has been incremented from "0.0.4" to "0.0.5" as part of the coordinated release update. There are no changes affecting functionality or logic.
components/neo4j_auradb/sources/new-node/test-event.mjs (1)
1-11: The test event object looks good for Neo4j node testing.This is a well-structured test event object that properly represents a Neo4j node with appropriate elementId, labels and properties. It will serve as a good sample for testing node-related functionality.
Note: There might be a small typo in the player's name - "Shikar Dhawan" should likely be "Shikhar Dhawan" (with an 'h' after 'S'), but this doesn't affect testing functionality.
components/calendly_v2/actions/create-invitee-no-show/create-invitee-no-show.mjs (2)
2-2: Import order change looks good.Rearranging import order for consistency with other modules in the codebase.
8-8: Version bump is appropriate.Incrementing version from 0.0.2 to 0.0.3 for tracking the changes made to this component.
components/neo4j_auradb/package.json (2)
3-3: Version update aligns with significant changes.The version change from 0.0.1 to 0.1.0 (minor version bump) correctly indicates the significant update with new functionality added to the Neo4j AuraDB component.
15-17: Adding explicit dependency on platform package.Adding the dependency on @pipedream/platform with appropriate version constraint is a good practice, ensuring the component explicitly defines its requirements.
components/neo4j_auradb/sources/new-query-result/test-event.mjs (1)
1-11: Test event object is appropriate for query result testing.The test event object has a good structure that represents a Neo4j node as a query result. The structure with elementId, labels, and properties is consistent with Neo4j's data model.
Note: Similar to the other test file, there appears to be a minor typo in "Shikar Dhawan" which would typically be spelled "Shikhar Dhawan", but this doesn't impact functionality.
components/neo4j_auradb/sources/new-relationship/test-event.mjs (1)
1-29: Well-structured test event for Neo4j relationships.This test event exports an array that properly demonstrates a Neo4j graph with two nodes and a relationship between them. The structure includes:
- First player node with elementId and properties
- Relationship object with startNodeElementId, endNodeElementId, and type
- Second player node with elementId and properties
This provides a comprehensive example for testing relationship functionality in the Neo4j component.
components/neo4j_auradb/common/constants.mjs (1)
1-2: LGTM: Appropriate constant definition.The LIMIT constant is well-defined and will be useful for pagination or restricting the number of results returned by Neo4j queries.
components/neo4j_auradb/actions/run-query/run-query.mjs (1)
1-25: LGTM: Well-structured Neo4j query action.The implementation is clean and follows the common pattern for Pipedream actions. It correctly imports the app, defines the necessary properties, and executes the Cypher query.
components/neo4j_auradb/actions/create-relationship/create-relationship.mjs (1)
1-48: LGTM! Solid implementation of a Neo4j relationship creation actionThe overall structure and implementation of this component is well-done. It correctly handles object parsing, provides clear property descriptions, and follows Pipedream's component architecture.
components/neo4j_auradb/common/utils.mjs (1)
1-24: LGTM! Effective utility for handling object parsingThe parseObject utility is well-structured with appropriate error handling for JSON parsing and handles different input types correctly.
components/neo4j_auradb/actions/create-node/create-node.mjs (2)
30-33: LGTM! Effective handling of response and summary generationThe element ID extraction with optional chaining and conditional summary message is well-implemented. This provides good user feedback regardless of the response structure.
As a minor optimization, you could use the nullish coalescing operator to slightly simplify the summary export:
const elementId = response.data?.values?.[0]?.[0]?.elementId; -$.export("$summary", elementId - ? `Created node with id ${elementId}` - : "Node created successfully"); +$.export("$summary", `Created node${elementId ? ` with id ${elementId}` : " successfully"}`);But the current implementation is perfectly fine as is.
1-36: LGTM! Solid implementation of a Neo4j node creation actionThe overall structure and implementation of this component is well-done. It correctly handles property parsing, provides clear descriptions, and follows Pipedream's component architecture.
components/neo4j_auradb/sources/new-node/new-node.mjs (1)
1-39: LGTM! Well-structured source component extending common baseThe overall implementation of this source component is solid. It correctly extends the common base, adds specific functionality for Neo4j node events, and properly formats the emitted events.
components/neo4j_auradb/neo4j_auradb.app.mjs (1)
1-2: Imports look good.
No issues found with importingaxiosfrom@pipedream/platformand theLIMITconstant.
        
          
                .../calendly_v2/actions/list-user-availability-schecdules/list-user-availability-schecdules.mjs
          
            Show resolved
            Hide resolved
        
              
          
                components/neo4j_auradb/sources/new-query-result/new-query-result.mjs
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                components/neo4j_auradb/sources/new-relationship/new-relationship.mjs
              
                Outdated
          
            Show resolved
            Hide resolved
        
      Actions - List User Availability Schedules
0cd7878    to
    9ff707e      
    Compare
  
    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: 0
🧹 Nitpick comments (2)
components/calendly_v2/calendly_v2.app.mjs (1)
258-271: Fix method name capitalization:listUSerAvailabilitySchedulesThere's an inconsistent capitalization in the method name - "USer" should be "User" to follow proper camelCase convention and match the rest of the codebase.
-async listUSerAvailabilitySchedules(uuid, $) { +async listUserAvailabilitySchedules(uuid, $) {Additionally, consider implementing pagination handling similar to the other list methods in this file. The current implementation uses a direct axios call, but other list operations use the
_makeRequestmethod which handles pagination.components/calendly_v2/actions/list-user-availability-schedules/list-user-availability-schedules.mjs (1)
4-6: Fix typo in action name and update method referenceThere's a typo in the action name: "Schecdules" should be "Schedules".
- name: "List User Availability Schecdules", + name: "List User Availability Schedules",Also, the description could be more informative by briefly explaining what "availability schedules" are before referencing the documentation.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
- pnpm-lock.yamlis excluded by- !**/pnpm-lock.yaml
📒 Files selected for processing (13)
- components/calendly_v2/actions/create-invitee-no-show/create-invitee-no-show.mjs(1 hunks)
- components/calendly_v2/actions/create-scheduling-link/create-scheduling-link.mjs(1 hunks)
- components/calendly_v2/actions/get-event/get-event.mjs(1 hunks)
- components/calendly_v2/actions/list-event-invitees/list-event-invitees.mjs(1 hunks)
- components/calendly_v2/actions/list-events/list-events.mjs(1 hunks)
- components/calendly_v2/actions/list-user-availability-schedules/list-user-availability-schedules.mjs(1 hunks)
- components/calendly_v2/actions/list-webhook-subscriptions/list-webhook-subscriptions.mjs(1 hunks)
- components/calendly_v2/calendly_v2.app.mjs(1 hunks)
- components/calendly_v2/package.json(1 hunks)
- components/calendly_v2/sources/invitee-canceled/invitee-canceled.mjs(1 hunks)
- components/calendly_v2/sources/invitee-created/invitee-created.mjs(1 hunks)
- components/calendly_v2/sources/new-event-scheduled/new-event-scheduled.mjs(1 hunks)
- components/calendly_v2/sources/routing-form-submission-created/routing-form-submission-created.mjs(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (11)
- components/calendly_v2/actions/create-invitee-no-show/create-invitee-no-show.mjs
- components/calendly_v2/package.json
- components/calendly_v2/actions/create-scheduling-link/create-scheduling-link.mjs
- components/calendly_v2/sources/routing-form-submission-created/routing-form-submission-created.mjs
- components/calendly_v2/actions/list-webhook-subscriptions/list-webhook-subscriptions.mjs
- components/calendly_v2/sources/invitee-created/invitee-created.mjs
- components/calendly_v2/actions/list-event-invitees/list-event-invitees.mjs
- components/calendly_v2/sources/new-event-scheduled/new-event-scheduled.mjs
- components/calendly_v2/sources/invitee-canceled/invitee-canceled.mjs
- components/calendly_v2/actions/get-event/get-event.mjs
- components/calendly_v2/actions/list-events/list-events.mjs
🔇 Additional comments (1)
components/calendly_v2/actions/list-user-availability-schedules/list-user-availability-schedules.mjs (1)
29-29: Update method reference to match corrected method nameIf you fix the method name capitalization in the main app file as suggested, make sure to update the reference here as well.
- const response = await this.calendly.listUSerAvailabilitySchedules(this.user, $); + const response = await this.calendly.listUserAvailabilitySchedules(this.user, $);
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.
There's just a few typos I commented on, but moving this forward to speed it up!
        
          
                ...ts/calendly_v2/actions/list-user-availability-schedules/list-user-availability-schedules.mjs
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                ...ts/calendly_v2/actions/list-user-availability-schedules/list-user-availability-schedules.mjs
              
                Outdated
          
            Show resolved
            Hide resolved
        
      …s/list-user-availability-schedules.mjs Co-authored-by: Guilherme Falcão <[email protected]>
…s/list-user-availability-schedules.mjs Co-authored-by: Guilherme Falcão <[email protected]>
Co-authored-by: Guilherme Falcão <[email protected]>
| /approve | 
Resolves #15214
Summary by CodeRabbit
New Features
Chores