unrealon 1.0.9__py3-none-any.whl → 1.1.1__py3-none-any.whl
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.
- unrealon/__init__.py +23 -21
- unrealon-1.1.1.dist-info/METADATA +722 -0
- unrealon-1.1.1.dist-info/RECORD +82 -0
- {unrealon-1.0.9.dist-info → unrealon-1.1.1.dist-info}/WHEEL +1 -1
- unrealon-1.1.1.dist-info/entry_points.txt +9 -0
- {unrealon-1.0.9.dist-info → unrealon-1.1.1.dist-info/licenses}/LICENSE +1 -1
- unrealon_bridge/__init__.py +114 -0
- unrealon_bridge/cli.py +316 -0
- unrealon_bridge/client/__init__.py +93 -0
- unrealon_bridge/client/base.py +78 -0
- unrealon_bridge/client/commands.py +89 -0
- unrealon_bridge/client/connection.py +90 -0
- unrealon_bridge/client/events.py +65 -0
- unrealon_bridge/client/health.py +38 -0
- unrealon_bridge/client/html_parser.py +146 -0
- unrealon_bridge/client/logging.py +139 -0
- unrealon_bridge/client/proxy.py +70 -0
- unrealon_bridge/client/scheduler.py +450 -0
- unrealon_bridge/client/session.py +70 -0
- unrealon_bridge/configs/__init__.py +14 -0
- unrealon_bridge/configs/bridge_config.py +212 -0
- unrealon_bridge/configs/bridge_config.yaml +39 -0
- unrealon_bridge/models/__init__.py +138 -0
- unrealon_bridge/models/base.py +28 -0
- unrealon_bridge/models/command.py +41 -0
- unrealon_bridge/models/events.py +40 -0
- unrealon_bridge/models/html_parser.py +79 -0
- unrealon_bridge/models/logging.py +55 -0
- unrealon_bridge/models/parser.py +63 -0
- unrealon_bridge/models/proxy.py +41 -0
- unrealon_bridge/models/requests.py +95 -0
- unrealon_bridge/models/responses.py +88 -0
- unrealon_bridge/models/scheduler.py +592 -0
- unrealon_bridge/models/session.py +28 -0
- unrealon_bridge/server/__init__.py +91 -0
- unrealon_bridge/server/base.py +171 -0
- unrealon_bridge/server/handlers/__init__.py +23 -0
- unrealon_bridge/server/handlers/command.py +110 -0
- unrealon_bridge/server/handlers/html_parser.py +139 -0
- unrealon_bridge/server/handlers/logging.py +95 -0
- unrealon_bridge/server/handlers/parser.py +95 -0
- unrealon_bridge/server/handlers/proxy.py +75 -0
- unrealon_bridge/server/handlers/scheduler.py +545 -0
- unrealon_bridge/server/handlers/session.py +66 -0
- unrealon_browser/__init__.py +61 -18
- unrealon_browser/{src/cli → cli}/browser_cli.py +6 -13
- unrealon_browser/{src/cli → cli}/cookies_cli.py +5 -1
- unrealon_browser/{src/core → core}/browser_manager.py +2 -2
- unrealon_browser/{src/managers → managers}/captcha.py +1 -1
- unrealon_browser/{src/managers → managers}/cookies.py +1 -1
- unrealon_browser/managers/logger_bridge.py +231 -0
- unrealon_browser/{src/managers → managers}/profile.py +1 -1
- unrealon_driver/__init__.py +73 -19
- unrealon_driver/browser/__init__.py +8 -0
- unrealon_driver/browser/config.py +74 -0
- unrealon_driver/browser/manager.py +416 -0
- unrealon_driver/exceptions.py +28 -0
- unrealon_driver/parser/__init__.py +55 -0
- unrealon_driver/parser/cli_manager.py +141 -0
- unrealon_driver/parser/daemon_manager.py +227 -0
- unrealon_driver/parser/managers/__init__.py +46 -0
- unrealon_driver/parser/managers/browser.py +51 -0
- unrealon_driver/parser/managers/config.py +281 -0
- unrealon_driver/parser/managers/error.py +412 -0
- unrealon_driver/parser/managers/html.py +732 -0
- unrealon_driver/parser/managers/logging.py +609 -0
- unrealon_driver/parser/managers/result.py +321 -0
- unrealon_driver/parser/parser_manager.py +628 -0
- unrealon/sdk_config.py +0 -88
- unrealon-1.0.9.dist-info/METADATA +0 -810
- unrealon-1.0.9.dist-info/RECORD +0 -246
- unrealon_browser/pyproject.toml +0 -182
- unrealon_browser/src/__init__.py +0 -62
- unrealon_browser/src/managers/logger_bridge.py +0 -395
- unrealon_driver/README.md +0 -204
- unrealon_driver/pyproject.toml +0 -187
- unrealon_driver/src/__init__.py +0 -90
- unrealon_driver/src/cli/__init__.py +0 -10
- unrealon_driver/src/cli/main.py +0 -66
- unrealon_driver/src/cli/simple.py +0 -510
- unrealon_driver/src/config/__init__.py +0 -11
- unrealon_driver/src/config/auto_config.py +0 -478
- unrealon_driver/src/core/__init__.py +0 -18
- unrealon_driver/src/core/exceptions.py +0 -289
- unrealon_driver/src/core/parser.py +0 -638
- unrealon_driver/src/dto/__init__.py +0 -66
- unrealon_driver/src/dto/cli.py +0 -119
- unrealon_driver/src/dto/config.py +0 -18
- unrealon_driver/src/dto/events.py +0 -237
- unrealon_driver/src/dto/execution.py +0 -313
- unrealon_driver/src/dto/services.py +0 -311
- unrealon_driver/src/execution/__init__.py +0 -23
- unrealon_driver/src/execution/daemon_mode.py +0 -317
- unrealon_driver/src/execution/interactive_mode.py +0 -88
- unrealon_driver/src/execution/modes.py +0 -45
- unrealon_driver/src/execution/scheduled_mode.py +0 -209
- unrealon_driver/src/execution/test_mode.py +0 -250
- unrealon_driver/src/logging/__init__.py +0 -24
- unrealon_driver/src/logging/driver_logger.py +0 -512
- unrealon_driver/src/services/__init__.py +0 -24
- unrealon_driver/src/services/browser_service.py +0 -726
- unrealon_driver/src/services/llm/__init__.py +0 -15
- unrealon_driver/src/services/llm/browser_llm_service.py +0 -363
- unrealon_driver/src/services/llm/llm.py +0 -195
- unrealon_driver/src/services/logger_service.py +0 -232
- unrealon_driver/src/services/metrics_service.py +0 -185
- unrealon_driver/src/services/scheduler_service.py +0 -489
- unrealon_driver/src/services/websocket_service.py +0 -362
- unrealon_driver/src/utils/__init__.py +0 -16
- unrealon_driver/src/utils/service_factory.py +0 -317
- unrealon_driver/src/utils/time_formatter.py +0 -338
- unrealon_llm/README.md +0 -44
- unrealon_llm/__init__.py +0 -26
- unrealon_llm/pyproject.toml +0 -154
- unrealon_llm/src/__init__.py +0 -228
- unrealon_llm/src/cli/__init__.py +0 -0
- unrealon_llm/src/core/__init__.py +0 -11
- unrealon_llm/src/core/smart_client.py +0 -438
- unrealon_llm/src/dto/__init__.py +0 -155
- unrealon_llm/src/dto/models/__init__.py +0 -0
- unrealon_llm/src/dto/models/config.py +0 -343
- unrealon_llm/src/dto/models/core.py +0 -328
- unrealon_llm/src/dto/models/enums.py +0 -123
- unrealon_llm/src/dto/models/html_analysis.py +0 -345
- unrealon_llm/src/dto/models/statistics.py +0 -473
- unrealon_llm/src/dto/models/translation.py +0 -383
- unrealon_llm/src/dto/models/type_conversion.py +0 -462
- unrealon_llm/src/dto/schemas/__init__.py +0 -0
- unrealon_llm/src/exceptions.py +0 -392
- unrealon_llm/src/llm_config/__init__.py +0 -20
- unrealon_llm/src/llm_config/logging_config.py +0 -178
- unrealon_llm/src/llm_logging/__init__.py +0 -42
- unrealon_llm/src/llm_logging/llm_events.py +0 -107
- unrealon_llm/src/llm_logging/llm_logger.py +0 -466
- unrealon_llm/src/managers/__init__.py +0 -15
- unrealon_llm/src/managers/cache_manager.py +0 -67
- unrealon_llm/src/managers/cost_manager.py +0 -107
- unrealon_llm/src/managers/request_manager.py +0 -298
- unrealon_llm/src/modules/__init__.py +0 -0
- unrealon_llm/src/modules/html_processor/__init__.py +0 -25
- unrealon_llm/src/modules/html_processor/base_processor.py +0 -415
- unrealon_llm/src/modules/html_processor/details_processor.py +0 -85
- unrealon_llm/src/modules/html_processor/listing_processor.py +0 -91
- unrealon_llm/src/modules/html_processor/models/__init__.py +0 -20
- unrealon_llm/src/modules/html_processor/models/processing_models.py +0 -40
- unrealon_llm/src/modules/html_processor/models/universal_model.py +0 -56
- unrealon_llm/src/modules/html_processor/processor.py +0 -102
- unrealon_llm/src/modules/llm/__init__.py +0 -0
- unrealon_llm/src/modules/translator/__init__.py +0 -0
- unrealon_llm/src/provider.py +0 -116
- unrealon_llm/src/utils/__init__.py +0 -95
- unrealon_llm/src/utils/common.py +0 -64
- unrealon_llm/src/utils/data_extractor.py +0 -188
- unrealon_llm/src/utils/html_cleaner.py +0 -767
- unrealon_llm/src/utils/language_detector.py +0 -308
- unrealon_llm/src/utils/models_cache.py +0 -592
- unrealon_llm/src/utils/smart_counter.py +0 -229
- unrealon_llm/src/utils/token_counter.py +0 -189
- unrealon_sdk/README.md +0 -25
- unrealon_sdk/__init__.py +0 -30
- unrealon_sdk/pyproject.toml +0 -231
- unrealon_sdk/src/__init__.py +0 -150
- unrealon_sdk/src/cli/__init__.py +0 -12
- unrealon_sdk/src/cli/commands/__init__.py +0 -22
- unrealon_sdk/src/cli/commands/benchmark.py +0 -42
- unrealon_sdk/src/cli/commands/diagnostics.py +0 -573
- unrealon_sdk/src/cli/commands/health.py +0 -46
- unrealon_sdk/src/cli/commands/integration.py +0 -498
- unrealon_sdk/src/cli/commands/reports.py +0 -43
- unrealon_sdk/src/cli/commands/security.py +0 -36
- unrealon_sdk/src/cli/commands/server.py +0 -483
- unrealon_sdk/src/cli/commands/servers.py +0 -56
- unrealon_sdk/src/cli/commands/tests.py +0 -55
- unrealon_sdk/src/cli/main.py +0 -126
- unrealon_sdk/src/cli/utils/reporter.py +0 -519
- unrealon_sdk/src/clients/openapi.yaml +0 -3347
- unrealon_sdk/src/clients/python_http/__init__.py +0 -3
- unrealon_sdk/src/clients/python_http/api_config.py +0 -228
- unrealon_sdk/src/clients/python_http/models/BaseModel.py +0 -12
- unrealon_sdk/src/clients/python_http/models/BroadcastDeliveryStats.py +0 -33
- unrealon_sdk/src/clients/python_http/models/BroadcastMessage.py +0 -17
- unrealon_sdk/src/clients/python_http/models/BroadcastMessageRequest.py +0 -35
- unrealon_sdk/src/clients/python_http/models/BroadcastPriority.py +0 -10
- unrealon_sdk/src/clients/python_http/models/BroadcastResponse.py +0 -21
- unrealon_sdk/src/clients/python_http/models/BroadcastResultResponse.py +0 -33
- unrealon_sdk/src/clients/python_http/models/BroadcastTarget.py +0 -11
- unrealon_sdk/src/clients/python_http/models/ConnectionStats.py +0 -27
- unrealon_sdk/src/clients/python_http/models/ConnectionsResponse.py +0 -21
- unrealon_sdk/src/clients/python_http/models/DeveloperMessageResponse.py +0 -23
- unrealon_sdk/src/clients/python_http/models/ErrorResponse.py +0 -25
- unrealon_sdk/src/clients/python_http/models/HTTPValidationError.py +0 -16
- unrealon_sdk/src/clients/python_http/models/HealthResponse.py +0 -23
- unrealon_sdk/src/clients/python_http/models/HealthStatus.py +0 -33
- unrealon_sdk/src/clients/python_http/models/LogLevel.py +0 -10
- unrealon_sdk/src/clients/python_http/models/LoggingRequest.py +0 -27
- unrealon_sdk/src/clients/python_http/models/LoggingResponse.py +0 -23
- unrealon_sdk/src/clients/python_http/models/MaintenanceMode.py +0 -9
- unrealon_sdk/src/clients/python_http/models/MaintenanceModeRequest.py +0 -33
- unrealon_sdk/src/clients/python_http/models/MaintenanceStatusResponse.py +0 -39
- unrealon_sdk/src/clients/python_http/models/ParserCommandRequest.py +0 -25
- unrealon_sdk/src/clients/python_http/models/ParserMessageResponse.py +0 -21
- unrealon_sdk/src/clients/python_http/models/ParserRegistrationRequest.py +0 -28
- unrealon_sdk/src/clients/python_http/models/ParserRegistrationResponse.py +0 -25
- unrealon_sdk/src/clients/python_http/models/ParserType.py +0 -10
- unrealon_sdk/src/clients/python_http/models/ProxyBlockRequest.py +0 -19
- unrealon_sdk/src/clients/python_http/models/ProxyEndpointResponse.py +0 -20
- unrealon_sdk/src/clients/python_http/models/ProxyListResponse.py +0 -19
- unrealon_sdk/src/clients/python_http/models/ProxyProvider.py +0 -10
- unrealon_sdk/src/clients/python_http/models/ProxyPurchaseRequest.py +0 -25
- unrealon_sdk/src/clients/python_http/models/ProxyResponse.py +0 -47
- unrealon_sdk/src/clients/python_http/models/ProxyRotationRequest.py +0 -23
- unrealon_sdk/src/clients/python_http/models/ProxyStatus.py +0 -10
- unrealon_sdk/src/clients/python_http/models/ProxyUsageRequest.py +0 -19
- unrealon_sdk/src/clients/python_http/models/ProxyUsageStatsResponse.py +0 -26
- unrealon_sdk/src/clients/python_http/models/ServiceRegistrationDto.py +0 -23
- unrealon_sdk/src/clients/python_http/models/ServiceStatsResponse.py +0 -31
- unrealon_sdk/src/clients/python_http/models/SessionStartRequest.py +0 -23
- unrealon_sdk/src/clients/python_http/models/SuccessResponse.py +0 -25
- unrealon_sdk/src/clients/python_http/models/SystemNotificationResponse.py +0 -23
- unrealon_sdk/src/clients/python_http/models/ValidationError.py +0 -18
- unrealon_sdk/src/clients/python_http/models/ValidationErrorResponse.py +0 -21
- unrealon_sdk/src/clients/python_http/models/WebSocketMetrics.py +0 -21
- unrealon_sdk/src/clients/python_http/models/__init__.py +0 -44
- unrealon_sdk/src/clients/python_http/services/None_service.py +0 -35
- unrealon_sdk/src/clients/python_http/services/ParserManagement_service.py +0 -190
- unrealon_sdk/src/clients/python_http/services/ProxyManagement_service.py +0 -289
- unrealon_sdk/src/clients/python_http/services/SocketLogging_service.py +0 -187
- unrealon_sdk/src/clients/python_http/services/SystemHealth_service.py +0 -119
- unrealon_sdk/src/clients/python_http/services/WebSocketAPI_service.py +0 -198
- unrealon_sdk/src/clients/python_http/services/__init__.py +0 -0
- unrealon_sdk/src/clients/python_http/services/admin_service.py +0 -125
- unrealon_sdk/src/clients/python_http/services/async_None_service.py +0 -35
- unrealon_sdk/src/clients/python_http/services/async_ParserManagement_service.py +0 -190
- unrealon_sdk/src/clients/python_http/services/async_ProxyManagement_service.py +0 -289
- unrealon_sdk/src/clients/python_http/services/async_SocketLogging_service.py +0 -189
- unrealon_sdk/src/clients/python_http/services/async_SystemHealth_service.py +0 -123
- unrealon_sdk/src/clients/python_http/services/async_WebSocketAPI_service.py +0 -200
- unrealon_sdk/src/clients/python_http/services/async_admin_service.py +0 -125
- unrealon_sdk/src/clients/python_websocket/__init__.py +0 -28
- unrealon_sdk/src/clients/python_websocket/client.py +0 -490
- unrealon_sdk/src/clients/python_websocket/events.py +0 -732
- unrealon_sdk/src/clients/python_websocket/example.py +0 -136
- unrealon_sdk/src/clients/python_websocket/types.py +0 -871
- unrealon_sdk/src/core/__init__.py +0 -64
- unrealon_sdk/src/core/client.py +0 -556
- unrealon_sdk/src/core/config.py +0 -465
- unrealon_sdk/src/core/exceptions.py +0 -239
- unrealon_sdk/src/core/metadata.py +0 -191
- unrealon_sdk/src/core/models.py +0 -142
- unrealon_sdk/src/core/types.py +0 -68
- unrealon_sdk/src/dto/__init__.py +0 -268
- unrealon_sdk/src/dto/authentication.py +0 -108
- unrealon_sdk/src/dto/cache.py +0 -208
- unrealon_sdk/src/dto/common.py +0 -19
- unrealon_sdk/src/dto/concurrency.py +0 -393
- unrealon_sdk/src/dto/events.py +0 -108
- unrealon_sdk/src/dto/health.py +0 -339
- unrealon_sdk/src/dto/load_balancing.py +0 -336
- unrealon_sdk/src/dto/logging.py +0 -230
- unrealon_sdk/src/dto/performance.py +0 -165
- unrealon_sdk/src/dto/rate_limiting.py +0 -295
- unrealon_sdk/src/dto/resource_pooling.py +0 -128
- unrealon_sdk/src/dto/structured_logging.py +0 -112
- unrealon_sdk/src/dto/task_scheduling.py +0 -121
- unrealon_sdk/src/dto/websocket.py +0 -55
- unrealon_sdk/src/enterprise/__init__.py +0 -59
- unrealon_sdk/src/enterprise/authentication.py +0 -401
- unrealon_sdk/src/enterprise/cache_manager.py +0 -578
- unrealon_sdk/src/enterprise/error_recovery.py +0 -494
- unrealon_sdk/src/enterprise/event_system.py +0 -549
- unrealon_sdk/src/enterprise/health_monitor.py +0 -747
- unrealon_sdk/src/enterprise/load_balancer.py +0 -964
- unrealon_sdk/src/enterprise/logging/__init__.py +0 -68
- unrealon_sdk/src/enterprise/logging/cleanup.py +0 -156
- unrealon_sdk/src/enterprise/logging/development.py +0 -744
- unrealon_sdk/src/enterprise/logging/service.py +0 -410
- unrealon_sdk/src/enterprise/multithreading_manager.py +0 -853
- unrealon_sdk/src/enterprise/performance_monitor.py +0 -539
- unrealon_sdk/src/enterprise/proxy_manager.py +0 -696
- unrealon_sdk/src/enterprise/rate_limiter.py +0 -652
- unrealon_sdk/src/enterprise/resource_pool.py +0 -763
- unrealon_sdk/src/enterprise/task_scheduler.py +0 -709
- unrealon_sdk/src/internal/__init__.py +0 -10
- unrealon_sdk/src/internal/command_router.py +0 -497
- unrealon_sdk/src/internal/connection_manager.py +0 -397
- unrealon_sdk/src/internal/http_client.py +0 -446
- unrealon_sdk/src/internal/websocket_client.py +0 -420
- unrealon_sdk/src/provider.py +0 -471
- unrealon_sdk/src/utils.py +0 -234
- /unrealon_browser/{src/cli → cli}/__init__.py +0 -0
- /unrealon_browser/{src/cli → cli}/interactive_mode.py +0 -0
- /unrealon_browser/{src/cli → cli}/main.py +0 -0
- /unrealon_browser/{src/core → core}/__init__.py +0 -0
- /unrealon_browser/{src/dto → dto}/__init__.py +0 -0
- /unrealon_browser/{src/dto → dto}/models/config.py +0 -0
- /unrealon_browser/{src/dto → dto}/models/core.py +0 -0
- /unrealon_browser/{src/dto → dto}/models/dataclasses.py +0 -0
- /unrealon_browser/{src/dto → dto}/models/detection.py +0 -0
- /unrealon_browser/{src/dto → dto}/models/enums.py +0 -0
- /unrealon_browser/{src/dto → dto}/models/statistics.py +0 -0
- /unrealon_browser/{src/managers → managers}/__init__.py +0 -0
- /unrealon_browser/{src/managers → managers}/stealth.py +0 -0
|
@@ -1,871 +0,0 @@
|
|
|
1
|
-
"""Generated WebSocket Types for UnrealServer v3"""
|
|
2
|
-
"""Auto-generated from server models - DO NOT EDIT"""
|
|
3
|
-
|
|
4
|
-
from typing import Dict, List, Optional, Any, Union
|
|
5
|
-
from datetime import datetime
|
|
6
|
-
from pydantic import BaseModel, Field
|
|
7
|
-
from enum import Enum
|
|
8
|
-
|
|
9
|
-
class ParserStatus(str, Enum):
|
|
10
|
-
"""ParserStatus types."""
|
|
11
|
-
REGISTERING = "registering"
|
|
12
|
-
ACTIVE = "active"
|
|
13
|
-
IDLE = "idle"
|
|
14
|
-
BUSY = "busy"
|
|
15
|
-
ERROR = "error"
|
|
16
|
-
OFFLINE = "offline"
|
|
17
|
-
|
|
18
|
-
class ParserType(str, Enum):
|
|
19
|
-
"""ParserType types."""
|
|
20
|
-
ENCAR = "encar"
|
|
21
|
-
MOBILE = "mobile"
|
|
22
|
-
REALESTATE = "realestate"
|
|
23
|
-
CUSTOM = "custom"
|
|
24
|
-
GENERAL = "general"
|
|
25
|
-
|
|
26
|
-
class ProcessingPhase(str, Enum):
|
|
27
|
-
"""ProcessingPhase types."""
|
|
28
|
-
INITIALIZING = "initializing"
|
|
29
|
-
CONNECTING = "connecting"
|
|
30
|
-
FETCHING_LISTINGS = "fetching_listings"
|
|
31
|
-
PROCESSING_DETAILS = "processing_details"
|
|
32
|
-
VALIDATING_DATA = "validating_data"
|
|
33
|
-
FINALIZING = "finalizing"
|
|
34
|
-
COMPLETED = "completed"
|
|
35
|
-
|
|
36
|
-
class CommandStatus(str, Enum):
|
|
37
|
-
"""CommandStatus types."""
|
|
38
|
-
PENDING = "pending"
|
|
39
|
-
RUNNING = "running"
|
|
40
|
-
COMPLETED = "completed"
|
|
41
|
-
FAILED = "failed"
|
|
42
|
-
CANCELLED = "cancelled"
|
|
43
|
-
TIMEOUT = "timeout"
|
|
44
|
-
|
|
45
|
-
class CommandType(str, Enum):
|
|
46
|
-
"""CommandType types."""
|
|
47
|
-
START_PARSING = "start_parsing"
|
|
48
|
-
STOP_PARSING = "stop_parsing"
|
|
49
|
-
PAUSE_PARSING = "pause_parsing"
|
|
50
|
-
RESUME_PARSING = "resume_parsing"
|
|
51
|
-
GET_STATUS = "get_status"
|
|
52
|
-
UPDATE_CONFIG = "update_config"
|
|
53
|
-
HEALTH_CHECK = "health_check"
|
|
54
|
-
|
|
55
|
-
class CommandPriority(str, Enum):
|
|
56
|
-
"""CommandPriority types."""
|
|
57
|
-
LOW = "low"
|
|
58
|
-
NORMAL = "normal"
|
|
59
|
-
HIGH = "high"
|
|
60
|
-
URGENT = "urgent"
|
|
61
|
-
|
|
62
|
-
class ServiceStatus(str, Enum):
|
|
63
|
-
"""ServiceStatus types."""
|
|
64
|
-
IDLE = "idle"
|
|
65
|
-
READY = "ready"
|
|
66
|
-
RUNNING = "running"
|
|
67
|
-
PAUSED = "paused"
|
|
68
|
-
ERROR = "error"
|
|
69
|
-
STOPPED = "stopped"
|
|
70
|
-
|
|
71
|
-
class ServiceType(str, Enum):
|
|
72
|
-
"""ServiceType types."""
|
|
73
|
-
SCRAPER = "scraper"
|
|
74
|
-
CRAWLER = "crawler"
|
|
75
|
-
MONITOR = "monitor"
|
|
76
|
-
ANALYZER = "analyzer"
|
|
77
|
-
EXTRACTOR = "extractor"
|
|
78
|
-
|
|
79
|
-
class AdminWebsocketChannel(str, Enum):
|
|
80
|
-
"""AdminWebsocketChannel types."""
|
|
81
|
-
ADMIN_EVENTS = "admin_events"
|
|
82
|
-
SYSTEM_METRICS = "admin_system_metrics"
|
|
83
|
-
OPERATIONS = "admin_operations"
|
|
84
|
-
ALERTS = "admin_alerts"
|
|
85
|
-
CRITICAL_ALERTS = "admin_critical_alerts"
|
|
86
|
-
WARNINGS = "admin_warnings"
|
|
87
|
-
USER_ACTIVITY = "admin_user_activity"
|
|
88
|
-
PROXY_STATUS = "admin_proxy_status"
|
|
89
|
-
PARSER_STATUS = "admin_parser_status"
|
|
90
|
-
REAL_TIME_ANALYTICS = "admin_real_time_analytics"
|
|
91
|
-
|
|
92
|
-
class SubscriptionType(str, Enum):
|
|
93
|
-
"""SubscriptionType types."""
|
|
94
|
-
REAL_TIME_METRICS = "real_time_metrics"
|
|
95
|
-
SYSTEM_ALERTS = "system_alerts"
|
|
96
|
-
OPERATION_PROGRESS = "operation_progress"
|
|
97
|
-
USER_ACTIVITIES = "user_activities"
|
|
98
|
-
PROXY_UPDATES = "proxy_updates"
|
|
99
|
-
PARSER_UPDATES = "parser_updates"
|
|
100
|
-
CUSTOM_ANALYTICS = "custom_analytics"
|
|
101
|
-
|
|
102
|
-
class AdminEventType(str, Enum):
|
|
103
|
-
"""AdminEventType types."""
|
|
104
|
-
OPERATION_STARTED = "operation_started"
|
|
105
|
-
OPERATION_PROGRESS = "operation_progress"
|
|
106
|
-
OPERATION_COMPLETED = "operation_completed"
|
|
107
|
-
OPERATION_ERROR = "operation_error"
|
|
108
|
-
PROXY_STATUS_CHANGED = "proxy_status_changed"
|
|
109
|
-
PROXY_INVENTORY_LOW = "proxy_inventory_low"
|
|
110
|
-
PROXY_PROCUREMENT_COMPLETED = "proxy_procurement_completed"
|
|
111
|
-
PROXY_VALIDATION_FAILED = "proxy_validation_failed"
|
|
112
|
-
PARSER_CONNECTED = "parser_connected"
|
|
113
|
-
PARSER_DISCONNECTED = "parser_disconnected"
|
|
114
|
-
PARSER_ERROR = "parser_error"
|
|
115
|
-
SYSTEM_THRESHOLD_BREACHED = "system_threshold_breached"
|
|
116
|
-
SERVICE_ERROR = "service_error"
|
|
117
|
-
PERFORMANCE_DEGRADATION = "performance_degradation"
|
|
118
|
-
SYSTEM_DOWN = "system_down"
|
|
119
|
-
ADMIN_ACTION_PERFORMED = "admin_action_performed"
|
|
120
|
-
ADMIN_ACCESS_DENIED = "admin_access_denied"
|
|
121
|
-
USER_MANAGEMENT = "user_management"
|
|
122
|
-
|
|
123
|
-
class SystemOperationType(str, Enum):
|
|
124
|
-
"""SystemOperationType types."""
|
|
125
|
-
SERVICE_RESTART = "service_restart"
|
|
126
|
-
SERVICE_STOP = "service_stop"
|
|
127
|
-
SERVICE_START = "service_start"
|
|
128
|
-
PARSER_RESTART = "parser_restart"
|
|
129
|
-
PARSER_DISCONNECT = "parser_disconnect"
|
|
130
|
-
SYSTEM_MAINTENANCE = "system_maintenance"
|
|
131
|
-
CACHE_CLEAR = "cache_clear"
|
|
132
|
-
LOG_ROTATION = "log_rotation"
|
|
133
|
-
DATABASE_BACKUP = "database_backup"
|
|
134
|
-
HEALTH_CHECK = "health_check"
|
|
135
|
-
PERFORMANCE_TEST = "performance_test"
|
|
136
|
-
EMERGENCY_SHUTDOWN = "emergency_shutdown"
|
|
137
|
-
|
|
138
|
-
class SystemComponentType(str, Enum):
|
|
139
|
-
"""SystemComponentType types."""
|
|
140
|
-
PARSER = "parser"
|
|
141
|
-
SERVICE = "service"
|
|
142
|
-
DATABASE = "database"
|
|
143
|
-
CACHE = "cache"
|
|
144
|
-
WEBSOCKET = "websocket"
|
|
145
|
-
PROXY_POOL = "proxy_pool"
|
|
146
|
-
LOGGING = "logging"
|
|
147
|
-
API_SERVER = "api_server"
|
|
148
|
-
ENTIRE_SYSTEM = "entire_system"
|
|
149
|
-
|
|
150
|
-
class OperationPriority(str, Enum):
|
|
151
|
-
"""OperationPriority types."""
|
|
152
|
-
LOW = "low"
|
|
153
|
-
NORMAL = "normal"
|
|
154
|
-
HIGH = "high"
|
|
155
|
-
URGENT = "urgent"
|
|
156
|
-
EMERGENCY = "emergency"
|
|
157
|
-
|
|
158
|
-
class ProxyProvider(str, Enum):
|
|
159
|
-
"""ProxyProvider types."""
|
|
160
|
-
PROXY6 = "proxy6"
|
|
161
|
-
PROXY_CHEAP = "proxy_cheap"
|
|
162
|
-
PROXY_SELLER = "proxy_seller"
|
|
163
|
-
OXYLABS = "oxylabs"
|
|
164
|
-
BRIGHT_DATA = "bright_data"
|
|
165
|
-
|
|
166
|
-
class ProxyStatus(str, Enum):
|
|
167
|
-
"""ProxyStatus types."""
|
|
168
|
-
ACTIVE = "active"
|
|
169
|
-
INACTIVE = "inactive"
|
|
170
|
-
EXPIRED = "expired"
|
|
171
|
-
BLOCKED = "blocked"
|
|
172
|
-
ERROR = "error"
|
|
173
|
-
|
|
174
|
-
class ProxyProtocol(str, Enum):
|
|
175
|
-
"""ProxyProtocol types."""
|
|
176
|
-
HTTP = "http"
|
|
177
|
-
HTTPS = "https"
|
|
178
|
-
SOCKS4 = "socks4"
|
|
179
|
-
SOCKS5 = "socks5"
|
|
180
|
-
|
|
181
|
-
class ProxyRotationStrategy(str, Enum):
|
|
182
|
-
"""ProxyRotationStrategy types."""
|
|
183
|
-
ROUND_ROBIN = "round_robin"
|
|
184
|
-
SUCCESS_RATE = "success_rate"
|
|
185
|
-
WEIGHTED_RANDOM = "weighted_random"
|
|
186
|
-
LEAST_FAILURES = "least_failures"
|
|
187
|
-
LEAST_USED = "least_used"
|
|
188
|
-
|
|
189
|
-
class WebSocketEventBase(BaseModel):
|
|
190
|
-
"""Base model for all WebSocket events."""
|
|
191
|
-
|
|
192
|
-
timestamp: str = Field(..., description="Event timestamp")
|
|
193
|
-
session_id: Any = Field(..., description="Session identifier")
|
|
194
|
-
|
|
195
|
-
class ConnectionEvent(BaseModel):
|
|
196
|
-
"""WebSocket connection established event."""
|
|
197
|
-
|
|
198
|
-
timestamp: str = Field(..., description="Event timestamp")
|
|
199
|
-
session_id: str = Field(..., description="Session identifier")
|
|
200
|
-
event_type: str = Field(..., description="Event type")
|
|
201
|
-
connection_type: str = Field(..., description="Connection type (parser/client)")
|
|
202
|
-
message: str = Field(..., description="Connection message")
|
|
203
|
-
|
|
204
|
-
class PongEvent(BaseModel):
|
|
205
|
-
"""WebSocket pong response event."""
|
|
206
|
-
|
|
207
|
-
timestamp: str = Field(..., description="Event timestamp")
|
|
208
|
-
session_id: Any = Field(..., description="Session identifier")
|
|
209
|
-
event_type: str = Field(..., description="Event type")
|
|
210
|
-
data: Dict[str, Any] = Field(..., description="Pong data")
|
|
211
|
-
|
|
212
|
-
class ErrorEvent(BaseModel):
|
|
213
|
-
"""WebSocket error event."""
|
|
214
|
-
|
|
215
|
-
timestamp: str = Field(..., description="Event timestamp")
|
|
216
|
-
session_id: Any = Field(..., description="Session identifier")
|
|
217
|
-
event_type: str = Field(..., description="Event type")
|
|
218
|
-
code: str = Field(..., description="Error code")
|
|
219
|
-
message: str = Field(..., description="Error message")
|
|
220
|
-
details: Any = Field(..., description="Additional error details")
|
|
221
|
-
|
|
222
|
-
class ParserWebSocketRegistrationRequest(BaseModel):
|
|
223
|
-
"""Parser WebSocket session registration request - simple data model."""
|
|
224
|
-
|
|
225
|
-
parser_id: str = Field(..., description="Parser identifier")
|
|
226
|
-
developer_id: str = Field(..., description="Developer identifier")
|
|
227
|
-
|
|
228
|
-
class ParserRegisteredEvent(BaseModel):
|
|
229
|
-
"""Parser registration success event."""
|
|
230
|
-
|
|
231
|
-
timestamp: str = Field(..., description="Event timestamp")
|
|
232
|
-
session_id: Any = Field(..., description="Session identifier")
|
|
233
|
-
event_type: str = Field(..., description="Event type")
|
|
234
|
-
parser_id: str = Field(..., description="Parser identifier")
|
|
235
|
-
status: str = Field(..., description="Registration status")
|
|
236
|
-
capabilities: List[str] = Field(..., description="Parser capabilities")
|
|
237
|
-
message: str = Field(..., description="Success message")
|
|
238
|
-
|
|
239
|
-
class ParserCommandEvent(BaseModel):
|
|
240
|
-
"""Parser command execution event."""
|
|
241
|
-
|
|
242
|
-
timestamp: str = Field(..., description="Event timestamp")
|
|
243
|
-
session_id: Any = Field(..., description="Session identifier")
|
|
244
|
-
event_type: str = Field(..., description="Event type (command_execute/command_result)")
|
|
245
|
-
command_id: str = Field(..., description="Command identifier")
|
|
246
|
-
parser_id: str = Field(..., description="Target parser identifier")
|
|
247
|
-
command_type: str = Field(..., description="Command type")
|
|
248
|
-
payload: Dict[str, Any] = Field(..., description="Command payload")
|
|
249
|
-
status: Any = Field(..., description="Command status")
|
|
250
|
-
|
|
251
|
-
class ParserStatusEvent(BaseModel):
|
|
252
|
-
"""Parser status update event."""
|
|
253
|
-
|
|
254
|
-
timestamp: str = Field(..., description="Event timestamp")
|
|
255
|
-
session_id: Any = Field(..., description="Session identifier")
|
|
256
|
-
event_type: str = Field(..., description="Event type")
|
|
257
|
-
parser_id: str = Field(..., description="Parser identifier")
|
|
258
|
-
status: str = Field(..., description="Parser status")
|
|
259
|
-
last_seen: str = Field(..., description="Last seen timestamp")
|
|
260
|
-
metrics: Any = Field(..., description="Performance metrics")
|
|
261
|
-
|
|
262
|
-
class NotificationEvent(BaseModel):
|
|
263
|
-
"""General notification event."""
|
|
264
|
-
|
|
265
|
-
timestamp: str = Field(..., description="Event timestamp")
|
|
266
|
-
session_id: Any = Field(..., description="Session identifier")
|
|
267
|
-
event_type: str = Field(..., description="Event type")
|
|
268
|
-
notification_type: str = Field(..., description="Notification type")
|
|
269
|
-
title: str = Field(..., description="Notification title")
|
|
270
|
-
message: str = Field(..., description="Notification message")
|
|
271
|
-
priority: str = Field(..., description="Notification priority")
|
|
272
|
-
metadata: Dict[str, Any] = Field(..., description="Additional metadata")
|
|
273
|
-
|
|
274
|
-
class SystemEvent(BaseModel):
|
|
275
|
-
"""System-wide event."""
|
|
276
|
-
|
|
277
|
-
timestamp: str = Field(..., description="Event timestamp")
|
|
278
|
-
session_id: Any = Field(..., description="Session identifier")
|
|
279
|
-
event_type: str = Field(..., description="Event type")
|
|
280
|
-
system_event_type: str = Field(..., description="System event type")
|
|
281
|
-
data: Dict[str, Any] = Field(..., description="System event data")
|
|
282
|
-
affected_components: List[str] = Field(..., description="Affected components")
|
|
283
|
-
|
|
284
|
-
class LogEntryMessage(BaseModel):
|
|
285
|
-
"""WebSocket message for log entry broadcast."""
|
|
286
|
-
|
|
287
|
-
type: str = Field(..., description="Message type")
|
|
288
|
-
session_id: str = Field(..., description="Session identifier")
|
|
289
|
-
entry: Dict[str, Any] = Field(..., description="Log entry data")
|
|
290
|
-
timestamp: str = Field(..., description="Timestamp in ISO format")
|
|
291
|
-
|
|
292
|
-
class CommandMessage(BaseModel):
|
|
293
|
-
"""WebSocket message for command routing."""
|
|
294
|
-
|
|
295
|
-
type: str = Field(..., description="Message type")
|
|
296
|
-
command_id: str = Field(..., description="Command identifier")
|
|
297
|
-
command: str = Field(..., description="Command to execute")
|
|
298
|
-
parameters: Dict[str, Any] = Field(..., description="Command parameters")
|
|
299
|
-
timeout: int = Field(..., description="Command timeout")
|
|
300
|
-
priority: str = Field(..., description="Command priority")
|
|
301
|
-
metadata: Dict[str, Any] = Field(..., description="Additional metadata")
|
|
302
|
-
developer_id: str = Field(..., description="Developer identifier")
|
|
303
|
-
timestamp: str = Field(..., description="Timestamp in ISO format")
|
|
304
|
-
|
|
305
|
-
class CommandCompletionMessage(BaseModel):
|
|
306
|
-
"""WebSocket message for command completion notification."""
|
|
307
|
-
|
|
308
|
-
type: str = Field(..., description="Message type")
|
|
309
|
-
command_id: str = Field(..., description="Command identifier")
|
|
310
|
-
status: str = Field(..., description="Command completion status")
|
|
311
|
-
parser_id: str = Field(..., description="Parser identifier")
|
|
312
|
-
execution_time_ms: Any = Field(..., description="Execution time in milliseconds")
|
|
313
|
-
completed_at: Any = Field(..., description="Completion timestamp in ISO format")
|
|
314
|
-
has_result: bool = Field(..., description="Whether command has result data")
|
|
315
|
-
has_error: bool = Field(..., description="Whether command has error")
|
|
316
|
-
timestamp: str = Field(..., description="Timestamp in ISO format")
|
|
317
|
-
|
|
318
|
-
class AdminBroadcastMessage(BaseModel):
|
|
319
|
-
"""WebSocket message for admin broadcast."""
|
|
320
|
-
|
|
321
|
-
message_id: str = Field(..., description="Unique broadcast message identifier")
|
|
322
|
-
type: str = Field(..., description="Message type (admin_broadcast, etc.)")
|
|
323
|
-
content: str = Field(..., description="Broadcast message content")
|
|
324
|
-
priority: str = Field(..., description="Message priority level")
|
|
325
|
-
timestamp: str = Field(..., description="Timestamp in ISO format")
|
|
326
|
-
persistent: bool = Field(..., description="Whether message is persistent")
|
|
327
|
-
metadata: Dict[str, Any] = Field(..., description="Additional metadata")
|
|
328
|
-
|
|
329
|
-
class MaintenanceNotificationMessage(BaseModel):
|
|
330
|
-
"""WebSocket message for maintenance notifications."""
|
|
331
|
-
|
|
332
|
-
type: str = Field(..., description="Message type")
|
|
333
|
-
message: str = Field(..., description="Maintenance notification message")
|
|
334
|
-
maintenance_active: bool = Field(..., description="Whether maintenance is active")
|
|
335
|
-
timestamp: str = Field(..., description="Timestamp in ISO format")
|
|
336
|
-
grace_period_minutes: Any = Field(..., description="Grace period in minutes")
|
|
337
|
-
affected_services: List[str] = Field(..., description="Affected services")
|
|
338
|
-
|
|
339
|
-
class ConnectionInfo(BaseModel):
|
|
340
|
-
"""Pydantic model for WebSocket connection information."""
|
|
341
|
-
|
|
342
|
-
connected_at: str = Field(..., description="Connection establishment time")
|
|
343
|
-
last_seen: str = Field(..., description="Last activity timestamp")
|
|
344
|
-
auth: Any = Field(..., description="Authentication data")
|
|
345
|
-
environ: Any = Field(..., description="ASGI environ data")
|
|
346
|
-
parser_id: Any = Field(..., description="Associated parser ID")
|
|
347
|
-
developer_id: Any = Field(..., description="Associated developer ID")
|
|
348
|
-
connection_type: str = Field(..., description="Connection type")
|
|
349
|
-
metadata: Dict[str, Any] = Field(..., description="Additional metadata")
|
|
350
|
-
|
|
351
|
-
class ConnectionStats(BaseModel):
|
|
352
|
-
"""Pydantic model for WebSocket connection statistics."""
|
|
353
|
-
|
|
354
|
-
total_connections: int = Field(..., description="Total active connections")
|
|
355
|
-
parser_connections: int = Field(..., description="Parser connections")
|
|
356
|
-
client_connections: int = Field(..., description="Client connections")
|
|
357
|
-
active_rooms: int = Field(..., description="Number of active rooms")
|
|
358
|
-
max_connections: int = Field(..., description="Maximum allowed connections")
|
|
359
|
-
metrics: Any = Field(..., description="Performance metrics")
|
|
360
|
-
|
|
361
|
-
class HealthStatus(BaseModel):
|
|
362
|
-
"""Pydantic model for WebSocket service health status."""
|
|
363
|
-
|
|
364
|
-
status: str = Field(..., description="Health status")
|
|
365
|
-
websocket_server: str = Field(..., description="WebSocket server type")
|
|
366
|
-
active_connections: int = Field(..., description="Number of active connections")
|
|
367
|
-
connected_parsers: int = Field(..., description="Number of connected parsers")
|
|
368
|
-
connected_developers: int = Field(..., description="Number of connected developers")
|
|
369
|
-
active_rooms: int = Field(..., description="Number of active rooms")
|
|
370
|
-
max_connections: int = Field(..., description="Maximum allowed connections")
|
|
371
|
-
metrics: Any = Field(..., description="Performance metrics")
|
|
372
|
-
error: Any = Field(..., description="Error message if unhealthy")
|
|
373
|
-
|
|
374
|
-
class WebSocketMetrics(BaseModel):
|
|
375
|
-
"""Pydantic model for WebSocket performance metrics."""
|
|
376
|
-
|
|
377
|
-
connections_opened: int = Field(..., description="Total connections opened")
|
|
378
|
-
connections_closed: int = Field(..., description="Total connections closed")
|
|
379
|
-
messages_sent: int = Field(..., description="Total messages sent")
|
|
380
|
-
messages_received: int = Field(..., description="Total messages received")
|
|
381
|
-
|
|
382
|
-
class BroadcastResponse(BaseModel):
|
|
383
|
-
"""Response model for broadcast operations."""
|
|
384
|
-
|
|
385
|
-
success: bool = Field(..., description="Whether broadcast was successful")
|
|
386
|
-
room: str = Field(..., description="Target room")
|
|
387
|
-
event: str = Field(..., description="Event type")
|
|
388
|
-
message_sent: bool = Field(..., description="Whether message was sent")
|
|
389
|
-
|
|
390
|
-
class ParserMessageResponse(BaseModel):
|
|
391
|
-
"""Response model for parser message operations."""
|
|
392
|
-
|
|
393
|
-
success: bool = Field(..., description="Whether message was sent")
|
|
394
|
-
parser_id: str = Field(..., description="Target parser ID")
|
|
395
|
-
event: str = Field(..., description="Event type")
|
|
396
|
-
message_sent: bool = Field(..., description="Whether message was sent")
|
|
397
|
-
|
|
398
|
-
class DeveloperMessageResponse(BaseModel):
|
|
399
|
-
"""Response model for developer message operations."""
|
|
400
|
-
|
|
401
|
-
success: bool = Field(..., description="Whether message was sent")
|
|
402
|
-
developer_id: str = Field(..., description="Target developer ID")
|
|
403
|
-
event: str = Field(..., description="Event type")
|
|
404
|
-
sessions_reached: int = Field(..., description="Number of sessions reached")
|
|
405
|
-
message_sent: bool = Field(..., description="Whether message was sent")
|
|
406
|
-
|
|
407
|
-
class ConnectionsResponse(BaseModel):
|
|
408
|
-
"""Response model for connections information."""
|
|
409
|
-
|
|
410
|
-
connected_parsers: List[str] = Field(..., description="List of connected parser IDs")
|
|
411
|
-
connected_developers: List[str] = Field(..., description="List of connected developer IDs")
|
|
412
|
-
total_parsers: int = Field(..., description="Total number of connected parsers")
|
|
413
|
-
total_developers: int = Field(..., description="Total number of connected developers")
|
|
414
|
-
|
|
415
|
-
class SystemNotificationResponse(BaseModel):
|
|
416
|
-
"""Response model for system notification broadcast."""
|
|
417
|
-
|
|
418
|
-
success: bool = Field(..., description="Whether notification was sent")
|
|
419
|
-
title: str = Field(..., description="Notification title")
|
|
420
|
-
content: str = Field(..., description="Notification content")
|
|
421
|
-
priority: str = Field(..., description="Notification priority")
|
|
422
|
-
broadcasted: bool = Field(..., description="Whether notification was broadcasted")
|
|
423
|
-
|
|
424
|
-
class DomainEvent(BaseModel):
|
|
425
|
-
"""Base class for all domain events."""
|
|
426
|
-
|
|
427
|
-
event_id: str
|
|
428
|
-
event_type: str
|
|
429
|
-
aggregate_id: str
|
|
430
|
-
occurred_at: str
|
|
431
|
-
version: int
|
|
432
|
-
data: Dict[str, Any]
|
|
433
|
-
metadata: Dict[str, Any]
|
|
434
|
-
|
|
435
|
-
class ParserRegisteredEvent(BaseModel):
|
|
436
|
-
"""Event fired when parser is registered."""
|
|
437
|
-
|
|
438
|
-
event_id: str
|
|
439
|
-
event_type: str
|
|
440
|
-
aggregate_id: str
|
|
441
|
-
occurred_at: str
|
|
442
|
-
version: int
|
|
443
|
-
data: Dict[str, Any]
|
|
444
|
-
metadata: Dict[str, Any]
|
|
445
|
-
|
|
446
|
-
class ParserDisconnectedEvent(BaseModel):
|
|
447
|
-
"""Event fired when parser disconnects."""
|
|
448
|
-
|
|
449
|
-
event_id: str
|
|
450
|
-
event_type: str
|
|
451
|
-
aggregate_id: str
|
|
452
|
-
occurred_at: str
|
|
453
|
-
version: int
|
|
454
|
-
data: Dict[str, Any]
|
|
455
|
-
metadata: Dict[str, Any]
|
|
456
|
-
|
|
457
|
-
class ParserStatusChangedEvent(BaseModel):
|
|
458
|
-
"""Event fired when parser status changes."""
|
|
459
|
-
|
|
460
|
-
event_id: str
|
|
461
|
-
event_type: str
|
|
462
|
-
aggregate_id: str
|
|
463
|
-
occurred_at: str
|
|
464
|
-
version: int
|
|
465
|
-
data: Dict[str, Any]
|
|
466
|
-
metadata: Dict[str, Any]
|
|
467
|
-
|
|
468
|
-
class AdminWebSocketEvent(BaseModel):
|
|
469
|
-
"""Base class for admin WebSocket events."""
|
|
470
|
-
|
|
471
|
-
success: bool = Field(..., description="Operation success status")
|
|
472
|
-
message: str = Field(..., description="Human-readable event message")
|
|
473
|
-
data: Any = Field(..., description="Optional response data")
|
|
474
|
-
timestamp: str = Field(..., description="Event timestamp")
|
|
475
|
-
request_id: Any = Field(..., description="Original request tracking ID")
|
|
476
|
-
type: str = Field(..., description="Event type identifier")
|
|
477
|
-
event_id: str = Field(..., description="Unique event identifier")
|
|
478
|
-
severity: Any = Field(..., description="Event severity")
|
|
479
|
-
component: str = Field(..., description="Component generating event")
|
|
480
|
-
details: Dict[str, Any] = Field(..., description="Event details")
|
|
481
|
-
requires_action: bool = Field(..., description="Whether admin action needed")
|
|
482
|
-
auto_resolve: bool = Field(..., description="Whether event auto-resolves")
|
|
483
|
-
|
|
484
|
-
class OperationProgressWebSocketEvent(BaseModel):
|
|
485
|
-
"""Operation progress WebSocket event."""
|
|
486
|
-
|
|
487
|
-
success: bool = Field(..., description="Operation success status")
|
|
488
|
-
message: str = Field(..., description="Human-readable event message")
|
|
489
|
-
data: Any = Field(..., description="Optional response data")
|
|
490
|
-
timestamp: str = Field(..., description="Event timestamp")
|
|
491
|
-
request_id: Any = Field(..., description="Original request tracking ID")
|
|
492
|
-
type: str = Field(..., description="Event type")
|
|
493
|
-
event_id: str = Field(..., description="Unique event identifier")
|
|
494
|
-
severity: Any = Field(..., description="Event severity")
|
|
495
|
-
component: str = Field(..., description="Component generating event")
|
|
496
|
-
details: Dict[str, Any] = Field(..., description="Event details")
|
|
497
|
-
requires_action: bool = Field(..., description="Whether admin action needed")
|
|
498
|
-
auto_resolve: bool = Field(..., description="Whether event auto-resolves")
|
|
499
|
-
operation_id: str = Field(..., description="Operation identifier")
|
|
500
|
-
operation_type: Any = Field(..., description="Operation type")
|
|
501
|
-
status: Any = Field(..., description="Current status")
|
|
502
|
-
progress: int = Field(..., description="Progress percentage")
|
|
503
|
-
current_step: str = Field(..., description="Current operation step")
|
|
504
|
-
steps_completed: int = Field(..., description="Steps completed")
|
|
505
|
-
total_steps: int = Field(..., description="Total steps")
|
|
506
|
-
started_at: str = Field(..., description="Operation start time")
|
|
507
|
-
estimated_completion: Any = Field(..., description="Estimated completion")
|
|
508
|
-
success_count: int = Field(..., description="Successful operations")
|
|
509
|
-
error_count: int = Field(..., description="Failed operations")
|
|
510
|
-
last_error: Any = Field(..., description="Most recent error message")
|
|
511
|
-
|
|
512
|
-
class Proxy(BaseModel):
|
|
513
|
-
"""
|
|
514
|
-
Proxy domain entity.
|
|
515
|
-
|
|
516
|
-
Represents a proxy resource with connection details, usage statistics,
|
|
517
|
-
and management metadata following Clean Architecture principles.
|
|
518
|
-
"""
|
|
519
|
-
|
|
520
|
-
proxy_id: Any = Field(..., description="Unique proxy identifier")
|
|
521
|
-
provider: Any = Field(..., description="Proxy provider")
|
|
522
|
-
provider_proxy_id: Any = Field(..., description="Provider's internal proxy ID")
|
|
523
|
-
endpoint: Any = Field(..., description="Proxy connection endpoint")
|
|
524
|
-
credentials: Any = Field(..., description="Authentication credentials")
|
|
525
|
-
country: str = Field(..., description="Proxy country code")
|
|
526
|
-
region: Any = Field(..., description="Proxy region/state")
|
|
527
|
-
city: Any = Field(..., description="Proxy city")
|
|
528
|
-
status: Any = Field(..., description="Current proxy status")
|
|
529
|
-
created_at: str = Field(..., description="Creation timestamp")
|
|
530
|
-
expires_at: Any = Field(..., description="Expiration timestamp")
|
|
531
|
-
last_validated_at: Any = Field(..., description="Last validation timestamp")
|
|
532
|
-
usage_stats: Any = Field(..., description="Usage statistics")
|
|
533
|
-
shared: bool = Field(..., description="Whether this is a shared proxy")
|
|
534
|
-
tags: List[str] = Field(..., description="Proxy tags for categorization")
|
|
535
|
-
metadata: Dict[str, Any] = Field(..., description="Additional metadata")
|
|
536
|
-
|
|
537
|
-
class ProxyEndpoint(BaseModel):
|
|
538
|
-
"""Proxy connection endpoint."""
|
|
539
|
-
|
|
540
|
-
host: str = Field(..., description="Proxy host/IP address")
|
|
541
|
-
port: int = Field(..., description="Proxy port")
|
|
542
|
-
protocol: Any = Field(..., description="Proxy protocol")
|
|
543
|
-
|
|
544
|
-
class ProxyCredentials(BaseModel):
|
|
545
|
-
"""Proxy authentication credentials."""
|
|
546
|
-
|
|
547
|
-
username: str = Field(..., description="Proxy username")
|
|
548
|
-
password: str = Field(..., description="Proxy password")
|
|
549
|
-
|
|
550
|
-
class ProxyUsageStats(BaseModel):
|
|
551
|
-
"""Proxy usage statistics."""
|
|
552
|
-
|
|
553
|
-
total_requests: int = Field(..., description="Total requests made")
|
|
554
|
-
successful_requests: int = Field(..., description="Successful requests")
|
|
555
|
-
failed_requests: int = Field(..., description="Failed requests")
|
|
556
|
-
consecutive_failures: int = Field(..., description="Consecutive failures")
|
|
557
|
-
avg_response_time_ms: float = Field(..., description="Average response time")
|
|
558
|
-
last_used_at: Any = Field(..., description="Last usage timestamp")
|
|
559
|
-
blocked_count: int = Field(..., description="Number of times blocked")
|
|
560
|
-
|
|
561
|
-
class ProxyAllocation(BaseModel):
|
|
562
|
-
"""Proxy allocation to a parser."""
|
|
563
|
-
|
|
564
|
-
parser_id: str = Field(..., description="Parser identifier")
|
|
565
|
-
proxy: Dict[str, Any] = Field(..., description="Allocated proxy details")
|
|
566
|
-
allocated_at: str = Field(..., description="Allocation timestamp")
|
|
567
|
-
last_used_at: str = Field(..., description="Last usage timestamp")
|
|
568
|
-
request_count: int = Field(..., description="Number of requests made")
|
|
569
|
-
success_count: int = Field(..., description="Number of successful requests")
|
|
570
|
-
failure_count: int = Field(..., description="Number of failed requests")
|
|
571
|
-
|
|
572
|
-
class ProxySummary(BaseModel):
|
|
573
|
-
"""Summary information about a proxy."""
|
|
574
|
-
|
|
575
|
-
proxy_id: str = Field(..., description="Proxy ID")
|
|
576
|
-
provider: Any = Field(..., description="Proxy provider")
|
|
577
|
-
status: Any = Field(..., description="Current status")
|
|
578
|
-
country: str = Field(..., description="Proxy country")
|
|
579
|
-
protocol: Any = Field(..., description="Proxy protocol")
|
|
580
|
-
host: str = Field(..., description="Proxy host")
|
|
581
|
-
port: int = Field(..., description="Proxy port")
|
|
582
|
-
health_status: Any = Field(..., description="Health status")
|
|
583
|
-
success_rate: float = Field(..., description="Success rate %")
|
|
584
|
-
total_requests: int = Field(..., description="Total requests made")
|
|
585
|
-
consecutive_failures: int = Field(..., description="Consecutive failures")
|
|
586
|
-
created_at: str = Field(..., description="Creation timestamp")
|
|
587
|
-
last_used_at: Any = Field(..., description="Last usage")
|
|
588
|
-
expires_at: Any = Field(..., description="Expiration date")
|
|
589
|
-
assigned_parsers: List[str] = Field(..., description="Assigned parser IDs")
|
|
590
|
-
tags: List[str] = Field(..., description="Proxy tags")
|
|
591
|
-
|
|
592
|
-
class ProxyDetails(BaseModel):
|
|
593
|
-
"""Detailed proxy information."""
|
|
594
|
-
|
|
595
|
-
success: bool = Field(..., description="Operation success status")
|
|
596
|
-
message: str = Field(..., description="Success message")
|
|
597
|
-
data: Any = Field(..., description="Optional response data")
|
|
598
|
-
timestamp: str = Field(..., description="Response timestamp")
|
|
599
|
-
request_id: Any = Field(..., description="Original request tracking ID")
|
|
600
|
-
proxy_id: str = Field(..., description="Proxy ID")
|
|
601
|
-
provider: Any = Field(..., description="Provider")
|
|
602
|
-
provider_proxy_id: Any = Field(..., description="Provider's internal ID")
|
|
603
|
-
status: Any = Field(..., description="Current status")
|
|
604
|
-
host: str = Field(..., description="Proxy host")
|
|
605
|
-
port: int = Field(..., description="Proxy port")
|
|
606
|
-
protocol: Any = Field(..., description="Protocol")
|
|
607
|
-
credentials: Any = Field(..., description="Login credentials")
|
|
608
|
-
connection_url: Any = Field(..., description="Full connection URL")
|
|
609
|
-
country: str = Field(..., description="Country code")
|
|
610
|
-
region: Any = Field(..., description="Region/state")
|
|
611
|
-
city: Any = Field(..., description="City")
|
|
612
|
-
health_status: Any = Field(..., description="Health status")
|
|
613
|
-
success_rate: float = Field(..., description="Success rate %")
|
|
614
|
-
failure_rate: float = Field(..., description="Failure rate %")
|
|
615
|
-
avg_response_time_ms: float = Field(..., description="Average response time")
|
|
616
|
-
total_requests: int = Field(..., description="Total requests")
|
|
617
|
-
successful_requests: int = Field(..., description="Successful requests")
|
|
618
|
-
failed_requests: int = Field(..., description="Failed requests")
|
|
619
|
-
consecutive_failures: int = Field(..., description="Consecutive failures")
|
|
620
|
-
blocked_count: int = Field(..., description="Times blocked")
|
|
621
|
-
created_at: str = Field(..., description="Creation timestamp")
|
|
622
|
-
last_used_at: Any = Field(..., description="Last usage")
|
|
623
|
-
last_validated_at: Any = Field(..., description="Last validation")
|
|
624
|
-
expires_at: Any = Field(..., description="Expiration date")
|
|
625
|
-
assigned_parsers: List[str] = Field(..., description="Assigned parsers")
|
|
626
|
-
rotation_strategy: Any = Field(..., description="Rotation strategy")
|
|
627
|
-
tags: List[str] = Field(..., description="Proxy tags")
|
|
628
|
-
recent_failures: List[Dict[str, Any]] = Field(..., description="Recent failure details")
|
|
629
|
-
created_by_admin: Any = Field(..., description="Admin who added proxy")
|
|
630
|
-
last_updated_by: Any = Field(..., description="Admin who last updated")
|
|
631
|
-
metadata: Dict[str, Any] = Field(..., description="Additional metadata")
|
|
632
|
-
|
|
633
|
-
class ProxyStatistics(BaseModel):
|
|
634
|
-
"""System-wide proxy statistics."""
|
|
635
|
-
|
|
636
|
-
success: bool = Field(..., description="Operation success status")
|
|
637
|
-
message: str = Field(..., description="Success message")
|
|
638
|
-
data: Any = Field(..., description="Optional response data")
|
|
639
|
-
timestamp: str = Field(..., description="Response timestamp")
|
|
640
|
-
request_id: Any = Field(..., description="Original request tracking ID")
|
|
641
|
-
total_proxies: int = Field(..., description="Total proxies")
|
|
642
|
-
active_proxies: int = Field(..., description="Active proxies")
|
|
643
|
-
inactive_proxies: int = Field(..., description="Inactive proxies")
|
|
644
|
-
blocked_proxies: int = Field(..., description="Blocked proxies")
|
|
645
|
-
expired_proxies: int = Field(..., description="Expired proxies")
|
|
646
|
-
error_proxies: int = Field(..., description="Error state proxies")
|
|
647
|
-
healthy_proxies: int = Field(..., description="Healthy proxies")
|
|
648
|
-
degraded_proxies: int = Field(..., description="Degraded proxies")
|
|
649
|
-
critical_proxies: int = Field(..., description="Critical proxies")
|
|
650
|
-
provider_breakdown: Dict[str, Any] = Field(..., description="Detailed provider statistics")
|
|
651
|
-
country_breakdown: Dict[str, Any] = Field(..., description="Proxy count by country")
|
|
652
|
-
overall_success_rate: float = Field(..., description="Overall success rate %")
|
|
653
|
-
avg_response_time_ms: float = Field(..., description="Average response time")
|
|
654
|
-
total_requests_last_24h: int = Field(..., description="Total requests in last 24h")
|
|
655
|
-
successful_requests_last_24h: int = Field(..., description="Successful requests in last 24h")
|
|
656
|
-
expiring_in_24h: int = Field(..., description="Proxies expiring in 24 hours")
|
|
657
|
-
expiring_in_7d: int = Field(..., description="Proxies expiring in 7 days")
|
|
658
|
-
expiring_in_30d: int = Field(..., description="Proxies expiring in 30 days")
|
|
659
|
-
most_used_providers: List[Dict[str, Any]] = Field(..., description="Most used providers")
|
|
660
|
-
most_active_countries: List[Dict[str, Any]] = Field(..., description="Most active proxy countries")
|
|
661
|
-
proxies_added_last_24h: int = Field(..., description="Proxies added in last 24h")
|
|
662
|
-
proxies_blocked_last_24h: int = Field(..., description="Proxies blocked in last 24h")
|
|
663
|
-
generated_at: str = Field(..., description="Statistics generation time")
|
|
664
|
-
|
|
665
|
-
class HealthStatsResponse(BaseModel):
|
|
666
|
-
"""Health service statistics."""
|
|
667
|
-
|
|
668
|
-
service_start_time: str = Field(..., description="Service start timestamp in ISO format")
|
|
669
|
-
uptime: str = Field(..., description="Human-readable uptime")
|
|
670
|
-
health_check_count: int = Field(..., description="Total health checks performed")
|
|
671
|
-
last_health_check: Any = Field(..., description="Last health check timestamp in ISO format")
|
|
672
|
-
component_timeout: float = Field(..., description="Component timeout in seconds")
|
|
673
|
-
overall_timeout: float = Field(..., description="Overall timeout in seconds")
|
|
674
|
-
|
|
675
|
-
class ComponentHealth(BaseModel):
|
|
676
|
-
"""Health status for individual system component."""
|
|
677
|
-
|
|
678
|
-
status: str = Field(..., description="Component health status")
|
|
679
|
-
response_time_ms: Any = Field(..., description="Response time in milliseconds")
|
|
680
|
-
error: Any = Field(..., description="Error message if unhealthy")
|
|
681
|
-
details: Dict[str, Any] = Field(..., description="Additional health details")
|
|
682
|
-
last_checked: str = Field(..., description="Last health check time in ISO format")
|
|
683
|
-
|
|
684
|
-
class SystemMetrics(BaseModel):
|
|
685
|
-
"""System performance metrics."""
|
|
686
|
-
|
|
687
|
-
cpu_usage: Any = Field(..., description="CPU usage percentage")
|
|
688
|
-
memory_usage: Any = Field(..., description="Memory usage in GB")
|
|
689
|
-
memory_percent: Any = Field(..., description="Memory usage percentage")
|
|
690
|
-
disk_usage: Any = Field(..., description="Disk usage percentage")
|
|
691
|
-
load_average: Any = Field(..., description="System load average")
|
|
692
|
-
note: Any = Field(..., description="Additional notes")
|
|
693
|
-
error: Any = Field(..., description="Error message if metrics unavailable")
|
|
694
|
-
|
|
695
|
-
class SystemHealthReport(BaseModel):
|
|
696
|
-
"""Complete system health report."""
|
|
697
|
-
|
|
698
|
-
status: str = Field(..., description="Overall system status")
|
|
699
|
-
service: str = Field(..., description="Service name")
|
|
700
|
-
version: str = Field(..., description="Service version")
|
|
701
|
-
timestamp: str = Field(..., description="Report timestamp in ISO format")
|
|
702
|
-
uptime: Any = Field(..., description="System uptime")
|
|
703
|
-
components: Dict[str, Any] = Field(..., description="Component health status")
|
|
704
|
-
system: Any = Field(..., description="System metrics")
|
|
705
|
-
message: str = Field(..., description="Status message")
|
|
706
|
-
error: Any = Field(..., description="Error message if unhealthy")
|
|
707
|
-
|
|
708
|
-
class BroadcastDeliveryStats(BaseModel):
|
|
709
|
-
"""Broadcast delivery statistics."""
|
|
710
|
-
|
|
711
|
-
success: bool = Field(..., description="Operation success status")
|
|
712
|
-
message: str = Field(..., description="Success message")
|
|
713
|
-
data: Any = Field(..., description="Optional response data")
|
|
714
|
-
timestamp: str = Field(..., description="Response timestamp")
|
|
715
|
-
request_id: Any = Field(..., description="Original request tracking ID")
|
|
716
|
-
total_targeted: int = Field(..., description="Total users targeted")
|
|
717
|
-
delivered: int = Field(..., description="Successfully delivered count")
|
|
718
|
-
failed: int = Field(..., description="Failed delivery count")
|
|
719
|
-
pending: int = Field(..., description="Pending delivery count")
|
|
720
|
-
delivery_rate: float = Field(..., description="Delivery success rate percentage")
|
|
721
|
-
|
|
722
|
-
class SystemMetricsPoint(BaseModel):
|
|
723
|
-
"""Single system metrics data point."""
|
|
724
|
-
|
|
725
|
-
success: bool = Field(..., description="Operation success status")
|
|
726
|
-
message: str = Field(..., description="Success message")
|
|
727
|
-
data: Any = Field(..., description="Optional response data")
|
|
728
|
-
timestamp: str = Field(..., description="Measurement timestamp")
|
|
729
|
-
request_id: Any = Field(..., description="Original request tracking ID")
|
|
730
|
-
cpu_usage: float = Field(..., description="CPU usage percentage")
|
|
731
|
-
memory_usage: float = Field(..., description="Memory usage percentage")
|
|
732
|
-
disk_usage: float = Field(..., description="Disk usage percentage")
|
|
733
|
-
network_in: Any = Field(..., description="Network input (MB/s)")
|
|
734
|
-
network_out: Any = Field(..., description="Network output (MB/s)")
|
|
735
|
-
active_connections: int = Field(..., description="Active connections")
|
|
736
|
-
requests_per_minute: int = Field(..., description="Requests per minute")
|
|
737
|
-
error_rate: float = Field(..., description="Error rate (0-1)")
|
|
738
|
-
response_time_avg: float = Field(..., description="Average response time (ms)")
|
|
739
|
-
active_proxies: int = Field(..., description="Active proxy count")
|
|
740
|
-
active_parsers: int = Field(..., description="Active parser count")
|
|
741
|
-
queue_size: int = Field(..., description="Processing queue size")
|
|
742
|
-
|
|
743
|
-
class SystemMetricsResponse(BaseModel):
|
|
744
|
-
"""System metrics response."""
|
|
745
|
-
|
|
746
|
-
success: bool = Field(..., description="Operation success status")
|
|
747
|
-
message: str = Field(..., description="Success message")
|
|
748
|
-
data: Any = Field(..., description="Optional response data")
|
|
749
|
-
timestamp: str = Field(..., description="Response timestamp")
|
|
750
|
-
request_id: Any = Field(..., description="Original request tracking ID")
|
|
751
|
-
timeframe: str = Field(..., description="Requested timeframe")
|
|
752
|
-
resolution: str = Field(..., description="Data resolution used")
|
|
753
|
-
metrics: List[Any] = Field(..., description="Time series metrics data")
|
|
754
|
-
summary: Dict[str, Any] = Field(..., description="Summary statistics for the period")
|
|
755
|
-
alerts: List[Dict[str, Any]] = Field(..., description="Active metric alerts")
|
|
756
|
-
predictions: Any = Field(..., description="Trend predictions if requested")
|
|
757
|
-
|
|
758
|
-
class SystemMetricsWebSocketEvent(BaseModel):
|
|
759
|
-
"""Real-time system metrics WebSocket event."""
|
|
760
|
-
|
|
761
|
-
success: bool = Field(..., description="Operation success status")
|
|
762
|
-
message: str = Field(..., description="Human-readable event message")
|
|
763
|
-
data: Any = Field(..., description="Optional response data")
|
|
764
|
-
timestamp: str = Field(..., description="Event timestamp")
|
|
765
|
-
request_id: Any = Field(..., description="Original request tracking ID")
|
|
766
|
-
type: str = Field(..., description="Event type")
|
|
767
|
-
event_id: str = Field(..., description="Unique event identifier")
|
|
768
|
-
severity: Any = Field(..., description="Event severity")
|
|
769
|
-
component: str = Field(..., description="Component generating event")
|
|
770
|
-
details: Dict[str, Any] = Field(..., description="Event details")
|
|
771
|
-
requires_action: bool = Field(..., description="Whether admin action needed")
|
|
772
|
-
auto_resolve: bool = Field(..., description="Whether event auto-resolves")
|
|
773
|
-
metrics_data: Any = Field(..., description="Current metrics")
|
|
774
|
-
trend_direction: str = Field(..., description="Overall trend direction")
|
|
775
|
-
alerts_triggered: List[str] = Field(..., description="Alerts triggered by current metrics")
|
|
776
|
-
|
|
777
|
-
class UserStatistics(BaseModel):
|
|
778
|
-
"""System-wide user statistics."""
|
|
779
|
-
|
|
780
|
-
success: bool = Field(..., description="Operation success status")
|
|
781
|
-
message: str = Field(..., description="Success message")
|
|
782
|
-
data: Any = Field(..., description="Optional response data")
|
|
783
|
-
timestamp: str = Field(..., description="Response timestamp")
|
|
784
|
-
request_id: Any = Field(..., description="Original request tracking ID")
|
|
785
|
-
total_users: int = Field(..., description="Total users in system")
|
|
786
|
-
active_users: int = Field(..., description="Active users")
|
|
787
|
-
suspended_users: int = Field(..., description="Suspended users")
|
|
788
|
-
pending_users: int = Field(..., description="Pending activation users")
|
|
789
|
-
developers: int = Field(..., description="Developer role users")
|
|
790
|
-
admins: int = Field(..., description="Admin role users")
|
|
791
|
-
guests: int = Field(..., description="Guest role users")
|
|
792
|
-
users_active_last_24h: int = Field(..., description="Users active in last 24 hours")
|
|
793
|
-
users_active_last_7d: int = Field(..., description="Users active in last 7 days")
|
|
794
|
-
users_active_last_30d: int = Field(..., description="Users active in last 30 days")
|
|
795
|
-
users_with_parsers: int = Field(..., description="Users who own parsers")
|
|
796
|
-
users_without_parsers: int = Field(..., description="Users without parsers")
|
|
797
|
-
avg_parsers_per_user: float = Field(..., description="Average parsers per user")
|
|
798
|
-
new_users_last_24h: int = Field(..., description="New users in last 24 hours")
|
|
799
|
-
new_users_last_7d: int = Field(..., description="New users in last 7 days")
|
|
800
|
-
new_users_last_30d: int = Field(..., description="New users in last 30 days")
|
|
801
|
-
total_api_calls_today: int = Field(..., description="Total API calls today")
|
|
802
|
-
unique_api_users_today: int = Field(..., description="Unique API users today")
|
|
803
|
-
avg_api_calls_per_user: float = Field(..., description="Average API calls per user")
|
|
804
|
-
generated_at: str = Field(..., description="Statistics generation time")
|
|
805
|
-
top_active_users: List[Dict[str, Any]] = Field(..., description="Top 10 most active users")
|
|
806
|
-
top_parser_owners: List[Dict[str, Any]] = Field(..., description="Top 10 users by parser count")
|
|
807
|
-
|
|
808
|
-
class SystemStatistics(BaseModel):
|
|
809
|
-
"""Comprehensive system statistics."""
|
|
810
|
-
|
|
811
|
-
success: bool = Field(..., description="Operation success status")
|
|
812
|
-
message: str = Field(..., description="Success message")
|
|
813
|
-
data: Any = Field(..., description="Optional response data")
|
|
814
|
-
timestamp: str = Field(..., description="Response timestamp")
|
|
815
|
-
request_id: Any = Field(..., description="Original request tracking ID")
|
|
816
|
-
total_parsers: int = Field(..., description="Total parsers")
|
|
817
|
-
active_parsers: int = Field(..., description="Active parsers")
|
|
818
|
-
total_developers: int = Field(..., description="Total developers")
|
|
819
|
-
active_developers: int = Field(..., description="Active developers")
|
|
820
|
-
total_services: int = Field(..., description="Total services")
|
|
821
|
-
running_services: int = Field(..., description="Running services")
|
|
822
|
-
idle_services: int = Field(..., description="Idle services")
|
|
823
|
-
error_services: int = Field(..., description="Services in error state")
|
|
824
|
-
commands_pending: int = Field(..., description="Pending commands")
|
|
825
|
-
commands_running: int = Field(..., description="Running commands")
|
|
826
|
-
commands_completed_today: int = Field(..., description="Commands completed today")
|
|
827
|
-
avg_system_response_time_ms: float = Field(..., description="Average system response time")
|
|
828
|
-
system_cpu_usage_percent: float = Field(..., description="System CPU usage")
|
|
829
|
-
system_memory_usage_percent: float = Field(..., description="System memory usage")
|
|
830
|
-
active_websocket_connections: int = Field(..., description="Active WebSocket connections")
|
|
831
|
-
total_api_calls_today: int = Field(..., description="Total API calls today")
|
|
832
|
-
database_size_mb: float = Field(..., description="Database size in MB")
|
|
833
|
-
cache_hit_rate_percent: float = Field(..., description="Cache hit rate")
|
|
834
|
-
total_proxies: int = Field(..., description="Total proxies")
|
|
835
|
-
healthy_proxies: int = Field(..., description="Healthy proxies")
|
|
836
|
-
operations_last_24h: int = Field(..., description="Admin operations in last 24h")
|
|
837
|
-
errors_last_24h: int = Field(..., description="System errors in last 24h")
|
|
838
|
-
generated_at: str = Field(..., description="Statistics generation time")
|
|
839
|
-
system_health_score: float = Field(..., description="Overall system health score (0-100)")
|
|
840
|
-
health_factors: Dict[str, Any] = Field(..., description="Individual health factor scores")
|
|
841
|
-
performance_trend_7d: str = Field(..., description="7-day performance trend")
|
|
842
|
-
capacity_utilization_percent: float = Field(..., description="Overall capacity utilization")
|
|
843
|
-
|
|
844
|
-
class RealTimeMetrics(BaseModel):
|
|
845
|
-
"""Real-time system metrics."""
|
|
846
|
-
|
|
847
|
-
timestamp: str = Field(..., description="Metrics timestamp")
|
|
848
|
-
cpu_usage_percent: float = Field(..., description="Current CPU usage")
|
|
849
|
-
memory_usage_percent: float = Field(..., description="Current memory usage")
|
|
850
|
-
disk_usage_percent: float = Field(..., description="Current disk usage")
|
|
851
|
-
network_in_mbps: float = Field(..., description="Network input rate")
|
|
852
|
-
network_out_mbps: float = Field(..., description="Network output rate")
|
|
853
|
-
active_connections: int = Field(..., description="Active connections")
|
|
854
|
-
requests_per_second: float = Field(..., description="Current RPS")
|
|
855
|
-
avg_response_time_ms: float = Field(..., description="Average response time")
|
|
856
|
-
error_rate_percent: float = Field(..., description="Current error rate")
|
|
857
|
-
active_parsers: int = Field(..., description="Active parsers")
|
|
858
|
-
total_parsers: int = Field(..., description="Total parsers")
|
|
859
|
-
commands_queued: int = Field(..., description="Queued commands")
|
|
860
|
-
commands_executing: int = Field(..., description="Executing commands")
|
|
861
|
-
healthy_proxies: int = Field(..., description="Healthy proxies")
|
|
862
|
-
total_proxies: int = Field(..., description="Total proxies")
|
|
863
|
-
proxy_success_rate_percent: float = Field(..., description="Proxy success rate")
|
|
864
|
-
cache_hit_rate_percent: float = Field(..., description="Cache hit rate")
|
|
865
|
-
cache_memory_usage_mb: float = Field(..., description="Cache memory usage")
|
|
866
|
-
db_connections_active: int = Field(..., description="Active DB connections")
|
|
867
|
-
db_query_avg_time_ms: float = Field(..., description="Average query time")
|
|
868
|
-
api_calls_last_minute: int = Field(..., description="API calls in last minute")
|
|
869
|
-
unique_users_online: int = Field(..., description="Unique users online")
|
|
870
|
-
overall_health_score: float = Field(..., description="Overall system health score")
|
|
871
|
-
alerts_active: int = Field(..., description="Active alerts count")
|