Files
CIAgent/apps/api/app/schemas/alert.py
T
saksham 1a4c80958f Initial commit: CI Agent competitive-intelligence monitoring app
FastAPI + Celery + Next.js + Postgres/Redis app with company monitoring,
source collection, LLM-based change analysis, enrichment, and account
security (Turnstile, escalating lockout, email verification).
2026-08-05 10:48:20 -04:00

45 lines
984 B
Python

from __future__ import annotations
import uuid
from datetime import datetime
from pydantic import BaseModel, ConfigDict
from app.models.enums import NotificationDeliveryStatus, SeverityLevel
class NotificationDeliverySummary(BaseModel):
model_config = ConfigDict(from_attributes=True)
id: uuid.UUID
destination_id: uuid.UUID
provider: str
status: NotificationDeliveryStatus
external_message_id: str | None
error_message: str | None
class AlertResponse(BaseModel):
model_config = ConfigDict(from_attributes=True)
id: uuid.UUID
company_id: uuid.UUID
detected_change_id: uuid.UUID
title: str
summary: str
why_it_matters: str
severity: SeverityLevel
confidence: float
read: bool
resolved: bool
created_at: datetime
class AlertDetailResponse(AlertResponse):
deliveries: list[NotificationDeliverySummary]
class AlertUpdate(BaseModel):
read: bool | None = None
resolved: bool | None = None