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).
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
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
|
||||
Reference in New Issue
Block a user