-
Notifications
You must be signed in to change notification settings - Fork 5.6k
[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
base: master
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
WalkthroughThis 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
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)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Suggested labels
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (1)📚 Learning: 2024-07-04T18:11:59.822ZApplied to files:
⏰ 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)
🔇 Additional comments (1)
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
Show resolved
Hide resolved
components/returnless/actions/list-return-statuses/list-return-statuses.mjs
Outdated
Show resolved
Hide resolved
| destructiveHint: false, | ||
| openWorldHint: true, | ||
| readOnlyHint: true, | ||
| idempotentHint: true, |
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.
Are the idempotentHint annotations meant to be included?
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.
I'll remove it
WHY
Resolves #19334
Summary by CodeRabbit
New Features
Chores
✏️ Tip: You can customize this high-level summary in your review settings.