diff --git a/src/models.py b/src/models.py index 63d053b..3bd8007 100644 --- a/src/models.py +++ b/src/models.py @@ -1,11 +1,16 @@ -from pydantic import BaseModel, Field +from shared_models.pydantic_base import DocumentedModel +class PullResponse(DocumentedModel): + """Result of one pull. -class PullRequest(BaseModel): - user_id: int = Field(gt=0) - -class PullResponse(BaseModel): + Attributes: + messages: Messages drained from the user's queue, in queue order. + count: Number of messages in this response (always equals len(messages)). + has_more: True if this batch was full (count reached the requested maximum), so more + messages MAY be waiting. It is a hint, not a guarantee: the next pull can return + an empty list. + """ messages: list[dict] count: int has_more: bool \ No newline at end of file