- Add PSABoard type + list_boards() to CW provider (cached 1h) - Extend search_tickets with assigned_to_me, unassigned, board_ids, page, page_size - New GET /integrations/psa/boards endpoint - New TicketQueue dashboard component: My Tickets / Unassigned tabs, multi-select board filter, Load more pagination, Start Session per ticket - Add TicketQueue to QuickStartPage after active sessions - FlowPilotSessionPage auto-starts with ticket context when navigated from TicketQueue (psaTicketId + psaTicket in location.state) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
86 lines
1.9 KiB
Python
86 lines
1.9 KiB
Python
"""Abstract base class for PSA provider implementations."""
|
|
from __future__ import annotations
|
|
|
|
from abc import ABC, abstractmethod
|
|
|
|
from .types import (
|
|
ConnectionTestResult,
|
|
PSATicket,
|
|
PSANote,
|
|
PSAStatus,
|
|
PSACompany,
|
|
PSAMember,
|
|
PSAConfiguration,
|
|
PSATimeEntry,
|
|
PSABoard,
|
|
)
|
|
|
|
|
|
class PSAProvider(ABC):
|
|
"""Abstract base for PSA integrations (ConnectWise, Autotask, etc.)."""
|
|
|
|
@abstractmethod
|
|
async def test_connection(self) -> ConnectionTestResult:
|
|
...
|
|
|
|
@abstractmethod
|
|
async def get_ticket(self, ticket_id: str) -> PSATicket:
|
|
...
|
|
|
|
@abstractmethod
|
|
async def search_tickets(self, query: str, **filters) -> list[PSATicket]:
|
|
...
|
|
|
|
@abstractmethod
|
|
async def post_note(
|
|
self,
|
|
ticket_id: str,
|
|
text: str,
|
|
note_type: str,
|
|
member_id: str | None = None,
|
|
) -> PSANote:
|
|
...
|
|
|
|
@abstractmethod
|
|
async def update_ticket_status(
|
|
self,
|
|
ticket_id: str,
|
|
status_id: int,
|
|
) -> PSATicket:
|
|
...
|
|
|
|
@abstractmethod
|
|
async def get_ticket_statuses(self, board_id: int) -> list[PSAStatus]:
|
|
...
|
|
|
|
@abstractmethod
|
|
async def list_companies(self, **filters) -> list[PSACompany]:
|
|
...
|
|
|
|
@abstractmethod
|
|
async def get_company(self, company_id: str) -> PSACompany:
|
|
...
|
|
|
|
@abstractmethod
|
|
async def list_members(self) -> list[PSAMember]:
|
|
...
|
|
|
|
@abstractmethod
|
|
async def list_boards(self) -> list[PSABoard]:
|
|
...
|
|
|
|
@abstractmethod
|
|
async def get_ticket_configurations(self, ticket_id: str) -> list[PSAConfiguration]:
|
|
...
|
|
|
|
@abstractmethod
|
|
async def create_time_entry(
|
|
self,
|
|
ticket_id: str,
|
|
member_id: str,
|
|
hours: float,
|
|
notes: str | None = None,
|
|
work_type: str | None = None,
|
|
) -> PSATimeEntry:
|
|
...
|