Skip to content

[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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jcortes
Copy link
Collaborator

@jcortes jcortes commented Jul 28, 2025

WHY

Resolves #17616

Summary by CodeRabbit

  • New Features

    • Added actions to retrieve a single invoice by ID and to list multiple invoices with filters in the SevDesk integration.
  • Chores

    • Updated version numbers for several SevDesk actions and sources.
    • Bumped the SevDesk integration package version.

@jcortes jcortes self-assigned this Jul 28, 2025
Copy link

vercel bot commented Jul 28, 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) Jul 28, 2025 10:30pm
pipedream-docs ⬜️ Ignored (Inspect) Jul 28, 2025 10:30pm
pipedream-docs-redirect-do-not-edit ⬜️ Ignored (Inspect) Jul 28, 2025 10:30pm

Copy link
Contributor

coderabbitai bot commented Jul 28, 2025

Walkthrough

This 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

Cohort / File(s) Change Summary
New Invoice Retrieval Actions
components/sevdesk/actions/get-invoice/get-invoice.mjs,
components/sevdesk/actions/get-invoices/get-invoices.mjs
Add new actions for retrieving a single invoice by ID and for finding invoices with filters.
App Method Addition
components/sevdesk/sevdesk.app.mjs
Add getInvoice method to support the new "Get Invoice" action.
Version Bumps: Actions
components/sevdesk/actions/cancel-invoice/cancel-invoice.mjs,
components/sevdesk/actions/create-contact/create-contact.mjs,
components/sevdesk/actions/create-invoice/create-invoice.mjs,
components/sevdesk/actions/send-invoice-email/send-invoice-email.mjs
Increment version numbers of existing SevDesk actions from 0.0.1 to 0.0.2.
Version Bumps: Sources
components/sevdesk/sources/new-contact/new-contact.mjs,
components/sevdesk/sources/new-order/new-order.mjs,
components/sevdesk/sources/new-voucher/new-voucher.mjs
Increment version numbers of existing SevDesk sources from 0.0.1 to 0.0.2.
Package Version Update
components/sevdesk/package.json
Update package version from 0.2.0 to 0.3.0.

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

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~15 minutes

Assessment against linked issues

Objective Addressed Explanation
Implement "findInvoice" (get invoices with filters) for SevDesk (#17616)
Implement "getInvoice" (retrieve invoice by ID) for SevDesk (#17616)

Poem

A hop, a skip, a SevDesk leap—
Now invoices are yours to keep!
Find them all, or just the one,
With shiny new actions, review is fun.
Version bumps abound, oh what a spree—
The rabbit’s code hops joyfully! 🐇✨

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch sevdesk-new-components

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 generate unit tests to generate unit tests for 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: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 28e91bb and 368cac2.

⛔ 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
The listInvoices method is implemented in components/sevdesk/sevdesk.app.mjs and correctly accepts an options object (opts = {}), so your call in components/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 Exists

The invoiceId propDefinition is correctly defined in components/sevdesk/sevdesk.app.mjs (type: integer, label: "Invoice Id", with async options). No further changes are needed.


19-33: Verified getInvoice Implementation

I’ve confirmed that getInvoice is defined in components/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 $ into opts, which _makeRequest uses for the Pipedream execution context. No changes are required here.

Copy link
Collaborator

@michelle0927 michelle0927 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

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.

[APP] implement new tool for sevdesk - findInvoice, getInvoice
2 participants