scalekit-sdk-python 2.3.2__tar.gz → 2.3.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/PKG-INFO +2 -1
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/client.py +8 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/common/scalekit.py +8 -8
- scalekit_sdk_python-2.3.3/scalekit/connect/__init__.py +6 -0
- scalekit_sdk_python-2.3.3/scalekit/connect/connect.py +361 -0
- scalekit_sdk_python-2.3.3/scalekit/connect/models/requests/mcp_request.py +17 -0
- scalekit_sdk_python-2.3.3/scalekit/connect/models/requests/tool_request.py +76 -0
- scalekit_sdk_python-2.3.3/scalekit/connect/models/responses/create_mcp_response.py +59 -0
- scalekit_sdk_python-2.3.3/scalekit/connect/models/responses/delete_connected_account_response.py +33 -0
- scalekit_sdk_python-2.3.3/scalekit/connect/models/responses/execute_tool_response.py +57 -0
- scalekit_sdk_python-2.3.3/scalekit/connect/models/responses/get_connected_account_auth_response.py +117 -0
- scalekit_sdk_python-2.3.3/scalekit/connect/models/responses/get_mcp_response.py +61 -0
- scalekit_sdk_python-2.3.3/scalekit/connect/models/responses/list_connected_accounts_response.py +171 -0
- scalekit_sdk_python-2.3.3/scalekit/connect/models/responses/magic_link_response.py +57 -0
- scalekit_sdk_python-2.3.3/scalekit/connect/models/tool_input_output.py +5 -0
- scalekit_sdk_python-2.3.3/scalekit/connect/models/tool_mapping.py +41 -0
- scalekit_sdk_python-2.3.3/scalekit/connect/modifier.py +68 -0
- scalekit_sdk_python-2.3.3/scalekit/connect/types.py +27 -0
- scalekit_sdk_python-2.3.3/scalekit/connected_accounts.py +251 -0
- scalekit_sdk_python-2.3.3/scalekit/mcp.py +96 -0
- scalekit_sdk_python-2.3.3/scalekit/tools.py +97 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/users.py +27 -3
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/auditlogs/auditlogs_pb2.py +8 -6
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/auditlogs/auditlogs_pb2.pyi +20 -6
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/auth/auth_pb2.py +21 -21
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/auth/auth_pb2.pyi +10 -2
- scalekit_sdk_python-2.3.3/scalekit/v1/auth/totp_pb2.py +106 -0
- scalekit_sdk_python-2.3.3/scalekit/v1/auth/totp_pb2.pyi +105 -0
- scalekit_sdk_python-2.3.3/scalekit/v1/auth/totp_pb2_grpc.py +202 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/clients/clients_pb2.py +165 -154
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/clients/clients_pb2.pyi +21 -8
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/commons/commons_pb2.py +28 -20
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/commons/commons_pb2.pyi +12 -2
- scalekit_sdk_python-2.3.3/scalekit/v1/connected_accounts/connected_accounts_pb2.py +213 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/connected_accounts/connected_accounts_pb2.pyi +74 -20
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/connected_accounts/connected_accounts_pb2_grpc.py +66 -1
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/connections/connections_pb2.py +129 -121
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/connections/connections_pb2.pyi +14 -6
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/directories/directories_pb2.py +36 -36
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/emails/emails_pb2.py +99 -73
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/emails/emails_pb2.pyi +36 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/emails/emails_pb2_grpc.py +33 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/environments/environments_pb2.py +2 -2
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/errdetails/errdetails_pb2.py +3 -3
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/errdetails/errdetails_pb2.pyi +6 -4
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/events/events_pb2.py +18 -18
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/events/events_pb2.pyi +26 -6
- scalekit_sdk_python-2.3.3/scalekit/v1/mcp/mcp_pb2.py +97 -0
- scalekit_sdk_python-2.3.3/scalekit/v1/mcp/mcp_pb2.pyi +91 -0
- scalekit_sdk_python-2.3.3/scalekit/v1/mcp/mcp_pb2_grpc.py +165 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/members/members_pb2.py +36 -34
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/members/members_pb2.pyi +4 -2
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/organizations/organizations_pb2.py +39 -33
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/organizations/organizations_pb2.pyi +6 -2
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/providers/providers_pb2.py +28 -24
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/providers/providers_pb2.pyi +24 -12
- scalekit_sdk_python-2.3.3/scalekit/v1/roles/roles_pb2.py +371 -0
- scalekit_sdk_python-2.3.3/scalekit/v1/roles/roles_pb2.pyi +416 -0
- scalekit_sdk_python-2.3.3/scalekit/v1/roles/roles_pb2_grpc.py +854 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/tools/tools_pb2.py +45 -45
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/tools/tools_pb2.pyi +20 -18
- scalekit_sdk_python-2.3.3/scalekit/v1/users/__init__.py +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/users/users_pb2.py +121 -25
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/users/users_pb2.pyi +112 -2
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/users/users_pb2_grpc.py +166 -0
- scalekit_sdk_python-2.3.3/scalekit/v1/webhooks/__init__.py +0 -0
- scalekit_sdk_python-2.3.3/scalekit/v1/workspaces/__init__.py +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit_sdk_python.egg-info/PKG-INFO +2 -1
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit_sdk_python.egg-info/SOURCES.txt +28 -4
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit_sdk_python.egg-info/requires.txt +1 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/setup.py +4 -2
- scalekit_sdk_python-2.3.2/scalekit/v1/connected_accounts/connected_accounts_pb2.py +0 -165
- scalekit_sdk_python-2.3.2/scalekit/v1/invites/invites_pb2.py +0 -47
- scalekit_sdk_python-2.3.2/scalekit/v1/invites/invites_pb2.pyi +0 -65
- scalekit_sdk_python-2.3.2/scalekit/v1/invites/invites_pb2_grpc.py +0 -99
- scalekit_sdk_python-2.3.2/scalekit/v1/roles/roles_pb2.py +0 -217
- scalekit_sdk_python-2.3.2/scalekit/v1/roles/roles_pb2.pyi +0 -236
- scalekit_sdk_python-2.3.2/scalekit/v1/roles/roles_pb2_grpc.py +0 -430
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/LICENSE +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/README.md +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/buf/__init__.py +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/buf/validate/__init__.py +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/buf/validate/expression_pb2.py +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/buf/validate/expression_pb2.pyi +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/buf/validate/expression_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/buf/validate/priv/__init__.py +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/buf/validate/priv/private_pb2.py +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/buf/validate/priv/private_pb2.pyi +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/buf/validate/priv/private_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/buf/validate/validate_pb2.py +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/buf/validate/validate_pb2.pyi +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/buf/validate/validate_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/__init__.py +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/common/__init__.py +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/common/exceptions.py +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/common/user.py +0 -0
- {scalekit_sdk_python-2.3.2/scalekit/constants → scalekit_sdk_python-2.3.3/scalekit/connect/models}/__init__.py +0 -0
- {scalekit_sdk_python-2.3.2/scalekit/utils → scalekit_sdk_python-2.3.3/scalekit/connect/models/requests}/__init__.py +0 -0
- {scalekit_sdk_python-2.3.2/scalekit/v1 → scalekit_sdk_python-2.3.3/scalekit/connect/models/responses}/__init__.py +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/connection.py +0 -0
- {scalekit_sdk_python-2.3.2/scalekit/v1/auditlogs → scalekit_sdk_python-2.3.3/scalekit/constants}/__init__.py +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/constants/user.py +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/core.py +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/directory.py +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/domain.py +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/m2m_client.py +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/organization.py +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/passwordless.py +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/role.py +0 -0
- {scalekit_sdk_python-2.3.2/scalekit/v1/auth → scalekit_sdk_python-2.3.3/scalekit/utils}/__init__.py +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/utils/directory.py +0 -0
- {scalekit_sdk_python-2.3.2/scalekit/v1/clients → scalekit_sdk_python-2.3.3/scalekit/v1}/__init__.py +0 -0
- {scalekit_sdk_python-2.3.2/scalekit/v1/commons → scalekit_sdk_python-2.3.3/scalekit/v1/auditlogs}/__init__.py +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/auditlogs/auditlogs_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.3.2/scalekit/v1/connected_accounts → scalekit_sdk_python-2.3.3/scalekit/v1/auth}/__init__.py +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/auth/auth_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/auth/passwordless_pb2.py +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/auth/passwordless_pb2.pyi +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/auth/passwordless_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.3.2/scalekit/v1/connections → scalekit_sdk_python-2.3.3/scalekit/v1/clients}/__init__.py +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/clients/clients_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.3.2/scalekit/v1/directories → scalekit_sdk_python-2.3.3/scalekit/v1/commons}/__init__.py +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/commons/commons_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.3.2/scalekit/v1/domains → scalekit_sdk_python-2.3.3/scalekit/v1/connected_accounts}/__init__.py +0 -0
- {scalekit_sdk_python-2.3.2/scalekit/v1/emails → scalekit_sdk_python-2.3.3/scalekit/v1/connections}/__init__.py +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/connections/connections_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.3.2/scalekit/v1/environments → scalekit_sdk_python-2.3.3/scalekit/v1/directories}/__init__.py +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/directories/directories_pb2.pyi +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/directories/directories_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.3.2/scalekit/v1/errdetails → scalekit_sdk_python-2.3.3/scalekit/v1/domains}/__init__.py +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/domains/domains_pb2.py +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/domains/domains_pb2.pyi +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/domains/domains_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.3.2/scalekit/v1/events → scalekit_sdk_python-2.3.3/scalekit/v1/emails}/__init__.py +0 -0
- {scalekit_sdk_python-2.3.2/scalekit/v1/invites → scalekit_sdk_python-2.3.3/scalekit/v1/environments}/__init__.py +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/environments/environments_pb2.pyi +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/environments/environments_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.3.2/scalekit/v1/members → scalekit_sdk_python-2.3.3/scalekit/v1/errdetails}/__init__.py +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/errdetails/errdetails_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.3.2/scalekit/v1/migrations → scalekit_sdk_python-2.3.3/scalekit/v1/events}/__init__.py +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/events/events_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.3.2/scalekit/v1/options → scalekit_sdk_python-2.3.3/scalekit/v1/mcp}/__init__.py +0 -0
- {scalekit_sdk_python-2.3.2/scalekit/v1/organizations → scalekit_sdk_python-2.3.3/scalekit/v1/members}/__init__.py +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/members/members_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.3.2/scalekit/v1/providers → scalekit_sdk_python-2.3.3/scalekit/v1/migrations}/__init__.py +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/migrations/migrations_pb2.py +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/migrations/migrations_pb2.pyi +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/migrations/migrations_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.3.2/scalekit/v1/roles → scalekit_sdk_python-2.3.3/scalekit/v1/options}/__init__.py +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/options/options_pb2.py +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/options/options_pb2.pyi +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/options/options_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.3.2/scalekit/v1/tools → scalekit_sdk_python-2.3.3/scalekit/v1/organizations}/__init__.py +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/organizations/organizations_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.3.2/scalekit/v1/user_attributes → scalekit_sdk_python-2.3.3/scalekit/v1/providers}/__init__.py +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/providers/providers_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.3.2/scalekit/v1/users → scalekit_sdk_python-2.3.3/scalekit/v1/roles}/__init__.py +0 -0
- {scalekit_sdk_python-2.3.2/scalekit/v1/webhooks → scalekit_sdk_python-2.3.3/scalekit/v1/tools}/__init__.py +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/tools/tools_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.3.2/scalekit/v1/workspaces → scalekit_sdk_python-2.3.3/scalekit/v1/user_attributes}/__init__.py +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/user_attributes/user_attributes_pb2.py +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/user_attributes/user_attributes_pb2.pyi +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/user_attributes/user_attributes_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/webhooks/webhooks_pb2.py +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/webhooks/webhooks_pb2.pyi +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/webhooks/webhooks_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/workspaces/workspaces_pb2.py +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/workspaces/workspaces_pb2.pyi +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit/v1/workspaces/workspaces_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit_sdk_python.egg-info/dependency_links.txt +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/scalekit_sdk_python.egg-info/top_level.txt +0 -0
- {scalekit_sdk_python-2.3.2 → scalekit_sdk_python-2.3.3}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: scalekit-sdk-python
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.3
|
|
4
4
|
Summary: Scalekit official Python SDK
|
|
5
5
|
Home-page: https://github.com/scalekit-inc/scalekit-sdk-python
|
|
6
6
|
Author: Team Scalekit
|
|
@@ -25,6 +25,7 @@ Requires-Dist: googleapis-common-protos<1.66.0,>=1.56.1
|
|
|
25
25
|
Requires-Dist: deprecation>=2.1.0
|
|
26
26
|
Requires-Dist: python-dotenv~=1.0.1
|
|
27
27
|
Requires-Dist: Faker~=25.8.0
|
|
28
|
+
Requires-Dist: pydantic~=2.10.6
|
|
28
29
|
Dynamic: author
|
|
29
30
|
Dynamic: author-email
|
|
30
31
|
Dynamic: classifier
|
|
@@ -16,7 +16,11 @@ from scalekit.organization import OrganizationClient
|
|
|
16
16
|
from scalekit.directory import DirectoryClient
|
|
17
17
|
from scalekit.users import UserClient
|
|
18
18
|
from scalekit.role import RoleClient
|
|
19
|
+
from scalekit.connected_accounts import ConnectedAccountsClient
|
|
20
|
+
from scalekit.tools import ToolsClient
|
|
21
|
+
from scalekit.connect import ConnectClient
|
|
19
22
|
from scalekit.passwordless import PasswordlessClient
|
|
23
|
+
from scalekit.mcp import McpClient
|
|
20
24
|
from scalekit.common.scalekit import (
|
|
21
25
|
AuthorizationUrlOptions,
|
|
22
26
|
CodeAuthenticationOptions,
|
|
@@ -62,6 +66,10 @@ class ScalekitClient:
|
|
|
62
66
|
self.m2m_client = M2MClient(self.core_client)
|
|
63
67
|
self.users = UserClient(self.core_client)
|
|
64
68
|
self.roles = RoleClient(self.core_client)
|
|
69
|
+
self.connected_accounts = ConnectedAccountsClient(self.core_client)
|
|
70
|
+
self.tools = ToolsClient(self.core_client)
|
|
71
|
+
self.mcp = McpClient(self.core_client)
|
|
72
|
+
self.connect = ConnectClient(self.tools, self.connected_accounts, self.mcp)
|
|
65
73
|
self.passwordless = PasswordlessClient(self.core_client)
|
|
66
74
|
except Exception as exp:
|
|
67
75
|
raise exp
|
|
@@ -64,10 +64,10 @@ class IdpInitiatedLoginClaims:
|
|
|
64
64
|
class LogoutUrlOptions:
|
|
65
65
|
"""Options for logout URL generation"""
|
|
66
66
|
def __init__(
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
67
|
+
self,
|
|
68
|
+
id_token_hint: Optional[str] = None,
|
|
69
|
+
post_logout_redirect_uri: Optional[str] = None,
|
|
70
|
+
state: Optional[str] = None
|
|
71
71
|
):
|
|
72
72
|
self.id_token_hint = id_token_hint
|
|
73
73
|
self.post_logout_redirect_uri = post_logout_redirect_uri
|
|
@@ -77,10 +77,10 @@ class LogoutUrlOptions:
|
|
|
77
77
|
class TokenValidationOptions:
|
|
78
78
|
"""Options for token validation including issuer, audience, and scope validation"""
|
|
79
79
|
def __init__(
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
80
|
+
self,
|
|
81
|
+
issuer: Optional[str] = None,
|
|
82
|
+
audience: Optional[List[str]] = None,
|
|
83
|
+
required_scopes: Optional[List[str]] = None
|
|
84
84
|
):
|
|
85
85
|
self.issuer = issuer
|
|
86
86
|
self.audience = audience
|
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
from typing import Optional, Dict, Any, List
|
|
2
|
+
from scalekit.v1.mcp.mcp_pb2 import Mcp
|
|
3
|
+
from scalekit.v1.mcp.mcp_pb2 import ToolMapping as ProtoToolMapping
|
|
4
|
+
|
|
5
|
+
from scalekit.connect.models.tool_mapping import ToolMapping
|
|
6
|
+
from scalekit.connect.types import ToolRequest,ExecuteToolResponse,MagicLinkResponse,ListConnectedAccountsResponse,DeleteConnectedAccountResponse,GetConnectedAccountAuthResponse,ToolInput,ToolOutput,McpRequest,CreateMcpResponse,GetMcpResponse
|
|
7
|
+
from scalekit.connect.modifier import (
|
|
8
|
+
Modifier, ModifierType, ToolNames,
|
|
9
|
+
apply_pre_modifiers, apply_post_modifiers
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class ConnectClient:
|
|
16
|
+
"""Class definition for Connect Client"""
|
|
17
|
+
|
|
18
|
+
def __init__(self,tools_client, connected_accounts_client, mcp_client=None):
|
|
19
|
+
"""
|
|
20
|
+
Initialize ConnectClient with tools, connected accounts, and MCP dependencies
|
|
21
|
+
|
|
22
|
+
:param tools_client: ToolsClient instance
|
|
23
|
+
:type: ToolsClient
|
|
24
|
+
:param connected_accounts_client: ConnectedAccountsClient instance
|
|
25
|
+
:type: ConnectedAccountsClient
|
|
26
|
+
:param mcp_client: McpClient instance (optional)
|
|
27
|
+
:type: McpClient
|
|
28
|
+
|
|
29
|
+
:returns:
|
|
30
|
+
None
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
self.tools = tools_client
|
|
34
|
+
self.connected_accounts = connected_accounts_client
|
|
35
|
+
self.mcp = mcp_client
|
|
36
|
+
self._modifiers: List[Modifier] = []
|
|
37
|
+
|
|
38
|
+
def execute_tool(
|
|
39
|
+
self,
|
|
40
|
+
tool_input:ToolInput,
|
|
41
|
+
tool_name: str,
|
|
42
|
+
identifier: Optional[str] = None,
|
|
43
|
+
tool_request: Optional[ToolRequest] = None,
|
|
44
|
+
connected_account_id: Optional[str] = None,
|
|
45
|
+
**kwargs
|
|
46
|
+
) -> ExecuteToolResponse:
|
|
47
|
+
"""
|
|
48
|
+
Execute a tool with the given parameters.
|
|
49
|
+
|
|
50
|
+
Args:
|
|
51
|
+
tool_input: Input data for the tool execution (required)
|
|
52
|
+
tool_name: Name of the tool to execute (required)
|
|
53
|
+
identifier: Unique identifier for this execution (required)
|
|
54
|
+
tool_request: Optional ToolRequest configuration object
|
|
55
|
+
connected_account_id: Optional connected account ID string
|
|
56
|
+
**kwargs: Additional optional parameters
|
|
57
|
+
|
|
58
|
+
Returns:
|
|
59
|
+
ExecuteToolResponse containing execution results
|
|
60
|
+
"""
|
|
61
|
+
# Validate required parameters
|
|
62
|
+
if not tool_input:
|
|
63
|
+
raise ValueError("tool_input is required")
|
|
64
|
+
if not tool_name:
|
|
65
|
+
raise ValueError("tool_name is required")
|
|
66
|
+
|
|
67
|
+
# Apply pre-modifications to the input parameters
|
|
68
|
+
modified_tool_input = apply_pre_modifiers(tool_name, tool_input, self._modifiers)
|
|
69
|
+
|
|
70
|
+
# Call the existing tools.execute_tool which returns (response, metadata) tuple
|
|
71
|
+
result_tuple = self.tools.execute_tool(
|
|
72
|
+
tool_name=tool_name,
|
|
73
|
+
identifier=identifier,
|
|
74
|
+
params=modified_tool_input,
|
|
75
|
+
connected_account_id=connected_account_id
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
# Extract the response[0] (the actual ExecuteToolResponse proto object)
|
|
79
|
+
proto_response = result_tuple[0]
|
|
80
|
+
|
|
81
|
+
# Convert proto to our ExecuteToolResponse class
|
|
82
|
+
response = ExecuteToolResponse.from_proto(proto_response)
|
|
83
|
+
|
|
84
|
+
# Apply post-modifications to the result
|
|
85
|
+
modified_response = apply_post_modifiers(tool_name, response.data, self._modifiers)
|
|
86
|
+
|
|
87
|
+
response.data = modified_response
|
|
88
|
+
|
|
89
|
+
return response
|
|
90
|
+
|
|
91
|
+
def get_authorization_link(
|
|
92
|
+
self,
|
|
93
|
+
identifier: Optional[str] = None,
|
|
94
|
+
connection_name: Optional[str] = None,
|
|
95
|
+
connected_account_id: Optional[str] = None,
|
|
96
|
+
**kwargs
|
|
97
|
+
) -> MagicLinkResponse:
|
|
98
|
+
"""
|
|
99
|
+
Get authorization magic link for a connected account
|
|
100
|
+
|
|
101
|
+
:param connection_name: Connector identifier
|
|
102
|
+
:type: str
|
|
103
|
+
:param identifier: Connected account identifier
|
|
104
|
+
:type: str
|
|
105
|
+
:param connected_account_id: Connected account ID (optional)
|
|
106
|
+
:type: str
|
|
107
|
+
|
|
108
|
+
:returns:
|
|
109
|
+
MagicLinkResponse containing magic link and expiry
|
|
110
|
+
"""
|
|
111
|
+
# Call the existing connected_accounts method which returns (response, metadata) tuple
|
|
112
|
+
result_tuple = self.connected_accounts.get_magic_link_for_connected_account(
|
|
113
|
+
connector=connection_name,
|
|
114
|
+
identifier=identifier,
|
|
115
|
+
connected_account_id=connected_account_id
|
|
116
|
+
)
|
|
117
|
+
|
|
118
|
+
# Extract the response[0] (the actual GetMagicLinkForConnectedAccountResponse proto object)
|
|
119
|
+
proto_response = result_tuple[0]
|
|
120
|
+
|
|
121
|
+
# Convert proto to our MagicLinkResponse class
|
|
122
|
+
return MagicLinkResponse.from_proto(proto_response)
|
|
123
|
+
|
|
124
|
+
def list_connected_accounts(
|
|
125
|
+
self,
|
|
126
|
+
connection_name: Optional[str] = None,
|
|
127
|
+
identifier: Optional[str] = None,
|
|
128
|
+
provider: Optional[str] = None,
|
|
129
|
+
**kwargs
|
|
130
|
+
) -> ListConnectedAccountsResponse:
|
|
131
|
+
"""
|
|
132
|
+
List connected accounts with optional filtering
|
|
133
|
+
|
|
134
|
+
:param connection_name: Connector identifier (optional)
|
|
135
|
+
:type: str
|
|
136
|
+
:param identifier: Identifier filter (optional)
|
|
137
|
+
:type: str
|
|
138
|
+
:param provider: Provider filter (optional)
|
|
139
|
+
:type: str
|
|
140
|
+
|
|
141
|
+
:returns:
|
|
142
|
+
ListConnectedAccountsResponse containing list of connected accounts
|
|
143
|
+
"""
|
|
144
|
+
# Call the existing connected_accounts method which returns (response, metadata) tuple
|
|
145
|
+
result_tuple = self.connected_accounts.list_connected_accounts(
|
|
146
|
+
connector=connection_name,
|
|
147
|
+
identifier=identifier,
|
|
148
|
+
provider=provider
|
|
149
|
+
)
|
|
150
|
+
|
|
151
|
+
# Extract the response[0] (the actual ListConnectedAccountsResponse proto object)
|
|
152
|
+
proto_response = result_tuple[0]
|
|
153
|
+
|
|
154
|
+
# Convert proto to our ListConnectedAccountsResponse class
|
|
155
|
+
return ListConnectedAccountsResponse.from_proto(proto_response)
|
|
156
|
+
|
|
157
|
+
def delete_connected_account(
|
|
158
|
+
self,
|
|
159
|
+
connection_name: Optional[str] = None,
|
|
160
|
+
identifier: Optional[str] = None,
|
|
161
|
+
connected_account_id: Optional[str] = None,
|
|
162
|
+
**kwargs
|
|
163
|
+
) -> DeleteConnectedAccountResponse:
|
|
164
|
+
"""
|
|
165
|
+
Delete a connected account
|
|
166
|
+
|
|
167
|
+
:param connection_name: Connector identifier (required)
|
|
168
|
+
:type: str
|
|
169
|
+
:param identifier: Connected account identifier (required)
|
|
170
|
+
:type: str
|
|
171
|
+
:param connected_account_id: Connected account ID (optional)
|
|
172
|
+
:type: str
|
|
173
|
+
|
|
174
|
+
:returns:
|
|
175
|
+
DeleteConnectedAccountResponse containing deletion status
|
|
176
|
+
"""
|
|
177
|
+
|
|
178
|
+
# Call the existing connected_accounts method which returns (response, metadata) tuple
|
|
179
|
+
result_tuple = self.connected_accounts.delete_connected_account(
|
|
180
|
+
connector=connection_name,
|
|
181
|
+
identifier=identifier,
|
|
182
|
+
connected_account_id=connected_account_id
|
|
183
|
+
)
|
|
184
|
+
|
|
185
|
+
# Extract the response[0] (the actual DeleteConnectedAccountResponse proto object)
|
|
186
|
+
proto_response = result_tuple[0]
|
|
187
|
+
|
|
188
|
+
# Convert proto to our DeleteConnectedAccountResponse class
|
|
189
|
+
return DeleteConnectedAccountResponse.from_proto(proto_response)
|
|
190
|
+
|
|
191
|
+
def get_connected_account(
|
|
192
|
+
self,
|
|
193
|
+
connection_name: Optional[str] = None,
|
|
194
|
+
identifier: Optional[str] = None,
|
|
195
|
+
connected_account_id: Optional[str] = None,
|
|
196
|
+
**kwargs
|
|
197
|
+
) -> GetConnectedAccountAuthResponse:
|
|
198
|
+
"""
|
|
199
|
+
Get connected account authorization details by identifier
|
|
200
|
+
|
|
201
|
+
:param connection_name: Connector identifier (required)
|
|
202
|
+
:type: str
|
|
203
|
+
:param identifier: Connected account identifier (required)
|
|
204
|
+
:type: str
|
|
205
|
+
:param connected_account_id: Connected account ID (optional)
|
|
206
|
+
:type: str
|
|
207
|
+
|
|
208
|
+
:returns:
|
|
209
|
+
GetConnectedAccountAuthResponse containing connected account details
|
|
210
|
+
"""
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
# Call the existing connected_accounts method which returns (response, metadata) tuple
|
|
215
|
+
result_tuple = self.connected_accounts.get_connected_account_by_identifier(
|
|
216
|
+
connector=connection_name,
|
|
217
|
+
identifier=identifier,
|
|
218
|
+
connected_account_id=connected_account_id
|
|
219
|
+
)
|
|
220
|
+
|
|
221
|
+
# Extract the response[0] (the actual GetConnectedAccountByIdentifierResponse proto object)
|
|
222
|
+
proto_response = result_tuple[0]
|
|
223
|
+
|
|
224
|
+
# Convert proto to our GetConnectedAccountAuthResponse class
|
|
225
|
+
return GetConnectedAccountAuthResponse.from_proto(proto_response)
|
|
226
|
+
|
|
227
|
+
def add_modifier(self, modifier: Modifier) -> None:
|
|
228
|
+
"""Add a modifier to the private list"""
|
|
229
|
+
self._modifiers.append(modifier)
|
|
230
|
+
|
|
231
|
+
def get_modifiers(
|
|
232
|
+
self,
|
|
233
|
+
tool_name: Optional[str] = None,
|
|
234
|
+
modifier_type: Optional[ModifierType] = None
|
|
235
|
+
) -> List[Modifier]:
|
|
236
|
+
"""Get modifiers, optionally filtered by tool_name and/or type"""
|
|
237
|
+
filtered = self._modifiers
|
|
238
|
+
|
|
239
|
+
if tool_name:
|
|
240
|
+
filtered = [m for m in filtered if tool_name in m.tool_names]
|
|
241
|
+
|
|
242
|
+
if modifier_type:
|
|
243
|
+
filtered = [m for m in filtered if m.type == modifier_type]
|
|
244
|
+
|
|
245
|
+
return filtered
|
|
246
|
+
|
|
247
|
+
def pre_modifier(self, tool_names: ToolNames, **kwargs: Any):
|
|
248
|
+
"""Decorator for pre-modification that registers with this Connect instance
|
|
249
|
+
|
|
250
|
+
Usage:
|
|
251
|
+
@connect.premodifier(tool_names="my_tool", priority=1)
|
|
252
|
+
def my_modifier(tool_name, data):
|
|
253
|
+
return modified_data
|
|
254
|
+
"""
|
|
255
|
+
def decorator(func):
|
|
256
|
+
modifier = Modifier(tool_names=tool_names, modifier_type="pre", **kwargs)
|
|
257
|
+
modifier.func = func
|
|
258
|
+
self.add_modifier(modifier)
|
|
259
|
+
return func
|
|
260
|
+
return decorator
|
|
261
|
+
|
|
262
|
+
def post_modifier(self, tool_names: ToolNames, **kwargs: Any):
|
|
263
|
+
"""Decorator for post-modification that registers with this Connect instance
|
|
264
|
+
|
|
265
|
+
Usage:
|
|
266
|
+
@connect.postmodifier(tool_names=["tool1", "tool2"])
|
|
267
|
+
def my_modifier(tool_name, result):
|
|
268
|
+
return modified_result
|
|
269
|
+
"""
|
|
270
|
+
def decorator(func):
|
|
271
|
+
modifier = Modifier(tool_names=tool_names, modifier_type="post", **kwargs)
|
|
272
|
+
modifier.func = func
|
|
273
|
+
self.add_modifier(modifier)
|
|
274
|
+
return func
|
|
275
|
+
return decorator
|
|
276
|
+
|
|
277
|
+
def get_mcp(
|
|
278
|
+
self,
|
|
279
|
+
mcp_id: str,
|
|
280
|
+
mcp_request: Optional[McpRequest] = None,
|
|
281
|
+
**kwargs
|
|
282
|
+
) -> GetMcpResponse:
|
|
283
|
+
"""
|
|
284
|
+
Get an existing MCP by ID via the connect interface
|
|
285
|
+
|
|
286
|
+
:param mcp_id: ID of the MCP to retrieve (required)
|
|
287
|
+
:type: str
|
|
288
|
+
:param mcp_request: Optional McpRequest configuration object
|
|
289
|
+
:type: McpRequest
|
|
290
|
+
|
|
291
|
+
:returns:
|
|
292
|
+
GetMcpResponse containing MCP details
|
|
293
|
+
"""
|
|
294
|
+
if not self.mcp:
|
|
295
|
+
raise ValueError("MCP client not initialized. Please ensure MCP client is available.")
|
|
296
|
+
|
|
297
|
+
if not mcp_id:
|
|
298
|
+
raise ValueError("mcp_id is required")
|
|
299
|
+
|
|
300
|
+
# Call the MCP client's get_mcp method which returns (response, metadata) tuple
|
|
301
|
+
result_tuple = self.mcp.get_mcp(mcp_id=mcp_id)
|
|
302
|
+
|
|
303
|
+
# Extract the response[0] (the actual GetMcpResponse proto object)
|
|
304
|
+
proto_response = result_tuple[0]
|
|
305
|
+
|
|
306
|
+
# Convert proto to our GetMcpResponse class
|
|
307
|
+
return GetMcpResponse.from_proto(proto_response)
|
|
308
|
+
|
|
309
|
+
def create_mcp(
|
|
310
|
+
self,
|
|
311
|
+
identifier: str,
|
|
312
|
+
tool_mappings: List[ToolMapping],
|
|
313
|
+
mcp_request: Optional[McpRequest] = None,
|
|
314
|
+
**kwargs
|
|
315
|
+
) -> CreateMcpResponse:
|
|
316
|
+
"""
|
|
317
|
+
Create or return existing MCP with given configuration via the connect interface
|
|
318
|
+
|
|
319
|
+
:param identifier: Identifier for the connected account (required)
|
|
320
|
+
:type: str
|
|
321
|
+
:param tool_mappings: List of tool mappings for the MCP (required)
|
|
322
|
+
:type: List[ToolMapping]
|
|
323
|
+
:param mcp_request: Optional McpRequest configuration object
|
|
324
|
+
:type: McpRequest
|
|
325
|
+
|
|
326
|
+
:returns:
|
|
327
|
+
CreateMcpResponse containing created MCP details
|
|
328
|
+
"""
|
|
329
|
+
if not self.mcp:
|
|
330
|
+
raise ValueError("MCP client not initialized. Please ensure MCP client is available.")
|
|
331
|
+
|
|
332
|
+
# Validate required parameters
|
|
333
|
+
if not identifier:
|
|
334
|
+
raise ValueError("connected_account_identifier is required")
|
|
335
|
+
if not tool_mappings:
|
|
336
|
+
raise ValueError("tool_mappings is required")
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
# Create ToolMapping objects from the provided tool_mappings
|
|
341
|
+
proto_tool_mappings = []
|
|
342
|
+
for mapping in tool_mappings:
|
|
343
|
+
proto_mapping = ProtoToolMapping(
|
|
344
|
+
tool_names=mapping.tool_names,
|
|
345
|
+
connection_name=mapping.connection_name,
|
|
346
|
+
)
|
|
347
|
+
proto_tool_mappings.append(proto_mapping)
|
|
348
|
+
|
|
349
|
+
# Create the MCP proto object
|
|
350
|
+
mcp_proto = Mcp(
|
|
351
|
+
connected_account_identifier=identifier,
|
|
352
|
+
tool_mappings=proto_tool_mappings,
|
|
353
|
+
)
|
|
354
|
+
|
|
355
|
+
result_tuple = self.mcp.create_mcp(mcp=mcp_proto)
|
|
356
|
+
|
|
357
|
+
# Extract the response[0] (the actual CreateMcpResponse proto object)
|
|
358
|
+
proto_response = result_tuple[0]
|
|
359
|
+
|
|
360
|
+
# Convert proto to our CreateMcpResponse class
|
|
361
|
+
return CreateMcpResponse.from_proto(proto_response)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from typing import Optional, List
|
|
2
|
+
from pydantic import BaseModel, Field, field_validator
|
|
3
|
+
|
|
4
|
+
from scalekit.connect.models.tool_mapping import ToolMapping
|
|
5
|
+
|
|
6
|
+
# TODO: Add validation for tool_mappings to ensure unique tool names across mappings
|
|
7
|
+
class McpRequest(BaseModel):
|
|
8
|
+
"""MCP request configuration with validation"""
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
identifier: Optional[str] = Field(
|
|
12
|
+
None,
|
|
13
|
+
description="Identifier for the connected account",
|
|
14
|
+
min_length=1,
|
|
15
|
+
max_length=255
|
|
16
|
+
)
|
|
17
|
+
tool_mappings: List[ToolMapping]
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
from pydantic import BaseModel, Field, field_validator
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class ToolRequest(BaseModel):
|
|
6
|
+
"""Tool request configuration with validation"""
|
|
7
|
+
|
|
8
|
+
tool_version: Optional[str] = Field(
|
|
9
|
+
None,
|
|
10
|
+
description="Version of the tool to use",
|
|
11
|
+
min_length=1,
|
|
12
|
+
max_length=50
|
|
13
|
+
)
|
|
14
|
+
tool_name: Optional[str] = Field(
|
|
15
|
+
None,
|
|
16
|
+
description="Name of the tool",
|
|
17
|
+
min_length=1,
|
|
18
|
+
max_length=100
|
|
19
|
+
)
|
|
20
|
+
identifier: Optional[str] = Field(
|
|
21
|
+
None,
|
|
22
|
+
description="Unique identifier for execution",
|
|
23
|
+
min_length=1,
|
|
24
|
+
max_length=255
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
@field_validator('tool_version')
|
|
28
|
+
@classmethod
|
|
29
|
+
def validate_tool_version(cls, v):
|
|
30
|
+
"""Validate tool version format"""
|
|
31
|
+
if v is not None:
|
|
32
|
+
if not isinstance(v, str):
|
|
33
|
+
raise ValueError('tool_version must be a string')
|
|
34
|
+
v = v.strip()
|
|
35
|
+
if not v:
|
|
36
|
+
raise ValueError('tool_version cannot be empty or whitespace only')
|
|
37
|
+
# Basic semantic version validation (optional)
|
|
38
|
+
if '.' in v and not all(part.isdigit() for part in v.split('.')):
|
|
39
|
+
raise ValueError('tool_version should follow semantic versioning (e.g., 1.0.0)')
|
|
40
|
+
return v
|
|
41
|
+
|
|
42
|
+
@field_validator('tool_name')
|
|
43
|
+
@classmethod
|
|
44
|
+
def validate_tool_name(cls, v):
|
|
45
|
+
"""Validate tool name format"""
|
|
46
|
+
if v is not None:
|
|
47
|
+
if not isinstance(v, str):
|
|
48
|
+
raise ValueError('tool_name must be a string')
|
|
49
|
+
v = v.strip()
|
|
50
|
+
if not v:
|
|
51
|
+
raise ValueError('tool_name cannot be empty or whitespace only')
|
|
52
|
+
# Tool name should contain valid characters
|
|
53
|
+
if not all(c.isalnum() or c in '.-_' for c in v):
|
|
54
|
+
raise ValueError('tool_name can only contain alphanumeric characters, dots, hyphens, and underscores')
|
|
55
|
+
return v
|
|
56
|
+
|
|
57
|
+
@field_validator('identifier')
|
|
58
|
+
@classmethod
|
|
59
|
+
def validate_identifier(cls, v):
|
|
60
|
+
"""Validate identifier format"""
|
|
61
|
+
if v is not None:
|
|
62
|
+
if not isinstance(v, str):
|
|
63
|
+
raise ValueError('identifier must be a string')
|
|
64
|
+
v = v.strip()
|
|
65
|
+
if not v:
|
|
66
|
+
raise ValueError('identifier cannot be empty or whitespace only')
|
|
67
|
+
# Identifier should be alphanumeric with some special characters
|
|
68
|
+
if not all(c.isalnum() or c in '-_.' for c in v):
|
|
69
|
+
raise ValueError('identifier can only contain alphanumeric characters, hyphens, underscores, and dots')
|
|
70
|
+
return v
|
|
71
|
+
|
|
72
|
+
class Config:
|
|
73
|
+
"""Pydantic configuration"""
|
|
74
|
+
validate_assignment = True
|
|
75
|
+
str_strip_whitespace = True
|
|
76
|
+
use_enum_values = True
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
from typing import Optional, Dict, Any, List
|
|
2
|
+
from pydantic import BaseModel, Field
|
|
3
|
+
from google.protobuf.json_format import MessageToDict
|
|
4
|
+
|
|
5
|
+
from scalekit.connect.models.tool_mapping import ToolMapping
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class CreateMcpResponse(BaseModel):
|
|
9
|
+
"""Create MCP response with one-to-one mapping to proto CreateMcpResponse"""
|
|
10
|
+
|
|
11
|
+
id: Optional[str]
|
|
12
|
+
identifier: Optional[str]
|
|
13
|
+
url: Optional[str]
|
|
14
|
+
tool_mappings: Optional[List[ToolMapping]]
|
|
15
|
+
|
|
16
|
+
@classmethod
|
|
17
|
+
def from_proto(cls, proto_response) -> 'CreateMcpResponse':
|
|
18
|
+
"""
|
|
19
|
+
Create CreateMcpResponse from protobuf CreateMcpResponse
|
|
20
|
+
|
|
21
|
+
:param proto_response: The protobuf CreateMcpResponse object
|
|
22
|
+
:type proto_response: CreateMcpResponse (from mcp_pb2)
|
|
23
|
+
|
|
24
|
+
:returns:
|
|
25
|
+
CreateMcpResponse instance
|
|
26
|
+
"""
|
|
27
|
+
mcp = proto_response.mcp if proto_response.mcp else None
|
|
28
|
+
|
|
29
|
+
if mcp:
|
|
30
|
+
# Convert tool_mappings from protobuf to dict
|
|
31
|
+
tool_mappings = []
|
|
32
|
+
if mcp.tool_mappings:
|
|
33
|
+
for mapping in mcp.tool_mappings:
|
|
34
|
+
tool_mappings.append(
|
|
35
|
+
ToolMapping.from_proto(mapping)
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
return cls(
|
|
39
|
+
id=mcp.id if mcp.id else None,
|
|
40
|
+
identifier=mcp.connected_account_identifier if mcp.connected_account_identifier else None,
|
|
41
|
+
tool_mappings=tool_mappings if tool_mappings else None,
|
|
42
|
+
url=mcp.url if mcp.url else None
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
return cls()
|
|
46
|
+
|
|
47
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
48
|
+
"""
|
|
49
|
+
Convert to dictionary representation
|
|
50
|
+
|
|
51
|
+
:returns:
|
|
52
|
+
Dictionary representation of the response
|
|
53
|
+
"""
|
|
54
|
+
return {
|
|
55
|
+
"id": self.mcp_id,
|
|
56
|
+
"identifier": self.connected_account_identifier,
|
|
57
|
+
"tool_mappings": self.tool_mappings,
|
|
58
|
+
"url": self.url
|
|
59
|
+
}
|
scalekit_sdk_python-2.3.3/scalekit/connect/models/responses/delete_connected_account_response.py
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
from pydantic import BaseModel
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class DeleteConnectedAccountResponse(BaseModel):
|
|
5
|
+
"""Delete connected account response with one-to-one mapping to proto DeleteConnectedAccountResponse"""
|
|
6
|
+
|
|
7
|
+
@classmethod
|
|
8
|
+
def from_proto(cls, proto_response) -> 'DeleteConnectedAccountResponse':
|
|
9
|
+
"""
|
|
10
|
+
Create DeleteConnectedAccountResponse from protobuf DeleteConnectedAccountResponse
|
|
11
|
+
|
|
12
|
+
:param proto_response: The protobuf DeleteConnectedAccountResponse object
|
|
13
|
+
:type proto_response: DeleteConnectedAccountResponse (from connected_accounts_pb2)
|
|
14
|
+
|
|
15
|
+
:returns:
|
|
16
|
+
DeleteConnectedAccountResponse instance
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
# Since the DeleteConnectedAccountResponse does not have any fields
|
|
20
|
+
return cls()
|
|
21
|
+
|
|
22
|
+
def to_dict(self) -> dict:
|
|
23
|
+
"""
|
|
24
|
+
Convert to dictionary representation
|
|
25
|
+
|
|
26
|
+
:returns:
|
|
27
|
+
Dictionary representation of the response
|
|
28
|
+
"""
|
|
29
|
+
return {}
|
|
30
|
+
|
|
31
|
+
class Config:
|
|
32
|
+
"""Pydantic configuration"""
|
|
33
|
+
validate_assignment = True
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
from typing import Optional, Dict, Any
|
|
2
|
+
|
|
3
|
+
from ..tool_input_output import ToolOutput
|
|
4
|
+
from pydantic import BaseModel, Field
|
|
5
|
+
from google.protobuf.json_format import MessageToDict
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class ExecuteToolResponse(BaseModel):
|
|
10
|
+
"""Execute tool response with one-to-one mapping to proto ExecuteToolResponse"""
|
|
11
|
+
|
|
12
|
+
data: Optional[ToolOutput] = Field(
|
|
13
|
+
None,
|
|
14
|
+
description="Free-flowing JSON parameters for the tool execution"
|
|
15
|
+
)
|
|
16
|
+
execution_id: Optional[str] = Field(
|
|
17
|
+
None,
|
|
18
|
+
description="Unique identifier for the tool execution"
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
@classmethod
|
|
22
|
+
def from_proto(cls, proto_response) -> 'ExecuteToolResponse':
|
|
23
|
+
"""
|
|
24
|
+
Create ExecuteToolResponse from protobuf ExecuteToolResponse
|
|
25
|
+
|
|
26
|
+
:param proto_response: The protobuf ExecuteToolResponse object
|
|
27
|
+
:type proto_response: ExecuteToolResponse (from tools_pb2)
|
|
28
|
+
|
|
29
|
+
:returns:
|
|
30
|
+
ExecuteToolResponse instance
|
|
31
|
+
"""
|
|
32
|
+
# Convert protobuf Struct to dict
|
|
33
|
+
data = None
|
|
34
|
+
if proto_response.data:
|
|
35
|
+
data = MessageToDict(proto_response.data)
|
|
36
|
+
|
|
37
|
+
return cls(
|
|
38
|
+
data=data,
|
|
39
|
+
execution_id=proto_response.execution_id if proto_response.execution_id else None
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
43
|
+
"""
|
|
44
|
+
Convert to dictionary representation
|
|
45
|
+
|
|
46
|
+
:returns:
|
|
47
|
+
Dictionary representation of the response
|
|
48
|
+
"""
|
|
49
|
+
return {
|
|
50
|
+
"data": self.data,
|
|
51
|
+
"execution_id": self.execution_id
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
class Config:
|
|
55
|
+
"""Pydantic configuration"""
|
|
56
|
+
validate_assignment = True
|
|
57
|
+
arbitrary_types_allowed = True
|