Skip to content

feat: wrap 30 new RPCs from v0.1.121.0#155

Open
ravibits wants to merge 7 commits into
mainfrom
proto-wrappers/v0.1.121.0-full
Open

feat: wrap 30 new RPCs from v0.1.121.0#155
ravibits wants to merge 7 commits into
mainfrom
proto-wrappers/v0.1.121.0-full

Conversation

@ravibits
Copy link
Copy Markdown
Contributor

@ravibits ravibits commented May 11, 2026

Summary

Wraps 30 new gRPC RPCs from proto tag v0.1.121.0 across three services. All new methods follow existing wrapper conventions: flat named params, full docstrings, grpc_exec error handling, explicit pagination params where applicable.

Methods Added

Service RPC Wrapper Method File
OrganizationService GetOrganizationByExternalId get_organization_by_external_id (updated to dedicated stub) scalekit/organization.py
OrganizationService SearchOrganization search_organizations scalekit/organization.py
OrganizationService DeletePortalLink delete_portal_link scalekit/organization.py
OrganizationService DeletePortalLinkByID delete_portal_link_by_id scalekit/organization.py
OrganizationService GetPortalLinks get_portal_links scalekit/organization.py
OrganizationService CreateOrganizationSessionSettings create_organization_session_settings scalekit/organization.py
OrganizationService GetOrganizationSessionSettings get_organization_session_settings scalekit/organization.py
OrganizationService UpdateOrganizationSessionSettings update_organization_session_settings scalekit/organization.py
OrganizationService DeleteOrganizationSessionSettings delete_organization_session_settings scalekit/organization.py
OrganizationService GetOrganizationUserManagementSetting get_organization_user_management_setting scalekit/organization.py
ConnectionService CreateEnvironmentConnection create_environment_connection scalekit/connection.py
ConnectionService AssignDomainsToConnection assign_domains_to_connection scalekit/connection.py
ConnectionService GetEnvironmentConnection get_environment_connection scalekit/connection.py
ConnectionService ListOrganizationConnections list_organization_connections scalekit/connection.py
ConnectionService SearchOrganizationConnections search_organization_connections scalekit/connection.py
ConnectionService UpdateEnvironmentConnection update_environment_connection scalekit/connection.py
ConnectionService UpdateConnection update_connection scalekit/connection.py
ConnectionService DeleteEnvironmentConnection delete_environment_connection scalekit/connection.py
ConnectionService EnableEnvironmentConnection enable_environment_connection scalekit/connection.py
ConnectionService DisableEnvironmentConnection disable_environment_connection scalekit/connection.py
ConnectionService GetConnectionTestResult get_connection_test_result scalekit/connection.py
ConnectionService ListAppConnections list_app_connections scalekit/connection.py
ConnectionService GetConnectionContext get_connection_context scalekit/connection.py
ConnectionService UpdateConnectionContext update_connection_context scalekit/connection.py
UserService GetCurrentUser get_current_user scalekit/users.py
UserService GetSupportHash get_support_hash scalekit/users.py
UserService SearchUsers search_users scalekit/users.py
UserService SearchOrganizationUsers search_organization_users scalekit/users.py
UserService AssignUserRoles assign_user_roles scalekit/users.py
UserService RemoveUserRole remove_user_role scalekit/users.py

Test plan

  • Test stubs added to tests/test_organization.py, tests/test_connection.py, tests/test_users.py
  • All new methods follow existing grpc_exec error handling pattern
  • No existing method signatures changed
  • All files pass python3 -m py_compile syntax check

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • New Features

    • Added comprehensive connection management including creation, domain assignment, enable/disable, and deletion.
    • Added organization connection search and listing with filtering.
    • Added organization portal link and session settings management.
    • Added user search functionality (global and organization-scoped) with role assignment and removal.
    • Added endpoints to retrieve current user and support information.
  • Tests

    • Expanded test coverage for new connection, organization, and user management features.

Review Change Stack

ravibits and others added 4 commits May 11, 2026 14:53
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Wraps 10 new OrganizationService RPCs from proto v0.1.121.0:
GetOrganizationByExternalId (now uses dedicated stub), SearchOrganization,
DeletePortalLink, DeletePortalLinkByID, GetPortalLinks,
CreateOrganizationSessionSettings, GetOrganizationSessionSettings,
UpdateOrganizationSessionSettings, DeleteOrganizationSessionSettings,
GetOrganizationUserManagementSetting.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Wraps 14 new ConnectionService RPCs from proto v0.1.121.0:
CreateEnvironmentConnection, AssignDomainsToConnection,
GetEnvironmentConnection, ListOrganizationConnections,
SearchOrganizationConnections, UpdateEnvironmentConnection,
UpdateConnection, DeleteEnvironmentConnection,
EnableEnvironmentConnection, DisableEnvironmentConnection,
GetConnectionTestResult, ListAppConnections,
GetConnectionContext, UpdateConnectionContext.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Wraps 6 new UserService RPCs from proto v0.1.121.0:
GetCurrentUser, GetSupportHash, SearchUsers,
SearchOrganizationUsers, AssignUserRoles, RemoveUserRole.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ravibits ravibits requested a review from Avinash-Kamath as a code owner May 11, 2026 13:37
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 11, 2026

Warning

Rate limit exceeded

@ravibits has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 50 minutes and 11 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ 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.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 59384467-4a7b-4921-a0f5-f80244abff99

📥 Commits

Reviewing files that changed from the base of the PR and between fc0039f and 5de23fe.

📒 Files selected for processing (3)
  • scalekit/organization.py
  • scalekit/users.py
  • tests/test_organization.py

Walkthrough

This PR adds comprehensive gRPC wrapper method coverage across the Scalekit SDK. An RPC manifest file enumerates all available service methods, followed by 13 new connection management methods (environment and organization-scoped), 10 new organization operations (search, portal links, session settings), and 6 new user/role management methods (current user, search, role assignment), each with corresponding test coverage.

Changes

API Method Expansion

Layer / File(s) Summary
RPC Manifest
.last-rpc-manifest.json
Complete enumeration of RPC definitions across 26 services (Organization, Client, Interceptor, Migration, Tools, UserAttribute, Domain, ConnectedAccount, Auth, TOTP, Passwordless, WebAuthn, Environment, Secret, Provider, Email, Roles, MCP, Workspace, Audit, Connection, Session, User, KeyManagement, Members, Directory, Events, Webhook, ApiToken) with request/response types and gRPC stub mappings.
Connection Client Imports
scalekit/connection.py
Updated typing import to include List for domain ID parameters.
Environment Connection Operations
scalekit/connection.py
Added environment-scoped connection methods: create with optional flags, get, update, delete, and enable/disable toggles.
Organization Connection Operations
scalekit/connection.py
Added organization-wide connection methods: list with pagination, search with filters, assign domains, and organization-scoped updates.
App & Context Connection Operations
scalekit/connection.py
Added test result retrieval, app-level connection listing, and connection context get/update operations.
Organization Client Protobuf Imports
scalekit/organization.py
Expanded protobuf imports for search, portal links, session settings, and user management settings operations.
External ID Lookup Fix
scalekit/organization.py
Changed get_organization_by_external_id to invoke GetOrganizationByExternalId RPC instead of GetOrganization.
Search & Portal Operations
scalekit/organization.py
Added cross-organization search and portal link management: retrieval, deletion by ID, and deletion by organization.
Session & User Management Settings
scalekit/organization.py
Added CRUD methods for organization session settings and user management settings retrieval.
User Client Imports
scalekit/users.py
Updated imports to include List, Empty from protobuf, and expanded protobuf symbols for user search and role operations.
Current User & Support Operations
scalekit/users.py
Added get_current_user and get_support_hash methods.
User Search Operations
scalekit/users.py
Added global and organization-scoped user search with query and pagination.
Role Management
scalekit/users.py
Added assign_user_roles (converts role names to protobuf) and remove_user_role.
Connection Tests
tests/test_connection.py
Added tests for list/search organization connections, get environment connection, test result retrieval, and app connection listing.
Organization Tests
tests/test_organization.py
Added tests for organization search, portal links, user management settings, and session settings lifecycle (create/get/delete).
User Tests
tests/test_users.py
Added tests for user search (global and org-scoped), role assignment/removal, and support hash retrieval.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

A rabbit hops through new paths bright,
Connections flow with gRPC's light,
Search and sessions, roles assigned,
APIs bloom, a gift well-timed,
The SDK grows, user delight! 🐰✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: wrapping 30 new RPCs from a specific proto version across multiple services.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch proto-wrappers/v0.1.121.0-full

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.

ravibits and others added 2 commits May 11, 2026 19:10
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…s them in one call

Hides the proto two-step (Create then Update) behind a single SDK method.
Developers pass settings directly to create; the wrapper handles provisioning
and configuration internally.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

@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.

🧹 Nitpick comments (2)
scalekit/users.py (1)

599-600: 💤 Low value

Consider moving Role import to module level.

The Role import is currently inside the assign_user_roles method. Moving it to the top-level imports (alongside other protobuf types from scalekit.v1.commons.commons_pb2) would be more consistent with the rest of the codebase.

♻️ Proposed refactor

At the top of the file, add:

 from scalekit.v1.users.users_pb2 import (
     AssignUserRolesRequest,
     AssignUserRolesResponse,
     ...
 )
+from scalekit.v1.commons.commons_pb2 import Role

Then in the method:

-        from scalekit.v1.commons.commons_pb2 import Role
         role_objects = [Role(name=r) for r in roles]
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scalekit/users.py` around lines 599 - 600, The Role protobuf is being
imported inside assign_user_roles; move the import to module-level with the
other protobuf imports (alongside scalekit.v1.commons.commons_pb2 imports) and
remove the local "from scalekit.v1.commons.commons_pb2 import Role" line; update
any references in assign_user_roles (e.g., role_objects = [Role(name=r) for r in
roles]) to use the now top-level Role symbol.
scalekit/connection.py (1)

503-532: 💤 Low value

Add type hint for context parameter.

The context parameter in update_connection_context lacks a type annotation, which is inconsistent with the rest of the codebase's type-hinting style.

♻️ Proposed fix
     def update_connection_context(
         self,
         connection_id: str,
         organization_id: str,
-        context,
+        context: Any,
     ):

You may need to add from typing import Any if not already present, or use a more specific protobuf message type if available.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scalekit/connection.py` around lines 503 - 532, The update_connection_context
method is missing a type annotation for the context parameter; add a type hint
(e.g., context: Any or the specific protobuf message type used by
UpdateConnectionContextRequest) to the update_connection_context signature,
import typing.Any if you choose Any, and update any docstring/type comments to
match the chosen type so the signature for update_connection_context and the
constructed UpdateConnectionContextRequest are properly typed.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@scalekit/connection.py`:
- Around line 503-532: The update_connection_context method is missing a type
annotation for the context parameter; add a type hint (e.g., context: Any or the
specific protobuf message type used by UpdateConnectionContextRequest) to the
update_connection_context signature, import typing.Any if you choose Any, and
update any docstring/type comments to match the chosen type so the signature for
update_connection_context and the constructed UpdateConnectionContextRequest are
properly typed.

In `@scalekit/users.py`:
- Around line 599-600: The Role protobuf is being imported inside
assign_user_roles; move the import to module-level with the other protobuf
imports (alongside scalekit.v1.commons.commons_pb2 imports) and remove the local
"from scalekit.v1.commons.commons_pb2 import Role" line; update any references
in assign_user_roles (e.g., role_objects = [Role(name=r) for r in roles]) to use
the now top-level Role symbol.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9411b0c4-639d-4338-bcc6-ebc49e658e6c

📥 Commits

Reviewing files that changed from the base of the PR and between 67e7171 and fc0039f.

📒 Files selected for processing (7)
  • .last-rpc-manifest.json
  • scalekit/connection.py
  • scalekit/organization.py
  • scalekit/users.py
  • tests/test_connection.py
  • tests/test_organization.py
  • tests/test_users.py

…params

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

1 participant