-
Notifications
You must be signed in to change notification settings - Fork 5.5k
[ACTIONS] Returnless - new components #19377
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
WalkthroughAdds 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
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
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this 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
📒 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
orderIdpropDefinition from returnless.app.mjs (lines 57–61), which includes type, label, description, and dynamic options. No changes needed.
24-32: No action required—getOrdermethod is correctly defined and properly called.The
getOrdermethod exists inreturnless.app.mjs(line 270) and accepts theorderIdparameter along with spread options (...opts), which correctly receives the$parameter passed in the action's run method. The implementation properly delegates to_makeRequestand 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. ThegetOrder()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 totype: "number"or adding validation to ensure string values represent valid numeric coordinates (e.g., usingpatternfor 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
getPaginatedResourceswith themaxResultsprop 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
getPaginatedResourceswith themaxResultsprop 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
returnStatusIdproperly referencing the app's propDefinition for dynamic options.
24-32: LGTM!The run method correctly calls the app's
getReturnStatusmethod, 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-ordercannot 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
shipmentIdpropDefinition 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
returnAddressIdpropDefinition 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
b702161eed54fshould correspond to the "retrieve a return address" endpoint in the Returnless API reference.components/returnless/returnless.app.mjs (3)
162-186: LGTM!The
shipmentIdpropDefinition is correctly implemented with pagination support and appropriate label fallback logic using tracking codes.
187-211: LGTM!The
returnAddressIdpropDefinition is correctly implemented with pagination support and appropriate label fallback logic.
330-420: LGTM!All 12 new methods are correctly implemented following the existing
_makeRequestpattern:
- Proper path construction with parameter interpolation
- Consistent parameter destructuring
updateReturnAddresscorrectly uses PATCH method for updates- All GET methods use default method (GET)
The implementation aligns with the PR objectives to expand Returnless action coverage.
components/returnless/actions/list-return-statuses/list-return-statuses.mjs
Outdated
Show resolved
Hide resolved
components/returnless/actions/list-return-statuses/list-return-statuses.mjs
Outdated
Show resolved
Hide resolved
components/returnless/actions/list-return-statuses/list-return-statuses.mjs
Outdated
Show resolved
Hide resolved
|
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:
|
31f1f56 to
f44ca59
Compare
There was a problem hiding this 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 missingthisbinding inpaginateto avoid runtime failures
paginatecurrently invokes the provided function as:const { data, meta } = await fn(args);When callers pass methods like
this.app.listReturnOrderShipmentsorthis.app.listShipmentsintogetPaginatedResources,fnis an unbound method, so inside those methodsthisisundefinedand calls tothis._makeRequestwill throw.Bind
thiswhen invokingfnso 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 ofgetPaginatedResources.
♻️ 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 returningresources.data(line 23) has not been addressed. This will cause the summary to displayundefinedstatuses.Additionally, this action should follow the pagination pattern used in other list actions (e.g.,
list-shipments.mjs) by usinggetPaginatedResourcesand adding amaxResultsprop.components/returnless/returnless.app.mjs (1)
212-236: Customer email as label still poses PII/compliance riskThe
customerIdpropDefinition 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
📒 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 correctProps, 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 paginationUsing
getPaginatedResourceswith:
fn: this.app.listReturnOrderShipmentsargs: { returnOrderId: this.returnOrderId }max: this.maxResultsis consistent with the existing pattern (e.g.,
list-shipments.mjs) and should work once the underlyingpaginatehelper callsfnwith the correctthisbinding (see comment onpaginateinreturnless.app.mjs).Please re-run the Returnless tests for all actions that rely on
getPaginatedResourcesafter applying thepaginatebinding fix inreturnless.app.mjsto confirm everything passes.components/returnless/returnless.app.mjs (2)
162-211: Dynamic selects for shipments and return addresses look consistentThe
shipmentIdandreturnAddressIdpropDefinitions 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 patternsThe added methods (
getReturnOrder,listReturnOrderShipments,getReturnStatus,listShipments,getShipment,listShipmentStatuses,listReturnAddresses,getReturnAddress,updateReturnAddress,listCustomers,getCustomer,listCustomerReturnOrders) all:
- Use
_makeRequestconsistently.- Construct paths that match the expected REST structure under
/2025-01.- Pass through
...optsso callers can attach$,params, anddataas needed.- Use
PATCHcorrectly forupdateReturnAddress.This surface is coherent with the existing app API and supports the new actions in this PR.
components/returnless/actions/update-return-address/update-return-address.mjs
Show resolved
Hide resolved
|
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:
|
f44ca59 to
295a6e5
Compare
There was a problem hiding this 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.mjslines 22-36). Global list endpoints should typically support amaxResultslimit 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
📒 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
argsparameter ingetPaginatedResourcesis 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
shipmentIdpropDefinition correctly implements cursor-based pagination and uses the tracking code as the label with a sensible fallback to the ID.
187-211: LGTM!The
returnAddressIdpropDefinition 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
_makeRequesthelper. The PATCH method forupdateReturnAddressis 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
createdAfterandcreatedBeforeprovide 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
getPaginatedResourceswith themaxResultslimit, passes required parameters in theargsobject, 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.
components/returnless/actions/list-statuses-of-shipment/list-statuses-of-shipment.mjs
Show resolved
Hide resolved
components/returnless/actions/update-return-address/update-return-address.mjs
Show resolved
Hide resolved
|
Hi everyone, all test cases are passed! Ready for release! Test reports
|
|
/approve |
michelle0927
left a comment
There was a problem hiding this 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.
WHY
Resolves #19334
Summary by CodeRabbit
New Features
Chores
✏️ Tip: You can customize this high-level summary in your review settings.