-
Notifications
You must be signed in to change notification settings - Fork 5.4k
[APP] implement new tool for sevdesk - findInvoice, getInvoice #17830
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
base: master
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ |
WalkthroughThis change introduces two new SevDesk actions: one for retrieving a single invoice by ID and another for finding invoices with filters. It also adds a supporting method to the SevDesk app module. Additionally, several existing actions and sources have their version numbers incremented, and the package version is updated. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant GetInvoicesAction
participant SevDeskApp
User->>GetInvoicesAction: Provide filters (status, date, etc.)
GetInvoicesAction->>GetInvoicesAction: Validate and convert filters
GetInvoicesAction->>SevDeskApp: listInvoices(params)
SevDeskApp-->>GetInvoicesAction: Return invoice list
GetInvoicesAction-->>User: Return invoices and summary
sequenceDiagram
participant User
participant GetInvoiceAction
participant SevDeskApp
User->>GetInvoiceAction: Provide invoiceId
GetInvoiceAction->>SevDeskApp: getInvoice(invoiceId)
SevDeskApp-->>GetInvoiceAction: Return invoice details
GetInvoiceAction-->>User: Return invoice and summary
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~15 minutes Assessment against linked issues
Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. ✨ Finishing Touches
🧪 Generate unit tests
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: 1
📜 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 (11)
components/sevdesk/actions/cancel-invoice/cancel-invoice.mjs
(1 hunks)components/sevdesk/actions/create-contact/create-contact.mjs
(1 hunks)components/sevdesk/actions/create-invoice/create-invoice.mjs
(1 hunks)components/sevdesk/actions/get-invoice/get-invoice.mjs
(1 hunks)components/sevdesk/actions/get-invoices/get-invoices.mjs
(1 hunks)components/sevdesk/actions/send-invoice-email/send-invoice-email.mjs
(1 hunks)components/sevdesk/package.json
(1 hunks)components/sevdesk/sevdesk.app.mjs
(1 hunks)components/sevdesk/sources/new-contact/new-contact.mjs
(1 hunks)components/sevdesk/sources/new-order/new-order.mjs
(1 hunks)components/sevdesk/sources/new-voucher/new-voucher.mjs
(1 hunks)
🧰 Additional context used
🧠 Learnings (6)
components/sevdesk/sources/new-contact/new-contact.mjs (1)
Learnt from: GTFalcao
PR: #15376
File: components/monday/sources/name-updated/name-updated.mjs:6-6
Timestamp: 2025-01-23T03:55:15.166Z
Learning: Source names in Monday.com components don't need to start with "New" if they emit events for updated items (e.g., "Name Updated", "Column Value Updated") rather than new items. This follows the component guidelines exception where the "New" prefix is only required when emits are limited to new items.
components/sevdesk/actions/create-invoice/create-invoice.mjs (1)
Learnt from: jcortes
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".
components/sevdesk/package.json (2)
Learnt from: jcortes
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.
Learnt from: js07
PR: #17375
File: components/zerobounce/actions/get-validation-results-file/get-validation-results-file.mjs:23-27
Timestamp: 2025-07-01T17:07:48.193Z
Learning: "dir" props in Pipedream components are hidden in the component form and not user-facing, so they don't require labels or descriptions for user clarity.
components/sevdesk/sources/new-order/new-order.mjs (1)
Learnt from: GTFalcao
PR: #15376
File: components/monday/sources/name-updated/name-updated.mjs:6-6
Timestamp: 2025-01-23T03:55:15.166Z
Learning: Source names in Monday.com components don't need to start with "New" if they emit events for updated items (e.g., "Name Updated", "Column Value Updated") rather than new items. This follows the component guidelines exception where the "New" prefix is only required when emits are limited to new items.
components/sevdesk/actions/get-invoices/get-invoices.mjs (2)
Learnt from: GTFalcao
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
.
Learnt from: GTFalcao
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
.
components/sevdesk/actions/create-contact/create-contact.mjs (1)
Learnt from: jcortes
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".
⏰ 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: Publish TypeScript components
- GitHub Check: Verify TypeScript components
- GitHub Check: Lint Code Base
🔇 Additional comments (17)
components/sevdesk/sevdesk.app.mjs (1)
162-169
: LGTM! Well-implemented method following established patterns.The
getInvoice
method is correctly implemented, following the same pattern as other methods in the file. It properly uses the_makeRequest
helper and constructs the appropriate API endpoint path.components/sevdesk/sources/new-voucher/new-voucher.mjs (1)
9-9
: LGTM! Appropriate version bump for coordinated release.The version increment from "0.0.1" to "0.0.2" is appropriate for this coordinated release that adds new invoice retrieval functionality to the SevDesk integration.
components/sevdesk/actions/cancel-invoice/cancel-invoice.mjs (1)
8-8
: LGTM! Appropriate version bump for coordinated release.The version increment aligns with the coordinated release adding new invoice retrieval functionality to the SevDesk integration.
components/sevdesk/actions/send-invoice-email/send-invoice-email.mjs (1)
8-8
: LGTM! Consistent version bump for coordinated release.The version increment is consistent with other components in this coordinated release.
components/sevdesk/package.json (1)
3-3
: LGTM! Appropriate minor version bump for new functionality.The version increment from "0.2.0" to "0.3.0" correctly follows semantic versioning by using a minor version bump for the addition of new invoice retrieval functionality.
components/sevdesk/sources/new-contact/new-contact.mjs (1)
9-9
: LGTM!Version bump is appropriate as part of the coordinated release that includes new invoice retrieval functionality.
components/sevdesk/sources/new-order/new-order.mjs (1)
9-9
: LGTM!Version bump is consistent with the coordinated release pattern across SevDesk components.
components/sevdesk/actions/create-contact/create-contact.mjs (1)
8-8
: LGTM!Version bump aligns with the coordinated release across SevDesk components.
components/sevdesk/actions/create-invoice/create-invoice.mjs (1)
15-15
: LGTM!Version bump is part of the consistent release update across SevDesk components.
components/sevdesk/actions/get-invoices/get-invoices.mjs (4)
3-8
: Verify alignment with PR objectives.The PR objectives mention implementing "findInvoice" and "getInvoice" actions, but this file implements "get-invoices" (plural) for retrieving multiple invoices. Please confirm this aligns with the intended functionality or if additional single-invoice retrieval actions are needed.
66-99
: Excellent date validation and error handling.The date conversion logic properly validates ISO 8601 format, converts to Unix timestamps, and includes logical validation to ensure start date is not after end date. Error messages are clear and informative.
119-121
: LGTM on summary message format.The summary message correctly follows the established pattern from the learnings, properly displaying the count of retrieved invoices with null-safe access to the response objects array.
101-117
: Confirmed:listInvoices
exists in the SevDesk app
ThelistInvoices
method is implemented incomponents/sevdesk/sevdesk.app.mjs
and correctly accepts an options object (opts = {}
), so your call incomponents/sevdesk/actions/get-invoices/get-invoices.mjs
is valid. No further changes needed.components/sevdesk/actions/get-invoice/get-invoice.mjs (4)
1-1
: LGTM!The import statement correctly references the SevDesk app module using the appropriate relative path.
3-8
: LGTM!The action metadata is well-structured with appropriate naming, description, and documentation link. The version "0.0.1" is correct for a new action.
9-18
: Verified:invoiceId
propDefinition ExistsThe
invoiceId
propDefinition is correctly defined incomponents/sevdesk/sevdesk.app.mjs
(type: integer, label: "Invoice Id", with asyncoptions
). No further changes are needed.
19-33
: VerifiedgetInvoice
ImplementationI’ve confirmed that
getInvoice
is defined incomponents/sevdesk/sevdesk.app.mjs
(lines 162–169) with the signature:getInvoice({ invoiceId, ...opts }) { return this._makeRequest({ path: `/Invoice/${invoiceId}`, ...opts, }); },Passing
{ $, invoiceId }
from your action correctly places$
intoopts
, which_makeRequest
uses for the Pipedream execution context. No changes are required here.
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!
WHY
Resolves #17616
Summary by CodeRabbit
New Features
Chores