Skip to content

[Docs] Add Connect API endpoint for updating a deployed trigger #16493

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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

js07
Copy link
Contributor

@js07 js07 commented Apr 30, 2025

WHY

The API now supports updating a deployed trigger's configured props.

Summary by CodeRabbit

  • Documentation
    • Added detailed documentation for a new API endpoint to update deployed triggers for specific users, including usage examples in TypeScript, JavaScript, and cURL.

Copy link
Contributor

coderabbitai bot commented Apr 30, 2025

Warning

Rate limit exceeded

@js07 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 5 minutes and 3 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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.

📥 Commits

Reviewing files that changed from the base of the PR and between 2f40354 and ddab4fe.

📒 Files selected for processing (1)
  • docs-v2/pages/connect/api.mdx (1 hunks)

"""

Walkthrough

A new section has been added to the API documentation describing an endpoint for updating a deployed trigger for a specific user. The endpoint uses the HTTP PUT method at /deployed-triggers/{deployed_trigger_id} and supports updating the trigger's active status, configuration properties, and name. The documentation provides detailed usage examples in TypeScript, JavaScript, and cURL, including OAuth token handling and request formatting. This addition complements the existing endpoints for managing deployed triggers.

Changes

File(s) Change Summary
docs-v2/pages/connect/api.mdx Added documentation for the PUT /deployed-triggers/{deployed_trigger_id} endpoint, including parameters, request/response details, and multi-language usage examples.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant API Server

    Client->>API Server: PUT /deployed-triggers/{deployed_trigger_id} (with external_user_id, body)
    API Server-->>Client: Returns updated deployed trigger details
Loading

Suggested reviewers

  • adolfo-pd

Poem

In the warren of docs, a new path appears,
For updating triggers, let's give three cheers!
With PUT and a payload, you set what you need,
Active or named, your triggers take heed.
Examples abound, from TypeScript to curl—
Now updating is easy for every dev squirrel!
🐇✨
"""


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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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 generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @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.

Copy link

vercel bot commented Apr 30, 2025

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

Name Status Preview Comments Updated (UTC)
docs-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 30, 2025 8:34pm
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
pipedream-docs ⬜️ Ignored (Inspect) Apr 30, 2025 8:34pm
pipedream-docs-redirect-do-not-edit ⬜️ Ignored (Inspect) Apr 30, 2025 8:34pm

@js07 js07 added docs component ee Component execution environment and removed component ee Component execution environment labels Apr 30, 2025
@js07 js07 marked this pull request as ready for review April 30, 2025 19:30
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 (5)
docs-v2/pages/connect/api.mdx (5)

2712-2719: Ensure consistent endpoint path formatting
The new PUT /deployed-triggers/{deployed_trigger_id} text block is missing the trailing slash present in other endpoint definitions (e.g., DELETE /deployed-triggers/{deployed_trigger_id}/). Add a slash to maintain consistency across the docs.


2733-2745: Indicate required body fields
All three body parameters (active, configured_props, and name) are optional, but at least one must be provided for the update to have any effect. Consider adding a note to clarify that the request body must contain at least one of these fields.


2751-2792: Use type imports for type-only entities
In the TypeScript snippet, GetTriggerResponse and V1DeployedComponent are imported as runtime bindings. Switching them to type imports will prevent unnecessary code from being bundled:

-import {
-  createBackendClient,
-  GetTriggerResponse,
-  V1DeployedComponent,
-  type BackendClient,
-  type BackendClientOpts,
-  type UpdateTriggerOpts,
-} from "@pipedream/sdk/server";
+import { createBackendClient } from "@pipedream/sdk/server";
+import type {
+  GetTriggerResponse,
+  V1DeployedComponent,
+  BackendClient,
+  BackendClientOpts,
+  UpdateTriggerOpts,
+} from "@pipedream/sdk/server";

2795-2827: Clarify JS example variable naming
In the JavaScript snippet, requestOpts is used without explicit context. Renaming it to updateOpts (or similar) will make the intent clearer and mirror the TS example:

-// Update the deployed trigger for the specified user
-const requestOpts = {
+// Prepare options to update the deployed trigger
+const updateOpts = {
   id: "dc_gzumK2e",
   externalUserId: "jverce",
   active: true,
   name: "My Updated Trigger",
   configuredProps: {
     gitlab: {
       authProvisionId: "apn_kVh9AoD",
     },
     projectId: 45672542,
   },
-};
-const { data: deployedTrigger } = await pd.updateTrigger(requestOpts);
+};
+const { data: deployedTrigger } = await pd.updateTrigger(updateOpts);

2830-2853: Synchronize endpoint path in cURL and description
The cURL example calls

PUT https://api.pipedream.com/v1/connect/{project_id}/deployed-triggers/{deployed_trigger_id}/

but the earlier description block omits the trailing slash. Align both examples to avoid confusion.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 49f4eb1 and 6d5e179.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • docs-v2/pages/connect/api.mdx (1 hunks)
🔇 Additional comments (1)
docs-v2/pages/connect/api.mdx (1)

2747-2754: Examples section looks good
The ##### Examples heading and <Tabs> wrapper are consistent with the rest of the API reference. No changes needed here.

add example response for update trigger
revert newline removal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants