{
"$defs": {
"Notification": {
"description": "Body of `notification_created`: ids only, never the message. The client already\nholds the message from `message_created`, or fetches it by id.",
"properties": {
"at": {
"description": "When the notification was written.",
"format": "date-time",
"type": "string"
},
"author_id": {
"description": "Its author.",
"pattern": "^[1-9][0-9]{0,18}$",
"type": "string"
},
"channel_id": {
"description": "Its channel.",
"pattern": "^[1-9][0-9]{0,18}$",
"type": "string"
},
"message_created_at": {
"description": "When the message was created.",
"format": "date-time",
"type": "string"
},
"message_id": {
"description": "The message.",
"pattern": "^[1-9][0-9]{0,18}$",
"type": "string"
},
"reason": {
"$ref": "#/$defs/NotificationReason",
"description": "Why."
},
"space_id": {
"description": "Its space (`null` in DMs).",
"pattern": "^[1-9][0-9]{0,18}$",
"type": [
"string",
"null"
]
},
"thread_root_id": {
"description": "Its thread root, for replies.",
"pattern": "^[1-9][0-9]{0,18}$",
"type": [
"string",
"null"
]
}
},
"required": [
"reason",
"message_id",
"channel_id",
"author_id",
"message_created_at",
"at"
],
"type": "object"
},
"NotificationReason": {
"description": "Why a member was notified; stored in `member_changes.entity_id` for kind `notification`.",
"oneOf": [
{
"const": "mention",
"description": "A direct `@member` mention.",
"type": "string"
},
{
"const": "role_mention",
"description": "A role mention.",
"type": "string"
},
{
"const": "group_mention",
"description": "A user-group mention.",
"type": "string"
},
{
"const": "channel_mention",
"description": "`@channel` (or an alias).",
"type": "string"
},
{
"const": "here_mention",
"description": "`@here`.",
"type": "string"
},
{
"const": "dm",
"description": "A DM or group DM message.",
"type": "string"
},
{
"const": "thread_reply",
"description": "A reply in a followed thread.",
"type": "string"
},
{
"const": "keyword",
"description": "A keyword match.",
"type": "string"
},
{
"const": "all_messages",
"description": "Notify-on-all-messages.",
"type": "string"
},
{
"const": "reminder",
"description": "A reminder came due.",
"type": "string"
},
{
"const": "call_missed",
"description": "A missed DM call.",
"type": "string"
},
{
"const": "transcript_ready",
"description": "A call transcript is ready.",
"type": "string"
},
{
"const": "inline_reply",
"description": "An inline reply (a `reply` reference, not a quote or a forward) to one of the\nmember's messages. People only.",
"type": "string"
}
]
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"description": "Body of `notifications_released`: what DND held and is still unread, newest first.",
"properties": {
"items": {
"description": "At most 50 items.",
"items": {
"$ref": "#/$defs/Notification"
},
"type": "array"
},
"more": {
"description": "Released items beyond `items`.",
"format": "uint32",
"minimum": 0,
"type": "integer"
}
},
"required": [
"items",
"more"
],
"title": "NotificationsReleased",
"type": "object"
}