Files
OpenHands/openhands/app_server/secrets/secrets_models.py
2026-04-16 18:50:38 -06:00

24 lines
552 B
Python

"""Models for the secrets API."""
from pydantic import BaseModel, SecretStr
class CustomSecretWithoutValue(BaseModel):
"""Custom secret model without value (for listing secrets)."""
name: str
description: str | None = None
class CustomSecretCreate(CustomSecretWithoutValue):
"""Custom secret model with value (for creating secrets)."""
value: SecretStr
class CustomSecretPage(BaseModel):
"""Paginated response for custom secrets search."""
items: list[CustomSecretWithoutValue]
next_page_id: str | None = None