{ "openapi": "3.1.0", "info": { "title": "AI Voice Bot Server (Refactored)", "description": "WebRTC voice chat server with modular architecture", "version": "2.0.0" }, "paths": { "/ai-voicebot/api/system/health": { "get": { "summary": "System Health", "description": "System health check showing manager status and enhanced monitoring", "operationId": "system_health_ai_voicebot_api_system_health_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/ai-voicebot/api/admin/names": { "get": { "summary": "List Names", "operationId": "list_names_ai_voicebot_api_admin_names_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminNamesResponse" } } } } } } }, "/ai-voicebot/api/admin/set_password": { "post": { "summary": "Set Password", "operationId": "set_password_ai_voicebot_api_admin_set_password_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminSetPassword" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminActionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/ai-voicebot/api/admin/clear_password": { "post": { "summary": "Clear Password", "operationId": "clear_password_ai_voicebot_api_admin_clear_password_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminClearPassword" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminActionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/ai-voicebot/api/admin/cleanup_sessions": { "post": { "summary": "Cleanup Sessions", "operationId": "cleanup_sessions_ai_voicebot_api_admin_cleanup_sessions_post", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminActionResponse" } } } } } } }, "/ai-voicebot/api/admin/session_metrics": { "get": { "summary": "Session Metrics", "operationId": "session_metrics_ai_voicebot_api_admin_session_metrics_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminMetricsResponse" } } } } } } }, "/ai-voicebot/api/admin/validate_sessions": { "get": { "summary": "Validate Sessions", "operationId": "validate_sessions_ai_voicebot_api_admin_validate_sessions_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminValidationResponse" } } } } } } }, "/ai-voicebot/api/admin/cleanup_lobbies": { "post": { "summary": "Cleanup Lobbies", "operationId": "cleanup_lobbies_ai_voicebot_api_admin_cleanup_lobbies_post", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminActionResponse" } } } } } } }, "/ai-voicebot/api/health": { "get": { "tags": [ "monitoring" ], "summary": "Get Health Summary", "description": "Get comprehensive health summary.\n\nReturns:\n Dict containing overall health status and component details", "operationId": "get_health_summary_ai_voicebot_api_health_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/ai-voicebot/api/session": { "get": { "summary": "Get Session", "operationId": "get_session_ai_voicebot_api_session_get", "parameters": [ { "name": "session_id", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Session Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/ai-voicebot/api/lobby": { "get": { "summary": "List Lobbies", "operationId": "list_lobbies_ai_voicebot_api_lobby_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LobbiesResponse" } } } } } } }, "/ai-voicebot/api/lobby/{session_id}": { "post": { "summary": "Create Lobby", "operationId": "create_lobby_ai_voicebot_api_lobby__session_id__post", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LobbyCreateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LobbyCreateResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/ai-voicebot/api/lobby/{lobby_id}/chat": { "get": { "summary": "Get Chat Messages", "operationId": "get_chat_messages_ai_voicebot_api_lobby__lobby_id__chat_get", "parameters": [ { "name": "lobby_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Lobby Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "default": 50, "title": "Limit" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChatMessagesResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/ai-voicebot/api/bots/providers/register": { "post": { "tags": [ "bots" ], "summary": "Register Bot Provider", "description": "Register a new bot provider with authentication", "operationId": "register_bot_provider_ai_voicebot_api_bots_providers_register_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BotProviderRegisterRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BotProviderRegisterResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/ai-voicebot/api/bots/providers": { "get": { "tags": [ "bots" ], "summary": "List Bot Providers", "description": "List all registered bot providers", "operationId": "list_bot_providers_ai_voicebot_api_bots_providers_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BotProviderListResponse" } } } } } } }, "/ai-voicebot/api/bots": { "get": { "tags": [ "bots" ], "summary": "List Available Bots", "description": "List all available bots from all registered providers", "operationId": "list_available_bots_ai_voicebot_api_bots_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BotListResponse" } } } } } } }, "/ai-voicebot/api/bots/{bot_name}/join": { "post": { "tags": [ "bots" ], "summary": "Request Bot Join Lobby", "description": "Request a bot to join a specific lobby", "operationId": "request_bot_join_lobby_ai_voicebot_api_bots__bot_name__join_post", "parameters": [ { "name": "bot_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Bot Name" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BotJoinLobbyRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BotJoinLobbyResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/ai-voicebot/api/bots/instances/{bot_instance_id}/leave": { "post": { "tags": [ "bots" ], "summary": "Request Bot Leave Lobby", "description": "Request a bot instance to leave from all lobbies and disconnect", "operationId": "request_bot_leave_lobby_ai_voicebot_api_bots_instances__bot_instance_id__leave_post", "parameters": [ { "name": "bot_instance_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Bot Instance Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BotLeaveLobbyResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/ai-voicebot/api/bots/instances/{bot_instance_id}": { "get": { "tags": [ "bots" ], "summary": "Get Bot Instance", "description": "Get information about a specific bot instance", "operationId": "get_bot_instance_ai_voicebot_api_bots_instances__bot_instance_id__get", "parameters": [ { "name": "bot_instance_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Bot Instance Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Get Bot Instance Ai Voicebot Api Bots Instances Bot Instance Id Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/ai-voicebot/api/bots/config/schema/{bot_name}": { "get": { "tags": [ "Bot Configuration" ], "summary": "Get Bot Config Schema", "description": "Get configuration schema for a specific bot.\n\nThis endpoint will query registered bot providers each time and\nrequest the bot's /config-schema endpoint without relying on any\nserver-side cached schema. This ensures the UI always receives the\nup-to-date schema from the provider.", "operationId": "get_bot_config_schema_ai_voicebot_api_bots_config_schema__bot_name__get", "parameters": [ { "name": "bot_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Bot Name" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BotConfigSchema" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/ai-voicebot/api/bots/config/schema/instance/{bot_instance_id}": { "get": { "tags": [ "Bot Configuration" ], "summary": "Get Bot Config Schema By Instance", "description": "Get configuration schema for a specific bot instance", "operationId": "get_bot_config_schema_by_instance_ai_voicebot_api_bots_config_schema_instance__bot_instance_id__get", "parameters": [ { "name": "bot_instance_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Bot Instance Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BotConfigSchema" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/ai-voicebot/api/bots/config/schema/instance/{bot_instance_id}/refresh": { "post": { "tags": [ "Bot Configuration" ], "summary": "Refresh Bot Schema By Instance", "description": "Refresh configuration schema for a specific bot instance", "operationId": "refresh_bot_schema_by_instance_ai_voicebot_api_bots_config_schema_instance__bot_instance_id__refresh_post", "parameters": [ { "name": "bot_instance_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Bot Instance Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Refresh Bot Schema By Instance Ai Voicebot Api Bots Config Schema Instance Bot Instance Id Refresh Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/ai-voicebot/api/bots/config/lobby/{lobby_id}": { "get": { "tags": [ "Bot Configuration" ], "summary": "Get Lobby Bot Configs", "description": "Get all bot configurations for a lobby", "operationId": "get_lobby_bot_configs_ai_voicebot_api_bots_config_lobby__lobby_id__get", "parameters": [ { "name": "lobby_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Lobby Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BotConfigListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "Bot Configuration" ], "summary": "Delete Lobby Configs", "description": "Delete all bot configurations for a lobby", "operationId": "delete_lobby_configs_ai_voicebot_api_bots_config_lobby__lobby_id__delete", "parameters": [ { "name": "lobby_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Lobby Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Delete Lobby Configs Ai Voicebot Api Bots Config Lobby Lobby Id Delete" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/ai-voicebot/api/bots/config/lobby/{lobby_id}/bot/{bot_instance_id}": { "get": { "tags": [ "Bot Configuration" ], "summary": "Get Lobby Bot Config", "description": "Get specific bot configuration for a lobby", "operationId": "get_lobby_bot_config_ai_voicebot_api_bots_config_lobby__lobby_id__bot__bot_instance_id__get", "parameters": [ { "name": "lobby_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Lobby Id" } }, { "name": "bot_instance_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Bot Instance Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BotLobbyConfig" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "Bot Configuration" ], "summary": "Delete Bot Config", "description": "Delete bot configuration for a lobby", "operationId": "delete_bot_config_ai_voicebot_api_bots_config_lobby__lobby_id__bot__bot_instance_id__delete", "parameters": [ { "name": "lobby_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Lobby Id" } }, { "name": "bot_instance_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Bot Instance Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Delete Bot Config Ai Voicebot Api Bots Config Lobby Lobby Id Bot Bot Instance Id Delete" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/ai-voicebot/api/bots/config/update": { "post": { "tags": [ "Bot Configuration" ], "summary": "Update Bot Config", "description": "Update bot configuration for a lobby", "operationId": "update_bot_config_ai_voicebot_api_bots_config_update_post", "parameters": [ { "name": "session_id", "in": "query", "required": false, "schema": { "type": "string", "default": "unknown", "title": "Session Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BotConfigUpdateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BotConfigUpdateResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/ai-voicebot/api/bots/config/statistics": { "get": { "tags": [ "Bot Configuration" ], "summary": "Get Config Statistics", "description": "Get configuration manager statistics", "operationId": "get_config_statistics_ai_voicebot_api_bots_config_statistics_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": true, "type": "object", "title": "Response Get Config Statistics Ai Voicebot Api Bots Config Statistics Get" } } } } } } }, "/ai-voicebot/api/bots/config/refresh-schemas": { "post": { "tags": [ "Bot Configuration" ], "summary": "Refresh Bot Schemas", "description": "Refresh all bot configuration schemas from providers", "operationId": "refresh_bot_schemas_ai_voicebot_api_bots_config_refresh_schemas_post", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": true, "type": "object", "title": "Response Refresh Bot Schemas Ai Voicebot Api Bots Config Refresh Schemas Post" } } } } } } }, "/ai-voicebot/api/bots/config/schema/{bot_name}/refresh": { "post": { "tags": [ "Bot Configuration" ], "summary": "Refresh Bot Schema", "description": "Refresh configuration schema for a specific bot", "operationId": "refresh_bot_schema_ai_voicebot_api_bots_config_schema__bot_name__refresh_post", "parameters": [ { "name": "bot_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Bot Name" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Refresh Bot Schema Ai Voicebot Api Bots Config Schema Bot Name Refresh Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/ai-voicebot/api/health/ready": { "get": { "tags": [ "monitoring" ], "summary": "Readiness Probe", "description": "Kubernetes readiness probe endpoint.\n\nReturns:\n Ready status for load balancer inclusion", "operationId": "readiness_probe_ai_voicebot_api_health_ready_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/ai-voicebot/api/health/live": { "get": { "tags": [ "monitoring" ], "summary": "Liveness Probe", "description": "Kubernetes liveness probe endpoint.\n\nReturns:\n Alive status for container restart decisions", "operationId": "liveness_probe_ai_voicebot_api_health_live_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/ai-voicebot/api/metrics": { "get": { "tags": [ "monitoring" ], "summary": "Get Current Metrics", "description": "Get current performance metrics.\n\nReturns:\n Current system and application metrics", "operationId": "get_current_metrics_ai_voicebot_api_metrics_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/ai-voicebot/api/metrics/history": { "get": { "tags": [ "monitoring" ], "summary": "Get Metrics History", "description": "Get historical data for a specific metric.\n\nArgs:\n metric_name: Name of the metric\n minutes: Number of minutes of history to retrieve (1-60)\n\nReturns:\n Historical metric data points", "operationId": "get_metrics_history_ai_voicebot_api_metrics_history_get", "parameters": [ { "name": "metric_name", "in": "query", "required": true, "schema": { "type": "string", "description": "Name of the metric to retrieve", "title": "Metric Name" }, "description": "Name of the metric to retrieve" }, { "name": "minutes", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 60, "minimum": 1, "description": "Minutes of history to retrieve", "default": 5, "title": "Minutes" }, "description": "Minutes of history to retrieve" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/ai-voicebot/api/cache/stats": { "get": { "tags": [ "monitoring" ], "summary": "Get Cache Statistics", "description": "Get cache performance statistics.\n\nReturns:\n Cache hit rates, sizes, and performance metrics", "operationId": "get_cache_statistics_ai_voicebot_api_cache_stats_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/ai-voicebot/api/system/info": { "get": { "tags": [ "monitoring" ], "summary": "Get System Info", "description": "Get system information and configuration.\n\nReturns:\n System details, configuration, and runtime information", "operationId": "get_system_info_ai_voicebot_api_system_info_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/ai-voicebot/api/cache/clear": { "post": { "tags": [ "monitoring" ], "summary": "Clear Cache", "description": "Clear cache entries.\n\nArgs:\n cache_type: Optional specific cache to clear (session, lobby, user, message, computed)\n\nReturns:\n Cache clear results", "operationId": "clear_cache_ai_voicebot_api_cache_clear_post", "parameters": [ { "name": "cache_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Specific cache to clear", "title": "Cache Type" }, "description": "Specific cache to clear" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/ai-voicebot/api/metrics/export": { "get": { "tags": [ "monitoring" ], "summary": "Export Metrics Prometheus", "description": "Export metrics in Prometheus format.\n\nReturns:\n Metrics in Prometheus text format", "operationId": "export_metrics_prometheus_ai_voicebot_api_metrics_export_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } } }, "components": { "schemas": { "AdminActionResponse": { "properties": { "status": { "type": "string", "enum": [ "ok", "not_found", "error" ], "title": "Status" }, "name": { "type": "string", "title": "Name" } }, "type": "object", "required": [ "status", "name" ], "title": "AdminActionResponse", "description": "Response for admin actions" }, "AdminClearPassword": { "properties": { "name": { "type": "string", "title": "Name" } }, "type": "object", "required": [ "name" ], "title": "AdminClearPassword", "description": "Request model for clearing admin password" }, "AdminMetricsConfig": { "properties": { "anonymous_timeout": { "type": "integer", "title": "Anonymous Timeout" }, "displaced_timeout": { "type": "integer", "title": "Displaced Timeout" }, "cleanup_interval": { "type": "integer", "title": "Cleanup Interval" }, "max_cleanup_per_cycle": { "type": "integer", "title": "Max Cleanup Per Cycle" } }, "type": "object", "required": [ "anonymous_timeout", "displaced_timeout", "cleanup_interval", "max_cleanup_per_cycle" ], "title": "AdminMetricsConfig", "description": "Config data for metrics response" }, "AdminMetricsResponse": { "properties": { "total_sessions": { "type": "integer", "title": "Total Sessions" }, "active_sessions": { "type": "integer", "title": "Active Sessions" }, "named_sessions": { "type": "integer", "title": "Named Sessions" }, "displaced_sessions": { "type": "integer", "title": "Displaced Sessions" }, "old_anonymous_sessions": { "type": "integer", "title": "Old Anonymous Sessions" }, "old_displaced_sessions": { "type": "integer", "title": "Old Displaced Sessions" }, "total_lobbies": { "type": "integer", "title": "Total Lobbies" }, "cleanup_candidates": { "type": "integer", "title": "Cleanup Candidates" }, "config": { "$ref": "#/components/schemas/AdminMetricsConfig" } }, "type": "object", "required": [ "total_sessions", "active_sessions", "named_sessions", "displaced_sessions", "old_anonymous_sessions", "old_displaced_sessions", "total_lobbies", "cleanup_candidates", "config" ], "title": "AdminMetricsResponse", "description": "Response for admin session metrics" }, "AdminNamesResponse": { "properties": { "name_passwords": { "additionalProperties": { "$ref": "#/components/schemas/NamePasswordRecord" }, "type": "object", "title": "Name Passwords" } }, "type": "object", "required": [ "name_passwords" ], "title": "AdminNamesResponse", "description": "Response for admin names endpoint" }, "AdminSetPassword": { "properties": { "name": { "type": "string", "title": "Name" }, "password": { "type": "string", "title": "Password" } }, "type": "object", "required": [ "name", "password" ], "title": "AdminSetPassword", "description": "Request model for setting admin password" }, "AdminValidationResponse": { "properties": { "status": { "type": "string", "enum": [ "ok", "error" ], "title": "Status" }, "issues": { "items": { "type": "string" }, "type": "array", "title": "Issues", "default": [] }, "issue_count": { "type": "integer", "title": "Issue Count", "default": 0 }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error" } }, "type": "object", "required": [ "status" ], "title": "AdminValidationResponse", "description": "Response for admin session validation" }, "BotConfigListResponse": { "properties": { "lobby_id": { "type": "string", "title": "Lobby Id" }, "configs": { "items": { "$ref": "#/components/schemas/BotLobbyConfig" }, "type": "array", "title": "Configs" } }, "type": "object", "required": [ "lobby_id", "configs" ], "title": "BotConfigListResponse", "description": "Response listing bot configurations for a lobby" }, "BotConfigParameter": { "properties": { "name": { "type": "string", "title": "Name" }, "type": { "type": "string", "enum": [ "string", "number", "boolean", "select", "range" ], "title": "Type" }, "label": { "type": "string", "title": "Label" }, "description": { "type": "string", "title": "Description" }, "default_value": { "anyOf": [ {}, { "type": "null" } ], "title": "Default Value" }, "required": { "type": "boolean", "title": "Required", "default": false }, "options": { "anyOf": [ { "items": { "additionalProperties": { "type": "string" }, "type": "object" }, "type": "array" }, { "type": "null" } ], "title": "Options" }, "min_value": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Min Value" }, "max_value": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Max Value" }, "step": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Step" }, "max_length": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Max Length" }, "pattern": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Pattern" } }, "type": "object", "required": [ "name", "type", "label", "description" ], "title": "BotConfigParameter", "description": "Definition of a bot configuration parameter" }, "BotConfigSchema": { "properties": { "bot_name": { "type": "string", "title": "Bot Name" }, "version": { "type": "string", "title": "Version", "default": "1.0" }, "parameters": { "items": { "$ref": "#/components/schemas/BotConfigParameter" }, "type": "array", "title": "Parameters" }, "categories": { "anyOf": [ { "items": { "additionalProperties": { "items": { "type": "string" }, "type": "array" }, "type": "object" }, "type": "array" }, { "type": "null" } ], "title": "Categories" } }, "type": "object", "required": [ "bot_name", "parameters" ], "title": "BotConfigSchema", "description": "Schema defining all configurable parameters for a bot" }, "BotConfigUpdateRequest": { "properties": { "bot_instance_id": { "type": "string", "title": "Bot Instance Id" }, "lobby_id": { "type": "string", "title": "Lobby Id" }, "config_values": { "additionalProperties": true, "type": "object", "title": "Config Values" } }, "type": "object", "required": [ "bot_instance_id", "lobby_id", "config_values" ], "title": "BotConfigUpdateRequest", "description": "Request to update bot configuration" }, "BotConfigUpdateResponse": { "properties": { "success": { "type": "boolean", "title": "Success" }, "message": { "type": "string", "title": "Message" }, "updated_config": { "anyOf": [ { "$ref": "#/components/schemas/BotLobbyConfig" }, { "type": "null" } ] } }, "type": "object", "required": [ "success", "message" ], "title": "BotConfigUpdateResponse", "description": "Response to bot configuration update" }, "BotInfoModel": { "properties": { "name": { "type": "string", "title": "Name" }, "description": { "type": "string", "title": "Description" }, "has_media": { "type": "boolean", "title": "Has Media", "default": true }, "configurable": { "type": "boolean", "title": "Configurable", "default": false }, "config_schema": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Config Schema" } }, "type": "object", "required": [ "name", "description" ], "title": "BotInfoModel", "description": "Information about a specific bot" }, "BotJoinLobbyRequest": { "properties": { "lobby_id": { "type": "string", "title": "Lobby Id" }, "nick": { "type": "string", "title": "Nick", "default": "" }, "provider_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Provider Id" } }, "type": "object", "required": [ "lobby_id" ], "title": "BotJoinLobbyRequest", "description": "Request to make a bot join a lobby" }, "BotJoinLobbyResponse": { "properties": { "status": { "type": "string", "title": "Status" }, "bot_instance_id": { "type": "string", "title": "Bot Instance Id" }, "bot_name": { "type": "string", "title": "Bot Name" }, "run_id": { "type": "string", "title": "Run Id" }, "provider_id": { "type": "string", "title": "Provider Id" }, "session_id": { "type": "string", "title": "Session Id" } }, "type": "object", "required": [ "status", "bot_instance_id", "bot_name", "run_id", "provider_id", "session_id" ], "title": "BotJoinLobbyResponse", "description": "Response after requesting a bot to join a lobby" }, "BotLeaveLobbyResponse": { "properties": { "status": { "type": "string", "title": "Status" }, "bot_instance_id": { "type": "string", "title": "Bot Instance Id" }, "session_id": { "type": "string", "title": "Session Id" }, "run_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Run Id" } }, "type": "object", "required": [ "status", "bot_instance_id", "session_id" ], "title": "BotLeaveLobbyResponse", "description": "Response after requesting a bot to leave a lobby" }, "BotListResponse": { "properties": { "bots": { "items": { "$ref": "#/components/schemas/BotInfoModel" }, "type": "array", "title": "Bots" }, "providers": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Providers" } }, "type": "object", "required": [ "bots", "providers" ], "title": "BotListResponse", "description": "Response listing all available bots from all providers" }, "BotLobbyConfig": { "properties": { "bot_name": { "type": "string", "title": "Bot Name" }, "lobby_id": { "type": "string", "title": "Lobby Id" }, "provider_id": { "type": "string", "title": "Provider Id" }, "config_values": { "additionalProperties": true, "type": "object", "title": "Config Values" }, "created_at": { "type": "number", "title": "Created At" }, "updated_at": { "type": "number", "title": "Updated At" }, "created_by": { "type": "string", "title": "Created By" } }, "type": "object", "required": [ "bot_name", "lobby_id", "provider_id", "config_values", "created_at", "updated_at", "created_by" ], "title": "BotLobbyConfig", "description": "Bot configuration for a specific lobby" }, "BotProviderListResponse": { "properties": { "providers": { "items": { "$ref": "#/components/schemas/BotProviderPublicModel" }, "type": "array", "title": "Providers" } }, "type": "object", "required": [ "providers" ], "title": "BotProviderListResponse", "description": "Response listing all registered bot providers" }, "BotProviderPublicModel": { "properties": { "provider_id": { "type": "string", "title": "Provider Id" }, "name": { "type": "string", "title": "Name" }, "description": { "type": "string", "title": "Description", "default": "" }, "registered_at": { "type": "number", "title": "Registered At" }, "last_seen": { "type": "number", "title": "Last Seen" } }, "type": "object", "required": [ "provider_id", "name", "registered_at", "last_seen" ], "title": "BotProviderPublicModel", "description": "Public bot provider information (safe for frontend)" }, "BotProviderRegisterRequest": { "properties": { "base_url": { "type": "string", "title": "Base Url" }, "name": { "type": "string", "title": "Name" }, "description": { "type": "string", "title": "Description", "default": "" }, "provider_key": { "type": "string", "title": "Provider Key" }, "provider_id": { "type": "string", "title": "Provider Id" } }, "type": "object", "required": [ "base_url", "name", "provider_key", "provider_id" ], "title": "BotProviderRegisterRequest", "description": "Request to register a bot provider" }, "BotProviderRegisterResponse": { "properties": { "provider_id": { "type": "string", "title": "Provider Id" }, "status": { "type": "string", "title": "Status", "default": "registered" } }, "type": "object", "required": [ "provider_id" ], "title": "BotProviderRegisterResponse", "description": "Response after registering a bot provider" }, "ChatMessageModel": { "properties": { "id": { "type": "string", "title": "Id" }, "message": { "type": "string", "title": "Message" }, "sender_name": { "type": "string", "title": "Sender Name" }, "sender_session_id": { "type": "string", "title": "Sender Session Id" }, "timestamp": { "type": "number", "title": "Timestamp" }, "lobby_id": { "type": "string", "title": "Lobby Id" } }, "type": "object", "required": [ "id", "message", "sender_name", "sender_session_id", "timestamp", "lobby_id" ], "title": "ChatMessageModel", "description": "Chat message model" }, "ChatMessagesResponse": { "properties": { "messages": { "items": { "$ref": "#/components/schemas/ChatMessageModel" }, "type": "array", "title": "Messages" } }, "type": "object", "required": [ "messages" ], "title": "ChatMessagesResponse", "description": "Response containing chat messages" }, "HTTPValidationError": { "properties": { "detail": { "items": { "$ref": "#/components/schemas/ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "HealthResponse": { "properties": { "status": { "type": "string", "title": "Status" } }, "type": "object", "required": [ "status" ], "title": "HealthResponse", "description": "Health check response" }, "LobbiesResponse": { "properties": { "lobbies": { "items": { "$ref": "#/components/schemas/LobbyListItem" }, "type": "array", "title": "Lobbies" } }, "type": "object", "required": [ "lobbies" ], "title": "LobbiesResponse", "description": "Response containing list of lobbies" }, "LobbyCreateData": { "properties": { "name": { "type": "string", "title": "Name" }, "private": { "type": "boolean", "title": "Private", "default": false } }, "type": "object", "required": [ "name" ], "title": "LobbyCreateData", "description": "Data for lobby creation" }, "LobbyCreateRequest": { "properties": { "type": { "type": "string", "const": "lobby_create", "title": "Type" }, "data": { "$ref": "#/components/schemas/LobbyCreateData" } }, "type": "object", "required": [ "type", "data" ], "title": "LobbyCreateRequest", "description": "Request for creating a lobby" }, "LobbyCreateResponse": { "properties": { "type": { "type": "string", "const": "lobby_created", "title": "Type" }, "data": { "$ref": "#/components/schemas/LobbyModel" } }, "type": "object", "required": [ "type", "data" ], "title": "LobbyCreateResponse", "description": "Response for lobby creation" }, "LobbyListItem": { "properties": { "id": { "type": "string", "title": "Id" }, "name": { "type": "string", "title": "Name" } }, "type": "object", "required": [ "id", "name" ], "title": "LobbyListItem", "description": "Lobby item for list responses" }, "LobbyModel": { "properties": { "id": { "type": "string", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "private": { "type": "boolean", "title": "Private", "default": false } }, "type": "object", "required": [ "id", "name" ], "title": "LobbyModel", "description": "Core lobby model used across components" }, "NamePasswordRecord": { "properties": { "salt": { "type": "string", "title": "Salt" }, "hash": { "type": "string", "title": "Hash" } }, "type": "object", "required": [ "salt", "hash" ], "title": "NamePasswordRecord", "description": "Password hash record for reserved names" }, "SessionResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "lobbies": { "items": { "$ref": "#/components/schemas/LobbyModel" }, "type": "array", "title": "Lobbies" }, "protected": { "type": "boolean", "title": "Protected", "default": false }, "has_media": { "type": "boolean", "title": "Has Media", "default": false }, "bot_run_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Bot Run Id" }, "bot_provider_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Bot Provider Id" }, "bot_instance_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Bot Instance Id" } }, "type": "object", "required": [ "id", "name", "lobbies" ], "title": "SessionResponse", "description": "Session response model" }, "ValidationError": { "properties": { "loc": { "items": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": [ "loc", "msg", "type" ], "title": "ValidationError" } } } }