main
py 55 lines 1.6 KB
Raw
1 from typing import Any
2 from typing import Dict
3 from typing import List
4 from typing import Optional
5
6 from pydantic import BaseModel
7 from pydantic import Field
8
9
10 class TalonMessageRequest(BaseModel):
11 message: str = Field(..., description="The message to send to Talon")
12 sender: str = Field(default="copilot", description="The sender identifier")
13
14
15 class TalonMessageResponse(BaseModel):
16 success: bool
17 message: str
18 data: Optional[Dict[str, Any]] = None
19
20
21 class TalonInvestigateRequest(BaseModel):
22 alert_id: int = Field(..., description="The CoPilot alert ID to investigate")
23 customer_code: str = Field(..., max_length=64, description="Customer code for the alert")
24 sender: str = Field(default="copilot", description="The sender identifier")
25
26
27 class TalonInvestigateResponse(BaseModel):
28 success: bool
29 message: str
30 data: Optional[Dict[str, Any]] = None
31
32
33 class TalonStatusResponse(BaseModel):
34 success: bool
35 message: str
36 data: Optional[Dict[str, Any]] = None
37
38
39 class TalonJobResponse(BaseModel):
40 success: bool
41 message: str
42 data: Optional[Dict[str, Any]] = None
43
44
45 class TalonTemplate(BaseModel):
46 filename: str = Field(..., description="Template filename, e.g. sysmon_event_1.txt")
47 size_bytes: int = Field(..., description="File size in bytes")
48 modified_at: str = Field(..., description="Last modification ISO timestamp")
49 first_line: Optional[str] = Field(None, description="First non-empty line (preview, ≤200 chars)")
50
51
52 class TalonTemplatesResponse(BaseModel):
53 success: bool
54 message: str
55 templates: List[TalonTemplate] = Field(default_factory=list)