-
Notifications
You must be signed in to change notification settings - Fork 5.5k
12502 components ticket source #19006
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
…or creating customers, retrieving events, bookings, and listing customers and events. Introduced pagination for customer and event retrieval, and added constants for limiting results.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including You can disable this status message by setting the WalkthroughAdds a Ticket Source integration: six new action modules, a pagination constant, an expanded app module with HTTP helpers, dynamic propDefinitions, API methods and a paginate generator, and bumps the package version and dependency. Changes
Sequence Diagram(s)sequenceDiagram
participant Action as Action Module
participant App as ticket_source.app
participant API as TicketSource API
Action->>App: call method (e.g., listEvents, getEvent, createCustomer) with {$, params}
App->>App: prepare request (_baseUrl, _headers) and call _makeRequest
App->>API: HTTP request (GET/POST)
API-->>App: Response (single or paginated)
alt Paginated
App->>App: paginate(fn, params, maxResults)
loop pages
App->>API: Fetch page
API-->>App: Page data
end
end
App-->>Action: Return response data
Action->>Action: $.export("$summary", message)
Action-->>User: Return aggregated result
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 2 inconclusive)
✅ Passed checks (2 passed)
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: 4
📜 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 (9)
components/ticket_source/actions/create-customer/create-customer.mjs(1 hunks)components/ticket_source/actions/get-booking/get-booking.mjs(1 hunks)components/ticket_source/actions/get-event/get-event.mjs(1 hunks)components/ticket_source/actions/list-bookings-for-date/list-bookings-for-date.mjs(1 hunks)components/ticket_source/actions/list-customers/list-customers.mjs(1 hunks)components/ticket_source/actions/list-events/list-events.mjs(1 hunks)components/ticket_source/common/constants.mjs(1 hunks)components/ticket_source/package.json(2 hunks)components/ticket_source/ticket_source.app.mjs(1 hunks)
🧰 Additional context used
🧠 Learnings (5)
📚 Learning: 2025-10-17T06:58:24.577Z
Learnt from: sergio-eliot-rodriguez
Repo: PipedreamHQ/pipedream PR: 18787
File: components/ticketsauce/ticketsauce.app.mjs:7-30
Timestamp: 2025-10-17T06:58:24.577Z
Learning: The TicketSauce "List of Events" API endpoint (GET /v2/events) does not support pagination and returns all events. Users can filter the data using the available query parameters (partner_id, organization_id, etc.) rather than paginating through results.
Applied to files:
components/ticket_source/actions/list-events/list-events.mjscomponents/ticket_source/ticket_source.app.mjs
📚 Learning: 2024-10-08T15:33:38.240Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-10-08T15:33:38.240Z
Learning: When exporting a summary message in the `run` method of an action, ensure the message is correctly formatted. For example, in the `hackerone-get-members` action, the correct format is `Successfully retrieved ${response.data.length} members`.
Applied to files:
components/ticket_source/actions/list-customers/list-customers.mjs
📚 Learning: 2024-10-30T15:24:39.294Z
Learnt from: jcortes
Repo: PipedreamHQ/pipedream PR: 14467
File: components/gainsight_px/actions/create-account/create-account.mjs:4-6
Timestamp: 2024-10-30T15:24:39.294Z
Learning: In `components/gainsight_px/actions/create-account/create-account.mjs`, the action name should be "Create Account" instead of "Create Memory".
Applied to files:
components/ticket_source/actions/create-customer/create-customer.mjs
📚 Learning: 2024-12-12T19:23:09.039Z
Learnt from: jcortes
Repo: PipedreamHQ/pipedream PR: 14935
File: components/sailpoint/package.json:15-18
Timestamp: 2024-12-12T19:23:09.039Z
Learning: When developing Pipedream components, do not add built-in Node.js modules like `fs` to `package.json` dependencies, as they are native modules provided by the Node.js runtime.
Applied to files:
components/ticket_source/package.json
📚 Learning: 2025-06-04T17:52:05.780Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 16954
File: components/salesloft/salesloft.app.mjs:14-23
Timestamp: 2025-06-04T17:52:05.780Z
Learning: In the Salesloft API integration (components/salesloft/salesloft.app.mjs), the _makeRequest method returns response.data which directly contains arrays for list endpoints like listPeople, listCadences, listUsers, and listAccounts. The propDefinitions correctly call .map() directly on these responses without needing to destructure a nested data property.
Applied to files:
components/ticket_source/ticket_source.app.mjs
🧬 Code graph analysis (7)
components/ticket_source/actions/list-events/list-events.mjs (2)
components/ticket_source/actions/list-bookings-for-date/list-bookings-for-date.mjs (1)
response(33-37)components/ticket_source/actions/list-customers/list-customers.mjs (1)
response(24-28)
components/ticket_source/actions/list-customers/list-customers.mjs (2)
components/ticket_source/actions/list-bookings-for-date/list-bookings-for-date.mjs (1)
response(33-37)components/ticket_source/actions/list-events/list-events.mjs (1)
response(24-28)
components/ticket_source/actions/list-bookings-for-date/list-bookings-for-date.mjs (2)
components/ticket_source/actions/list-customers/list-customers.mjs (1)
response(24-28)components/ticket_source/actions/list-events/list-events.mjs (1)
response(24-28)
components/ticket_source/actions/get-booking/get-booking.mjs (2)
components/ticket_source/actions/create-customer/create-customer.mjs (1)
response(107-137)components/ticket_source/actions/get-event/get-event.mjs (1)
response(24-27)
components/ticket_source/actions/get-event/get-event.mjs (2)
components/ticket_source/actions/create-customer/create-customer.mjs (1)
response(107-137)components/ticket_source/actions/get-booking/get-booking.mjs (1)
response(42-45)
components/ticket_source/actions/create-customer/create-customer.mjs (3)
components/ticket_source/actions/get-booking/get-booking.mjs (1)
response(42-45)components/ticket_source/actions/get-event/get-event.mjs (1)
response(24-27)components/ticket_source/actions/list-customers/list-customers.mjs (1)
response(24-28)
components/ticket_source/ticket_source.app.mjs (1)
components/ticket_source/common/constants.mjs (2)
LIMIT(1-1)LIMIT(1-1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: pnpm publish
- GitHub Check: Lint Code Base
- GitHub Check: Verify TypeScript components
- GitHub Check: Publish TypeScript components
🔇 Additional comments (10)
components/ticket_source/package.json (1)
3-3: LGTM!The version bump to 0.1.0 and the addition of the
@pipedream/platformdependency are appropriate for this initial feature release.Also applies to: 14-17
components/ticket_source/common/constants.mjs (1)
1-1: LGTM!The pagination limit constant is properly defined and the value of 100 is reasonable.
components/ticket_source/actions/get-booking/get-booking.mjs (1)
3-50: LGTM!The action implementation is clean with properly chained prop dependencies and a clear summary message.
components/ticket_source/actions/list-customers/list-customers.mjs (1)
3-40: LGTM!The pagination implementation and pluralization logic are correct and follow established patterns.
components/ticket_source/actions/list-events/list-events.mjs (1)
3-40: LGTM!The implementation follows the same consistent pagination pattern as other list actions with proper pluralization.
components/ticket_source/actions/get-event/get-event.mjs (1)
3-31: LGTM!The action implementation is straightforward and follows the expected pattern for GET operations.
components/ticket_source/actions/create-customer/create-customer.mjs (1)
138-138: Remove the concern—TicketSource API guarantees response.id exists.The TicketSource Create Customer API response follows JSON:API format with a top-level "data" object containing "id", "type" ("customer"), "attributes", and "links". After destructuring (
const { data: response } = ...), theresponsevariable contains this object with theidfield guaranteed to be present. The code correctly accessesresponse.idin the summary export.components/ticket_source/ticket_source.app.mjs (3)
1-2: LGTM!The imports are appropriate for this integration. The
axioshelper from@pipedream/platformand theLIMITconstant for pagination are correctly referenced.
72-89: LGTM! Solid HTTP abstraction layer.The
_baseUrl,_headers, and_makeRequestmethods provide a clean, reusable foundation for API calls. The Bearer token authentication is correctly implemented usingthis.$auth.api_key, and the axios wrapper properly combines the base URL, headers, and additional options.
90-140: LGTM! Well-structured API methods.All seven API methods follow a consistent pattern and correctly delegate to
_makeRequest. The RESTful path conventions are appropriate, and thecreateCustomermethod correctly specifiesmethod: "POST". The destructuring of path parameters (e.g.,eventId,bookingId) with spread opts provides good flexibility.
components/ticket_source/actions/list-bookings-for-date/list-bookings-for-date.mjs
Outdated
Show resolved
Hide resolved
…ookings-for-date.mjs Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
…number by 1 for event, event dates, and bookings retrieval.
…for improved readability.
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
♻️ Duplicate comments (1)
components/ticket_source/ticket_source.app.mjs (1)
141-166: Optimize pagination termination condition using TicketSource's links metadata.The pagination logic at line 163 sets
hasMore = data.length, which continues whenever any data exists. This causes an unnecessary API call when the last page contains exactlyLIMIT(100) items—the loop fetches again to discover an empty result.TicketSource API responses include a
linksobject with next/prev navigation (nextis null if no next page) and ametaobject with pagination details, so the paginate function should leverage this instead:- const { data } = await fn({ + const { data, links } = await fn({ params, ...opts, }); for (const d of data) { yield d; if (maxResults && ++count === maxResults) { return count; } } - hasMore = data.length; + hasMore = links?.next !== null;Alternatively, if metadata is unavailable, use
hasMore = data.length === LIMIT;but verify this matches the API's actual pagination behavior.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (2)
components/ticket_source/actions/list-bookings-for-date/list-bookings-for-date.mjs(1 hunks)components/ticket_source/ticket_source.app.mjs(1 hunks)
🧰 Additional context used
🧠 Learnings (4)
📚 Learning: 2024-07-04T18:11:59.822Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-07-04T18:11:59.822Z
Learning: When exporting a summary message in the `run` method of an action, ensure the message is correctly formatted. For example, in the `hackerone-get-members` action, the correct format is `Successfully retrieved ${response.data.length} members`.
Applied to files:
components/ticket_source/actions/list-bookings-for-date/list-bookings-for-date.mjs
📚 Learning: 2025-06-04T17:52:05.780Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 16954
File: components/salesloft/salesloft.app.mjs:14-23
Timestamp: 2025-06-04T17:52:05.780Z
Learning: In the Salesloft API integration (components/salesloft/salesloft.app.mjs), the _makeRequest method returns response.data which directly contains arrays for list endpoints like listPeople, listCadences, listUsers, and listAccounts. The propDefinitions correctly call .map() directly on these responses without needing to destructure a nested data property.
Applied to files:
components/ticket_source/ticket_source.app.mjs
📚 Learning: 2024-10-08T15:33:38.240Z
Learnt from: LucBerge
Repo: PipedreamHQ/pipedream PR: 14080
File: components/nocodb/nocodb.app.mjs:133-133
Timestamp: 2024-10-08T15:33:38.240Z
Learning: When implementing pagination with an offset, incrementing `args.params.offset` within the loop ensures correct tracking of the offset, particularly when a maximum count limit (`max`) is used.
Applied to files:
components/ticket_source/ticket_source.app.mjs
📚 Learning: 2025-10-17T06:58:24.577Z
Learnt from: sergio-eliot-rodriguez
Repo: PipedreamHQ/pipedream PR: 18787
File: components/ticketsauce/ticketsauce.app.mjs:7-30
Timestamp: 2025-10-17T06:58:24.577Z
Learning: The TicketSauce "List of Events" API endpoint (GET /v2/events) does not support pagination and returns all events. Users can filter the data using the available query parameters (partner_id, organization_id, etc.) rather than paginating through results.
Applied to files:
components/ticket_source/ticket_source.app.mjs
🧬 Code graph analysis (2)
components/ticket_source/actions/list-bookings-for-date/list-bookings-for-date.mjs (2)
components/ticket_source/actions/list-customers/list-customers.mjs (1)
response(24-28)components/ticket_source/actions/list-events/list-events.mjs (1)
response(24-28)
components/ticket_source/ticket_source.app.mjs (1)
components/ticket_source/common/constants.mjs (2)
LIMIT(1-1)LIMIT(1-1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Publish TypeScript components
- GitHub Check: Lint Code Base
- GitHub Check: Verify TypeScript components
🔇 Additional comments (4)
components/ticket_source/actions/list-bookings-for-date/list-bookings-for-date.mjs (1)
44-46: LGTM! Pluralization correctly implemented.The conditional pluralization follows the established pattern from other list actions and provides clean, grammatically correct summary messages.
components/ticket_source/ticket_source.app.mjs (3)
1-3: LGTM! Clean imports.The imports are appropriate: axios for HTTP requests and LIMIT constant for pagination configuration.
7-70: LGTM! Well-structured propDefinitions with proper dependency chain.The three propDefinitions (eventId → eventDate → bookingId) correctly implement dynamic options with appropriate dependencies. The
page + 1offset correctly translates Pipedream's 0-indexed pagination to the API's 1-indexed pagination.
72-140: LGTM! Consistent API method implementations.The HTTP abstraction layer and API methods follow a clean, consistent pattern. Authorization headers are properly configured, and path construction is correct for all endpoints.
components/ticket_source/actions/list-bookings-for-date/list-bookings-for-date.mjs
Show resolved
Hide resolved
components/ticket_source/actions/list-bookings-for-date/list-bookings-for-date.mjs
Outdated
Show resolved
Hide resolved
…ookings-for-date.mjs
michelle0927
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.
LGTM!
|
Hi everyone, all test cases are passed! Ready for release! Test reports
|
|
/approve |
Resolves #12502
Summary by CodeRabbit
New Features
Chores