systemprompt_models/notifications/
realtime.rs1use schemars::JsonSchema;
7use serde::{Deserialize, Serialize};
8use systemprompt_identifiers::NotificationId;
9
10use super::attention::Attention;
11use super::notification::Notification;
12
13pub const NOTIFICATION_CREATED: &str = "notification.created";
14pub const NOTIFICATION_READ: &str = "notification.read";
15pub const NOTIFICATION_ESCALATED: &str = "notification.escalated";
16
17#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, JsonSchema)]
19pub struct NotificationCreatedPayload {
20 pub notification: Notification,
21 pub unread: i64,
22}
23
24#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, JsonSchema)]
26pub struct NotificationReadPayload {
27 pub ids: Vec<NotificationId>,
28 pub unread: i64,
29}
30
31#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, JsonSchema)]
33pub struct NotificationEscalatedPayload {
34 pub id: NotificationId,
35 pub attention: Attention,
36}