Skip to content

New Components - quriiri #16064

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 3 commits into from
Apr 1, 2025
Merged

New Components - quriiri #16064

merged 3 commits into from
Apr 1, 2025

Conversation

luancazarine
Copy link
Collaborator

@luancazarine luancazarine commented Mar 27, 2025

Resolves #15041.

Summary by CodeRabbit

  • New Features

    • Introduced SMS messaging support with customizable configurations.
    • Added new options for sender types and data representation.
  • Refactor

    • Enhanced API communication with improved request handling and error validation.
  • Chores

    • Updated version information and dependency management for improved platform stability.

Copy link

vercel bot commented Mar 27, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Ignored (Inspect) Visit Preview Mar 31, 2025 2:36pm
pipedream-docs ⬜️ Ignored (Inspect) Mar 31, 2025 2:36pm
pipedream-docs-redirect-do-not-edit ⬜️ Ignored (Inspect) Mar 31, 2025 2:36pm

@luancazarine luancazarine added the ai-assisted Content generated by AI, with human refinement and modification label Mar 27, 2025
Copy link
Contributor

coderabbitai bot commented Mar 27, 2025

Walkthrough

A new SMS sending action has been introduced to integrate with the Quriiri API. The new module (quriiri-send-message) validates that either a text or data payload is provided before calling the enhanced sendSms method. The Quriiri app component has been refactored with new helper methods for constructing API requests, and obsolete functionality has been removed. Additionally, a constants module was added to define sender and delivery receipt type options, and the package configuration was updated for versioning and dependency management.

Changes

File(s) Change Summary
components/quriiri/{actions/send-message/send-message.mjs, common/constants.mjs} Added a new SMS sending action module with detailed configuration properties and a constants module exporting sender type and DR type options.
components/quriiri/package.json Updated version from 0.0.1 to 0.1.0 and added a dependency on @pipedream/platform (^3.0.3).
components/quriiri/quriiri.app.mjs Removed the authKeys method; added _baseUrl, _headers, _makeRequest, and a new public sendSms method to handle structured API calls.

Sequence Diagram(s)

sequenceDiagram
    participant A as quriiri-send-message Action
    participant App as Quriiri App
    participant API as Quriiri API
    A->>A: Validate input (ensure 'text' or 'data')
    A->>App: Call sendSms(options)
    App->>App: Build request (_baseUrl, _headers, _makeRequest)
    App->>API: POST /sendsms with SMS data
    API-->>App: Return API response
    App-->>A: Produce summary message
Loading

Assessment against linked issues

Objective Addressed Explanation
Implement quriiri-send-message action with required sender, destination, and text (#15041)
Implement sendSms method to handle API requests for SMS delivery (#15041)

Possibly related PRs

Suggested labels

action

Suggested reviewers

  • michelle0927

Poem

I'm hopping through the lines of code,
Sending SMS with a cheerful node.
My whiskers twitch with every new method call,
Validating inputs, standing tall.
With API magic, my hops are light,
CodeRabbit cheers—everything's just right!
🐇✨

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

components/quriiri/actions/send-message/send-message.mjs

Oops! Something went wrong! :(

ESLint: 8.57.1

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs
at packageResolve (node:internal/modules/esm/resolve:839:9)
at moduleResolve (node:internal/modules/esm/resolve:908:18)
at defaultResolve (node:internal/modules/esm/resolve:1038:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:557:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:525:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:246:38)
at ModuleJob._link (node:internal/modules/esm/module_job:126:49)

components/quriiri/common/constants.mjs

Oops! Something went wrong! :(

ESLint: 8.57.1

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs
at packageResolve (node:internal/modules/esm/resolve:839:9)
at moduleResolve (node:internal/modules/esm/resolve:908:18)
at defaultResolve (node:internal/modules/esm/resolve:1038:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:557:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:525:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:246:38)
at ModuleJob._link (node:internal/modules/esm/module_job:126:49)

components/quriiri/quriiri.app.mjs

Oops! Something went wrong! :(

ESLint: 8.57.1

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs
at packageResolve (node:internal/modules/esm/resolve:839:9)
at moduleResolve (node:internal/modules/esm/resolve:908:18)
at defaultResolve (node:internal/modules/esm/resolve:1038:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:557:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:525:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:246:38)
at ModuleJob._link (node:internal/modules/esm/module_job:126:49)

✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@luancazarine luancazarine marked this pull request as ready for review March 31, 2025 14:52
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: 0

🧹 Nitpick comments (1)
components/quriiri/actions/send-message/send-message.mjs (1)

99-101: Consider clarifying the error message for improved user guidance

While the validation correctly checks that either 'text' or 'data' is provided, the error message could be more informative by mentioning that both can be provided but 'text' will take precedence as mentioned in the prop description (line 43).

-      throw new ConfigurationError("You must provide either 'Data' or 'Text' input.");
+      throw new ConfigurationError("You must provide either 'Data' or 'Text' input. If both are provided, 'Text' will take precedence.");
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1e4db9a and 2f17efc.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (4)
  • components/quriiri/actions/send-message/send-message.mjs (1 hunks)
  • components/quriiri/common/constants.mjs (1 hunks)
  • components/quriiri/package.json (2 hunks)
  • components/quriiri/quriiri.app.mjs (1 hunks)
🔇 Additional comments (12)
components/quriiri/common/constants.mjs (2)

1-14: Well-defined sender type options with appropriate values

The SENDER_TYPE_OPTIONS constant provides a clear set of options for the sender types with descriptive labels and corresponding values, which will be useful for the UI dropdown and API interaction.


16-20: Appropriate delivery receipt type options

The DR_TYPE_OPTIONS constant properly defines the standard formats for delivery receipts (JSON, POST, GET) that will be used by the SMS sending functionality.

components/quriiri/package.json (2)

3-3: Appropriate version bump for new functionality

The version increase from 0.0.1 to 0.1.0 appropriately reflects the addition of new components and functionality per semantic versioning guidelines.


14-16: Correctly added platform dependency

The dependency on @pipedream/platform is correctly specified, which is needed for the ConfigurationError import and other platform functionalities used in the new action.

components/quriiri/actions/send-message/send-message.mjs (4)

8-13: Well-defined action with clear documentation

The action is properly configured with a descriptive name, appropriate key, and helpful description that includes a link to the API documentation.


14-97: Comprehensive props configuration with detailed descriptions

The props are well-defined with appropriate types, descriptive labels, and thorough descriptions that help users understand each parameter's purpose and constraints. The use of imported constants for option values ensures consistency.


102-119: Clean API request construction

The API request is properly constructed, mapping all the prop values to their corresponding API parameters with the correct casing.


120-122: Effective response handling

The code appropriately exports a summary message and returns the full API response, providing a good user experience while preserving all data for potential downstream steps.

components/quriiri/quriiri.app.mjs (4)

1-1: Appropriate use of platform dependencies

Correctly imports axios from the Pipedream platform, which aligns with the dependency added in the package.json.


7-14: Well-structured helper methods for API URL and authentication

The _baseUrl and _headers methods follow good practices by encapsulating the logic for constructing the API URL and authorization headers, making the code more maintainable.


15-23: Robust request handling with flexible parameters

The _makeRequest method provides a clean abstraction for making HTTP requests, with sensible defaults and the ability to override parameters as needed. This follows the DRY principle by centralizing request logic.


24-29: Clean implementation of SMS sending functionality

The sendSms method correctly uses the _makeRequest helper to send a POST request to the /sendsms endpoint, passing through any additional options. This provides a simple interface for the action component to use.

Copy link
Collaborator

@michelle0927 michelle0927 left a comment

Choose a reason for hiding this comment

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

LGTM!

@luancazarine luancazarine merged commit 349720e into master Apr 1, 2025
11 checks passed
@luancazarine luancazarine deleted the issue-15041 branch April 1, 2025 13:01
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
ai-assisted Content generated by AI, with human refinement and modification
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Components] quriiri
2 participants