Skip to content

Conversation

@kl2400033266
Copy link

@kl2400033266 kl2400033266 commented Nov 26, 2025

  • Implements WICS (for people) API integration for Pipedream
  • Added authentication support with API key and base URL configuration
  • Implemented core API methods:
    • getOrder(order_id): Retrieve a specific order from WICS
    • listOrders(params): Retrieve all orders with optional filtering
    • createOrder(data): Create new orders through WICS API
  • Added automatic request handling with proper headers and authorization
  • Resolves issue [APP] WICS #19207 - Add WICS app integration

This implementation follows Pipedream's app component conventions and supports the WICS API endpoint documented at https://docs.wics.nl/#orders-get-order

WHY

Summary by CodeRabbit

  • New Features
    • WICS integration now available. Securely connect your WICS account using an API key to seamlessly manage your orders. Features include retrieving detailed order information, browsing your complete order history, creating new orders, and customizing your connection settings for optimal integration with your WICS setup.

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

- Implements WICS (for people) API integration for Pipedream
- Added authentication support with API key and base URL configuration
- Implemented core API methods:
  * getOrder(order_id): Retrieve a specific order from WICS
  * listOrders(params): Retrieve all orders with optional filtering
  * createOrder(data): Create new orders through WICS API
- Added automatic request handling with proper headers and authorization
- Resolves issue PipedreamHQ#19207 - Add WICS app integration

This implementation follows Pipedream's app component conventions and supports the WICS API endpoint documented at https://docs.wics.nl/#orders-get-order
@vercel
Copy link

vercel bot commented Nov 26, 2025

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

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
pipedream-docs-redirect-do-not-edit Ignored Ignored Nov 26, 2025 2:44pm

@pipedream-component-development
Copy link
Collaborator

Thank you so much for submitting this! We've added it to our backlog to review, and our team has been notified.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 26, 2025

Walkthrough

Introduces a new WICS app integration module with configurable API credentials, a centralized HTTP request wrapper using Bearer authentication, and methods for order retrieval, listing, and creation, plus authentication verification.

Changes

Cohort / File(s) Summary
WICS App Integration
components/wics/wics.app.mjs
New app module with prop definitions for API key and base URL, internal request helper with Bearer auth, and public methods for order operations (getOrder, listOrders, createOrder) and authentication verification.

Sequence Diagram

sequenceDiagram
    participant App as WICS App
    participant Client as Client
    participant WICS as WICS API
    
    Note over App: Configuration Phase
    Client->>App: Initialize with api_key & base_url
    App->>App: Store credentials
    
    Note over App: Authentication Phase
    Client->>App: call auth()
    App->>App: _makeRequest({path: "/auth/verify"})
    App->>WICS: POST /auth/verify<br/>(Authorization: Bearer api_key)
    WICS-->>App: Verification response
    App-->>Client: auth result
    
    Note over App: Order Operations Phase
    Client->>App: call getOrder(order_id)
    App->>App: _makeRequest({path: "/orders/{order_id}"})
    App->>WICS: GET /orders/{order_id}<br/>(Authorization: Bearer api_key)
    WICS-->>App: Order data
    App-->>Client: Order details
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify Bearer token construction and Header formatting are correct
  • Confirm _baseUrl() fallback logic and default URL alignment with WICS documentation
  • Validate query parameter handling in listOrders() and request body structure in createOrder()

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive The pull request description is largely complete with implementation details, methods, and reference to the resolved issue, though the required WHY section remains unfilled as a placeholder. Complete the 'WHY' section to explain the business rationale, user benefits, or motivation behind adding this WICS integration.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The pull request title clearly and concisely summarizes the main change: adding a WICS app integration with API connector functionality.
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

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.

@pipedream-component-development
Copy link
Collaborator

Thanks for submitting this PR! When we review PRs, we follow the Pipedream component guidelines. If you're not familiar, here's a quick checklist:

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: 2

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a77314f and ab1ecc4.

📒 Files selected for processing (1)
  • components/wics/wics.app.mjs (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 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/wics.app.mjs (1)
components/gmail/gmail.app.mjs (1)
  • axios (415-423)
🔇 Additional comments (2)
components/wics/wics.app.mjs (2)

24-33: Request wrapper looks solid; confirm WICS auth scheme and header usage

_makeRequest is structured correctly for Pipedream apps: passing $ into axios, building the full URL, and centralizing headers. One thing to double‑check against WICS docs is whether authentication truly uses Authorization: Bearer <api_key> versus a different header name or token scheme; if it differs, adjust the header here once and all methods will follow. Setting "Content-Type": "application/json" globally is fine, though you could omit it for pure GETs if you prefer.


53-57: Verify /auth/verify is the right endpoint and method for auth testing

The auth() helper delegating to _makeRequest({ path: "/auth/verify" }) is fine structurally, but it assumes:

  • WICS exposes a /auth/verify endpoint, and
  • It accepts a GET with Bearer auth and returns a 2xx on success.

Please confirm this matches the WICS API; if not, pointing auth() at a known, cheap endpoint (e.g. a lightweight GET /orders with restrictive params) may be more reliable.

Comment on lines +6 to +23
propDefinitions: {
api_key: {
type: "string",
secret: true,
label: "API Key",
description: "WICS API Key",
},
base_url: {
type: "string",
label: "Base URL",
description: "WICS Base URL",
default: "https://api.wics.nl",
},
},
methods: {
_baseUrl() {
return this.$auth.base_url || "https://api.wics.nl";
},
Copy link
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

Avoid duplicating the base URL default and consider normalizing trailing slashes

You hard‑code "https://api.wics.nl" both in propDefinitions.base_url.default and _baseUrl(), and _baseUrl() doesn’t normalize trailing slashes. To keep things DRY and avoid //orders when users include a trailing slash, consider centralizing and normalizing here:

-  methods: {
-    _baseUrl() {
-      return this.$auth.base_url || "https://api.wics.nl";
-    },
+  methods: {
+    _baseUrl() {
+      const baseUrl = this.$auth.base_url || "https://api.wics.nl";
+      return baseUrl.replace(/\/+$/, "");
+    },
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
propDefinitions: {
api_key: {
type: "string",
secret: true,
label: "API Key",
description: "WICS API Key",
},
base_url: {
type: "string",
label: "Base URL",
description: "WICS Base URL",
default: "https://api.wics.nl",
},
},
methods: {
_baseUrl() {
return this.$auth.base_url || "https://api.wics.nl";
},
propDefinitions: {
api_key: {
type: "string",
secret: true,
label: "API Key",
description: "WICS API Key",
},
base_url: {
type: "string",
label: "Base URL",
description: "WICS Base URL",
default: "https://api.wics.nl",
},
},
methods: {
_baseUrl() {
const baseUrl = this.$auth.base_url || "https://api.wics.nl";
return baseUrl.replace(/\/+$/, "");
},
🤖 Prompt for AI Agents
In components/wics/wics.app.mjs around lines 6–23, you duplicate the base URL
default and don’t normalize trailing slashes; introduce a single constant like
DEFAULT_BASE_URL (use it for propDefinitions.base_url.default) and have
_baseUrl() return (this.$auth.base_url || DEFAULT_BASE_URL) with trailing
slashes stripped (e.g., remove any trailing '/' characters) so callers never get
a double-slash when concatenating paths. Ensure all concatenations add a single
'/' as needed elsewhere.

@jcortes jcortes linked an issue Nov 26, 2025 that may be closed by this pull request
Copy link
Collaborator

@jcortes jcortes left a comment

Choose a reason for hiding this comment

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

Hi @kl2400033266 this is a great contribution however, it seems like it is missing the components, can you please take a look at the documentation here and if you have questions please let me know so I can help you out.

Also can you run a git rebase somthing like:

$ git pull origin master --rebase

and fix the conflicts you might have in your branch after pulling master, thanks

@jcortes jcortes moved this from Ready for PR Review to Changes Required in Component (Source and Action) Backlog Nov 26, 2025
@buhtz
Copy link

buhtz commented Nov 27, 2025

Dear maintainer,
have a close look at this contributor.
He is IMHO throwing AI crap at several repos.

@jcortes
Copy link
Collaborator

jcortes commented Dec 1, 2025

This PR is closed due to dubious code contribution!

@jcortes jcortes closed this Dec 1, 2025
@github-project-automation github-project-automation bot moved this from Changes Required to Done in Component (Source and Action) Backlog Dec 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

User submitted Submitted by a user

Development

Successfully merging this pull request may close these issues.

[Components] wics

5 participants