Skip to content

Conversation

@jcortes
Copy link
Collaborator

@jcortes jcortes commented Dec 4, 2025

WHY

Resolves #19334

Summary by CodeRabbit

  • New Features

    • New actions to list/retrieve shipments, return orders, return statuses, return addresses, sales orders/items, and shipment statuses
    • Action to update return address
    • Dynamic selectable fields for shipment, return address, and customer IDs; paginated listing support
  • Chores

    • Component package version bumped to 0.2.0
    • Incremented action/source versions for maintenance

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

@jcortes jcortes self-assigned this Dec 4, 2025
@vercel
Copy link

vercel bot commented Dec 4, 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 Dec 4, 2025 9:38pm
pipedream-docs-redirect-do-not-edit Ignored Ignored Dec 4, 2025 9:38pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 4, 2025

Walkthrough

This PR expands the Returnless integration: adds multiple new actions and sources, extends the app module with new API methods and propDefinitions (shipmentId, returnAddressId, customerId), bumps several action/source versions, and increments the package version to 0.2.0. (48 words)

Changes

Cohort / File(s) Change Summary
Existing action version bumps (0.0.2 → 0.0.3)
components/returnless/actions/create-return-order/create-return-order.mjs, components/returnless/actions/list-return-orders/list-return-orders.mjs, components/returnless/actions/list-sales-order-items/list-sales-order-items.mjs, components/returnless/actions/list-sales-orders/list-sales-orders.mjs, components/returnless/actions/update-return-order-status/update-return-order-status.mjs
Version fields updated from 0.0.20.0.3. No logic changes.
New retrieve/single-entity actions
components/returnless/actions/retrieve-sales-order/retrieve-sales-order.mjs, components/returnless/actions/retrieve-return-order/retrieve-return-order.mjs, components/returnless/actions/retrieve-return-address/retrieve-return-address.mjs, components/returnless/actions/retrieve-shipment/retrieve-shipment.mjs, components/returnless/actions/retrieve-return-status/retrieve-return-status.mjs
Added five actions that call corresponding app methods with an ID prop, export a summary, and return retrieved data.
New list/collection actions
components/returnless/actions/list-shipments/list-shipments.mjs, components/returnless/actions/list-shipments-of-return-order/list-shipments-of-return-order.mjs, components/returnless/actions/list-return-statuses/list-return-statuses.mjs, components/returnless/actions/list-statuses-of-shipment/list-statuses-of-shipment.mjs
Added four actions that fetch collections (using getPaginatedResources or direct calls), export count summaries, and return resource arrays.
New update action
components/returnless/actions/update-return-address/update-return-address.mjs
New action to update a return address; accepts identifier + optional fields, maps camelCase props to snake_case API payload, calls app.updateReturnAddress, exports a summary, returns response.
Existing source version bumps (0.0.1 → 0.0.2)
components/returnless/sources/new-return-created/new-return-created.mjs, components/returnless/sources/return-notes-added/return-notes-added.mjs, components/returnless/sources/return-product-marked-received/return-product-marked-received.mjs, components/returnless/sources/return-status-changed/return-status-changed.mjs
Version fields updated from 0.0.10.0.2. No logic changes.
App module expansion
components/returnless/returnless.app.mjs
Added >12 public methods (e.g., getReturnOrder, listReturnOrderShipments, getReturnStatus, listShipments, getShipment, listShipmentStatuses, listReturnAddresses, getReturnAddress, updateReturnAddress, listCustomers, getCustomer, listCustomerReturnOrders) and three new propDefinitions (shipmentId, returnAddressId, customerId) with async option resolvers.
Package version update
components/returnless/package.json
Package version bumped from 0.1.10.2.0.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    actor UserAction as Action (Run)
    participant App as returnless.app
    participant API as Returnless API
    UserAction->>App: call method (e.g., listShipments / getShipment / updateReturnAddress) with {$, props}
    App->>API: HTTP request (GET/PUT) to endpoint (paginated if needed)
    API-->>App: HTTP response (data)
    App-->>UserAction: return data (and summary exported)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Review the 12+ new methods in returnless.app.mjs for consistent _makeRequest usage, correct endpoint paths, parameter handling, and pagination.
  • Verify the three new propDefinitions return properly shaped { value, label } entries and handle paging.
  • Inspect new actions for correct prop wiring, proper use of app methods, and accurate field mapping in update-return-address.

Possibly related PRs

Suggested labels

User submitted

Suggested reviewers

  • luancazarine
  • GTFalcao

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title '[ACTIONS] Returnless - new components' is partially related to the changeset, referring to new actions but is broad and lacks specificity about the actual new functionality. Consider using a more descriptive title that highlights key new actions, such as '[ACTIONS] Returnless - add shipment, address, and customer management actions'.
✅ Passed checks (4 passed)
Check name Status Explanation
Description check ✅ Passed The PR description meets the minimum template requirement with the WHY section completed, referencing issue #19334, though it lacks detailed implementation context.
Linked Issues check ✅ Passed All 13 required API endpoints from issue #19334 have corresponding implementations: retrieve sales order, retrieve/list return orders with shipments, return statuses, shipments, addresses, and customer operations are all present with proper app methods and actions.
Out of Scope Changes check ✅ Passed All changes are in-scope. Version bumps for existing actions/sources and new component implementations align with issue #19334 objectives; no unrelated modifications detected.
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 returnless-new-components

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between df8199c and 9f70120.

📒 Files selected for processing (1)
  • components/returnless/actions/list-return-statuses/list-return-statuses.mjs (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2024-07-04T18:11:59.822Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream 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`.

Applied to files:

  • components/returnless/actions/list-return-statuses/list-return-statuses.mjs
⏰ 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). (5)
  • GitHub Check: pnpm publish
  • GitHub Check: Lint Code Base
  • GitHub Check: Ensure component commits modify component versions
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Publish TypeScript components
🔇 Additional comments (1)
components/returnless/actions/list-return-statuses/list-return-statuses.mjs (1)

8-13: Address the question about idempotentHint.

A reviewer previously asked whether the idempotentHint annotation is meant to be included. Please clarify the intent. For a read-only list action, idempotentHint: true is generally appropriate since the operation can be safely retried without side effects.


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.

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 9e8564b and df8199c.

📒 Files selected for processing (21)
  • components/returnless/actions/create-return-order/create-return-order.mjs (1 hunks)
  • components/returnless/actions/list-return-orders/list-return-orders.mjs (1 hunks)
  • components/returnless/actions/list-return-statuses/list-return-statuses.mjs (1 hunks)
  • components/returnless/actions/list-sales-order-items/list-sales-order-items.mjs (1 hunks)
  • components/returnless/actions/list-sales-orders/list-sales-orders.mjs (1 hunks)
  • components/returnless/actions/list-shipments-of-return-order/list-shipments-of-return-order.mjs (1 hunks)
  • components/returnless/actions/list-shipments/list-shipments.mjs (1 hunks)
  • components/returnless/actions/list-statuses-of-shipment/list-statuses-of-shipment.mjs (1 hunks)
  • components/returnless/actions/retrieve-return-address/retrieve-return-address.mjs (1 hunks)
  • components/returnless/actions/retrieve-return-order/retrieve-return-order.mjs (1 hunks)
  • components/returnless/actions/retrieve-return-status/retrieve-return-status.mjs (1 hunks)
  • components/returnless/actions/retrieve-sales-order/retrieve-sales-order.mjs (1 hunks)
  • components/returnless/actions/retrieve-shipment/retrieve-shipment.mjs (1 hunks)
  • components/returnless/actions/update-return-address/update-return-address.mjs (1 hunks)
  • components/returnless/actions/update-return-order-status/update-return-order-status.mjs (1 hunks)
  • components/returnless/package.json (1 hunks)
  • components/returnless/returnless.app.mjs (2 hunks)
  • components/returnless/sources/new-return-created/new-return-created.mjs (1 hunks)
  • components/returnless/sources/return-notes-added/return-notes-added.mjs (1 hunks)
  • components/returnless/sources/return-product-marked-received/return-product-marked-received.mjs (1 hunks)
  • components/returnless/sources/return-status-changed/return-status-changed.mjs (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2024-07-04T18:11:59.822Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream 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`.

Applied to files:

  • components/returnless/actions/list-return-statuses/list-return-statuses.mjs
📚 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/returnless/package.json
🧬 Code graph analysis (2)
components/returnless/actions/list-return-statuses/list-return-statuses.mjs (2)
components/returnless/actions/list-shipments-of-return-order/list-shipments-of-return-order.mjs (1)
  • resources (31-37)
components/returnless/actions/list-shipments/list-shipments.mjs (1)
  • resources (25-28)
components/returnless/actions/list-shipments-of-return-order/list-shipments-of-return-order.mjs (3)
components/returnless/actions/list-return-statuses/list-return-statuses.mjs (1)
  • resources (25-27)
components/returnless/actions/list-shipments/list-shipments.mjs (1)
  • resources (25-28)
components/returnless/returnless.app.mjs (1)
  • resources (473-473)
⏰ 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: Publish TypeScript components
  • GitHub Check: pnpm publish
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Lint Code Base
🔇 Additional comments (30)
components/returnless/actions/create-return-order/create-return-order.mjs (1)

9-9: LGTM! Version bump aligns with package release.

The version increment from 0.0.2 to 0.0.3 is appropriate for this patch release.

components/returnless/package.json (1)

3-3: LGTM! Minor version bump appropriate for new features.

The version increment from 0.1.1 to 0.2.0 correctly reflects the addition of new action components according to semantic versioning conventions.

components/returnless/actions/list-sales-orders/list-sales-orders.mjs (1)

7-7: LGTM! Version bump aligns with package release.

components/returnless/actions/list-sales-order-items/list-sales-order-items.mjs (1)

7-7: LGTM! Version bump aligns with package release.

components/returnless/sources/return-product-marked-received/return-product-marked-received.mjs (1)

8-8: LGTM! Version bump aligns with package release.

components/returnless/sources/return-notes-added/return-notes-added.mjs (1)

8-8: LGTM! Version bump aligns with package release.

components/returnless/sources/new-return-created/new-return-created.mjs (1)

8-8: LGTM! Version bump aligns with package release.

components/returnless/actions/retrieve-sales-order/retrieve-sales-order.mjs (3)

15-23: The orderId propDefinition is correctly defined in the app module.

The props structure in retrieve-sales-order.mjs properly references the orderId propDefinition from returnless.app.mjs (lines 57–61), which includes type, label, description, and dynamic options. No changes needed.


24-32: No action required—getOrder method is correctly defined and properly called.

The getOrder method exists in returnless.app.mjs (line 270) and accepts the orderId parameter along with spread options (...opts), which correctly receives the $ parameter passed in the action's run method. The implementation properly delegates to _makeRequest and follows standard Pipedream patterns.


1-14: No issues identified. The action metadata and implementation are correct. The documentation URL follows the established pattern used consistently across all Returnless components. The getOrder() method is properly invoked, and all annotations and version metadata are appropriate for this read-only, idempotent operation.

components/returnless/actions/update-return-address/update-return-address.mjs (2)

12-12: Verify the idempotency of the update operation.

Update operations are typically idempotent (repeated identical requests produce the same result). Confirm whether this operation has side effects that make it non-idempotent, such as updating timestamps or triggering external notifications.


59-69: Verify the Returnless API coordinate type expectations.

Latitude and longitude are defined as type: "string", but the Returnless API documentation should be consulted to confirm this is the expected format. If the API requires numeric values, consider either changing to type: "number" or adding validation to ensure string values represent valid numeric coordinates (e.g., using pattern for regex validation).

components/returnless/actions/list-return-orders/list-return-orders.mjs (1)

7-7: LGTM!

Version bump is consistent with the broader PR changes.

components/returnless/actions/update-return-order-status/update-return-order-status.mjs (1)

7-7: LGTM!

Version bump is consistent with the broader PR changes.

components/returnless/sources/return-status-changed/return-status-changed.mjs (1)

8-8: LGTM!

Version bump is consistent with the broader PR changes.

components/returnless/actions/list-statuses-of-shipment/list-statuses-of-shipment.mjs (1)

24-31: LGTM!

The implementation correctly destructures the response and maintains consistency between the summary and return value.

components/returnless/actions/list-shipments-of-return-order/list-shipments-of-return-order.mjs (1)

30-40: LGTM!

The implementation correctly uses getPaginatedResources with the maxResults prop and maintains consistency between the summary and return value.

components/returnless/actions/list-shipments/list-shipments.mjs (1)

24-31: LGTM!

The implementation correctly uses getPaginatedResources with the maxResults prop and maintains consistency between the summary and return value.

components/returnless/actions/retrieve-return-status/retrieve-return-status.mjs (3)

15-23: LGTM!

The props are correctly defined, with returnStatusId properly referencing the app's propDefinition for dynamic options.


24-32: LGTM!

The run method correctly calls the app's getReturnStatus method, exports an appropriate summary, and returns the retrieved data. The implementation follows Pipedream's standard action pattern.


6-6: Documentation URL is valid and accessible. The link correctly points to the Returnless API reference page for retrieving a return status.

components/returnless/actions/retrieve-return-order/retrieve-return-order.mjs (2)

15-32: LGTM!

The action implementation correctly follows the established pattern: props are properly defined with propDefinition references, and the run method appropriately calls getReturnOrder, exports a summary, and returns the data.


6-6: Verify the documentation URL is valid and accessible.

The URL https://docs.returnless.com/docs/api-rest-reference/f670282943eae-retrieve-a-return-order cannot be verified through automated tools as the Returnless documentation site requires JavaScript rendering. Manual verification by opening the link in a browser is recommended to confirm it points to the correct API reference page.

components/returnless/actions/retrieve-shipment/retrieve-shipment.mjs (2)

15-32: LGTM!

The implementation correctly follows the established pattern and properly integrates with the new shipmentId propDefinition added in this PR.


6-6: Documentation URL is valid and accessible. The link to the Returnless API reference page at https://docs.returnless.com/docs/api-rest-reference/8add0ab769032-retrieve-a-shipment resolves correctly.

components/returnless/actions/retrieve-return-address/retrieve-return-address.mjs (2)

15-32: LGTM!

The implementation correctly follows the established pattern and properly integrates with the new returnAddressId propDefinition added in this PR.


6-6: The documentation URL structure appears valid but requires JavaScript rendering.

The URL https://docs.returnless.com/docs/api-rest-reference/b702161eed54f-retrieve-a-return-address follows the expected Returnless API documentation structure. However, verify the link is accessible in a browser since the documentation site requires JavaScript rendering. The URL identifier b702161eed54f should correspond to the "retrieve a return address" endpoint in the Returnless API reference.

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

162-186: LGTM!

The shipmentId propDefinition is correctly implemented with pagination support and appropriate label fallback logic using tracking codes.


187-211: LGTM!

The returnAddressId propDefinition is correctly implemented with pagination support and appropriate label fallback logic.


330-420: LGTM!

All 12 new methods are correctly implemented following the existing _makeRequest pattern:

  • Proper path construction with parameter interpolation
  • Consistent parameter destructuring
  • updateReturnAddress correctly uses PATCH method for updates
  • All GET methods use default method (GET)

The implementation aligns with the PR objectives to expand Returnless action coverage.

destructiveHint: false,
openWorldHint: true,
readOnlyHint: true,
idempotentHint: true,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are the idempotentHint annotations meant to be included?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'll remove it

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] Returnless - expand functionality

3 participants