From ab1ecc4921282afc7b18e5d4a37cf37d1edd6873 Mon Sep 17 00:00:00 2001 From: RONGALI MOHAN KRISHNA 2400033266 <2400033266@kluniversity.in> Date: Wed, 26 Nov 2025 20:13:05 +0530 Subject: [PATCH] feat(wics): add WICS app integration with API connector - 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 #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 --- components/wics/wics.app.mjs | 58 ++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 components/wics/wics.app.mjs diff --git a/components/wics/wics.app.mjs b/components/wics/wics.app.mjs new file mode 100644 index 0000000000000..501e796f67110 --- /dev/null +++ b/components/wics/wics.app.mjs @@ -0,0 +1,58 @@ +import { axios } from "@pipedream/platform"; + +export default { + type: "app", + app: "wics", + 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"; + }, + async _makeRequest({ $ = this, path, ...opts }) { + return axios($, { + url: `${this._baseUrl()}${path}`, + headers: { + Authorization: `Bearer ${this.$auth.api_key}`, + "Content-Type": "application/json", + }, + ...opts, + }); + }, + async getOrder(order_id) { + return this._makeRequest({ + path: `/orders/${order_id}`, + }); + }, + async listOrders(params = {}) { + return this._makeRequest({ + path: "/orders", + params, + }); + }, + async createOrder(data) { + return this._makeRequest({ + method: "POST", + path: "/orders", + data, + }); + }, + }, + async auth() { + return this._makeRequest({ + path: "/auth/verify", + }); + }, +};