Notification Model¶
Data models for notification operations.
Notification data models.
Defines the request and response models for the notification system.
MESSAGE_KEY_ALIASES
module-attribute
¶
MESSAGE_KEY_ALIASES = ['content', 'body']
Alternative field names accepted for the message content.
NotificationContent ¶
Bases: PydanticBaseModel
Content of a notification message.
Attributes:
| Name | Type | Description |
|---|---|---|
subject |
str
|
The subject line of the notification. |
message |
str
|
The body content of the notification. |
content_type |
NotificationContentType
|
The format of the message content. |
NotificationContentType ¶
Bases: StrEnum
Content types for notification messages.
Attributes:
| Name | Type | Description |
|---|---|---|
PLAIN_TEXT |
Plain text content type. |
|
HTML |
HTML formatted content. |
|
JSON |
JSON structured content. |
NotificationRequest ¶
Bases: PydanticBaseModel
Request model for sending notifications.
Attributes:
| Name | Type | Description |
|---|---|---|
content |
NotificationContent
|
The notification content to deliver. |
targets |
list[SESEmailTarget | SNSTopicTarget]
|
List of delivery targets (SES or SNS). |
NotificationResponse ¶
Bases: PydanticBaseModel
Response model for notification delivery.
Attributes:
| Name | Type | Description |
|---|---|---|
results |
list[NotifierResult]
|
List of results for each notification target. |