Skip to content

Conversation

@michelle0927
Copy link
Collaborator

@michelle0927 michelle0927 commented Dec 5, 2025

Resolves #19335

Summary by CodeRabbit

  • New Features

    • Added FedEx tracking support for: tracking number, reference number, tracking control number, and multi-piece shipments.
    • Added optional filters: ship date range and "include detailed scans" for richer tracking results.
  • Chores

    • Bumped FedEx component and action versions to publish the new tracking capabilities.

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

@vercel
Copy link

vercel bot commented Dec 5, 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 5, 2025 6:57pm
pipedream-docs-redirect-do-not-edit Ignored Ignored Dec 5, 2025 6:57pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 5, 2025

Walkthrough

Adds four FedEx tracking actions and corresponding tracking methods/propDefinitions in the FedEx app, plus minor version bumps for the component and two actions.

Changes

Cohort / File(s) Summary
New FedEx Tracking Actions
components/fedex/actions/track-by-reference/track-by-reference.mjs, components/fedex/actions/track-by-tcn/track-by-tcn.mjs, components/fedex/actions/track-by-tracking-number/track-by-tracking-number.mjs, components/fedex/actions/track-multi-piece-shipment/track-multi-piece-shipment.mjs
Added four action modules. Each exports an action object with metadata, props, and a run method that validates inputs (track-by-reference requires accountNumber or destinationPostalCode+destinationCountryCode), builds a payload, calls the matching this.fedex.* tracking method, exports a summary, and returns the API response.
FedEx App Module Enhancements
components/fedex/fedex.app.mjs
Added propDefinitions: trackingNumber, includeDetailedScans, shipDateBegin, shipDateEnd. Added four methods: trackByTrackingNumber, trackByReference, trackByTrackingControlNumber, trackMultiplePieceShipment — each issues a POST to the corresponding FedEx Track API path.
Version bumps
components/fedex/package.json, components/fedex/actions/create-shipment/create-shipment.mjs, components/fedex/actions/validate-shipment/validate-shipment.mjs
Bumped component package version from 0.1.00.2.0. Updated two action metadata versions: create-shipment 0.0.2→0.0.3 and validate-shipment 0.0.2→0.0.3. No other functional changes in those action files.

Sequence Diagram(s)

mermaid
sequenceDiagram
participant User as Caller
participant Action as FedEx Action (track-)
participant App as fedex.app.mjs
participant FedEx as FedEx API
Note over Action,App: Action validates inputs and builds payload
User->>Action: invoke run({ $ }) with props
Action->>App: call this.fedex.track
(payload)
App->>FedEx: POST /track/v1/... with payload
FedEx-->>App: tracking response
App-->>Action: returns response
Action-->>User: $.export summary + return response

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Check validation in track-by-reference for correct error type and conditions.
  • Verify payload shapes in each action match the corresponding fedex.app.mjs method expectations.
  • Confirm API endpoint paths and HTTP method usage in fedex.app.mjs align with FedEx docs.
  • Inspect propDefinition wiring for trackingNumber, includeDetailedScans, shipDateBegin, and shipDateEnd.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Description check ⚠️ Warning The description only contains 'Resolves #19335' without filling the required WHY section from the template, making it incomplete. Complete the 'WHY' section in the PR description to explain the motivation and context for adding these tracking components.
Title check ❓ Inconclusive The title 'Fedex - new components' is vague and generic, lacking specificity about the tracking API implementations added. Use a more descriptive title that highlights the main change, such as 'Add Fedex Tracking API actions' or 'Implement Fedex tracking endpoints'.
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed All four tracking endpoints specified in issue #19335 are implemented: Track by Reference, Track by TCN, Track by Tracking Number, and Track Multiple Shipments.
Out of Scope Changes check ✅ Passed Version bumps in package.json and existing action versions are maintenance changes; all new tracking actions directly align with #19335 requirements.
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 issue-19335

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: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 85caf1b and fdd2045.

📒 Files selected for processing (6)
  • components/fedex/actions/track-by-reference/track-by-reference.mjs (1 hunks)
  • components/fedex/actions/track-by-tcn/track-by-tcn.mjs (1 hunks)
  • components/fedex/actions/track-by-tracking-number/track-by-tracking-number.mjs (1 hunks)
  • components/fedex/actions/track-multi-piece-shipment/track-multi-piece-shipment.mjs (1 hunks)
  • components/fedex/fedex.app.mjs (2 hunks)
  • components/fedex/package.json (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 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/fedex/package.json
🧬 Code graph analysis (3)
components/fedex/actions/track-by-tcn/track-by-tcn.mjs (3)
components/fedex/actions/track-by-reference/track-by-reference.mjs (1)
  • response (63-76)
components/fedex/actions/track-by-tracking-number/track-by-tracking-number.mjs (1)
  • response (30-42)
components/fedex/actions/track-multi-piece-shipment/track-multi-piece-shipment.mjs (1)
  • response (40-51)
components/fedex/actions/track-by-tracking-number/track-by-tracking-number.mjs (3)
components/fedex/actions/track-by-reference/track-by-reference.mjs (1)
  • response (63-76)
components/fedex/actions/track-by-tcn/track-by-tcn.mjs (1)
  • response (41-51)
components/fedex/actions/track-multi-piece-shipment/track-multi-piece-shipment.mjs (1)
  • response (40-51)
components/fedex/actions/track-by-reference/track-by-reference.mjs (3)
components/fedex/actions/track-by-tcn/track-by-tcn.mjs (1)
  • response (41-51)
components/fedex/actions/track-by-tracking-number/track-by-tracking-number.mjs (1)
  • response (30-42)
components/fedex/actions/track-multi-piece-shipment/track-multi-piece-shipment.mjs (1)
  • response (40-51)
⏰ 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: Verify TypeScript components
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Lint Code Base
🔇 Additional comments (5)
components/fedex/package.json (1)

3-3: Version bump is consistent with new functionality

Updating version to 0.2.0 aligns with the addition of new tracking actions; nothing else in this manifest raises concerns.

components/fedex/actions/track-by-tracking-number/track-by-tracking-number.mjs (1)

1-45: Action wiring and payload look good

Props, request payload (trackingInfo with trackingNumberInfo), and summary usage of this.trackingNumber are consistent and match the new trackByTrackingNumber app method.

components/fedex/actions/track-multi-piece-shipment/track-multi-piece-shipment.mjs (1)

1-54: Multi‑piece shipment action is consistent and coherent

The props, associatedType options, request payload, and summary all line up with the trackMultiplePieceShipment helper; no issues found.

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

181-202: New tracking propDefinitions and helper methods are wired correctly

The added tracking-related props are simple and reusable, and the four new helper methods correctly delegate to _makeRequest using the expected tracking endpoints and POST semantics, matching how the new actions call them.

Also applies to: 233-260

components/fedex/actions/track-by-tcn/track-by-tcn.mjs (1)

1-55: TCN tracking action matches app helper and props

The tcnInfo payload, date props via propDefinition, and $summary using this.value all look consistent with trackByTrackingControlNumber.

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

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fdd2045 and 2dff498.

📒 Files selected for processing (3)
  • components/fedex/actions/create-shipment/create-shipment.mjs (1 hunks)
  • components/fedex/actions/track-by-reference/track-by-reference.mjs (1 hunks)
  • components/fedex/actions/validate-shipment/validate-shipment.mjs (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2024-07-04T18:11:59.822Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-07-04T18:11:59.822Z
Learning: When exporting a summary message in the `run` method of an action, ensure the message is correctly formatted. For example, in the `hackerone-get-members` action, the correct format is `Successfully retrieved ${response.data.length} members`.

Applied to files:

  • components/fedex/actions/track-by-reference/track-by-reference.mjs
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Lint Code Base
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Verify TypeScript components
  • GitHub Check: pnpm publish
🔇 Additional comments (3)
components/fedex/actions/validate-shipment/validate-shipment.mjs (1)

7-7: Version bump for validate-shipment looks consistent

version: "0.0.3" aligns with the other updated FedEx actions and the package version bump; no further changes needed here.

components/fedex/actions/create-shipment/create-shipment.mjs (1)

7-7: Version bump for create-shipment is appropriate

Setting version: "0.0.3" keeps this action in sync with the other FedEx actions and the package metadata; no issues spotted.

components/fedex/actions/track-by-reference/track-by-reference.mjs (1)

59-78: run() flow and $summary look solid

The run method’s guard:

if (!this.accountNumber && (!this.destinationPostalCode || !this.destinationCountryCode)) {
  throw new ConfigurationError("Either `accountNumber` or `destinationPostalCode` and `destinationCountryCode` must be provided.");
}

correctly enforces the documented “account vs destination” requirement and fails fast with a clear configuration error.

The summary export:

$.export("$summary", `Tracking information for ${this.value} retrieved successfully`);

uses the defined value prop instead of a non‑existent tracking number field and provides a clear, user‑friendly message. Based on learnings, this follows the preferred $summary pattern.

Copy link
Collaborator

@GTFalcao GTFalcao left a comment

Choose a reason for hiding this comment

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

LGTM!

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] Fedex - Tracking API

3 participants