# social.grain.notification.defs

- Kind: defs
- Authority: notification.grain.social
- Lexicon: 1
- Published by [grain.social](https://lexicon.garden/identity/did:plc:e7rftrdyz5e2rw4y6ocszew2), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:e7rftrdyz5e2rw4y6ocszew2/social.grain.notification.defs)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:e7rftrdyz5e2rw4y6ocszew2/social.grain.notification.defs/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:e7rftrdyz5e2rw4y6ocszew2/social.grain.notification.defs/analytics)

## #notificationItem (`social.grain.notification.defs#notificationItem`)

Type: object

### Properties

- `author` (ref, required)
  - Reference: `social.grain.actor.defs#profileView`
- `commentText` (string)
- `createdAt` (string · datetime, required)
- `galleryThumb` (string)
- `galleryTitle` (string)
- `galleryUri` (string · at-uri)
- `indexedAt` (string · datetime, required): When the index first held the record, or when it says it was made if that is earlier: what notifications are ordered by, and isRead and getUnreadCount compare with seenAt.
- `isRead` (boolean, required): Whether the viewer had marked their notifications seen as of indexedAt.
- `reason` (string, required)
  - Constraints: knownValues: gallery-favorite | gallery-comment | gallery-comment-mention | gallery-mention | comment-favorite | story-favorite | story-comment | reply | follow
- `replyToText` (string)
- `storyThumb` (string)
- `storyUri` (string · at-uri)
- `uri` (string · at-uri, required)

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "notificationItem": {
      "properties": {
        "author": {
          "ref": "social.grain.actor.defs#profileView",
          "type": "ref"
        },
        "commentText": {
          "type": "string"
        },
        "createdAt": {
          "format": "datetime",
          "type": "string"
        },
        "galleryThumb": {
          "type": "string"
        },
        "galleryTitle": {
          "type": "string"
        },
        "galleryUri": {
          "format": "at-uri",
          "type": "string"
        },
        "indexedAt": {
          "description": "When the index first held the record, or when it says it was made if that is earlier: what notifications are ordered by, and isRead and getUnreadCount compare with seenAt.",
          "format": "datetime",
          "type": "string"
        },
        "isRead": {
          "description": "Whether the viewer had marked their notifications seen as of indexedAt.",
          "type": "boolean"
        },
        "reason": {
          "knownValues": [
            "gallery-favorite",
            "gallery-comment",
            "gallery-comment-mention",
            "gallery-mention",
            "comment-favorite",
            "story-favorite",
            "story-comment",
            "reply",
            "follow"
          ],
          "type": "string"
        },
        "replyToText": {
          "type": "string"
        },
        "storyThumb": {
          "type": "string"
        },
        "storyUri": {
          "format": "at-uri",
          "type": "string"
        },
        "uri": {
          "format": "at-uri",
          "type": "string"
        }
      },
      "required": [
        "uri",
        "reason",
        "createdAt",
        "indexedAt",
        "isRead",
        "author"
      ],
      "type": "object"
    }
  },
  "id": "social.grain.notification.defs",
  "lexicon": 1
}
```
