-
Notifications
You must be signed in to change notification settings - Fork 5.5k
18051 paazl #18248
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
18051 paazl #18248
Conversation
- Introduced prop definitions for Order ID and Shipment ID. - Implemented methods for retrieving order shipments and shipment details. - Added methods for creating orders and shipments. - Enhanced request handling with improved headers and base URL configuration.
- Bump version to 0.1.0 in package.json. - Add new actions: Create Order, Create Shipment, Get Shipment Details, and Get Pickup Locations. - Introduce utility functions and constants for handling country options and object parsing. - Enhance the app's functionality for order and shipment management.
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
Warning Rate limit exceeded@luancazarine has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 13 minutes and 0 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (2)
WalkthroughAdds a Paazl integration: new actions (create order, create shipment, get pickup locations, get shipment details), shared constants and utils, a lightweight HTTP client in the Paazl app with request helpers, and bumps the Paazl package version and dependency. Changes
Sequence Diagram(s)sequenceDiagram
actor User
participant Action as Create Order Action
participant App as Paazl App Client
participant API as Paazl API
User->>Action: Provide consignee/shipping inputs
Action->>Action: Validate inputs, build payload
Action->>App: createOrder({ data })
App->>API: POST /v1/order
API-->>App: 201 Created + body
App-->>Action: Response
Action-->>User: Return API response
sequenceDiagram
actor User
participant Action as Create Shipment Action
participant App as Paazl App Client
participant API as Paazl API
User->>Action: orderId, type/size/quantity, parcels
Action->>App: createShipment({ orderId, data })
App->>API: POST /v1/orders/{orderId}/shipments
API-->>App: 201 Created + shipment
App-->>Action: Response
Action-->>User: Summary + response
sequenceDiagram
actor User
participant Action as Get Pickup Locations Action
participant App as Paazl App Client
participant API as Paazl API
User->>Action: Country/postal codes, dates, locale
Action->>App: getPickupLocations({ data })
App->>API: POST /v1/pickuplocations
API-->>App: Locations
App-->>Action: Response
Action-->>User: Locations list
sequenceDiagram
actor User
participant Action as Get Shipment Details Action
participant App as Paazl App Client
participant API as Paazl API
User->>Action: orderId, shipmentId
Action->>App: getOrderShipmentDetails({ orderId, shipmentId })
App->>API: GET /v1/orders/{orderId}/shipments/{shipmentId}
API-->>App: Shipment details
App-->>Action: Response
Action-->>User: Details
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Assessment against linked issues
Suggested reviewers
Poem
✨ 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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
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: 16
🧹 Nitpick comments (9)
components/paazl/common/constants.mjs (1)
1-32
: Prevent accidental mutation.
Freeze the exported array to avoid runtime modifications.-export const COUNTRY_OPTIONS = [ +export const COUNTRY_OPTIONS = Object.freeze([ "NL", "DE", "BE", "FR", "GB", "ES", "IT", "AT", "CH", "DK", "NO", "SE", "FI", "PL", "CZ", "HU", "SK", "SI", "HR", "RO", "BG", "GR", "PT", "IE", "LU", "EE", "LV", "LT", "MT", "CY", -]; +]);components/paazl/actions/create-order/create-order.mjs (5)
160-160
: Align payload with the string type for companyName.
Avoid unnecessary parsing.- companyName: parseObject(this.consigneeCompanyName), + companyName: this.consigneeCompanyName,
118-118
: Fix broken doc link.
There’s a stray%22
at the end of the URL.- description: "A shipping option's Paazl identifier. You will find a list of the identifiers of the shipping options available to your webshop in your webshop account under **Settings>Account>Overview of shipping options**. **Note!** If you have used [custom shipping option identifiers](https://support.paazl.com/hc/en-us/articles/360021787374-Customizing-shipping-option-identifiers%22), these will be returned instead of their Paazl equivalents.", + description: "A shipping option's Paazl identifier. You will find a list of the identifiers of the shipping options available to your webshop in your webshop account under **Settings>Account>Overview of shipping options**. **Note!** If you have used [custom shipping option identifiers](https://support.paazl.com/hc/en-us/articles/360021787374-Customizing-shipping-option-identifiers), these will be returned instead of their Paazl equivalents.",
69-71
: Country codes: reference ISO 3166-1 alpha-2, not 3166-2.
3166-2 is for subdivisions; countries use 3166-1 alpha-2.- description: "The [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) code for the country to which an order is shipped.", + description: "The [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code for the country to which an order is shipped.",
57-61
: Locale description: same ISO correction.
Use ISO 3166-1 alpha-2 for the country portion.- description: "Specifies the language of the email templates used for track & trace notifications. `locale` is specified using the format `{language}_{country}`, where `{language}` is an [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code and `{country}` is an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) country code. Example: `fr_FR`", + description: "Specifies the language of the email templates used for track & trace notifications. `locale` is specified using the format `{language}_{country}`, where `{language}` is an [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code and `{country}` is an [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code. Example: `fr_FR`",
191-192
: Add a success summary for UX consistency.
Aligns with other actions.- return response; + $.export("$summary", `Order ${this.reference} created`); + return response;components/paazl/actions/get-shipment-details/get-shipment-details.mjs (2)
34-35
: Include shipmentId in the summary.
More informative in the UI.- $.export("$summary", `Successfully retrieved shipment details for ${this.orderId}`); + $.export("$summary", `Successfully retrieved shipment ${this.shipmentId} for order ${this.orderId}`);
7-7
: Version note (optional).
Action is 0.0.1 while package is 0.1.0. Fine to keep action versions independent; align if you prefer.components/paazl/actions/get-pickup-locations/get-pickup-locations.mjs (1)
7-7
: Documentation link is incorrect - uses URL fragment instead of proper API pathThe documentation link uses a URL fragment (
#/Shipping%20options/getPickupLocationsUsingPOST
) which may not work reliably. Based on the API reference structure, this should likely be a direct path or proper anchor.- description: "Retrieve available pickup locations from Paazl. [See the documentation](https://support.paazl.com/hc/en-us/articles/360008633973-REST-API-reference#/Shipping%20options/getPickupLocationsUsingPOST)", + description: "Retrieve available pickup locations from Paazl. [See the documentation](https://support.paazl.com/hc/en-us/articles/360008633973-REST-API-reference)",
📜 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 (8)
components/paazl/actions/create-order/create-order.mjs
(1 hunks)components/paazl/actions/create-shipment/create-shipment.mjs
(1 hunks)components/paazl/actions/get-pickup-locations/get-pickup-locations.mjs
(1 hunks)components/paazl/actions/get-shipment-details/get-shipment-details.mjs
(1 hunks)components/paazl/common/constants.mjs
(1 hunks)components/paazl/common/utils.mjs
(1 hunks)components/paazl/paazl.app.mjs
(1 hunks)components/paazl/package.json
(2 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2024-12-12T19:23:09.039Z
Learnt from: jcortes
PR: PipedreamHQ/pipedream#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/paazl/package.json
🧬 Code graph analysis (5)
components/paazl/common/utils.mjs (1)
components/akeneo/akeneo.app.mjs (1)
JSON
(99-110)
components/paazl/actions/get-pickup-locations/get-pickup-locations.mjs (1)
components/paazl/common/constants.mjs (2)
COUNTRY_OPTIONS
(1-32)COUNTRY_OPTIONS
(1-32)
components/paazl/actions/get-shipment-details/get-shipment-details.mjs (3)
components/paazl/actions/create-order/create-order.mjs (1)
response
(155-190)components/paazl/actions/create-shipment/create-shipment.mjs (1)
response
(55-64)components/paazl/actions/get-pickup-locations/get-pickup-locations.mjs (1)
response
(76-90)
components/paazl/actions/create-order/create-order.mjs (2)
components/paazl/common/constants.mjs (2)
COUNTRY_OPTIONS
(1-32)COUNTRY_OPTIONS
(1-32)components/paazl/common/utils.mjs (2)
parseObject
(1-24)parseObject
(1-24)
components/paazl/actions/create-shipment/create-shipment.mjs (1)
components/paazl/common/utils.mjs (2)
parseObject
(1-24)parseObject
(1-24)
⏰ 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: Lint Code Base
- GitHub Check: Publish TypeScript components
🔇 Additional comments (3)
components/paazl/package.json (2)
3-3
: Version bump looks fine.
No concerns with 0.1.0 for the package.
15-17
: Confirm export of ConfigurationError
No occurrences ofConfigurationError
were found incomponents/paazl
. Manually verify that@pipedream/platform@^3.1.0
exportsConfigurationError
as required by your actions.components/paazl/paazl.app.mjs (1)
16-27
: Verify correct field for shipmentId options in paazl.app.mjs
In components/paazl/paazl.app.mjs theshipmentId
prop’soptions
method returnstrackingNumber
, but thegetOrderShipmentDetails
endpoint uses ashipmentId
path parameter. Confirm whethertrackingNumber
is in fact the identifier expected by that endpoint or if you should be mapping to the shipment’s numeric or UUIDid
(or another field) instead.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
- Changed consigneeCompanyName type from "object" to "string" in create-order action. - Added a configuration error check in create-shipment action to ensure 'quantity' and 'parcels' parameters are mutually exclusive.
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.
LGTM!
this is duplicated with #18255 |
Resolves #18051
Summary by CodeRabbit
New Features
Improvements
Chores