-
Couldn't load subscription status.
- Fork 5.5k
UPS - new actions #18833
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
UPS - new actions #18833
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
WalkthroughAdds trailing newlines to multiple component app files. Introduces a UPS integration: new UPS action modules (create shipment, get tracking info, recover label, void shipment), a constants module with version/service/packaging codes, updated ups.app.mjs with request helpers and API methods, and a package.json bump with a platform dependency. Changes
Sequence DiagramsequenceDiagram
participant Action as UPS Action Module
participant UPSApp as UPS App (ups.app.mjs)
participant RequestHelper as _makeRequest()
participant UPSAPI as UPS API
Action->>UPSApp: call method (getTrackingInfo / createShipment / voidShipment / recoverLabel)
activate UPSApp
UPSApp->>RequestHelper: _makeRequest({ path, method, data, $ })
activate RequestHelper
RequestHelper->>RequestHelper: build headers (Authorization, transid UUID)
RequestHelper->>UPSAPI: HTTP request to _baseUrl() + path
UPSAPI-->>RequestHelper: response
deactivate RequestHelper
RequestHelper-->>UPSApp: response data
deactivate UPSApp
UPSApp-->>Action: return response
Action->>Action: export $summary
Action-->>Workflow: return response
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ 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)
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
🧹 Nitpick comments (2)
components/ups/actions/create-shipment/create-shipment.mjs (1)
115-117: Consider making RequestOption configurable.The RequestOption is hardcoded to "nonvalidate". Users may want to validate shipment data before creation. Consider adding a prop to allow users to choose between "validate" and "nonvalidate" options.
components/ups/ups.app.mjs (1)
28-28: Consider making the version dynamic.The
transactionsrcheader has a hardcoded version "v0.1" that may become stale as the integration evolves.If the package version is available, consider using it dynamically:
-transactionsrc: "@PipedreamHQ/pipedream v0.1", +transactionsrc: `@PipedreamHQ/pipedream v${VERSION}`,Note: Verify that
VERSION(currently "v2409" from constants) is the appropriate version to use here, or import the package version if available.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (18)
components/clarifai/clarifai.app.mjs(1 hunks)components/cloud_66/cloud_66.app.mjs(1 hunks)components/codefresh/codefresh.app.mjs(1 hunks)components/coinapi/coinapi.app.mjs(1 hunks)components/cometapi/cometapi.app.mjs(1 hunks)components/copicake/copicake.app.mjs(1 hunks)components/cronly/cronly.app.mjs(1 hunks)components/crossmint/crossmint.app.mjs(1 hunks)components/hex/hex.app.mjs(1 hunks)components/piwik_pro/piwik_pro.app.mjs(1 hunks)components/topdesk/topdesk.app.mjs(1 hunks)components/ups/actions/create-shipment/create-shipment.mjs(1 hunks)components/ups/actions/get-tracking-info/get-tracking-info.mjs(1 hunks)components/ups/actions/recover-label/recover-label.mjs(1 hunks)components/ups/actions/void-shipment/void-shipment.mjs(1 hunks)components/ups/common/constants.mjs(1 hunks)components/ups/package.json(2 hunks)components/ups/ups.app.mjs(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (5)
components/ups/actions/get-tracking-info/get-tracking-info.mjs (3)
components/ups/actions/recover-label/recover-label.mjs (1)
response(24-34)components/ups/actions/void-shipment/void-shipment.mjs (1)
response(24-27)components/ups/actions/create-shipment/create-shipment.mjs (1)
response(111-169)
components/ups/actions/create-shipment/create-shipment.mjs (2)
components/ups/ups.app.mjs (1)
constants(4-4)components/ups/actions/get-tracking-info/get-tracking-info.mjs (1)
response(24-27)
components/ups/actions/void-shipment/void-shipment.mjs (2)
components/ups/actions/get-tracking-info/get-tracking-info.mjs (1)
response(24-27)components/ups/actions/recover-label/recover-label.mjs (1)
response(24-34)
components/ups/ups.app.mjs (1)
components/ups/common/constants.mjs (1)
VERSION(1-1)
components/ups/actions/recover-label/recover-label.mjs (2)
components/ups/actions/get-tracking-info/get-tracking-info.mjs (1)
response(24-27)components/ups/actions/void-shipment/void-shipment.mjs (1)
response(24-27)
⏰ 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: Verify TypeScript components
- GitHub Check: Lint Code Base
🔇 Additional comments (21)
components/cloud_66/cloud_66.app.mjs (1)
11-11: Formatting consistency applied.Trailing newline added for consistency across component files.
components/topdesk/topdesk.app.mjs (1)
11-11: Formatting consistency applied.Trailing newline added for consistency across component files.
components/codefresh/codefresh.app.mjs (1)
11-11: Formatting consistency applied.Trailing newline added for consistency across component files.
components/crossmint/crossmint.app.mjs (1)
11-11: Formatting consistency applied.Trailing newline added for consistency across component files.
components/cronly/cronly.app.mjs (1)
11-11: Formatting consistency applied.Trailing newline added for consistency across component files.
components/hex/hex.app.mjs (1)
11-11: Formatting consistency applied.Trailing newline added for consistency across component files.
components/coinapi/coinapi.app.mjs (1)
11-11: Formatting consistency applied.Trailing newline added for consistency across component files.
components/cometapi/cometapi.app.mjs (1)
11-11: Formatting consistency applied.Trailing newline added for consistency across component files.
components/piwik_pro/piwik_pro.app.mjs (1)
11-11: LGTM!Formatting change only—adds a trailing newline for consistency.
components/copicake/copicake.app.mjs (1)
11-11: LGTM!Formatting change only—adds a trailing newline for consistency.
components/ups/package.json (1)
3-17: LGTM!Version bump to 0.1.0 and platform dependency addition are appropriate for the new UPS action features.
components/clarifai/clarifai.app.mjs (1)
11-11: LGTM!Formatting change only—adds a trailing newline for consistency.
components/ups/common/constants.mjs (1)
150-249: LGTM!Packaging codes are well-structured and comprehensive.
components/ups/actions/recover-label/recover-label.mjs (2)
28-30: Verify if SubVersion should be configurable.The SubVersion "1903" is hardcoded. Please confirm whether this is:
- A fixed UPS API requirement that should remain constant
- A value that might need updates over time (consider extracting to constants)
- A parameter users should be able to configure
If this value is subject to change with API updates, consider moving it to the constants module alongside VERSION.
1-39: Action structure looks good.The recover label action follows the established pattern and has appropriate annotations (non-destructive, read-only).
components/ups/actions/void-shipment/void-shipment.mjs (1)
1-32: LGTM!The void shipment action is well-structured with appropriate annotations (destructiveHint: true, readOnlyHint: false) that correctly reflect the destructive nature of the operation.
components/ups/actions/create-shipment/create-shipment.mjs (2)
153-165: Verify single package limitation is intentional.The Package field is hardcoded as an array with a single element. Please confirm whether:
- Single package per shipment is sufficient for the initial implementation
- Multi-package support is planned for a future version
- The UPS API supports multiple packages and this is a v1 simplification
If multi-package support is needed, consider adding a prop for package count or an array of package details.
1-173: Action implementation looks solid.The create shipment action has comprehensive props, proper use of constants for service and packaging codes, and follows the established pattern. The payload structure appears to align with UPS API requirements.
components/ups/ups.app.mjs (2)
1-5: LGTM!The imports are correctly structured and necessary for the UPS API integration.
34-64: LGTM!The API methods are well-structured with consistent patterns. The use of
_makeRequestprovides good centralization, and the methods correctly pass through options for flexibility.components/ups/actions/get-tracking-info/get-tracking-info.mjs (1)
1-32: LGTM!This action is well-implemented:
- Correctly uses the
upsapp'strackingNumberpropDefinition- Appropriate annotations for a read-only tracking operation
- Clean async flow with proper summary export
- Documentation link provided for reference
|
Hi everyone, all test cases are passed! Ready for release! Test report |
Completes the actions requested in #17449
Summary by CodeRabbit
New Features
Chores