Skip to content

Conversation

@michelle0927
Copy link
Collaborator

@michelle0927 michelle0927 commented Dec 3, 2025

Resolves #19207
Resolves #19359

Summary by CodeRabbit

  • New Features

    • Added three new order management actions for WICS: Delete Order Line, Get Order by Additional Reference, and Update Order.
    • Added data parsing and normalization utility function.
    • Enhanced WICS component with new API methods and dynamic selection fields.
  • Style

    • Added trailing newlines to multiple component files.
  • Chores

    • Bumped WICS component version to 0.1.0 and added new dependency.

✏️ Tip: You can customize this high-level summary in your review settings.

@vercel
Copy link

vercel bot commented Dec 3, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Review Updated (UTC)
pipedream-docs Ignored Ignored Dec 16, 2025 7:06pm
pipedream-docs-redirect-do-not-edit Ignored Ignored Dec 16, 2025 7:06pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 3, 2025

Walkthrough

This PR adds three new actions to the WICS app component (get order by additional reference, update order, delete order line) and enhances the core WICS app module with API integration capabilities. Minor trailing newline formatting changes are applied to unrelated app files. Package dependencies are updated to include @pipedream/platform.

Changes

Cohort / File(s) Summary
Trailing newline formatting
components/eaccounting/eaccounting.app.mjs, components/factorial_api_keys/factorial_api_keys.app.mjs, components/flowii/flowii.app.mjs, components/hailey_hr/hailey_hr.app.mjs, components/nuvemshop/nuvemshop.app.mjs, components/simpleem/simpleem.app.mjs, components/suitecrm/suitecrm.app.mjs
Added trailing newlines at end of files for formatting consistency; no functional changes.
WICS Core Integration
components/wics/wics.app.mjs, components/wics/package.json
Enhanced WICS app with axios import, dynamic propDefinitions for orderReference/additionalReference/lineNumber, and new API methods (_baseUrl, _makeRequest, getOrder, listOrders, updateOrder, deleteOrderLine); replaced legacy authKeys logic. Updated package version from 0.0.1 to 0.1.0 and added @pipedream/platform dependency.
WICS Utilities
components/wics/common/utils.mjs
Introduced parseObject utility function that recursively normalizes inputs: converts JSON strings, processes arrays and objects, with fallback handling for parsing failures.
WICS Actions
components/wics/actions/delete-order-line/delete-order-line.mjs, components/wics/actions/get-order-by-additional-reference/get-order-by-additional-reference.mjs, components/wics/actions/update-order/update-order.mjs
Added three new action modules: delete-order-line calls wics.deleteOrderLine; get-order-by-additional-reference fetches orders via listOrders and returns first match; update-order merges existing and new order data then calls wics.updateOrder with consolidated payload. All include metadata, propDefinitions, and async run methods.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~35 minutes

  • WICS app.mjs requires careful review of API method implementations (_makeRequest, getOrder, listOrders, updateOrder, deleteOrderLine), propDefinitions data mapping logic, and error handling patterns
  • Three new action files follow similar structural patterns but each requires verification of prop configuration and run method logic (particularly update-order's line merging logic)
  • parseObject utility recursive logic and JSON parsing error handling should be validated
  • Verify propDefinition wiring aligns between app.mjs and action files

Suggested reviewers

  • lcaresia
  • GTFalcao

Pre-merge checks and finishing touches

❌ Failed checks (2 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive The PR description includes issue references (#19207, #19359) but lacks the required 'WHY' section from the template explaining the rationale. Add a 'WHY' section to explain the motivation and context for adding these WICS components.
Out of Scope Changes check ❓ Inconclusive Trailing newline fixes in unrelated component files appear to be incidental formatting cleanup and are not part of the core WICS functionality objectives. Consider whether trailing newline changes in other components (eaccounting, factorial_api_keys, flowii, hailey_hr, nuvemshop, simpleem, suitecrm) are intentional or should be in a separate commit.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'WICS - new components' clearly summarizes the main change: adding new components for the WICS app integration.
Linked Issues check ✅ Passed All coding requirements from the linked issues are met: get-order-by-additional-reference action [#19207], update-order and delete-order-line actions [#19359], plus supporting wics.app.mjs with necessary methods.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch issue-19027

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@michelle0927 michelle0927 marked this pull request as ready for review December 16, 2025 19:06
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: 3

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d6edb6e and 10d6bac.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (13)
  • components/eaccounting/eaccounting.app.mjs (1 hunks)
  • components/factorial_api_keys/factorial_api_keys.app.mjs (1 hunks)
  • components/flowii/flowii.app.mjs (1 hunks)
  • components/hailey_hr/hailey_hr.app.mjs (1 hunks)
  • components/nuvemshop/nuvemshop.app.mjs (1 hunks)
  • components/simpleem/simpleem.app.mjs (1 hunks)
  • components/suitecrm/suitecrm.app.mjs (1 hunks)
  • components/wics/actions/delete-order-line/delete-order-line.mjs (1 hunks)
  • components/wics/actions/get-order-by-additional-reference/get-order-by-additional-reference.mjs (1 hunks)
  • components/wics/actions/update-order/update-order.mjs (1 hunks)
  • components/wics/common/utils.mjs (1 hunks)
  • components/wics/package.json (2 hunks)
  • components/wics/wics.app.mjs (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 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/wics/package.json
📚 Learning: 2025-09-15T22:01:11.472Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 18362
File: components/leonardo_ai/actions/generate-image/generate-image.mjs:103-105
Timestamp: 2025-09-15T22:01:11.472Z
Learning: In Pipedream components, pipedream/platform's axios implementation automatically excludes undefined values from HTTP requests, so there's no need to manually check for truthiness before including properties in request payloads.

Applied to files:

  • components/wics/wics.app.mjs
🧬 Code graph analysis (1)
components/wics/actions/update-order/update-order.mjs (1)
components/wics/common/utils.mjs (2)
  • parseObject (1-32)
  • parseObject (1-32)
⏰ 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: Verify TypeScript components
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Lint Code Base
🔇 Additional comments (17)
components/eaccounting/eaccounting.app.mjs (1)

11-11: Formatting-only change; no issues.

This is a trailing newline adjustment with no functional impact.

components/nuvemshop/nuvemshop.app.mjs (1)

11-11: Unrelated formatting change; verify scope.

This file is unrelated to the PR objectives, which focus on adding WICS app actions (get order, update order, delete order line). Only a trailing newline was added here. If this change is incidental, consider excluding it from the PR or confirming it's intentional alongside the primary WICS work.

components/simpleem/simpleem.app.mjs (1)

1-11: Trivial whitespace change.

components/flowii/flowii.app.mjs (1)

11-11: No concerns.

This change is a minor formatting adjustment (trailing newline) with no functional impact.

components/suitecrm/suitecrm.app.mjs (1)

11-11: Trailing newline formatting — LGTM.

This is an incidental cosmetic improvement and does not affect functionality. The change is approved.

components/hailey_hr/hailey_hr.app.mjs (1)

11-11: LGTM!

Trailing newline formatting change - no functional impact.

components/wics/package.json (1)

3-17: LGTM!

Version bump to 0.1.0 is appropriate for new feature additions, and @pipedream/platform dependency is required for the HTTP request utilities used in the new actions.

components/factorial_api_keys/factorial_api_keys.app.mjs (1)

11-11: LGTM!

Trailing newline formatting change - no functional impact.

components/wics/common/utils.mjs (1)

1-10: Approve the core parsing logic.

The JSON parsing with fallback and the falsy-to-undefined conversion are appropriate for normalizing optional Pipedream prop inputs.

components/wics/actions/get-order-by-additional-reference/get-order-by-additional-reference.mjs (1)

3-22: LGTM!

Action metadata and props are well-defined. The annotations correctly indicate this is a read-only, non-destructive operation.

components/wics/actions/delete-order-line/delete-order-line.mjs (1)

1-41: LGTM! Well-structured delete action.

The action is correctly implemented with appropriate destructive annotations and proper use of propDefinitions. The logic is straightforward and follows Pipedream patterns.

components/wics/wics.app.mjs (3)

6-53: LGTM! Proper dynamic prop definitions.

The propDefinitions correctly fetch data from the API and map to user-friendly options. The use of optional chaining provides good defensive programming against missing data.


58-100: LGTM! Clean API method implementations.

The _makeRequest helper correctly configures axios with basic authentication, and all API methods properly delegate to it with the appropriate HTTP methods and paths.


55-57: Verify environment field format in base URL construction.

The base URL is constructed by concatenating this.$auth.environment directly with servicelayer.wics.nl/api. This pattern assumes the environment field contains a full protocol and optional subdomain prefix (e.g., https://test-). The auth field definition for the environment property should be verified to ensure:

  1. The expected format is clearly documented
  2. Input validation is applied to prevent malformed URLs
  3. The pattern is intentional or should be refactored for clarity and robustness
components/wics/actions/update-order/update-order.mjs (3)

1-173: LGTM! Comprehensive props for order updates.

The action provides a thorough set of optional props for updating various order fields. The descriptions are clear and helpful for users.


199-236: LGTM! Proper merge of existing and new data.

The update logic correctly merges the existing order data with new values. Undefined values from unprovided optional props are automatically excluded by axios from @pipedream/platform, so only the fields the user actually wants to update will be sent to the API.

Based on learnings, axios from @pipedream/platform automatically excludes undefined values from requests.


237-239: LGTM! Proper action completion.

The summary export and data return follow standard Pipedream patterns.

@michelle0927
Copy link
Collaborator Author

@vunguyenhung We have an account in 1PW w/ api_key and api_secret, but the account doesn't contain any orders with which to test the components. Neople will test the components after they're published.

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.

[ACTION] WICS update order & delete order line [APP] WICS

2 participants