-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Adding SDK examples to components API docs #15574
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
Adding SDK examples to components API docs #15574
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
Warning Rate limit exceeded@dannyroosevelt has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 11 minutes and 40 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 (1)
WalkthroughThe pull request removes an unused import from the API proxy documentation file and significantly updates the components documentation. The components file now includes a new "Authenticate to the Pipedream API" section with code examples for both JavaScript and cURL, tabbed examples for various API interactions, and standardized identifiers in the example payloads. Changes
Sequence Diagram(s)sequenceDiagram
participant U as User
participant C as Client (SDK/cURL)
participant API as Pipedream Connect API
U->>C: Initialize authentication
C->>API: Request access token (with provided credentials)
API-->>C: Return access token (e.g., abc-123, apn_kVh9AoD)
U->>C: Make authenticated API request
C->>API: Send API request with token
API-->>C: Return API response
Suggested labels
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
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: 0
🧹 Nitpick comments (3)
docs-v2/pages/connect/components.mdx (3)
52-59: Add explanatory comments for placeholder values.The SDK initialization example would benefit from comments explaining where users can find or obtain the placeholder values (
{oauth_client_id},{oauth_client_secret},{your_project_id}).const pd = createBackendClient({ environment: "development | production", credentials: { + // Find your OAuth client ID in your Pipedream dashboard under Settings > OAuth Apps clientId: "{oauth_client_id}", + // Find your OAuth client secret in your Pipedream dashboard under Settings > OAuth Apps clientSecret: "{oauth_client_secret}", }, + // Find your project ID in your Pipedream dashboard under Settings > Projects projectId: "{your_project_id}" });
83-84: Simplify the introductory text.To improve readability, consider simplifying the text.
-In order to find the right trigger or action to configure and run, you first need to find the app. In this example, we'll search for `gitlab`. +To find the right trigger or action to configure and run, first find the app. In this example, we'll search for `gitlab`.
681-682: Simplify the deployment explanation.To improve readability, consider simplifying the text.
-Because sources are exercised by events that happen on a third-party service, their semantics are different from actions. Once a source is configured, it must be deployed in order to start listening for events. +Because sources are exercised by events that happen on a third-party service, their semantics are different from actions. Once configured, a source must be deployed to start listening for events.🧰 Tools
🪛 LanguageTool
[style] ~681-~681: Consider a shorter alternative to avoid wordiness.
Context: ...urce is configured, it must be deployed in order to start listening for events. When deploy...(IN_ORDER_TO_PREMIUM)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (2)
docs-v2/pages/connect/api-proxy.mdx(0 hunks)docs-v2/pages/connect/components.mdx(11 hunks)
💤 Files with no reviewable changes (1)
- docs-v2/pages/connect/api-proxy.mdx
🧰 Additional context used
🪛 LanguageTool
docs-v2/pages/connect/components.mdx
[style] ~82-~82: Consider a shorter alternative to avoid wordiness.
Context: ...out> ### Find the app you want to use In order to find the right trigger or action to con...
(IN_ORDER_TO_PREMIUM)
[style] ~681-~681: Consider a shorter alternative to avoid wordiness.
Context: ...urce is configured, it must be deployed in order to start listening for events. When deploy...
(IN_ORDER_TO_PREMIUM)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: pnpm publish
- GitHub Check: Lint Code Base
- GitHub Check: validate-links
🔇 Additional comments (3)
docs-v2/pages/connect/components.mdx (3)
135-153: LGTM! Clear examples with both SDK and REST API options.The tabbed examples make it easy for users to choose their preferred implementation method.
230-248: LGTM! Comprehensive documentation of component structure.The examples clearly demonstrate how to retrieve and interpret a component's definition.
331-340: LGTM! Consistent use of identifiers across examples.The standardized identifiers (
abc-123for external user ID andapn_kVh9AoDfor authProvisionId) make the documentation easier to follow.
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: 0
🧹 Nitpick comments (2)
docs-v2/pages/connect/components.mdx (2)
679-684: Remove redundant text in the source deployment explanation.The text contains a redundant statement about source deployment:
-Because sources are exercised by events that happen on a third-party service, -their semantics are different from actions. Once configured, a source must be -deployed to start listening for events. Once a source is configured, it must -be deployed in order to start listening for events. When deploying a source, you -can define either a webhook URL or a Pipedream workflow ID to consume those events. +Because sources are exercised by events that happen on a third-party service, +their semantics are different from actions. Once a source is configured, it must +be deployed to start listening for events. When deploying a source, you +can define either a webhook URL or a Pipedream workflow ID to consume those events.🧰 Tools
🪛 LanguageTool
[style] ~682-~682: Consider a shorter alternative to avoid wordiness.
Context: ...urce is configured, it must be deployed in order to start listening for events. When deploy...(IN_ORDER_TO_PREMIUM)
638-675: Consider adding error handling examples.While the success response is well documented, it would be helpful to include examples of error responses and how to handle them, particularly for common scenarios like:
- Invalid authentication
- Rate limiting
- Component execution failures
🧰 Tools
🪛 LanguageTool
[uncategorized] ~641-~641: Loose punctuation mark.
Context: ...ning the following fields: 1.exports: all the named exports produced by the a...(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~642-~642: The official spelling of this programming framework is “Node.js”.
Context: ...when calling$.exportin a Node.js component. 2.os: a lis...(NODE_JS)
[uncategorized] ~643-~643: Loose punctuation mark.
Context: .../nodejs#using-export) component. 2.os: a list of observations produced by the ...(UNLIKELY_OPENING_PUNCTUATION)
[style] ~643-~643: In American English, abbreviations like “etc.” require a period.
Context: ...duced by the action (e.g. logs, errors, etc). 3.ret: the return value of the act...(ETC_PERIOD)
[uncategorized] ~644-~644: Loose punctuation mark.
Context: ...ction (e.g. logs, errors, etc). 3.ret: the return value of the action, if any....(UNLIKELY_OPENING_PUNCTUATION)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
docs-v2/pages/connect/components.mdx(11 hunks)
🧰 Additional context used
🪛 LanguageTool
docs-v2/pages/connect/components.mdx
[style] ~682-~682: Consider a shorter alternative to avoid wordiness.
Context: ...urce is configured, it must be deployed in order to start listening for events. When deploy...
(IN_ORDER_TO_PREMIUM)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: validate-links
- GitHub Check: Lint Code Base
🔇 Additional comments (3)
docs-v2/pages/connect/components.mdx (3)
41-80: Great addition of the authentication section!The new authentication section provides clear setup instructions for both SDK and REST API usage, with well-structured examples and a helpful callout about subsequent examples.
145-151: Fix the cURL endpoint in the component listing example.The cURL endpoint for listing components includes a placeholder
{project_id}but doesn't show how to obtain or use this value. Consider adding a note about where to find the project ID or reference the relevant documentation section.
1-814: Excellent documentation improvements!The changes significantly enhance the documentation by:
- Adding clear authentication instructions
- Providing consistent tabbed examples for both SDK and REST API
- Standardizing identifiers across examples
- Improving overall organization and readability
🧰 Tools
🪛 LanguageTool
[uncategorized] ~133-~133: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...t app. We'll list the actions for Gitlab and we'll pass thename_sluggitlabas ...(COMMA_COMPOUND_SENTENCE)
[uncategorized] ~314-~314: Loose punctuation mark.
Context: ...following fields: 1.external_user_id: the ID of your user on your end 2.id...(UNLIKELY_OPENING_PUNCTUATION)
[grammar] ~430-~430: Did you mean “they” or “then”?
Context: ...prop you currently want to configure as theprop_name2. Include the names and va...(THE_THEY)
[uncategorized] ~431-~431: Although a hyphen is possible, it is not necessary in a compound modifier in which the first word is an adverb that ends in ‘ly’.
Context: ... 2. Include the names and values of all previously-configured props in theconfigured_propsobje...(HYPHENATED_LY_ADVERB_ADJECTIVE)
[style] ~457-~457: Consider replacing this phrase with the adverb “differently” to avoid wordiness.
Context: ...-props), and they need to be configured in a different way. Props that are dynamic will have a `re...(IN_A_X_MANNER)
[style] ~458-~458: You can shorten this phrase to improve clarity and avoid wordiness.
Context: ...ed to be configured in a different way. Props that are dynamic will have areloadPropsattribute set...(NNS_THAT_ARE_JJ)
[style] ~577-~577: Consider using “except” or “except for”
Context: ...to the one used for configuring a prop, with the exception of theprop_nameattribute (because we'r...(WITH_THE_EXCEPTION_OF)
[uncategorized] ~641-~641: Loose punctuation mark.
Context: ...ning the following fields: 1.exports: all the named exports produced by the a...(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~642-~642: The official spelling of this programming framework is “Node.js”.
Context: ...when calling$.exportin a Node.js component. 2.os: a lis...(NODE_JS)
[uncategorized] ~643-~643: Loose punctuation mark.
Context: .../nodejs#using-export) component. 2.os: a list of observations produced by the ...(UNLIKELY_OPENING_PUNCTUATION)
[style] ~643-~643: In American English, abbreviations like “etc.” require a period.
Context: ...duced by the action (e.g. logs, errors, etc). 3.ret: the return value of the act...(ETC_PERIOD)
[uncategorized] ~644-~644: Loose punctuation mark.
Context: ...ction (e.g. logs, errors, etc). 3.ret: the return value of the action, if any....(UNLIKELY_OPENING_PUNCTUATION)
[style] ~682-~682: Consider a shorter alternative to avoid wordiness.
Context: ...urce is configured, it must be deployed in order to start listening for events. When deploy...(IN_ORDER_TO_PREMIUM)
WHY
Summary by CodeRabbit