-
Notifications
You must be signed in to change notification settings - Fork 5.5k
[Components] Paazl new components #18255
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
|
Caution Review failedFailed to post review comments. Configuration used: CodeRabbit UI Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (17)
🚧 Files skipped from review as they are similar to previous changes (12)
🧰 Additional context used🧬 Code graph analysis (4)components/paazl/actions/create-checkout-token/create-checkout-token.mjs (3)
components/paazl/paazl.app.mjs (15)
components/paazl/actions/get-parcel-label/get-parcel-label.mjs (2)
components/paazl/actions/create-shipment/create-shipment.mjs (4)
WalkthroughAdds a complete Paazl integration: a populated app with extensive propDefinitions, an axios-based HTTP client and many endpoint wrappers, plus numerous new action modules for checkout, orders, shipments, shipping options, labels, and returns, and a package.json version/dependency bump. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant Action
participant App as Paazl App
participant API as Paazl REST API
User->>Action: Trigger action (e.g., Save Order, Get Shipping Options)
Action->>App: app.<method>({ $, data/params })
rect #CFEFF7
App->>API: HTTP request (GET/POST/PUT/DELETE)
API-->>App: Response / Error
end
App-->>Action: return response or throw
Action-->>User: export $summary and return response
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120 minutes Suggested reviewers
Pre-merge checks (2 passed, 2 warnings, 1 inconclusive)❌ Failed checks (2 warnings, 1 inconclusive)
✅ Passed checks (2 passed)
Poem
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal). Please share your feedback with us on this Discord post. ✨ Finishing Touches
🧪 Generate unit tests
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 |
4b141e6
to
fecf177
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: 4
🧹 Nitpick comments (6)
components/paazl/paazl.app.mjs (1)
671-686
: Labels may require non-JSON Accept/responseTypeIf these endpoints return binary labels (PDF/PNG/ZPL), you may need
Accept
per type andresponseType: "arraybuffer"
. Consider allowing callers to override viaheaders
/responseType
, or set automatically fromparams.type
.Please verify expected content-types for label endpoints in the latest Paazl reference before changing defaults. (support.paazl.com)
components/paazl/actions/delete-order/delete-order.mjs (1)
6-6
: Doc link anchor refers to saveOrderNit: point to the DELETE order doc anchor instead of
#/Order/saveOrderUsingPOST
.- description: "Deletes an order. [See the documentation](https://support.paazl.com/hc/en-us/articles/360008633973-REST-API-reference#/Order/saveOrderUsingPOST)", + description: "Deletes an order. [See the documentation](https://support.paazl.com/hc/en-us/articles/360008633973-REST-API-reference#/Order/deleteOrderUsingDELETE)",components/paazl/actions/get-shipment-labels/get-shipment-labels.mjs (1)
39-61
: Ensure Accept/responseType match requested label formatIf Paazl returns binary for PDF/PNG/ZPL, pass appropriate
headers
and possiblyresponseType
. Example: setheaders: { Accept: "application/pdf" }
whentype === "PDF"
; or expose a “download as file” toggle.Confirm content-types for
getShipmentLabels
in the current REST reference. (support.paazl.com)components/paazl/actions/get-shipping-options/get-shipping-options.mjs (3)
173-176
: Parse integers for limit and numberOfProcessingDays.Ensures correct types sent to the API.
- limit, - numberOfProcessingDays, + limit: (limit === undefined || limit === null || limit === "") ? undefined : parseInt(limit, 10), + numberOfProcessingDays: (numberOfProcessingDays === undefined || numberOfProcessingDays === null || numberOfProcessingDays === "") ? undefined : parseInt(numberOfProcessingDays, 10),
139-146
: Avoid shadowing the importedapp
with the propapp
.Small readability tweak: rename the destructured prop locally.
- const { - app, + const { + app: paazl, consigneeCountryCode, consigneePostalCode, consignorCountryCode, consignorPostalCode, locale, timeZone, limit, numberOfProcessingDays, includeExternalDeliveryDates, token, tags, sortOrderBy, sortOrder, sortDistributor, totalWeight, totalPrice, totalVolume, numberOfGoods, startMatrix, deliveryDateStartDate, deliveryDateNumberOfDays, } = this; - const response = await app.getShippingOptions({ + const response = await paazl.getShippingOptions({Also applies to: 164-166
225-225
: Use local var in summary for consistency.- $.export("$summary", `Successfully retrieved ${response.shippingOptions?.length || 0} shipping options for country: ${this.consigneeCountryCode}`); + $.export("$summary", `Successfully retrieved ${response.shippingOptions?.length || 0} shipping options for country: ${consigneeCountryCode}`);
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (17)
components/paazl/actions/create-checkout-token/create-checkout-token.mjs
(1 hunks)components/paazl/actions/create-shipment/create-shipment.mjs
(1 hunks)components/paazl/actions/delete-order/delete-order.mjs
(1 hunks)components/paazl/actions/get-checkout-session/get-checkout-session.mjs
(1 hunks)components/paazl/actions/get-order-labels/get-order-labels.mjs
(1 hunks)components/paazl/actions/get-order-shipments/get-order-shipments.mjs
(1 hunks)components/paazl/actions/get-parcel-label/get-parcel-label.mjs
(1 hunks)components/paazl/actions/get-pickup-location-options/get-pickup-location-options.mjs
(1 hunks)components/paazl/actions/get-return-shipments/get-return-shipments.mjs
(1 hunks)components/paazl/actions/get-shipment-labels/get-shipment-labels.mjs
(1 hunks)components/paazl/actions/get-shipment-tracking/get-shipment-tracking.mjs
(1 hunks)components/paazl/actions/get-shipping-options/get-shipping-options.mjs
(1 hunks)components/paazl/actions/modify-order/modify-order.mjs
(1 hunks)components/paazl/actions/save-checkout-session/save-checkout-session.mjs
(1 hunks)components/paazl/actions/save-order/save-order.mjs
(1 hunks)components/paazl/paazl.app.mjs
(1 hunks)components/paazl/package.json
(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (11)
- components/paazl/actions/get-parcel-label/get-parcel-label.mjs
- components/paazl/actions/create-checkout-token/create-checkout-token.mjs
- components/paazl/package.json
- components/paazl/actions/get-shipment-tracking/get-shipment-tracking.mjs
- components/paazl/actions/get-checkout-session/get-checkout-session.mjs
- components/paazl/actions/get-order-labels/get-order-labels.mjs
- components/paazl/actions/save-order/save-order.mjs
- components/paazl/actions/create-shipment/create-shipment.mjs
- components/paazl/actions/save-checkout-session/save-checkout-session.mjs
- components/paazl/actions/get-pickup-location-options/get-pickup-location-options.mjs
- components/paazl/actions/modify-order/modify-order.mjs
🧰 Additional context used
🧬 Code graph analysis (4)
components/paazl/actions/get-shipment-labels/get-shipment-labels.mjs (2)
components/paazl/actions/get-order-labels/get-order-labels.mjs (1)
response
(40-51)components/paazl/actions/get-parcel-label/get-parcel-label.mjs (1)
response
(54-67)
components/paazl/actions/get-shipping-options/get-shipping-options.mjs (1)
components/paazl/actions/get-pickup-location-options/get-pickup-location-options.mjs (1)
response
(171-222)
components/paazl/actions/get-return-shipments/get-return-shipments.mjs (1)
components/paazl/actions/get-order-shipments/get-order-shipments.mjs (1)
response
(24-27)
components/paazl/actions/get-order-shipments/get-order-shipments.mjs (3)
components/paazl/actions/get-order-labels/get-order-labels.mjs (1)
response
(40-51)components/paazl/actions/get-return-shipments/get-return-shipments.mjs (1)
response
(24-27)components/paazl/actions/get-shipment-tracking/get-shipment-tracking.mjs (1)
response
(31-35)
⏰ 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: pnpm publish
- GitHub Check: Publish TypeScript components
- GitHub Check: Verify TypeScript components
🔇 Additional comments (9)
components/paazl/paazl.app.mjs (3)
541-555
: Auth header construction matches Paazl specPublic calls use API key only; private calls use
key:secret
. Good.Reference: Paazl docs outline which endpoints require API key vs key+secret. (support.paazl.com)
625-631
: Correct use of public auth for shipping/pickup options
isPublic: true
for/pickuplocations
and/shippingoptions
aligns with Paazl’s guidance.Also applies to: 632-638
42-49
: Map shipment options to use the shipment’sid
rather than itstrackingNumber
The picker feeds into/orders/{orderReference}/shipments/{shipmentId}
, which expects the internal shipmentid
. Update to something like:- async options({ orderReference }) { - const { shipments } = await this.getOrderShipments({ orderReference }); - return shipments.map(({ trackingNumber: value }) => value); - }, + async options({ orderReference }) { + const { shipments } = await this.getOrderShipments({ orderReference }); + return shipments.map(({ id, trackingNumber }) => ({ + label: trackingNumber, + value: id, + })); + },Please confirm the
shipments
response shape in Paazl’s REST API reference to ensure you’re using the correct property.components/paazl/actions/delete-order/delete-order.mjs (1)
19-33
: Action flow looks goodReads props, calls app, exports summary, returns response.
components/paazl/actions/get-order-shipments/get-order-shipments.mjs (1)
18-31
: Solid wrapper for shipments retrievalProps wiring and call to
getOrderShipments
are correct; summary is helpful.components/paazl/actions/get-return-shipments/get-return-shipments.mjs (1)
18-31
: LGTMConsistent with other actions; uses
getReturnShipments
and sets a clear summary.components/paazl/actions/get-shipping-options/get-shipping-options.mjs (3)
83-88
: Verifytags
shape matches API.If Paazl expects an array of strings, ensure propDefinition enforces/normalizes it. Otherwise, coerce here.
Also applies to: 176-178
1-9
: Solid action scaffold and prop wiring.Naming, metadata, and conditional payload construction look consistent with other Paazl actions.
188-199
: Confirm request body contract matches Paazl.
- sortingModel: keys should be
orderBy
,sortOrder
,distributor
; ensuresortOrderBy
/sortOrder
/sortDistributor
map to the allowed enums (orderBy: PRICE | DATE | CARRIER | DISTANCE; sortOrder: ASC | DESC; distributor: valid Paazl carrier code).- shipmentParameters: verify presence and types for
totalWeight
,totalVolume
,totalPrice
,numberOfGoods
,startMatrix
.- top-level: confirm fields and types for
limit
(orshippingOptionsLimit
),numberOfProcessingDays
, andtags
align with theshippingOptionsUsingPOST
schema.
fecf177
to
03e4c4d
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
♻️ Duplicate comments (5)
components/paazl/paazl.app.mjs (3)
542-544
: LGTM! Path construction is correct.The
getUrl
method properly constructs the full API URL by prepending the base URL with/v1
prefix, which correctly addresses the past review concerns about path construction.
556-567
: LGTM! URL construction fixed.The
makeRequest
method now correctly usesthis.getUrl(path)
instead of the undefinedthis.getBaseUrl()
, which resolves the critical issue identified in the past review.
617-623
: LGTM! Default parameter fixed.The function now correctly uses
} = {}
as the default parameter instead of the undefinedargs
, which resolves the issue from the past review.components/paazl/actions/get-shipping-options/get-shipping-options.mjs (2)
164-166
: Path correctly includes /v1 prefix.The
getShippingOptions
method call is correct. The app'sgetUrl
method already prepends/v1
to the path, so the endpoint will correctly resolve to/v1/shippingoptions
.
206-218
: Preserve valid zero values for numeric fields.The current truthy checks will incorrectly exclude valid
0
values. Also,numberOfGoods
should be parsed to ensure it's numeric.Apply this fix to handle zero values correctly:
shipmentParameters: { - totalWeight: totalWeight - ? parseFloat(totalWeight) - : undefined, - totalPrice: totalPrice - ? parseFloat(totalPrice) - : undefined, - totalVolume: totalVolume - ? parseFloat(totalVolume) - : undefined, - numberOfGoods, + totalWeight: (totalWeight === undefined || totalWeight === null || totalWeight === "") + ? undefined + : parseFloat(totalWeight), + totalPrice: (totalPrice === undefined || totalPrice === null || totalPrice === "") + ? undefined + : parseFloat(totalPrice), + totalVolume: (totalVolume === undefined || totalVolume === null || totalVolume === "") + ? undefined + : parseFloat(totalVolume), + numberOfGoods: (numberOfGoods === undefined || numberOfGoods === null || numberOfGoods === "") + ? undefined + : parseInt(numberOfGoods, 10), startMatrix: startMatrix, },
🧹 Nitpick comments (2)
components/paazl/paazl.app.mjs (2)
61-69
: Consider error handling for async options.The
shippingOptionId
prop's async options method doesn't handle potential API errors, which could cause the UI to fail when loading options.Consider adding error handling:
async options() { - const { shippingOptions } = await this.getShippingOptions(); - return shippingOptions.map(({ - identifier: value, name: label, - }) => ({ - label, - value, - })); + try { + const { shippingOptions } = await this.getShippingOptions(); + return shippingOptions?.map(({ + identifier: value, name: label, + }) => ({ + label, + value, + })) || []; + } catch (error) { + console.error("Failed to load shipping options:", error); + return []; + } }
76-84
: Consider error handling for async options.The
pickupLocationCode
prop's async options method doesn't handle potential API errors.Consider adding error handling:
async options() { - const { pickupLocations } = await this.getPickupLocationOptions(); - return pickupLocations.map(({ - code: value, name: label, - }) => ({ - label, - value, - })); + try { + const { pickupLocations } = await this.getPickupLocationOptions(); + return pickupLocations?.map(({ + code: value, name: label, + }) => ({ + label, + value, + })) || []; + } catch (error) { + console.error("Failed to load pickup locations:", error); + return []; + } }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (17)
components/paazl/actions/create-checkout-token/create-checkout-token.mjs
(1 hunks)components/paazl/actions/create-shipment/create-shipment.mjs
(1 hunks)components/paazl/actions/delete-order/delete-order.mjs
(1 hunks)components/paazl/actions/get-checkout-session/get-checkout-session.mjs
(1 hunks)components/paazl/actions/get-order-labels/get-order-labels.mjs
(1 hunks)components/paazl/actions/get-order-shipments/get-order-shipments.mjs
(1 hunks)components/paazl/actions/get-parcel-label/get-parcel-label.mjs
(1 hunks)components/paazl/actions/get-pickup-location-options/get-pickup-location-options.mjs
(1 hunks)components/paazl/actions/get-return-shipments/get-return-shipments.mjs
(1 hunks)components/paazl/actions/get-shipment-labels/get-shipment-labels.mjs
(1 hunks)components/paazl/actions/get-shipment-tracking/get-shipment-tracking.mjs
(1 hunks)components/paazl/actions/get-shipping-options/get-shipping-options.mjs
(1 hunks)components/paazl/actions/modify-order/modify-order.mjs
(1 hunks)components/paazl/actions/save-checkout-session/save-checkout-session.mjs
(1 hunks)components/paazl/actions/save-order/save-order.mjs
(1 hunks)components/paazl/paazl.app.mjs
(1 hunks)components/paazl/package.json
(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (14)
- components/paazl/actions/get-shipment-tracking/get-shipment-tracking.mjs
- components/paazl/actions/create-checkout-token/create-checkout-token.mjs
- components/paazl/actions/get-return-shipments/get-return-shipments.mjs
- components/paazl/actions/get-shipment-labels/get-shipment-labels.mjs
- components/paazl/actions/get-parcel-label/get-parcel-label.mjs
- components/paazl/actions/delete-order/delete-order.mjs
- components/paazl/package.json
- components/paazl/actions/get-pickup-location-options/get-pickup-location-options.mjs
- components/paazl/actions/get-order-shipments/get-order-shipments.mjs
- components/paazl/actions/get-order-labels/get-order-labels.mjs
- components/paazl/actions/create-shipment/create-shipment.mjs
- components/paazl/actions/save-order/save-order.mjs
- components/paazl/actions/save-checkout-session/save-checkout-session.mjs
- components/paazl/actions/modify-order/modify-order.mjs
🧰 Additional context used
🧬 Code graph analysis (2)
components/paazl/actions/get-shipping-options/get-shipping-options.mjs (1)
components/paazl/actions/get-pickup-location-options/get-pickup-location-options.mjs (1)
response
(171-222)
components/paazl/actions/get-checkout-session/get-checkout-session.mjs (5)
components/paazl/actions/create-checkout-token/create-checkout-token.mjs (1)
response
(25-30)components/paazl/actions/delete-order/delete-order.mjs (1)
response
(25-28)components/paazl/actions/get-order-labels/get-order-labels.mjs (1)
response
(40-51)components/paazl/actions/get-parcel-label/get-parcel-label.mjs (1)
response
(54-67)components/paazl/actions/get-shipment-labels/get-shipment-labels.mjs (1)
response
(47-59)
⏰ 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 (1)
components/paazl/actions/get-checkout-session/get-checkout-session.mjs (1)
19-34
: LGTM! Clean implementation.The action correctly retrieves checkout session data using the provided reference. The implementation is straightforward and follows the expected pattern.
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.
Hi @jcortes, LGTM! Ready for QA!
03e4c4d
to
df1102d
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: 6
♻️ Duplicate comments (2)
components/paazl/actions/get-shipping-options/get-shipping-options.mjs (2)
164-166
: Verify client targets /v1/shippingoptionsConfirm paazl.app.mjs uses the v1 path (or base URL includes /v1) for getShippingOptions to avoid 404s.
#!/bin/bash # Check Paazl client method and endpoint path set -euo pipefail fd -a 'paazl.app.mjs' | while read -r f; do echo "==> $f" rg -nP -C2 '\bgetShippingOptions\s*\(' "$f" || true rg -nP -C2 'path:\s*["'\'']/v1/shippingoptions["'\'']' "$f" || true rg -nP -C2 'baseUrl\s*:.*?/v1\b' "$f" || true done
200-221
: Bug: 0 values dropped and startMatrix=false can’t be sentTruthiness drops 0 for totals and prevents sending startMatrix: false. Also numberOfGoods isn’t coerced.
- ...(totalWeight - || totalPrice - || totalVolume - || numberOfGoods - || startMatrix + ...((totalWeight !== undefined && totalWeight !== null && totalWeight !== "") + || (totalPrice !== undefined && totalPrice !== null && totalPrice !== "") + || (totalVolume !== undefined && totalVolume !== null && totalVolume !== "") + || (numberOfGoods !== undefined && numberOfGoods !== null && numberOfGoods !== "") + || (startMatrix !== undefined) ? { shipmentParameters: { - totalWeight: totalWeight - ? parseFloat(totalWeight) - : undefined, - totalPrice: totalPrice - ? parseFloat(totalPrice) - : undefined, - totalVolume: totalVolume - ? parseFloat(totalVolume) - : undefined, - numberOfGoods, - startMatrix: startMatrix, + totalWeight: (totalWeight === undefined || totalWeight === null || totalWeight === "") + ? undefined + : Number(totalWeight), + totalPrice: (totalPrice === undefined || totalPrice === null || totalPrice === "") + ? undefined + : Number(totalPrice), + totalVolume: (totalVolume === undefined || totalVolume === null || totalVolume === "") + ? undefined + : Number(totalVolume), + numberOfGoods: (numberOfGoods === undefined || numberOfGoods === null || numberOfGoods === "") + ? undefined + : parseInt(numberOfGoods, 10), + ...(startMatrix !== undefined ? { startMatrix } : {}), }, } : {} ),
🧹 Nitpick comments (5)
components/paazl/actions/get-shipment-tracking/get-shipment-tracking.mjs (1)
24-39
: Alias app prop and add error context + return payload onlyPrevents shadowing the imported
app
, adds actionable error context, and (optionally) returns the data payload instead of the raw response if the app client uses Axios-style responses.async run({ $ }) { - const { - app, - orderReference, - shipmentId, - } = this; - - const response = await app.getShipmentById({ - $, - orderReference, - shipmentId, - }); - - $.export("$summary", `Successfully retrieved tracking details for shipment: ${shipmentId} in order: ${orderReference}`); - return response; + const { app: paazl, orderReference, shipmentId } = this; + try { + const response = await paazl.getShipmentById({ + $, + orderReference, + shipmentId, + }); + $.export("$summary", "Successfully retrieved shipment tracking details."); + // If paazl.getShipmentById returns an Axios response, prefer `response.data`. + return response?.data ?? response; + } catch (err) { + err.message = `[Paazl] Failed to retrieve tracking for shipmentId=${shipmentId}, orderReference=${orderReference}: ${err.message}`; + throw err; + } },components/paazl/actions/get-shipping-options/get-shipping-options.mjs (1)
225-226
: Minor: use local var in summary and safer countAvoid this.* in favor of local destructured value; guard array shape.
- $.export("$summary", `Successfully retrieved ${response.shippingOptions?.length || 0} shipping options for country: ${this.consigneeCountryCode}`); + $.export("$summary", `Retrieved ${Array.isArray(response?.shippingOptions) ? response.shippingOptions.length : 0} shipping options for country: ${consigneeCountryCode}`);components/paazl/actions/create-shipment/create-shipment.mjs (3)
165-181
: Normalize currency codes to uppercaseEnsures ISO 4217 format regardless of user input casing.
- codValue: { - value: parseFloat(parcelCodValue), - currency: parcelCodCurrency || "EUR", - }, + codValue: { + value: parseFloat(parcelCodValue), + currency: (parcelCodCurrency || "EUR").toUpperCase(), + }, } : {} ), ...(parcelInsuredValue ? { insuredValue: { - value: parseFloat(parcelInsuredValue), - currency: parcelInsuredCurrency || "EUR", + value: parseFloat(parcelInsuredValue), + currency: (parcelInsuredCurrency || "EUR").toUpperCase(), }, },
35-107
: Consider supporting multiple parcelsCurrent UI props allow only a single parcel. The API supports multiple parcels; exposing an array input (JSON items or a dynamic fields array) would unlock multi-parcel shipments. Keep the single-parcel fields for convenience and prefer
parcels
when provided.I can draft a
parcels
array prop and merge logic to use it when present.
191-193
: Enrich summary with shipment identifier when availableImproves UX in runs list.
- $.export("$summary", `Successfully created shipment for order: ${orderReference}`); + const shipmentId = response?.id ?? response?.shipmentId ?? response?.shipments?.[0]?.id; + $.export("$summary", `Successfully created shipment${shipmentId ? ` (${shipmentId})` : ""} for order: ${orderReference}`);
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (17)
components/paazl/actions/create-checkout-token/create-checkout-token.mjs
(1 hunks)components/paazl/actions/create-shipment/create-shipment.mjs
(1 hunks)components/paazl/actions/delete-order/delete-order.mjs
(1 hunks)components/paazl/actions/get-checkout-session/get-checkout-session.mjs
(1 hunks)components/paazl/actions/get-order-labels/get-order-labels.mjs
(1 hunks)components/paazl/actions/get-order-shipments/get-order-shipments.mjs
(1 hunks)components/paazl/actions/get-parcel-label/get-parcel-label.mjs
(1 hunks)components/paazl/actions/get-pickup-location-options/get-pickup-location-options.mjs
(1 hunks)components/paazl/actions/get-return-shipments/get-return-shipments.mjs
(1 hunks)components/paazl/actions/get-shipment-labels/get-shipment-labels.mjs
(1 hunks)components/paazl/actions/get-shipment-tracking/get-shipment-tracking.mjs
(1 hunks)components/paazl/actions/get-shipping-options/get-shipping-options.mjs
(1 hunks)components/paazl/actions/modify-order/modify-order.mjs
(1 hunks)components/paazl/actions/save-checkout-session/save-checkout-session.mjs
(1 hunks)components/paazl/actions/save-order/save-order.mjs
(1 hunks)components/paazl/paazl.app.mjs
(1 hunks)components/paazl/package.json
(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (14)
- components/paazl/actions/get-return-shipments/get-return-shipments.mjs
- components/paazl/actions/get-parcel-label/get-parcel-label.mjs
- components/paazl/actions/delete-order/delete-order.mjs
- components/paazl/actions/get-shipment-labels/get-shipment-labels.mjs
- components/paazl/paazl.app.mjs
- components/paazl/actions/create-checkout-token/create-checkout-token.mjs
- components/paazl/actions/save-order/save-order.mjs
- components/paazl/actions/get-order-shipments/get-order-shipments.mjs
- components/paazl/actions/get-order-labels/get-order-labels.mjs
- components/paazl/actions/modify-order/modify-order.mjs
- components/paazl/actions/get-checkout-session/get-checkout-session.mjs
- components/paazl/actions/get-pickup-location-options/get-pickup-location-options.mjs
- components/paazl/package.json
- components/paazl/actions/save-checkout-session/save-checkout-session.mjs
🧰 Additional context used
🧬 Code graph analysis (3)
components/paazl/actions/get-shipment-tracking/get-shipment-tracking.mjs (3)
components/paazl/actions/get-order-shipments/get-order-shipments.mjs (1)
response
(24-27)components/paazl/actions/get-parcel-label/get-parcel-label.mjs (1)
response
(54-67)components/paazl/actions/get-shipment-labels/get-shipment-labels.mjs (1)
response
(47-59)
components/paazl/actions/get-shipping-options/get-shipping-options.mjs (1)
components/paazl/actions/get-pickup-location-options/get-pickup-location-options.mjs (1)
response
(171-222)
components/paazl/actions/create-shipment/create-shipment.mjs (7)
components/paazl/actions/get-order-labels/get-order-labels.mjs (1)
response
(40-51)components/paazl/actions/get-parcel-label/get-parcel-label.mjs (1)
response
(54-67)components/paazl/actions/get-pickup-location-options/get-pickup-location-options.mjs (1)
response
(171-222)components/paazl/actions/get-shipment-labels/get-shipment-labels.mjs (1)
response
(47-59)components/paazl/actions/get-shipping-options/get-shipping-options.mjs (1)
response
(164-223)components/paazl/actions/modify-order/modify-order.mjs (1)
response
(208-254)components/paazl/actions/save-order/save-order.mjs (1)
response
(208-254)
⏰ 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: Lint Code Base
- GitHub Check: Publish TypeScript components
- GitHub Check: Verify TypeScript components
🔇 Additional comments (4)
components/paazl/actions/get-shipment-tracking/get-shipment-tracking.mjs (2)
9-23
: Props look consistent with app propDefinitionsUsing
propDefinition: [app, "orderReference" | "shipmentId"]
matches the pattern used elsewhere in this PR. No issues.
7-7
: No version bump needed—versions are consistent
All Paazl actions undercomponents/paazl/actions
useversion: "0.0.1"
, including this file, so no change required.components/paazl/actions/create-shipment/create-shipment.mjs (2)
1-9
: Module scaffold looks goodImport, key/name/description/version/type all align with Pipedream patterns.
129-189
: Verify placement oftype
,size
, andquantity
increateShipment
call
They’re currently passed underdata
, but if the Paazl API requires these as URL query parameters, move them into aparams
object in thecreateShipment
invocation.
components/paazl/actions/get-shipment-tracking/get-shipment-tracking.mjs
Show resolved
Hide resolved
74d9307
to
d629389
Compare
d629389
to
82bd0df
Compare
WHY
Resolves #18051
Summary by CodeRabbit