diff --git a/backend/app/services/psa/base.py b/backend/app/services/psa/base.py index a599b064..913dbaee 100644 --- a/backend/app/services/psa/base.py +++ b/backend/app/services/psa/base.py @@ -13,6 +13,7 @@ from .types import ( PSAConfiguration, PSATimeEntry, PSABoard, + PaginatedTicketResult, ) @@ -28,7 +29,7 @@ class PSAProvider(ABC): ... @abstractmethod - async def search_tickets(self, query: str, **filters) -> list[PSATicket]: + async def search_tickets(self, query: str, **filters) -> PaginatedTicketResult: ... @abstractmethod diff --git a/backend/app/services/psa/types.py b/backend/app/services/psa/types.py index c051a5f7..025fe756 100644 --- a/backend/app/services/psa/types.py +++ b/backend/app/services/psa/types.py @@ -73,6 +73,13 @@ class PSABoard(BaseModel): inactive: bool = False +class PaginatedTicketResult(BaseModel): + items: list[PSATicket] + total: int + page: int + page_size: int + + class NoteType: INTERNAL_ANALYSIS = "internal_analysis" RESOLUTION = "resolution"