From a814949ced08416a93b565a8f62fcedb42fb4136 Mon Sep 17 00:00:00 2001 From: Florian Date: Fri, 27 Nov 2026 10:07:00 +0100 Subject: [PATCH] Switched to shared pydantic model --- src/models.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) 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