Skip to content

Conversation

luancazarine
Copy link
Collaborator

@luancazarine luancazarine commented Sep 2, 2025

Resolves #18051

Summary by CodeRabbit

  • New Features

    • Added actions to create orders and shipments, fetch pickup locations, and retrieve shipment details.
    • Introduced dynamic selectors for Order ID and Shipment ID.
  • Improvements

    • Added country code dropdown options and safer parsing for complex inputs.
    • Validation for consignee address when creating orders.
    • Improved API request handling with a more robust internal client and clearer summaries.
  • Chores

    • Bumped Paazl component version to 0.1.0 and updated dependencies.

- Introduced prop definitions for Order ID and Shipment ID.
- Implemented methods for retrieving order shipments and shipment details.
- Added methods for creating orders and shipments.
- Enhanced request handling with improved headers and base URL configuration.
- Bump version to 0.1.0 in package.json.
- Add new actions: Create Order, Create Shipment, Get Shipment Details, and Get Pickup Locations.
- Introduce utility functions and constants for handling country options and object parsing.
- Enhance the app's functionality for order and shipment management.
@luancazarine luancazarine linked an issue Sep 2, 2025 that may be closed by this pull request
Copy link

vercel bot commented Sep 2, 2025

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

2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
pipedream-docs Ignored Ignored Sep 2, 2025 8:15pm
pipedream-docs-redirect-do-not-edit Ignored Ignored Sep 2, 2025 8:15pm

Copy link
Contributor

coderabbitai bot commented Sep 2, 2025

Warning

Rate limit exceeded

@luancazarine has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 13 minutes and 0 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between d341fdb and 00d0e12.

📒 Files selected for processing (2)
  • components/paazl/actions/create-order/create-order.mjs (1 hunks)
  • components/paazl/actions/create-shipment/create-shipment.mjs (1 hunks)

Walkthrough

Adds a Paazl integration: new actions (create order, create shipment, get pickup locations, get shipment details), shared constants and utils, a lightweight HTTP client in the Paazl app with request helpers, and bumps the Paazl package version and dependency.

Changes

Cohort / File(s) Summary
Paazl Actions
components/paazl/actions/create-order/create-order.mjs, components/paazl/actions/create-shipment/create-shipment.mjs, components/paazl/actions/get-pickup-locations/get-pickup-locations.mjs, components/paazl/actions/get-shipment-details/get-shipment-details.mjs
Adds four actions: Create Order (validates address fields, builds nested payload, calls createOrder), Create Shipment (parcels parsing, calls createShipment), Get Pickup Locations (builds query payload, calls getPickupLocations), Get Shipment Details (calls getOrderShipmentDetails).
Paazl App Client
components/paazl/paazl.app.mjs
Replaces authKeys flow with internal HTTP client using axios; adds _headers, _baseUrl, _makeRequest helpers; implements getOrderShipments, getOrderShipmentDetails, createOrder, createShipment; adds propDefinitions for orderId and shipmentId (shipmentId options async).
Shared Constants / Utils
components/paazl/common/constants.mjs, components/paazl/common/utils.mjs
Adds COUNTRY_OPTIONS array of country codes and parseObject utility to safely parse string/array inputs.
Package Metadata
components/paazl/package.json
Bumps version to 0.1.0 and adds dependency on @pipedream/platform.

Sequence Diagram(s)

sequenceDiagram
  actor User
  participant Action as Create Order Action
  participant App as Paazl App Client
  participant API as Paazl API

  User->>Action: Provide consignee/shipping inputs
  Action->>Action: Validate inputs, build payload
  Action->>App: createOrder({ data })
  App->>API: POST /v1/order
  API-->>App: 201 Created + body
  App-->>Action: Response
  Action-->>User: Return API response
Loading
sequenceDiagram
  actor User
  participant Action as Create Shipment Action
  participant App as Paazl App Client
  participant API as Paazl API

  User->>Action: orderId, type/size/quantity, parcels
  Action->>App: createShipment({ orderId, data })
  App->>API: POST /v1/orders/{orderId}/shipments
  API-->>App: 201 Created + shipment
  App-->>Action: Response
  Action-->>User: Summary + response
Loading
sequenceDiagram
  actor User
  participant Action as Get Pickup Locations Action
  participant App as Paazl App Client
  participant API as Paazl API

  User->>Action: Country/postal codes, dates, locale
  Action->>App: getPickupLocations({ data })
  App->>API: POST /v1/pickuplocations
  API-->>App: Locations
  App-->>Action: Response
  Action-->>User: Locations list
Loading
sequenceDiagram
  actor User
  participant Action as Get Shipment Details Action
  participant App as Paazl App Client
  participant API as Paazl API

  User->>Action: orderId, shipmentId
  Action->>App: getOrderShipmentDetails({ orderId, shipmentId })
  App->>API: GET /v1/orders/{orderId}/shipments/{shipmentId}
  API-->>App: Shipment details
  App-->>Action: Response
  Action-->>User: Details
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Assessment against linked issues

Objective Addressed Explanation
Implement order endpoints (save/modify/delete) and related actions (#18051) Save (POST /v1/order) implemented via createOrder; modify (PUT) and delete (DELETE /v1/order/{reference}) not implemented.
Implement pickup & home delivery shipping options (#18051) Pickup locations implemented (POST /v1/pickuplocations); home delivery shipping options (POST /v1/shippingoptions) not implemented.
Implement shipment endpoints: create, list, specific tracking/details, labels, return shipments (#18051) createShipment and getOrderShipmentDetails implemented; getOrderShipments exists in app methods but no action exposing list; label and return shipment endpoints not implemented.
App-level auth/request client and prop definitions for order/shipment selection (#18051)

Suggested reviewers

  • jcortes

Poem

"I nibble code and hop with zest,
New orders born, parcels dressed.
Pickup dots like carrot treats,
Shipments roll on nimble feet.
I twirl my whiskers — build and test!"

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

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.
    • 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.
  • 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 the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit 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

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • 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: 16

🧹 Nitpick comments (9)
components/paazl/common/constants.mjs (1)

1-32: Prevent accidental mutation.
Freeze the exported array to avoid runtime modifications.

-export const COUNTRY_OPTIONS = [
+export const COUNTRY_OPTIONS = Object.freeze([
   "NL",
   "DE",
   "BE",
   "FR",
   "GB",
   "ES",
   "IT",
   "AT",
   "CH",
   "DK",
   "NO",
   "SE",
   "FI",
   "PL",
   "CZ",
   "HU",
   "SK",
   "SI",
   "HR",
   "RO",
   "BG",
   "GR",
   "PT",
   "IE",
   "LU",
   "EE",
   "LV",
   "LT",
   "MT",
   "CY",
-];
+]);
components/paazl/actions/create-order/create-order.mjs (5)

160-160: Align payload with the string type for companyName.
Avoid unnecessary parsing.

-          companyName: parseObject(this.consigneeCompanyName),
+          companyName: this.consigneeCompanyName,

118-118: Fix broken doc link.
There’s a stray %22 at the end of the URL.

-      description: "A shipping option's Paazl identifier. You will find a list of the identifiers of the shipping options available to your webshop in your webshop account under **Settings>Account>Overview of shipping options**. **Note!** If you have used [custom shipping option identifiers](https://support.paazl.com/hc/en-us/articles/360021787374-Customizing-shipping-option-identifiers%22), these will be returned instead of their Paazl equivalents.",
+      description: "A shipping option's Paazl identifier. You will find a list of the identifiers of the shipping options available to your webshop in your webshop account under **Settings>Account>Overview of shipping options**. **Note!** If you have used [custom shipping option identifiers](https://support.paazl.com/hc/en-us/articles/360021787374-Customizing-shipping-option-identifiers), these will be returned instead of their Paazl equivalents.",

69-71: Country codes: reference ISO 3166-1 alpha-2, not 3166-2.
3166-2 is for subdivisions; countries use 3166-1 alpha-2.

-      description: "The [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) code for the country to which an order is shipped.",
+      description: "The [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code for the country to which an order is shipped.",

57-61: Locale description: same ISO correction.
Use ISO 3166-1 alpha-2 for the country portion.

-      description: "Specifies the language of the email templates used for track & trace notifications. `locale` is specified using the format `{language}_{country}`, where `{language}` is an [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code and `{country}` is an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) country code. Example: `fr_FR`",
+      description: "Specifies the language of the email templates used for track & trace notifications. `locale` is specified using the format `{language}_{country}`, where `{language}` is an [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code and `{country}` is an [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code. Example: `fr_FR`",

191-192: Add a success summary for UX consistency.
Aligns with other actions.

-    return response;
+    $.export("$summary", `Order ${this.reference} created`);
+    return response;
components/paazl/actions/get-shipment-details/get-shipment-details.mjs (2)

34-35: Include shipmentId in the summary.
More informative in the UI.

-    $.export("$summary", `Successfully retrieved shipment details for ${this.orderId}`);
+    $.export("$summary", `Successfully retrieved shipment ${this.shipmentId} for order ${this.orderId}`);

7-7: Version note (optional).
Action is 0.0.1 while package is 0.1.0. Fine to keep action versions independent; align if you prefer.

components/paazl/actions/get-pickup-locations/get-pickup-locations.mjs (1)

7-7: Documentation link is incorrect - uses URL fragment instead of proper API path

The documentation link uses a URL fragment (#/Shipping%20options/getPickupLocationsUsingPOST) which may not work reliably. Based on the API reference structure, this should likely be a direct path or proper anchor.

-  description: "Retrieve available pickup locations from Paazl. [See the documentation](https://support.paazl.com/hc/en-us/articles/360008633973-REST-API-reference#/Shipping%20options/getPickupLocationsUsingPOST)",
+  description: "Retrieve available pickup locations from Paazl. [See the documentation](https://support.paazl.com/hc/en-us/articles/360008633973-REST-API-reference)",
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between a00e05a and c7883f9.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (8)
  • components/paazl/actions/create-order/create-order.mjs (1 hunks)
  • components/paazl/actions/create-shipment/create-shipment.mjs (1 hunks)
  • components/paazl/actions/get-pickup-locations/get-pickup-locations.mjs (1 hunks)
  • components/paazl/actions/get-shipment-details/get-shipment-details.mjs (1 hunks)
  • components/paazl/common/constants.mjs (1 hunks)
  • components/paazl/common/utils.mjs (1 hunks)
  • components/paazl/paazl.app.mjs (1 hunks)
  • components/paazl/package.json (2 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2024-12-12T19:23:09.039Z
Learnt from: jcortes
PR: PipedreamHQ/pipedream#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/paazl/package.json
🧬 Code graph analysis (5)
components/paazl/common/utils.mjs (1)
components/akeneo/akeneo.app.mjs (1)
  • JSON (99-110)
components/paazl/actions/get-pickup-locations/get-pickup-locations.mjs (1)
components/paazl/common/constants.mjs (2)
  • COUNTRY_OPTIONS (1-32)
  • COUNTRY_OPTIONS (1-32)
components/paazl/actions/get-shipment-details/get-shipment-details.mjs (3)
components/paazl/actions/create-order/create-order.mjs (1)
  • response (155-190)
components/paazl/actions/create-shipment/create-shipment.mjs (1)
  • response (55-64)
components/paazl/actions/get-pickup-locations/get-pickup-locations.mjs (1)
  • response (76-90)
components/paazl/actions/create-order/create-order.mjs (2)
components/paazl/common/constants.mjs (2)
  • COUNTRY_OPTIONS (1-32)
  • COUNTRY_OPTIONS (1-32)
components/paazl/common/utils.mjs (2)
  • parseObject (1-24)
  • parseObject (1-24)
components/paazl/actions/create-shipment/create-shipment.mjs (1)
components/paazl/common/utils.mjs (2)
  • parseObject (1-24)
  • parseObject (1-24)
⏰ 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: Lint Code Base
  • GitHub Check: Publish TypeScript components
🔇 Additional comments (3)
components/paazl/package.json (2)

3-3: Version bump looks fine.
No concerns with 0.1.0 for the package.


15-17: Confirm export of ConfigurationError
No occurrences of ConfigurationError were found in components/paazl. Manually verify that @pipedream/platform@^3.1.0 exports ConfigurationError as required by your actions.

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

16-27: Verify correct field for shipmentId options in paazl.app.mjs
In components/paazl/paazl.app.mjs the shipmentId prop’s options method returns trackingNumber, but the getOrderShipmentDetails endpoint uses a shipmentId path parameter. Confirm whether trackingNumber is in fact the identifier expected by that endpoint or if you should be mapping to the shipment’s numeric or UUID id (or another field) instead.

luancazarine and others added 2 commits September 2, 2025 17:10
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
- Changed consigneeCompanyName type from "object" to "string" in create-order action.
- Added a configuration error check in create-shipment action to ensure 'quantity' and 'parcels' parameters are mutually exclusive.
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!

@luancazarine
Copy link
Collaborator Author

this is duplicated with #18255

@jcortes jcortes removed a link to an issue Sep 5, 2025
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.

2 participants