Source code for secretvaults.dto.system

"""
System-related DTOs for node information.
"""

from datetime import datetime
from typing import Literal
from pydantic import BaseModel, Field, HttpUrl


[docs] class BuildInfo(BaseModel): """Build information for a node, including time, commit, and version.""" time: datetime commit: str version: str
[docs] class MaintenanceInfo(BaseModel): """Information about node maintenance status and start time.""" active: bool started_at: datetime
[docs] class ReadAboutNodeResponse(BaseModel): """Response model for node information, including build, public key, and maintenance.""" started: datetime build: BuildInfo public_key: str url: HttpUrl maintenance: MaintenanceInfo
[docs] class NodeHealthCheckResponse(BaseModel): """Response model for node health check status.""" status: Literal["OK"] = Field("OK", description="Health check status should always be 'OK'")