Skip to content

Conversation

@jcortes
Copy link
Collaborator

@jcortes jcortes commented Dec 4, 2025

WHY

Resolves #19334

Summary by CodeRabbit

  • New Features

    • Added many new actions to list and retrieve shipments, shipment statuses, return orders/statuses/addresses, sales orders/items, and shipments-of-return-orders; added an action to update return addresses.
    • Added dynamic selectable fields for shipment, return address, and customer IDs with paginated listing support and several new public API methods.
  • Chores

    • Component package version bumped to 0.2.0.
    • Incremented action/source metadata 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 10, 2025 2:46pm
pipedream-docs-redirect-do-not-edit Ignored Ignored Dec 10, 2025 2:46pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 4, 2025

Walkthrough

Adds multiple new Returnless actions and sources, extends the app module with new API methods and three propDefinitions, increments several action/source versions, and bumps the component package version to 0.2.0.

Changes

Cohort / File(s) Change Summary
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
Updated exported version fields from 0.0.20.0.3. Minor description update in list-return-orders. No logic changes.
New single-entity retrieve 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 actions that call corresponding app methods with ID props, export a summary, and return the retrieved data.
New collection/list 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 actions that fetch collections (some use getPaginatedResources), 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 payload, calls app.updateReturnAddress, exports a summary, returns response.
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
Updated exported version fields from 0.0.10.0.2. No logic changes.
App module expansion
components/returnless/returnless.app.mjs
Added three propDefinitions (shipmentId, returnAddressId, customerId) with async option resolvers and cursor paging; added many new public methods (e.g., getReturnOrder, listReturnOrderShipments, getReturnStatus, listShipments, getShipment, listShipmentStatuses, listReturnAddresses, getReturnAddress, updateReturnAddress, listCustomers, getCustomer, listCustomerReturnOrders) following existing _makeRequest pattern.
Package version update
components/returnless/package.json
Bumped package version from 0.1.10.2.0.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    actor Action as Action (action.run)
    participant App as returnless.app
    participant API as Returnless API
    Action->>App: call app method (e.g., getShipment / listShipments / updateReturnAddress) with {$, props}
    App->>API: perform HTTP request to endpoint (GET/PUT), include pagination params if used
    API-->>App: return HTTP response (data / paginated page)
    App-->>Action: return data
    Action->>Action: $.export("$summary", summary) and return resources
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Review focus:
    • components/returnless/returnless.app.mjs — verify correct endpoint paths, consistent _makeRequest usage, pagination handling, and option mapping in async propDefinitions.
    • components/returnless/actions/update-return-address/update-return-address.mjs — confirm payload field mapping (camelCase → snake_case) and prop wiring.
    • New list actions using getPaginatedResources — confirm maxResults handling and returned structure.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is minimal and only states 'Resolves #19334' without explaining the specific changes, implementation details, or impact of the new components added. Add details about what new actions were implemented, their purposes, and a summary of changes made to support the linked issue requirements.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The PR title '[ACTIONS] Returnless - new components' clearly describes the addition of new Returnless action components, which is the primary change across multiple files.
Linked Issues check ✅ Passed The PR implements all required actions from issue #19334: retrieve/list sales orders, return orders, shipments, statuses, return addresses, and customers with appropriate API endpoint coverage.
Out of Scope Changes check ✅ Passed All changes align with the linked issue #19334 scope: new action files for Returnless endpoints, version bumps, app method additions, and minor description updates are all directly related to expanding Returnless 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
  • Commit unit tests in branch returnless-new-components

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.

@vunguyenhung
Copy link
Collaborator

Hello everyone, I have tested this PR and there're some test cases failed or needed improvement.

Please check test reports below for more information:

@jcortes jcortes force-pushed the returnless-new-components branch from 31f1f56 to f44ca59 Compare December 9, 2025 16: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: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
components/returnless/returnless.app.mjs (1)

444-478: Fix missing this binding in paginate to avoid runtime failures

paginate currently invokes the provided function as:

const { data, meta } = await fn(args);

When callers pass methods like this.app.listReturnOrderShipments or this.app.listShipments into getPaginatedResources, fn is an unbound method, so inside those methods this is undefined and calls to this._makeRequest will throw.

Bind this when invoking fn so all existing and new paginated actions work:

-        const {
-          data, meta,
-        } = await fn(args);
+        const {
+          data, meta,
+        } = await fn.call(this, args);

This should fix pagination-backed actions such as list-shipments, list-shipments-of-return-order, and any future callers of getPaginatedResources.

♻️ Duplicate comments (2)
components/returnless/actions/list-return-statuses/list-return-statuses.mjs (1)

17-24: The critical pagination issue from the previous review remains unresolved.

The inconsistency between accessing resources.length (line 22) and returning resources.data (line 23) has not been addressed. This will cause the summary to display undefined statuses.

Additionally, this action should follow the pagination pattern used in other list actions (e.g., list-shipments.mjs) by using getPaginatedResources and adding a maxResults prop.

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

212-236: Customer email as label still poses PII/compliance risk

The customerId propDefinition builds options as:

options: data.map(({ id: value, email: label }) => ({
  value,
  label: label || value,
}))

This surfaces customer email addresses directly in the UI dropdown (and possibly logs), which is the same privacy/compliance concern already raised in the earlier review.

Prefer using a non-PII field (e.g., customer name) and only fall back to ID if needed, or implement an email redaction scheme before exposing it as label.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

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

📒 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 (2 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 (3)
📚 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
📚 Learning: 2024-10-08T16:42:59.225Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 14229
File: components/americommerce/actions/update-customer/update-customer.mjs:89-94
Timestamp: 2024-10-08T16:42:59.225Z
Learning: When defining boolean properties in AmeriCommerce components (e.g., in `update-customer.mjs`), ensure that the label and description are consistent and clearly indicate the intent, especially when using negations like "No Account", to avoid confusion.

Applied to files:

  • components/returnless/returnless.app.mjs
🧬 Code graph analysis (2)
components/returnless/actions/list-return-statuses/list-return-statuses.mjs (3)
components/returnless/actions/list-shipments-of-return-order/list-shipments-of-return-order.mjs (1)
  • resources (30-36)
components/returnless/actions/list-shipments/list-shipments.mjs (1)
  • resources (24-27)
components/returnless/returnless.app.mjs (1)
  • resources (473-473)
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 (18-20)
components/returnless/actions/list-shipments/list-shipments.mjs (1)
  • resources (24-27)
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). (3)
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Lint Code Base
🔇 Additional comments (20)
components/returnless/actions/retrieve-sales-order/retrieve-sales-order.mjs (1)

16-20: > Likely an incorrect or invalid review comment.

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

9-9: LGTM: Version bump is appropriate.

The patch version increment from 0.0.2 to 0.0.3 is consistent with the broader version alignment across Returnless actions in this PR.

components/returnless/package.json (1)

3-3: LGTM: Minor version bump is appropriate.

The increment to 0.2.0 correctly reflects the addition of new actions and expanded API coverage for the Returnless integration, as indicated in the PR objectives.

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

7-7: LGTM: Version bump is appropriate.

The patch version increment aligns with the coordinated version update across Returnless action modules.

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

8-8: LGTM: Version bump is appropriate.

The patch version increment from 0.0.1 to 0.0.2 is consistent with version updates across Returnless source modules in this PR.

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

7-7: LGTM: Version bump is appropriate.

The patch version increment is consistent with the version alignment pattern across Returnless actions.

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

7-7: LGTM: Version bump is appropriate.

The patch version increment aligns with the coordinated version update across action modules.

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

8-8: LGTM: Version bump is appropriate.

The patch version increment is consistent with version updates across Returnless source modules.

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

8-8: LGTM: Version bump is appropriate.

The patch version increment is consistent with version updates across source modules. However, note that the PR objectives mention test failures reported by vunguyenhung for some of the new actions—please ensure all tests pass before merging.

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

8-8: LGTM!

Version bump is consistent with the broader PR updates.

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

1-32: LGTM!

The action follows the established pattern for retrieve operations, correctly uses propDefinitions, and handles the API call appropriately.

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

1-32: LGTM!

The action correctly retrieves and returns shipment statuses with proper summary formatting.

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

7-7: LGTM!

Version bump and the addition of timestamp examples improve the user experience without changing functionality.

Also applies to: 28-28, 34-34

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

1-32: LGTM!

The action correctly implements pagination using getPaginatedResources, consistently accesses the returned data, and provides clear feedback in the summary.

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

1-32: LGTM!

The action follows the established pattern for retrieve operations with proper use of propDefinitions and consistent data handling.

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

1-32: LGTM!

The action follows the established pattern for retrieve operations with correct implementation of the API call and summary export.

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

3-31: Retrieve Shipment action wiring looks correct

Props, app call (this.app.getShipment) and summary/return shape are consistent with the existing Returnless action patterns and should behave as expected.

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

3-40: List Shipments of Return Order action is correctly wired into pagination

Using getPaginatedResources with:

  • fn: this.app.listReturnOrderShipments
  • args: { returnOrderId: this.returnOrderId }
  • max: this.maxResults

is consistent with the existing pattern (e.g., list-shipments.mjs) and should work once the underlying paginate helper calls fn with the correct this binding (see comment on paginate in returnless.app.mjs).

Please re-run the Returnless tests for all actions that rely on getPaginatedResources after applying the paginate binding fix in returnless.app.mjs to confirm everything passes.

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

162-211: Dynamic selects for shipments and return addresses look consistent

The shipmentId and returnAddressId propDefinitions follow the same async options pattern as existing props:

  • Properly page via cursor.
  • Use stable IDs as value.
  • Provide usable labels (tracking code or address name with ID fallback).

This is aligned with how other Returnless selects are implemented.


330-420: New Returnless app methods align with REST endpoints and existing patterns

The added methods (getReturnOrder, listReturnOrderShipments, getReturnStatus, listShipments, getShipment, listShipmentStatuses, listReturnAddresses, getReturnAddress, updateReturnAddress, listCustomers, getCustomer, listCustomerReturnOrders) all:

  • Use _makeRequest consistently.
  • Construct paths that match the expected REST structure under /2025-01.
  • Pass through ...opts so callers can attach $, params, and data as needed.
  • Use PATCH correctly for updateReturnAddress.

This surface is coherent with the existing app API and supports the new actions in this PR.

@vunguyenhung
Copy link
Collaborator

Hello everyone, I have tested this PR and there're some test cases failed or needed improvement.

Please check test reports below for more information:

@jcortes jcortes force-pushed the returnless-new-components branch from f44ca59 to 295a6e5 Compare December 10, 2025 14:46
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

♻️ Duplicate comments (1)
components/returnless/actions/list-return-statuses/list-return-statuses.mjs (1)

14-23: Add pagination support to align with other list actions.

This action doesn't support pagination, unlike other list actions in this PR (e.g., list-shipments-of-return-order.mjs lines 22-36). Global list endpoints should typically support a maxResults limit to avoid retrieving excessive data.

Apply this diff to add pagination support:

   props: {
     app,
+    maxResults: {
+      propDefinition: [
+        app,
+        "maxResults",
+      ],
+    },
   },
   async run({ $ }) {
-    const response = await this.app.listReturnStatuses({
-      $,
+    const resources = await this.app.getPaginatedResources({
+      fn: this.app.listReturnStatuses,
+      args: {
+        $,
+      },
+      max: this.maxResults,
     });

-    $.export("$summary", `Successfully retrieved ${response?.data?.length} return status(es)`);
-    return response?.data;
+    $.export("$summary", `Successfully retrieved ${resources.length} return status(es)`);
+    return resources;
   },
📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f44ca59 and 295a6e5.

📒 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 (2 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 (4)
📚 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
📚 Learning: 2025-10-20T01:01:02.970Z
Learnt from: js07
Repo: PipedreamHQ/pipedream PR: 18744
File: components/slack_v2/actions/send-large-message/send-large-message.mjs:49-64
Timestamp: 2025-10-20T01:01:02.970Z
Learning: In components/slack_v2/actions/send-large-message/send-large-message.mjs, the metadata_event_payload prop is typed as string, so the code only needs to handle string-to-JSON parsing and does not need to handle object inputs.

Applied to files:

  • components/returnless/actions/update-return-address/update-return-address.mjs
📚 Learning: 2024-10-08T15:33:38.240Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-10-08T15:33:38.240Z
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-10-08T16:42:59.225Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 14229
File: components/americommerce/actions/update-customer/update-customer.mjs:89-94
Timestamp: 2024-10-08T16:42:59.225Z
Learning: When defining boolean properties in AmeriCommerce components (e.g., in `update-customer.mjs`), ensure that the label and description are consistent and clearly indicate the intent, especially when using negations like "No Account", to avoid confusion.

Applied to files:

  • components/returnless/returnless.app.mjs
🧬 Code graph analysis (3)
components/returnless/actions/list-shipments/list-shipments.mjs (2)
components/returnless/actions/list-shipments-of-return-order/list-shipments-of-return-order.mjs (1)
  • resources (30-36)
components/returnless/returnless.app.mjs (1)
  • resources (473-473)
components/returnless/actions/update-return-address/update-return-address.mjs (1)
components/returnless/actions/list-return-statuses/list-return-statuses.mjs (1)
  • response (18-20)
components/returnless/actions/list-shipments-of-return-order/list-shipments-of-return-order.mjs (2)
components/returnless/actions/list-shipments/list-shipments.mjs (1)
  • resources (24-27)
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: pnpm publish
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Lint Code Base
  • GitHub Check: Verify TypeScript components
🔇 Additional comments (20)
components/returnless/package.json (1)

3-3: LGTM! Package version bump aligns with feature expansion.

The minor version increment from 0.1.1 to 0.2.0 is appropriate for the addition of new Returnless actions and sources mentioned in the PR objectives.

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

8-8: LGTM! Version bump is consistent with the coordinated release.

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

8-8: LGTM! Version bump is consistent with the coordinated release.

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

7-7: LGTM! Version bump is consistent with the coordinated release.

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

7-7: LGTM! Version bump is consistent with the coordinated release.

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

8-8: LGTM! Version bump is consistent with the coordinated release.

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

9-9: LGTM! Version bump is consistent with the coordinated release.

Note: PR comments mention test failures for some actions. Ensure this action passes all tests before merging.

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

8-8: LGTM! Version bump is consistent with the coordinated release.

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

7-7: LGTM!

The version bump is consistent with the coordinated metadata update across multiple actions in this PR.

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

3-32: LGTM!

The action correctly retrieves a sales order using the established propDefinition pattern, calls the appropriate app method with proper parameters, and returns the data with a helpful summary.

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

3-32: LGTM!

The action correctly implements paginated shipment listing. The omission of the args parameter in getPaginatedResources is intentional and correctly handled by the pagination method's default parameter initialization.

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

3-32: LGTM!

The action correctly retrieves a return order using the established propDefinition pattern, calls the appropriate app method with proper parameters, and returns the data with a helpful summary.

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

3-32: LGTM!

The action correctly retrieves a return status using the established propDefinition pattern, calls the appropriate app method with proper parameters, and returns the data with a helpful summary.

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

162-186: LGTM!

The shipmentId propDefinition correctly implements cursor-based pagination and uses the tracking code as the label with a sensible fallback to the ID.


187-211: LGTM!

The returnAddressId propDefinition correctly implements cursor-based pagination and uses the address name as the label with a sensible fallback to the ID.


330-420: LGTM!

The new API methods follow the established pattern, correctly construct endpoint paths with dynamic parameters, and consistently use the _makeRequest helper. The PATCH method for updateReturnAddress is appropriate for partial updates.

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

7-7: LGTM!

The version bump aligns with the coordinated metadata update across the PR. The added timestamp examples in the descriptions for createdAfter and createdBefore provide helpful guidance for users on the expected format.

Also applies to: 28-28, 34-34

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

3-31: LGTM!

The retrieve action is well-implemented with proper prop definitions, clear error handling through destructuring, and an informative summary message.

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

3-40: LGTM!

The pagination implementation is correct and follows the established pattern. The action properly uses getPaginatedResources with the maxResults limit, passes required parameters in the args object, and handles the response consistently.

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

3-31: LGTM!

The retrieve action follows the correct pattern with proper prop definitions, clean destructuring of the API response, and a clear summary message.

@vunguyenhung
Copy link
Collaborator

Hi everyone, all test cases are passed! Ready for release!

Test reports

@jcortes
Copy link
Collaborator Author

jcortes commented Dec 10, 2025

/approve

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.

@jcortes FYI, if you push changes without using force-push, the reviewer can see what changes have been made since the last review. Otherwise, the reviewer is forced to re-review the entire PR.

@jcortes jcortes merged commit 635194a into master Dec 10, 2025
10 checks passed
@jcortes jcortes deleted the returnless-new-components branch December 10, 2025 15:46
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

4 participants