scalekit-sdk-python 2.19.0__tar.gz → 2.20.0__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.19.0 → scalekit_sdk_python-2.20.0}/PKG-INFO +1 -1
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/_version.py +1 -1
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/actions.py +9 -1
- scalekit_sdk_python-2.20.0/scalekit/actions/models/custom_provider.py +596 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/types.py +8 -1
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/client.py +30 -4
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/common/scalekit.py +8 -3
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/core.py +63 -6
- scalekit_sdk_python-2.20.0/scalekit/resource.py +438 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/auth/auth_pb2.py +48 -46
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/auth/auth_pb2.pyi +5 -3
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/auth/auth_pb2_grpc.py +10 -10
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/auth/passwordless_pb2.py +19 -19
- scalekit_sdk_python-2.20.0/scalekit/v1/billing/billing_pb2.py +171 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/billing/billing_pb2.pyi +72 -12
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/billing/billing_pb2_grpc.py +131 -14
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/clients/clients_pb2.py +224 -200
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/clients/clients_pb2.pyi +32 -6
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/commons/commons_pb2.py +29 -29
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/environments/environments_pb2.py +164 -160
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/environments/environments_pb2.pyi +8 -4
- scalekit_sdk_python-2.20.0/scalekit/v1/workspaces/workspaces_pb2.py +277 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/workspaces/workspaces_pb2.pyi +13 -4
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit_sdk_python.egg-info/PKG-INFO +1 -1
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit_sdk_python.egg-info/SOURCES.txt +4 -0
- scalekit_sdk_python-2.20.0/tests/test_actions_list_connected_accounts_pagination.py +41 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/tests/test_domain.py +18 -9
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/tests/test_keepalive_channel_options.py +57 -3
- scalekit_sdk_python-2.20.0/tests/test_multi_issuer.py +143 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/tests/test_providers.py +366 -0
- scalekit_sdk_python-2.20.0/tests/test_resource.py +506 -0
- scalekit_sdk_python-2.19.0/scalekit/actions/models/custom_provider.py +0 -380
- scalekit_sdk_python-2.19.0/scalekit/v1/billing/billing_pb2.py +0 -135
- scalekit_sdk_python-2.19.0/scalekit/v1/workspaces/workspaces_pb2.py +0 -273
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/LICENSE +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/README.md +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/buf/__init__.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/buf/validate/__init__.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/buf/validate/validate_pb2.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/buf/validate/validate_pb2.pyi +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/buf/validate/validate_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/pyproject.toml +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/__init__.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/__init__.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/frameworks/__init__.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/frameworks/google_adk.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/frameworks/langchain.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/frameworks/types/__init__.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/frameworks/types/google_adk_tool.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/frameworks/util.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/models/__init__.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/models/mcp_config.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/models/mcp_connection_auth_state.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/models/mcp_instance.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/models/requests/__init__.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/models/requests/create_connected_account_request.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/models/requests/create_custom_provider_request.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/models/requests/delete_custom_provider_request.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/models/requests/list_providers_request.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/models/requests/mcp_request.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/models/requests/tool_request.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/models/requests/update_connected_account_request.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/models/requests/update_custom_provider_request.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/models/responses/__init__.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/models/responses/create_connected_account_response.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/models/responses/create_custom_provider_response.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/models/responses/create_mcp_config_response.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/models/responses/create_mcp_response.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/models/responses/create_mcp_session_token_response.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/models/responses/delete_connected_account_response.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/models/responses/delete_custom_provider_response.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/models/responses/delete_mcp_config_response.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/models/responses/delete_mcp_instance_response.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/models/responses/ensure_mcp_instance_response.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/models/responses/execute_tool_response.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/models/responses/get_connected_account_auth_response.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/models/responses/get_mcp_instance_auth_state_response.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/models/responses/get_mcp_instance_response.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/models/responses/get_mcp_response.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/models/responses/list_connected_accounts_response.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/models/responses/list_mcp_configs_response.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/models/responses/list_mcp_connected_accounts_response.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/models/responses/list_mcp_instances_response.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/models/responses/list_providers_response.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/models/responses/list_tools_response.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/models/responses/magic_link_response.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/models/responses/update_connected_account_response.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/models/responses/update_custom_provider_response.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/models/responses/update_mcp_config_response.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/models/responses/update_mcp_instance_response.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/models/responses/verify_connected_account_user_response.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/models/tool_input_output.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/models/tool_mapping.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/actions/modifier.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/auth.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/common/__init__.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/common/exceptions.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/common/user.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/connected_accounts.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/connection.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/constants/__init__.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/constants/user.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/directory.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/domain.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/events.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/frameworks/__init__.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/frameworks/django.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/frameworks/fastapi.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/frameworks/flask.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/m2m_client.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/mcp.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/middleware/__init__.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/middleware/csrf_state.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/middleware/protocol.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/middleware/session_crypto.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/middleware/session_manager.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/organization.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/passwordless.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/permissions.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/providers.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/role.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/sessions.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/token.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/tools.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/users.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/utils/__init__.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/utils/directory.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/__init__.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/agentkit_logs/__init__.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/agentkit_logs/agentkit_analytics_pb2.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/agentkit_logs/agentkit_analytics_pb2.pyi +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/agentkit_logs/agentkit_analytics_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/agentkit_logs/agentkit_logs_pb2.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/agentkit_logs/agentkit_logs_pb2.pyi +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/agentkit_logs/agentkit_logs_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/auditlogs/__init__.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/auditlogs/auditlogs_pb2.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/auditlogs/auditlogs_pb2.pyi +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/auditlogs/auditlogs_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/auth/__init__.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/auth/passwordless_pb2.pyi +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/auth/passwordless_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/auth/totp_pb2.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/auth/totp_pb2.pyi +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/auth/totp_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/auth/webauthn_pb2.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/auth/webauthn_pb2.pyi +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/auth/webauthn_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/billing/__init__.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/clients/__init__.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/clients/clients_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/commons/__init__.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/commons/commons_pb2.pyi +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/commons/commons_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/connected_accounts/__init__.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/connected_accounts/connected_accounts_pb2.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/connected_accounts/connected_accounts_pb2.pyi +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/connected_accounts/connected_accounts_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/connections/__init__.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/connections/connections_pb2.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/connections/connections_pb2.pyi +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/connections/connections_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/directories/__init__.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/directories/directories_pb2.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/directories/directories_pb2.pyi +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/directories/directories_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/domains/__init__.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/domains/domains_pb2.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/domains/domains_pb2.pyi +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/domains/domains_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/emails/__init__.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/emails/emails_pb2.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/emails/emails_pb2.pyi +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/emails/emails_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/environments/__init__.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/environments/environments_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/errdetails/__init__.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/errdetails/errdetails_pb2.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/errdetails/errdetails_pb2.pyi +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/errdetails/errdetails_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/events/__init__.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/events/events_pb2.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/events/events_pb2.pyi +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/events/events_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/gateway/__init__.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/gateway/gateway_pb2.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/gateway/gateway_pb2.pyi +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/gateway/gateway_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/interceptors/__init__.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/interceptors/interceptors_pb2.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/interceptors/interceptors_pb2.pyi +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/interceptors/interceptors_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/keys/__init__.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/keys/keys_pb2.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/keys/keys_pb2.pyi +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/keys/keys_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/logstreams/__init__.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/logstreams/logstreams_pb2.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/logstreams/logstreams_pb2.pyi +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/logstreams/logstreams_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/mcp/__init__.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/mcp/mcp_pb2.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/mcp/mcp_pb2.pyi +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/mcp/mcp_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/members/__init__.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/members/members_pb2.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/members/members_pb2.pyi +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/members/members_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/migrations/__init__.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/migrations/migrations_pb2.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/migrations/migrations_pb2.pyi +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/migrations/migrations_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/options/__init__.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/options/options_pb2.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/options/options_pb2.pyi +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/options/options_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/organizations/__init__.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/organizations/organizations_pb2.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/organizations/organizations_pb2.pyi +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/organizations/organizations_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/providers/__init__.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/providers/providers_pb2.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/providers/providers_pb2.pyi +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/providers/providers_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/roles/__init__.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/roles/roles_pb2.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/roles/roles_pb2.pyi +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/roles/roles_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/secrets/__init__.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/secrets/secrets_pb2.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/secrets/secrets_pb2.pyi +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/secrets/secrets_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/sessions/__init__.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/sessions/sessions_pb2.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/sessions/sessions_pb2.pyi +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/sessions/sessions_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/tokens/__init__.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/tokens/tokens_pb2.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/tokens/tokens_pb2.pyi +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/tokens/tokens_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/tools/__init__.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/tools/tools_pb2.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/tools/tools_pb2.pyi +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/tools/tools_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/user_attributes/__init__.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/user_attributes/user_attributes_pb2.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/user_attributes/user_attributes_pb2.pyi +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/user_attributes/user_attributes_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/users/__init__.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/users/users_pb2.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/users/users_pb2.pyi +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/users/users_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/webhooks/__init__.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/webhooks/webhooks_pb2.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/webhooks/webhooks_pb2.pyi +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/webhooks/webhooks_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/workspaces/__init__.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/v1/workspaces/workspaces_pb2_grpc.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit/webauthn.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit_sdk_python.egg-info/dependency_links.txt +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit_sdk_python.egg-info/requires.txt +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/scalekit_sdk_python.egg-info/top_level.txt +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/setup.cfg +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/setup.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/tests/test_actions.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/tests/test_call_timeout.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/tests/test_connected_accounts.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/tests/test_connection.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/tests/test_directory.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/tests/test_events.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/tests/test_http_timeout.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/tests/test_login.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/tests/test_m2m_client.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/tests/test_mcp.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/tests/test_middleware_csrf_state.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/tests/test_middleware_django.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/tests/test_middleware_fastapi.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/tests/test_middleware_flask.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/tests/test_middleware_session_crypto.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/tests/test_middleware_session_manager.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/tests/test_org_roles.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/tests/test_organization.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/tests/test_organization_session_policy.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/tests/test_organization_slug_logo.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/tests/test_passwordless.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/tests/test_permissions.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/tests/test_role_defaults_dependent.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/tests/test_roles.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/tests/test_sessions.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/tests/test_sk819_retry_behavior.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/tests/test_tokens.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/tests/test_tools.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/tests/test_transient_error_no_retry.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/tests/test_user_roles_permissions.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/tests/test_users.py +0 -0
- {scalekit_sdk_python-2.19.0 → scalekit_sdk_python-2.20.0}/tests/test_webauthn_credentials.py +0 -0
|
@@ -328,6 +328,8 @@ class ActionClient:
|
|
|
328
328
|
identifier: Optional[str] = None,
|
|
329
329
|
provider: Optional[str] = None,
|
|
330
330
|
connection_names: Optional[List[str]] = None,
|
|
331
|
+
page_size: Optional[int] = None,
|
|
332
|
+
page_token: Optional[str] = None,
|
|
331
333
|
**kwargs
|
|
332
334
|
) -> ListConnectedAccountsResponse:
|
|
333
335
|
"""List connected accounts with optional filtering.
|
|
@@ -341,14 +343,20 @@ class ActionClient:
|
|
|
341
343
|
of these connection slugs. Useful when you want to check multiple
|
|
342
344
|
connectors at once, e.g. ``["github", "google-calendar", "slack"]``.
|
|
343
345
|
Can be combined with ``identifier`` to narrow results to a specific user.
|
|
346
|
+
page_size: Maximum number of connected accounts per page (optional).
|
|
347
|
+
page_token: ``next_page_token`` from a previous response, to fetch the
|
|
348
|
+
next page (optional).
|
|
344
349
|
|
|
345
350
|
Returns:
|
|
346
|
-
ListConnectedAccountsResponse containing the matching connected accounts
|
|
351
|
+
ListConnectedAccountsResponse containing the matching connected accounts,
|
|
352
|
+
with ``next_page_token`` set when more pages remain.
|
|
347
353
|
"""
|
|
348
354
|
result_tuple = self.connected_accounts.list_connected_accounts(
|
|
349
355
|
connector=connection_name,
|
|
350
356
|
identifier=identifier,
|
|
351
357
|
provider=provider,
|
|
358
|
+
page_size=page_size,
|
|
359
|
+
page_token=page_token,
|
|
352
360
|
connection_names=connection_names,
|
|
353
361
|
)
|
|
354
362
|
return ListConnectedAccountsResponse.from_proto(result_tuple[0])
|
|
@@ -0,0 +1,596 @@
|
|
|
1
|
+
from typing import Dict, List, Optional
|
|
2
|
+
|
|
3
|
+
from google.protobuf.json_format import MessageToDict
|
|
4
|
+
from pydantic import BaseModel, Field, PrivateAttr, ValidationInfo, model_validator
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class AuthFieldOption(BaseModel):
|
|
8
|
+
"""One selectable choice on an AuthField whose input_type is 'select'.
|
|
9
|
+
|
|
10
|
+
Served alongside every select field. Without these the caller has a
|
|
11
|
+
dropdown with no values to render.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
value: str = Field(
|
|
15
|
+
"",
|
|
16
|
+
description=(
|
|
17
|
+
"The value submitted when this choice is selected. This is what gets "
|
|
18
|
+
"stored as the field's credential value. Example: 'offline'."
|
|
19
|
+
),
|
|
20
|
+
)
|
|
21
|
+
display_name: str = Field(
|
|
22
|
+
"",
|
|
23
|
+
description=(
|
|
24
|
+
"Human-readable label for this choice as shown in the dropdown. "
|
|
25
|
+
"Example: 'Offline'."
|
|
26
|
+
),
|
|
27
|
+
)
|
|
28
|
+
description: str = Field(
|
|
29
|
+
"",
|
|
30
|
+
description=(
|
|
31
|
+
"Optional. Longer explanation of what this choice means, shown as "
|
|
32
|
+
"helper text. Example: 'Offline with refresh token support'."
|
|
33
|
+
),
|
|
34
|
+
)
|
|
35
|
+
default: bool = Field(
|
|
36
|
+
False,
|
|
37
|
+
description=(
|
|
38
|
+
"Whether this choice is pre-selected when the field is first "
|
|
39
|
+
"rendered. At most one option in a field is the default."
|
|
40
|
+
),
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
def to_dict(self) -> dict:
|
|
44
|
+
"""Serialize this option to a wire-format dict.
|
|
45
|
+
|
|
46
|
+
:returns: Dict with 'value', 'display_name', 'description', and 'default'.
|
|
47
|
+
Keys the SDK does not declare are re-emitted unchanged.
|
|
48
|
+
:rtype: dict
|
|
49
|
+
"""
|
|
50
|
+
d: dict = {
|
|
51
|
+
"value": self.value,
|
|
52
|
+
"display_name": self.display_name,
|
|
53
|
+
"description": self.description,
|
|
54
|
+
"default": self.default,
|
|
55
|
+
}
|
|
56
|
+
d.update(self.model_extra or {})
|
|
57
|
+
return d
|
|
58
|
+
|
|
59
|
+
@classmethod
|
|
60
|
+
def from_dict(cls, d: dict) -> "AuthFieldOption":
|
|
61
|
+
"""Deserialize an AuthFieldOption from a response dict.
|
|
62
|
+
|
|
63
|
+
Keys this SDK does not declare are kept on the instance rather than
|
|
64
|
+
dropped, so they survive a decode/encode round-trip.
|
|
65
|
+
|
|
66
|
+
:param d: Dict containing option data as returned by the server.
|
|
67
|
+
:type d: dict
|
|
68
|
+
:returns: AuthFieldOption instance populated from the dict values.
|
|
69
|
+
:rtype: AuthFieldOption
|
|
70
|
+
"""
|
|
71
|
+
known = {
|
|
72
|
+
"value": d.get("value") or "",
|
|
73
|
+
"display_name": d.get("display_name") or "",
|
|
74
|
+
"description": d.get("description") or "",
|
|
75
|
+
"default": d.get("default") or False,
|
|
76
|
+
}
|
|
77
|
+
extras = {k: v for k, v in d.items() if k not in known}
|
|
78
|
+
return cls(**known, **extras)
|
|
79
|
+
|
|
80
|
+
class Config:
|
|
81
|
+
extra = "allow"
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
class AuthField(BaseModel):
|
|
85
|
+
"""A single input field displayed to the user during connection setup.
|
|
86
|
+
|
|
87
|
+
Use one AuthField per value the user must supply. For a BEARER connector, add
|
|
88
|
+
one AuthField(field_name='token', ...). For an API_KEY connector, add one
|
|
89
|
+
AuthField(field_name='api_key', ...). Always set input_type='password' for
|
|
90
|
+
tokens and keys so the UI masks the value.
|
|
91
|
+
|
|
92
|
+
Fields are not limited to BEARER and API_KEY patterns. OAUTH patterns carry
|
|
93
|
+
them too, for options collected before the browser flow starts rather than
|
|
94
|
+
credentials — a select field choosing how the flow behaves, for example.
|
|
95
|
+
|
|
96
|
+
The server models this as a free-form JSON object, so it may carry keys this
|
|
97
|
+
SDK does not declare. Those are preserved on the instance and re-emitted by
|
|
98
|
+
to_dict() rather than dropped.
|
|
99
|
+
"""
|
|
100
|
+
|
|
101
|
+
field_name: str = Field(
|
|
102
|
+
...,
|
|
103
|
+
description=(
|
|
104
|
+
"Required. Machine-readable identifier for this field. Used as the key "
|
|
105
|
+
"when the credential value is stored and retrieved. "
|
|
106
|
+
"For BEARER patterns use 'token' or 'bearer_token'. "
|
|
107
|
+
"For API_KEY patterns use 'api_key'."
|
|
108
|
+
),
|
|
109
|
+
)
|
|
110
|
+
label: str = Field(
|
|
111
|
+
"",
|
|
112
|
+
description=(
|
|
113
|
+
"Optional. Human-readable label displayed above the input in the UI. "
|
|
114
|
+
"Example: 'API Key', 'Bearer Token'. Defaults to empty string."
|
|
115
|
+
),
|
|
116
|
+
)
|
|
117
|
+
input_type: str = Field(
|
|
118
|
+
"text",
|
|
119
|
+
description=(
|
|
120
|
+
"Optional. Controls how the input is rendered in the UI. "
|
|
121
|
+
"Known values: 'text' (visible input, default), 'password' (masked "
|
|
122
|
+
"input — use for secrets, tokens, and keys), 'select' (dropdown), and "
|
|
123
|
+
"'textarea' (multi-line input). Not restricted to a fixed set: the "
|
|
124
|
+
"value vocabulary is owned by the Scalekit provider catalogue and may "
|
|
125
|
+
"grow, so the SDK accepts any string and passes an unknown type through "
|
|
126
|
+
"unchanged rather than failing to parse the response."
|
|
127
|
+
),
|
|
128
|
+
)
|
|
129
|
+
hint: str = Field(
|
|
130
|
+
"",
|
|
131
|
+
description=(
|
|
132
|
+
"Optional. Placeholder or helper text shown below the input field. "
|
|
133
|
+
"Example: 'Find your token at Settings → API'. Defaults to empty string."
|
|
134
|
+
),
|
|
135
|
+
)
|
|
136
|
+
required: bool = Field(
|
|
137
|
+
False,
|
|
138
|
+
description=(
|
|
139
|
+
"Optional. Whether the user must fill this field before the connection "
|
|
140
|
+
"can be saved. True = field is mandatory; False = field is optional. "
|
|
141
|
+
"Defaults to False."
|
|
142
|
+
),
|
|
143
|
+
)
|
|
144
|
+
options: List["AuthFieldOption"] = Field(
|
|
145
|
+
default_factory=list,
|
|
146
|
+
description=(
|
|
147
|
+
"Optional. The selectable choices for this field, populated when "
|
|
148
|
+
"input_type='select'. Empty for every other input type. A select "
|
|
149
|
+
"field without options cannot be rendered, so the catalogue always "
|
|
150
|
+
"ships them together."
|
|
151
|
+
),
|
|
152
|
+
)
|
|
153
|
+
is_path_param: bool = Field(
|
|
154
|
+
False,
|
|
155
|
+
description=(
|
|
156
|
+
"Optional. True when the collected value is substituted into the "
|
|
157
|
+
"provider's request path rather than sent as a credential — used by "
|
|
158
|
+
"connectors whose base URL embeds a tenant or region. Defaults to False."
|
|
159
|
+
),
|
|
160
|
+
)
|
|
161
|
+
header_name: str = Field(
|
|
162
|
+
"",
|
|
163
|
+
description=(
|
|
164
|
+
"Optional. On an API_KEY pattern, marks this field's value for "
|
|
165
|
+
"injection as this exact HTTP header (case preserved). Setting it on "
|
|
166
|
+
"any field puts the pattern in multiple-headers mode. Empty means "
|
|
167
|
+
"single-key mode, which uses the pattern's auth_header_key_override. "
|
|
168
|
+
"Defaults to empty string."
|
|
169
|
+
),
|
|
170
|
+
)
|
|
171
|
+
|
|
172
|
+
def to_dict(self) -> dict:
|
|
173
|
+
"""Serialize this field to a wire-format dict for inclusion in auth_patterns.
|
|
174
|
+
|
|
175
|
+
:returns: Dict representation of the field. 'hint', 'required', 'options',
|
|
176
|
+
'is_path_param', and 'header_name' are omitted when they hold
|
|
177
|
+
their default values to keep the wire payload minimal. Keys the
|
|
178
|
+
SDK does not declare are re-emitted unchanged.
|
|
179
|
+
:rtype: dict
|
|
180
|
+
"""
|
|
181
|
+
d: dict = {
|
|
182
|
+
"field_name": self.field_name,
|
|
183
|
+
"label": self.label,
|
|
184
|
+
"input_type": self.input_type,
|
|
185
|
+
}
|
|
186
|
+
if self.hint:
|
|
187
|
+
d["hint"] = self.hint
|
|
188
|
+
if self.required:
|
|
189
|
+
d["required"] = True
|
|
190
|
+
if self.options:
|
|
191
|
+
d["options"] = [o.to_dict() for o in self.options]
|
|
192
|
+
if self.is_path_param:
|
|
193
|
+
d["is_path_param"] = True
|
|
194
|
+
if self.header_name:
|
|
195
|
+
d["header_name"] = self.header_name
|
|
196
|
+
d.update(self.model_extra or {})
|
|
197
|
+
return d
|
|
198
|
+
|
|
199
|
+
@classmethod
|
|
200
|
+
def from_dict(cls, d: dict) -> "AuthField":
|
|
201
|
+
"""Deserialize an AuthField from a response dict.
|
|
202
|
+
|
|
203
|
+
Keys this SDK does not declare are kept on the instance rather than
|
|
204
|
+
dropped, so a field the catalogue grows later survives a decode/encode
|
|
205
|
+
round-trip.
|
|
206
|
+
|
|
207
|
+
:param d: Dict containing field data as returned by the server.
|
|
208
|
+
:type d: dict
|
|
209
|
+
:returns: AuthField instance populated from the dict values.
|
|
210
|
+
:rtype: AuthField
|
|
211
|
+
"""
|
|
212
|
+
known = {
|
|
213
|
+
"field_name": d.get("field_name") or "",
|
|
214
|
+
"label": d.get("label") or "",
|
|
215
|
+
"input_type": d.get("input_type") or "text",
|
|
216
|
+
"hint": d.get("hint") or "",
|
|
217
|
+
"required": d.get("required") or False,
|
|
218
|
+
"options": [AuthFieldOption.from_dict(o) for o in d.get("options") or []],
|
|
219
|
+
"is_path_param": d.get("is_path_param") or False,
|
|
220
|
+
"header_name": d.get("header_name") or "",
|
|
221
|
+
}
|
|
222
|
+
extras = {k: v for k, v in d.items() if k not in known}
|
|
223
|
+
return cls(**known, **extras)
|
|
224
|
+
|
|
225
|
+
class Config:
|
|
226
|
+
extra = "allow"
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
class OAuthConfig(BaseModel):
|
|
230
|
+
"""OAuth configuration attached to an OAUTH auth pattern.
|
|
231
|
+
|
|
232
|
+
Pass OAuthConfig() (all defaults) for MCP connectors that use Dynamic Client
|
|
233
|
+
Registration — the MCP server manages the OAuth flow itself and no static
|
|
234
|
+
endpoints are needed. Set pkce_enabled=False only if your OAuth server does
|
|
235
|
+
not support PKCE.
|
|
236
|
+
|
|
237
|
+
Attach it to AuthPattern(type="OAUTH"). The managed catalogue also attaches
|
|
238
|
+
one to its other OAuth-family types ('OAUTH_M2M', 'GOOGLE_DWD',
|
|
239
|
+
'TRELLO_OAUTH1'). Do not attach it to BEARER or API_KEY patterns.
|
|
240
|
+
|
|
241
|
+
pkce_enabled is the only key you set when authoring a connector, but a
|
|
242
|
+
catalogue provider's oauth_config carries much more — 'authorize_uri',
|
|
243
|
+
'token_uri', 'user_info_uri', 'available_scopes',
|
|
244
|
+
'allow_use_scalekit_credentials' and others. Those are preserved on the
|
|
245
|
+
instance (readable as ordinary attributes) and re-emitted by to_dict()
|
|
246
|
+
rather than dropped, so reading a provider and writing it back does not
|
|
247
|
+
erase its OAuth endpoints and scopes.
|
|
248
|
+
"""
|
|
249
|
+
|
|
250
|
+
pkce_enabled: bool = Field(
|
|
251
|
+
True,
|
|
252
|
+
description=(
|
|
253
|
+
"Optional. Whether to enable PKCE (Proof Key for Code Exchange, RFC 7636) "
|
|
254
|
+
"for the OAuth authorization flow. True = PKCE on (default, recommended); "
|
|
255
|
+
"False = PKCE disabled. Only set to False if the OAuth server does not "
|
|
256
|
+
"support PKCE."
|
|
257
|
+
),
|
|
258
|
+
)
|
|
259
|
+
|
|
260
|
+
def to_dict(self) -> dict:
|
|
261
|
+
"""Serialize to a wire-format dict.
|
|
262
|
+
|
|
263
|
+
:returns: Dict with 'pkce_enabled', always emitted explicitly so the
|
|
264
|
+
server receives an unambiguous value, plus any other keys the
|
|
265
|
+
config was decoded with, re-emitted unchanged.
|
|
266
|
+
:rtype: dict
|
|
267
|
+
"""
|
|
268
|
+
d: dict = {"pkce_enabled": self.pkce_enabled}
|
|
269
|
+
d.update(self.model_extra or {})
|
|
270
|
+
return d
|
|
271
|
+
|
|
272
|
+
@classmethod
|
|
273
|
+
def from_dict(cls, d: dict) -> "OAuthConfig":
|
|
274
|
+
"""Deserialize an OAuthConfig from a response dict.
|
|
275
|
+
|
|
276
|
+
Keys this SDK does not declare are kept on the instance rather than
|
|
277
|
+
dropped, so a catalogue provider's endpoints and scopes survive a
|
|
278
|
+
decode/encode round-trip.
|
|
279
|
+
|
|
280
|
+
:param d: Dict containing oauth_config data as returned by the server.
|
|
281
|
+
:type d: dict
|
|
282
|
+
:returns: OAuthConfig instance. pkce_enabled defaults to True if the key
|
|
283
|
+
is absent from the dict.
|
|
284
|
+
:rtype: OAuthConfig
|
|
285
|
+
"""
|
|
286
|
+
extras = {k: v for k, v in d.items() if k != "pkce_enabled"}
|
|
287
|
+
return cls(pkce_enabled=d.get("pkce_enabled", True), **extras)
|
|
288
|
+
|
|
289
|
+
class Config:
|
|
290
|
+
extra = "allow"
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
class AuthPattern(BaseModel):
|
|
294
|
+
"""One authentication option available on a custom connector.
|
|
295
|
+
|
|
296
|
+
A custom provider can have multiple auth patterns (e.g. both OAUTH and API_KEY),
|
|
297
|
+
giving users a choice of how to authenticate. For MCP connectors set is_mcp=True
|
|
298
|
+
on every pattern.
|
|
299
|
+
|
|
300
|
+
Type guide for the four types you create custom connectors with:
|
|
301
|
+
- "OAUTH" — Browser-based OAuth 2.0 / 2.1 flow. Attach an OAuthConfig.
|
|
302
|
+
- "BEARER" — Static bearer token supplied by the user. Add AuthFields for
|
|
303
|
+
the token input.
|
|
304
|
+
- "API_KEY" — Static API key supplied by the user. Add AuthFields for the
|
|
305
|
+
key input.
|
|
306
|
+
- "NO_AUTH" — Connector requires no credentials (e.g. public docs MCP
|
|
307
|
+
servers). Attach no fields and no OAuthConfig.
|
|
308
|
+
|
|
309
|
+
Reading providers back can surface further types the managed catalogue uses
|
|
310
|
+
(e.g. 'BASIC', 'OAUTH_M2M', 'GOOGLE_DWD', 'TRELLO_OAUTH1', 'TRUSTED_IDP'), so
|
|
311
|
+
type is not restricted to the four above — see the field description.
|
|
312
|
+
|
|
313
|
+
The server models this as a free-form JSON object, so it may carry keys this
|
|
314
|
+
SDK does not declare. Those are preserved on the instance and re-emitted by
|
|
315
|
+
to_dict() rather than dropped.
|
|
316
|
+
"""
|
|
317
|
+
|
|
318
|
+
type: str = Field(
|
|
319
|
+
...,
|
|
320
|
+
description=(
|
|
321
|
+
"Required. Authentication mechanism for this pattern. "
|
|
322
|
+
"Use one of 'OAUTH' (browser OAuth flow), 'BEARER' (static bearer "
|
|
323
|
+
"token), 'API_KEY' (static API key), or 'NO_AUTH' (connector requires "
|
|
324
|
+
"no credentials) when creating a custom connector. Not restricted to "
|
|
325
|
+
"those four: the managed catalogue also serves 'BASIC', 'OAUTH_M2M', "
|
|
326
|
+
"'GOOGLE_DWD', 'TRELLO_OAUTH1', 'TRUSTED_IDP' and others, and the set "
|
|
327
|
+
"is owned by the server, so the SDK accepts any string and passes an "
|
|
328
|
+
"unknown type through unchanged rather than failing to parse."
|
|
329
|
+
),
|
|
330
|
+
)
|
|
331
|
+
display_name: str = Field(
|
|
332
|
+
...,
|
|
333
|
+
description=(
|
|
334
|
+
"Required. Human-readable label for this auth option shown in the UI. "
|
|
335
|
+
"Accepted characters: a-z, A-Z, 0-9, and spaces. "
|
|
336
|
+
"Example: 'GitHub OAuth', 'API Token', 'Service Account Key'."
|
|
337
|
+
),
|
|
338
|
+
)
|
|
339
|
+
description: str = Field(
|
|
340
|
+
"",
|
|
341
|
+
description=(
|
|
342
|
+
"Optional. Short explanation of this auth method shown to the user. "
|
|
343
|
+
"Example: 'Authenticate with your GitHub account using OAuth 2.1'. "
|
|
344
|
+
"Defaults to empty string."
|
|
345
|
+
),
|
|
346
|
+
)
|
|
347
|
+
fields: List[AuthField] = Field(
|
|
348
|
+
default_factory=list,
|
|
349
|
+
description=(
|
|
350
|
+
"Optional. List of AuthField objects defining the inputs the user must "
|
|
351
|
+
"supply. For BEARER and API_KEY these are the credential itself. OAUTH "
|
|
352
|
+
"patterns also use them, for options gathered before the browser flow "
|
|
353
|
+
"starts rather than for credentials, which the flow collects itself. "
|
|
354
|
+
"Leave empty for NO_AUTH, which collects nothing. Defaults to empty list."
|
|
355
|
+
),
|
|
356
|
+
)
|
|
357
|
+
account_fields: List[AuthField] = Field(
|
|
358
|
+
default_factory=list,
|
|
359
|
+
description=(
|
|
360
|
+
"Optional. Inputs collected per connected account rather than once per "
|
|
361
|
+
"connection, for connectors that need an account-scoped value (a "
|
|
362
|
+
"workspace or subdomain, say) alongside the shared credential. Same "
|
|
363
|
+
"shape as 'fields'. Defaults to empty list."
|
|
364
|
+
),
|
|
365
|
+
)
|
|
366
|
+
is_mcp: bool = Field(
|
|
367
|
+
False,
|
|
368
|
+
description=(
|
|
369
|
+
"Optional. Set to True for MCP (Model Context Protocol) server connectors. "
|
|
370
|
+
"When True the server sets is_custom_mcp=True on the provider. "
|
|
371
|
+
"Defaults to False."
|
|
372
|
+
),
|
|
373
|
+
)
|
|
374
|
+
oauth_config: Optional["OAuthConfig"] = Field(
|
|
375
|
+
None,
|
|
376
|
+
description=(
|
|
377
|
+
"Optional. OAuth configuration. Required when type='OAUTH'; omit for "
|
|
378
|
+
"'BEARER' and 'API_KEY'. "
|
|
379
|
+
"Pass OAuthConfig() for MCP connectors using Dynamic Client Registration. "
|
|
380
|
+
"Pass OAuthConfig(pkce_enabled=False) to disable PKCE. "
|
|
381
|
+
"The managed catalogue also attaches one to its other OAuth-family "
|
|
382
|
+
"types ('OAUTH_M2M', 'GOOGLE_DWD', 'TRELLO_OAUTH1'). "
|
|
383
|
+
"Defaults to None."
|
|
384
|
+
),
|
|
385
|
+
)
|
|
386
|
+
auth_header_key_override: str = Field(
|
|
387
|
+
"",
|
|
388
|
+
description=(
|
|
389
|
+
"Optional. Overrides the HTTP header name Scalekit uses when injecting "
|
|
390
|
+
"the static credential into proxied requests. Applies to BEARER and "
|
|
391
|
+
"API_KEY patterns. Example: 'x-api-key' to send the credential in the "
|
|
392
|
+
"'x-api-key' header instead of the default 'Authorization' header. "
|
|
393
|
+
"Defaults to empty string (use the default header)."
|
|
394
|
+
),
|
|
395
|
+
)
|
|
396
|
+
allowed_proxy_domains: List[str] = Field(
|
|
397
|
+
default_factory=list,
|
|
398
|
+
description=(
|
|
399
|
+
"Optional. Domains this connector's proxied requests may be routed to. "
|
|
400
|
+
"Empty means no domain restriction beyond the provider's proxy_url. "
|
|
401
|
+
"Defaults to empty list."
|
|
402
|
+
),
|
|
403
|
+
)
|
|
404
|
+
|
|
405
|
+
# Set on instances produced by from_dict. validate_assignment=True re-runs
|
|
406
|
+
# the validator below on every attribute write, and that re-run carries no
|
|
407
|
+
# validation context, so without this flag editing a decoded provider would
|
|
408
|
+
# raise for a shape the server legitimately served.
|
|
409
|
+
_decoded: bool = PrivateAttr(default=False)
|
|
410
|
+
|
|
411
|
+
@model_validator(mode="after")
|
|
412
|
+
def validate_auth_invariants(self, info: ValidationInfo):
|
|
413
|
+
"""Guard the shapes create_custom_provider accepts.
|
|
414
|
+
|
|
415
|
+
These are SDK-side authoring guardrails, not server rules — the API
|
|
416
|
+
validates almost nothing about an auth pattern. So they are skipped for
|
|
417
|
+
anything decoded from a response (from_dict passes decoding=True): the
|
|
418
|
+
managed catalogue legitimately serves shapes a caller should not
|
|
419
|
+
hand-author, and refusing one would break list_providers() for the whole
|
|
420
|
+
page.
|
|
421
|
+
"""
|
|
422
|
+
if (info.context or {}).get("decoding"):
|
|
423
|
+
self._decoded = True
|
|
424
|
+
return self
|
|
425
|
+
if self._decoded:
|
|
426
|
+
return self
|
|
427
|
+
if self.type == "OAUTH" and self.oauth_config is None:
|
|
428
|
+
raise ValueError("oauth_config is required when type='OAUTH'")
|
|
429
|
+
if self.type == "NO_AUTH" and self.fields:
|
|
430
|
+
raise ValueError("fields must be empty when type='NO_AUTH'")
|
|
431
|
+
return self
|
|
432
|
+
|
|
433
|
+
def to_dict(self) -> dict:
|
|
434
|
+
"""Serialize to a wire-format dict for inclusion in the auth_patterns ListValue.
|
|
435
|
+
|
|
436
|
+
:returns: Dict representation of this auth pattern. 'description' is omitted
|
|
437
|
+
when empty, 'is_mcp' when False, 'oauth_config' when None, and
|
|
438
|
+
'auth_header_key_override', 'account_fields' and
|
|
439
|
+
'allowed_proxy_domains' when empty, to keep the wire payload
|
|
440
|
+
minimal. Keys the SDK does not declare are re-emitted unchanged.
|
|
441
|
+
:rtype: dict
|
|
442
|
+
"""
|
|
443
|
+
d: dict = {
|
|
444
|
+
"type": self.type,
|
|
445
|
+
"display_name": self.display_name,
|
|
446
|
+
"fields": [f.to_dict() for f in self.fields],
|
|
447
|
+
}
|
|
448
|
+
if self.description:
|
|
449
|
+
d["description"] = self.description
|
|
450
|
+
if self.is_mcp:
|
|
451
|
+
d["is_mcp"] = True
|
|
452
|
+
if self.oauth_config is not None:
|
|
453
|
+
d["oauth_config"] = self.oauth_config.to_dict()
|
|
454
|
+
if self.auth_header_key_override:
|
|
455
|
+
d["auth_header_key_override"] = self.auth_header_key_override
|
|
456
|
+
if self.account_fields:
|
|
457
|
+
d["account_fields"] = [f.to_dict() for f in self.account_fields]
|
|
458
|
+
if self.allowed_proxy_domains:
|
|
459
|
+
d["allowed_proxy_domains"] = list(self.allowed_proxy_domains)
|
|
460
|
+
d.update(self.model_extra or {})
|
|
461
|
+
return d
|
|
462
|
+
|
|
463
|
+
@classmethod
|
|
464
|
+
def from_dict(cls, d: dict) -> "AuthPattern":
|
|
465
|
+
"""Deserialize an AuthPattern from a response dict.
|
|
466
|
+
|
|
467
|
+
Decoding is deliberately permissive: the authoring guardrails in
|
|
468
|
+
validate_auth_invariants are skipped, unknown 'type' values are accepted,
|
|
469
|
+
and keys this SDK does not declare are kept on the instance. A managed
|
|
470
|
+
provider whose shape the SDK has not seen still decodes, instead of
|
|
471
|
+
failing the whole list_providers() page.
|
|
472
|
+
|
|
473
|
+
:param d: Dict containing auth pattern data as returned by the server.
|
|
474
|
+
The 'oauth_config' key must be present for OAuth patterns;
|
|
475
|
+
its absence is interpreted as oauth_config=None.
|
|
476
|
+
:type d: dict
|
|
477
|
+
:returns: AuthPattern instance populated from the dict values.
|
|
478
|
+
:rtype: AuthPattern
|
|
479
|
+
"""
|
|
480
|
+
# A JSON null is treated as absent, not as an empty config: the server
|
|
481
|
+
# models oauth_config as a nullable pointer, so the key can arrive with
|
|
482
|
+
# no value.
|
|
483
|
+
oauth_cfg: Optional[OAuthConfig] = None
|
|
484
|
+
if d.get("oauth_config") is not None:
|
|
485
|
+
oauth_cfg = OAuthConfig.from_dict(d["oauth_config"])
|
|
486
|
+
known = {
|
|
487
|
+
"type": d.get("type", ""),
|
|
488
|
+
"display_name": d.get("display_name", ""),
|
|
489
|
+
"description": d.get("description", ""),
|
|
490
|
+
"fields": [AuthField.from_dict(f) for f in d.get("fields") or []],
|
|
491
|
+
"account_fields": [
|
|
492
|
+
AuthField.from_dict(f) for f in d.get("account_fields") or []
|
|
493
|
+
],
|
|
494
|
+
"is_mcp": d.get("is_mcp", False),
|
|
495
|
+
"oauth_config": oauth_cfg,
|
|
496
|
+
"auth_header_key_override": d.get("auth_header_key_override", ""),
|
|
497
|
+
"allowed_proxy_domains": list(d.get("allowed_proxy_domains") or []),
|
|
498
|
+
}
|
|
499
|
+
extras = {k: v for k, v in d.items() if k not in known}
|
|
500
|
+
return cls.model_validate({**known, **extras}, context={"decoding": True})
|
|
501
|
+
|
|
502
|
+
class Config:
|
|
503
|
+
validate_assignment = True
|
|
504
|
+
extra = "allow"
|
|
505
|
+
|
|
506
|
+
|
|
507
|
+
class Provider(BaseModel):
|
|
508
|
+
"""A custom provider as returned by the Scalekit API.
|
|
509
|
+
|
|
510
|
+
Produced exclusively by ProvidersClient response decoding via from_proto().
|
|
511
|
+
All fields are populated from the server response — do not construct this
|
|
512
|
+
directly. The auth_patterns list is fully decoded so callers never need to
|
|
513
|
+
handle protobuf types.
|
|
514
|
+
"""
|
|
515
|
+
|
|
516
|
+
identifier: str = Field(
|
|
517
|
+
"",
|
|
518
|
+
description="Unique identifier assigned by the server. Read-only.",
|
|
519
|
+
)
|
|
520
|
+
display_name: str = Field(
|
|
521
|
+
"",
|
|
522
|
+
description=(
|
|
523
|
+
"Human-readable name of the provider. "
|
|
524
|
+
"Accepted characters: a-z, A-Z, 0-9, and spaces."
|
|
525
|
+
),
|
|
526
|
+
)
|
|
527
|
+
description: str = Field(
|
|
528
|
+
"",
|
|
529
|
+
description="Short description of the provider.",
|
|
530
|
+
)
|
|
531
|
+
proxy_url: str = Field(
|
|
532
|
+
"",
|
|
533
|
+
description="The proxy URL through which requests to this provider are routed.",
|
|
534
|
+
)
|
|
535
|
+
proxy_enabled: bool = Field(
|
|
536
|
+
False,
|
|
537
|
+
description="Whether request proxying is enabled for this provider.",
|
|
538
|
+
)
|
|
539
|
+
icon_src: str = Field(
|
|
540
|
+
"",
|
|
541
|
+
description="URL of the provider's icon image. Empty string when not set.",
|
|
542
|
+
)
|
|
543
|
+
metadata: Dict[str, str] = Field(
|
|
544
|
+
default_factory=dict,
|
|
545
|
+
description=(
|
|
546
|
+
"Arbitrary string key-value pairs attached to the provider. "
|
|
547
|
+
"Empty dict when none are set."
|
|
548
|
+
),
|
|
549
|
+
)
|
|
550
|
+
is_custom: bool = Field(
|
|
551
|
+
False,
|
|
552
|
+
description="True for all providers created via create_custom_provider.",
|
|
553
|
+
)
|
|
554
|
+
is_custom_mcp: bool = Field(
|
|
555
|
+
False,
|
|
556
|
+
description=(
|
|
557
|
+
"True when at least one auth_pattern was created with is_mcp=True. "
|
|
558
|
+
"Set by the server — not a field you write."
|
|
559
|
+
),
|
|
560
|
+
)
|
|
561
|
+
auth_patterns: List[AuthPattern] = Field(
|
|
562
|
+
default_factory=list,
|
|
563
|
+
description=(
|
|
564
|
+
"Decoded list of authentication options for this provider. "
|
|
565
|
+
"Currently contains at most one element — only a single auth pattern "
|
|
566
|
+
"is supported today. The list type is intentional for future multi-pattern support."
|
|
567
|
+
),
|
|
568
|
+
)
|
|
569
|
+
|
|
570
|
+
@classmethod
|
|
571
|
+
def from_proto(cls, proto) -> "Provider":
|
|
572
|
+
"""Decode a proto Provider message into a typed Provider.
|
|
573
|
+
|
|
574
|
+
Calls MessageToDict on the auth_patterns ListValue field to produce a
|
|
575
|
+
plain Python list, then deserializes each element into an AuthPattern.
|
|
576
|
+
|
|
577
|
+
:param proto: A proto Provider message instance from providers_pb2.
|
|
578
|
+
:returns: Provider instance with all fields populated and auth_patterns decoded.
|
|
579
|
+
:rtype: Provider
|
|
580
|
+
"""
|
|
581
|
+
auth_patterns_raw = MessageToDict(proto.auth_patterns)
|
|
582
|
+
return cls(
|
|
583
|
+
identifier=proto.identifier,
|
|
584
|
+
display_name=proto.display_name,
|
|
585
|
+
description=proto.description,
|
|
586
|
+
proxy_url=proto.proxy_url,
|
|
587
|
+
proxy_enabled=proto.proxy_enabled,
|
|
588
|
+
icon_src=proto.icon_src,
|
|
589
|
+
metadata=dict(proto.metadata),
|
|
590
|
+
is_custom=proto.is_custom,
|
|
591
|
+
is_custom_mcp=proto.is_custom_mcp,
|
|
592
|
+
auth_patterns=[AuthPattern.from_dict(p) for p in auth_patterns_raw],
|
|
593
|
+
)
|
|
594
|
+
|
|
595
|
+
class Config:
|
|
596
|
+
validate_assignment = True
|
|
@@ -27,7 +27,13 @@ from .models.tool_input_output import ToolInput, ToolOutput
|
|
|
27
27
|
from .models.tool_mapping import ToolMapping
|
|
28
28
|
from .models.mcp_config import McpConfig, McpConfigConnectionToolMapping
|
|
29
29
|
from .models.mcp_instance import McpInstance, McpInstanceConnectionAuthState
|
|
30
|
-
from .models.custom_provider import
|
|
30
|
+
from .models.custom_provider import (
|
|
31
|
+
AuthPattern,
|
|
32
|
+
AuthField,
|
|
33
|
+
AuthFieldOption,
|
|
34
|
+
OAuthConfig,
|
|
35
|
+
Provider,
|
|
36
|
+
)
|
|
31
37
|
from .models.requests.create_custom_provider_request import CreateCustomProviderRequest
|
|
32
38
|
from .models.requests.update_custom_provider_request import UpdateCustomProviderRequest
|
|
33
39
|
from .models.requests.list_providers_request import ListProvidersRequest
|
|
@@ -77,6 +83,7 @@ __all__ = [
|
|
|
77
83
|
'McpInstanceConnectionAuthState',
|
|
78
84
|
'AuthPattern',
|
|
79
85
|
'AuthField',
|
|
86
|
+
'AuthFieldOption',
|
|
80
87
|
'OAuthConfig',
|
|
81
88
|
'Provider',
|
|
82
89
|
'CreateCustomProviderRequest',
|