-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Danny/connect api docs patch2 #14929
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WalkthroughThis pull request enhances the documentation for the Pipedream Connect API by introducing a new optional query parameter, Changes
Possibly related PRs
Suggested reviewers
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
🧹 Outside diff range and nitpick comments (2)
docs-v2/pages/connect/api.mdx (2)
336-343
: Add a security warning about credential handling.While the code examples are correct, it would be beneficial to add a more prominent security warning about credential handling, perhaps as a callout block before the examples.
+ <Callout type="warning"> + **Security Warning**: When retrieving account credentials, ensure they are: + - Never logged or stored in plaintext + - Never exposed in client-side code or responses + - Stored securely using appropriate encryption + - Accessed only when necessary + </Callout>Also applies to: 359-366, 382-392
575-577
: Consider adding TypeScript type annotations.While the examples are correct, adding TypeScript type annotations for the parameters would improve developer experience.
-const account = await pd.getAccountById(accountId, { +const account = await pd.getAccountById(accountId, { + app?: string; + external_user_id?: string; + include_credentials?: boolean;Also applies to: 600-602, 622-631
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
⛔ 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
(8 hunks)
🔇 Additional comments (2)
docs-v2/pages/connect/api.mdx (2)
308-316
: LGTM! Clear and secure documentation of the new parameter.
The documentation for the include_credentials
parameter is well-structured and includes an important security callout about OAuth client requirements.
479-524
: LGTM! Comprehensive response example with credentials.
The example response with credentials is well-structured and includes all necessary fields. The sensitive fields are properly masked with "xxx" and "xxxxxxxx".
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
🧹 Outside diff range and nitpick comments (2)
docs-v2/pages/connect/api.mdx (2)
Line range hint
401-528
: Example responses are comprehensive but could use formatting improvements.The example responses effectively show the difference between responses with and without credentials. However, consider adding line breaks between major sections of the JSON response for better readability.
{ "page_info": { "total_count": 1, "count": 1, "start_cursor": "YXBuX0JtaEJKSm0", "end_cursor": "YXBuX1YxaE1lTE0", }, + "data": { "accounts":[ { "id": "apn_MGhvgnX",
694-694
: Consider removing or obfuscating the user ID in example.The example response includes a specific user ID "gcostanza" which might be better replaced with a generic placeholder like "user123".
- "user_id": "gcostanza", + "user_id": "user123",
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
docs-v2/pages/connect/api.mdx
(10 hunks)
🔇 Additional comments (3)
docs-v2/pages/connect/api.mdx (3)
308-320
: Documentation for include_credentials
parameter is well structured.
The documentation clearly explains the parameter's purpose and includes appropriate security warnings. The additional info callout about OAuth client requirements is particularly helpful.
340-347
: Examples are consistent across all language implementations.
The TypeScript, Node.js, and cURL examples consistently demonstrate the usage of the new include_credentials
parameter. The comments about not returning credentials to the client are appropriately emphasized across all examples.
Also applies to: 363-370, 386-396
583-585
: Verify consistency of optional parameters across endpoints.
The documentation shows app
and external_user_id
as optional parameters for the single account endpoint, but these aren't listed in the parameters section. This could be confusing for API users.
Also applies to: 608-610, 630-639
✅ Verification successful
Let me analyze the implementation details to verify the parameter consistency.
Let me analyze the complete API documentation to verify the parameter consistency.
After analyzing the API documentation, I can now provide a definitive response about the parameter consistency.
Parameters are correctly documented but in different sections
The app
and external_user_id
parameters shown in the code example are indeed documented in the API reference:
app
is documented under "Query parameters" for the "List all accounts" endpointexternal_user_id
is documented under "Query parameters" for the "List all accounts" endpointinclude_credentials
is documented under "Query parameters" for both "List all accounts" and "Retrieve account details by ID" endpoints
All parameters are properly supported in the implementation and consistently documented across the API reference.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check if these parameters are actually supported in the implementation
# Search for parameter handling in the codebase
rg -A 5 "GET.*\/accounts\/\{account_id\}"
Length of output: 146
Script:
#!/bin/bash
# Search for routes or handlers related to accounts
rg -l "accounts.*account_id"
# Search for parameter documentation in API docs
rg -A 10 "parameters.*account" "docs-v2"
# Search for account-related code patterns
ast-grep --pattern 'app: $_'
Length of output: 367
Script:
#!/bin/bash
# Let's examine the specific API documentation content
cat "docs-v2/pages/connect/api.mdx"
# Also check the REST API documentation for parameter consistency
cat "docs-v2/pages/rest-api/index.mdx"
Length of output: 86496
WHY
Summary by CodeRabbit
New Features
include_credentials
for account-related API endpoints.Documentation