Notification Models
This page documents the data models related to notifications and user preferences.
Notification
Represents a user notification.
Properties
| Property | Type | Description |
id | string | Notification identifier |
type | string | Notification type (e.g., compliance_alert, export_complete) |
title | string | Notification title |
message | string | Notification message body |
priority | NotificationPriority | Priority level |
is_read | boolean | Whether notification has been read |
read_at | string (ISO 8601)? | When notification was read |
metadata | object? | Additional context data |
created_at | string (ISO 8601) | Creation timestamp |
Example
{
"id": "notif_abc123",
"type": "compliance_alert",
"title": "OC Test Warning",
"message": "Senior OC test cushion below 2% threshold",
"priority": "high",
"is_read": false,
"read_at": null,
"metadata": {
"workbook_id": "550e8400-e29b-41d4-a716-446655440000",
"test_name": "senior_oc"
},
"created_at": "2026-01-25T10:30:00Z"
}
NotificationPreferences
Per-user notification delivery configuration.
Properties
| Property | Type | Description |
email_notifications | boolean | Enable email delivery |
push_notifications | boolean | Enable push delivery |
notification_types | object | Per-type enable/disable map |
Example
{
"email_notifications": true,
"push_notifications": false,
"notification_types": {
"compliance_alert": true,
"export_complete": true,
"reconciliation_issue": true,
"system": true,
"insight_ready": false
}
}
NotificationStats
Aggregate notification statistics.
Properties
| Property | Type | Description |
total_count | integer | Total notifications |
unread_count | integer | Unread notifications |
by_type | object | Count per notification type |
Enumerations
NotificationPriority
| Value | Description |
low | Informational, non-urgent |
normal | Standard priority |
high | Important, requires attention |
urgent | Critical, immediate action needed |
Notification Types
| Type | Description |
compliance_alert | Compliance test threshold warnings |
export_complete | Export job completed |
reconciliation_issue | New reconciliation discrepancy |
system | System announcements |
insight_ready | New insights generated |
job_failed | Background task failure |