Skip to content

Conversation

@abdelrahman-zaki
Copy link
Contributor

Explain your changes

  • Updated README_management_client.md:
    • Use id= instead of positional user_id in examples.
    • Updated user creation example to use profile and identities structure.
  • Updated management_client_example.py:
    • Calls to get_user now use id=<user_id>.
  • Updated management/README.md:
    • Corrected get_user usage to use id=user_id.

Checklist

🛟 If you need help, consider asking for advice over in the Kinde community.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 5, 2025

Walkthrough

Updated ManagementClient user-method signatures to use id (query param) instead of user_id, adjusted create_user payload shape to a nested profile object (given_name, family_name), and updated documentation and examples to match these changes.

Changes

Cohort / File(s) Summary
Core: Management client implementation
kinde_sdk/management/management_client.py
Renamed method parameters: get_user(user_id)get_user(id), update_user(user_id, **data)update_user(id, **data), delete_user(user_id)delete_user(id).
Docs: Management client usage and payloads
README_management_client.md, kinde_sdk/management/README.md
Updated usage examples and public API docs to call get_user(id=...), update_user(id, ...), delete_user(id). Clarified single-user endpoints use query param id. Adjusted create_user example payload to use profile with given_name / family_name. Referenced management_client.py.
Examples: Method call update
examples/management_client_example.py
Changed Test 11 to call get_user(id=user_id) (keyword argument) in line with updated signature.

Sequence Diagram(s)

sequenceDiagram
    participant App as Example / App
    participant SDK as ManagementClient
    participant API as Management API

    Note left of App `#DDEBF7`: Example calls SDK
    App->>SDK: get_user(id= "user_id")
    Note right of SDK `#F6F8FA`: SDK maps to GET /user?id=...
    SDK->>API: GET /user?id=user_id
    API-->>SDK: 200 OK + user JSON
    SDK-->>App: user JSON

    rect rgba(220,235,255,0.6)
      Note over App,API: Create user flow uses nested profile payload
      App->>SDK: create_user(profile={given_name, family_name}, email=...)
      SDK->>API: POST /users\nbody: { profile: { given_name, family_name }, ... }
      API-->>SDK: 201 Created
      SDK-->>App: created user
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Pay attention to: kinde_sdk/management/management_client.py method signatures and any call sites; create_user input validation/serialization to ensure profile nesting; update consistency across docs/examples.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: updating documentation and examples for corrected users endpoints with new parameter naming.
Description check ✅ Passed The description directly relates to the changeset, providing a bulleted list of specific file updates and documenting the parameter naming changes from positional user_id to id= keyword argument.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4276ab9 and 481caf2.

📒 Files selected for processing (1)
  • kinde_sdk/management/README.md (3 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-08-21T04:46:50.368Z
Learnt from: KomanRudden
Repo: kinde-oss/kinde-python-sdk PR: 101
File: kinde_sdk/auth/permissions.py:6-7
Timestamp: 2025-08-21T04:46:50.368Z
Learning: The kinde_sdk has both frontend and management API modules. The frontend permissions_api.py exists at kinde_sdk/frontend/api/permissions_api.py and contains PermissionsApi class. Using the management API instead of the frontend API for user permissions would be incorrect.

Applied to files:

  • kinde_sdk/management/README.md
🪛 markdownlint-cli2 (0.18.1)
kinde_sdk/management/README.md

67-67: Code block style
Expected: fenced; Actual: indented

(MD046, code-block-style)

🔇 Additional comments (2)
kinde_sdk/management/README.md (2)

146-146: LGTM!

The usage example is correctly updated to reflect the query-parameter style with id=user_id.


10-10: LGTM!

Module reference correctly updated from client.py to management_client.py.

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


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

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Sep 5, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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: 1

🧹 Nitpick comments (2)
README_management_client.md (2)

89-93: Standardize method list parameter formatting

For consistency with other entries (e.g., get_role(role_id)), prefer get_user(id), update_user(id, **data), delete_user(id) rather than id=user_id in the methods list.

-- `get_user(id=user_id)` - Get a specific user
+- `get_user(id)` - Get a specific user
-- `update_user(id=user_id, **data)` - Update a user
+- `update_user(id, **data)` - Update a user
-- `delete_user(id=user_id)` - Delete a user
+- `delete_user(id)` - Delete a user

147-150: Create user payload update looks good; add a brief migration note

The profile.given_name/family_name structure is clear. Consider a small “Migration” callout showing the old vs new payload to help users adjust quickly.

📜 Review details

Configuration used: Path: .coderabbit.yaml

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.

📥 Commits

Reviewing files that changed from the base of the PR and between a0024de and 4276ab9.

📒 Files selected for processing (3)
  • README_management_client.md (3 hunks)
  • examples/management_client_example.py (1 hunks)
  • kinde_sdk/management/README.md (3 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-08-21T04:46:50.368Z
Learnt from: KomanRudden
PR: kinde-oss/kinde-python-sdk#101
File: kinde_sdk/auth/permissions.py:6-7
Timestamp: 2025-08-21T04:46:50.368Z
Learning: The kinde_sdk has both frontend and management API modules. The frontend permissions_api.py exists at kinde_sdk/frontend/api/permissions_api.py and contains PermissionsApi class. Using the management API instead of the frontend API for user permissions would be incorrect.

Applied to files:

  • kinde_sdk/management/README.md
🔇 Additional comments (4)
examples/management_client_example.py (1)

183-183: Switch to keyword id looks correct

Using client.get_user(id=user_id) aligns with the updated single-user endpoints. LGTM.

kinde_sdk/management/README.md (2)

10-10: Filename reference is accurate

management_client.py matches the module path used elsewhere. LGTM.


145-145: Error handling example aligns with new signature

management.get_user(id=user_id) is consistent with the API note above. LGTM.

README_management_client.md (1)

56-56: Quick Start uses the new id keyword correctly

get_user(id="user_id") reflects the updated API. LGTM.

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@BrandtKruger BrandtKruger requested a review from a team as a code owner November 26, 2025 17:07
@BrandtKruger BrandtKruger merged commit 7deb113 into kinde-oss:main Nov 26, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants