# site.mochott.notification.defs

> Shared definitions for mochott notifications.

- Kind: defs
- Authority: notification.mochott.site
- Lexicon: 1
- Published by [tokimeki.blue](https://lexicon.garden/identity/did:plc:4tr5dqti7nmu6g2czpthntak), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:4tr5dqti7nmu6g2czpthntak/site.mochott.notification.defs)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:4tr5dqti7nmu6g2czpthntak/site.mochott.notification.defs/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:4tr5dqti7nmu6g2czpthntak/site.mochott.notification.defs/analytics)

## #actorView (`site.mochott.notification.defs#actorView`)

Type: object

### Properties

- `avatar` (string, required): Avatar image. May be a path relative to the mochott origin (/api/image/{did}/{cid}) or an absolute URL.
  - Constraints: nullable
- `did` (string, required): DID of the account that caused the notification.
- `displayName` (string, required)
  - Constraints: nullable
- `handle` (string, required): Handle, or "unknown" when the profile could not be resolved.

## #notificationView (`site.mochott.notification.defs#notificationView`)

Type: object

A notification for the requesting account. url, commentUri and commentText are only returned when the request names types or continues a keyset cursor.

### Properties

- `actor` (ref, required)
  - Reference: `#actorView`
- `commentText` (string): The content of commentUri. Absent when the comment has been deleted.
- `commentUri` (string · at-uri): For comment, reply, comic_comment and comic_reply: the comment that caused the notification (the reply itself for replies). Absent for notifications created before it was recorded.
- `createdAt` (string · datetime, required)
- `documentTitle` (string, required): Title of the subject. For import_completed and import_failed it is "<processed>|<failed>".
  - Constraints: nullable
- `documentUri` (string · at-uri, required): The article, comic chapter or strip, or comic series the notification is about. Null for subscriptions and imports.
  - Constraints: nullable
- `id` (integer, required)
  - Constraints: minimum: 0
- `isRead` (boolean, required)
- `type` (string, required)
  - Constraints: knownValues: new_article | like | subscription | comment | reply | import_completed | import_failed | new_comic | comic_like | comic_comment | comic_reply | comic_subscription
- `url` (string · uri): Absolute URL of the mochott page the notification opens: the article, the comic chapter, strip or series, or the subscriber's profile. Absent for imports and for works no longer indexed.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "actorView": {
      "nullable": [
        "displayName",
        "avatar"
      ],
      "properties": {
        "avatar": {
          "description": "Avatar image. May be a path relative to the mochott origin (/api/image/{did}/{cid}) or an absolute URL.",
          "type": "string"
        },
        "did": {
          "description": "DID of the account that caused the notification.",
          "type": "string"
        },
        "displayName": {
          "type": "string"
        },
        "handle": {
          "description": "Handle, or \"unknown\" when the profile could not be resolved.",
          "type": "string"
        }
      },
      "required": [
        "did",
        "handle",
        "displayName",
        "avatar"
      ],
      "type": "object"
    },
    "notificationView": {
      "description": "A notification for the requesting account. url, commentUri and commentText are only returned when the request names types or continues a keyset cursor.",
      "nullable": [
        "documentUri",
        "documentTitle"
      ],
      "properties": {
        "actor": {
          "ref": "#actorView",
          "type": "ref"
        },
        "commentText": {
          "description": "The content of commentUri. Absent when the comment has been deleted.",
          "type": "string"
        },
        "commentUri": {
          "description": "For comment, reply, comic_comment and comic_reply: the comment that caused the notification (the reply itself for replies). Absent for notifications created before it was recorded.",
          "format": "at-uri",
          "type": "string"
        },
        "createdAt": {
          "format": "datetime",
          "type": "string"
        },
        "documentTitle": {
          "description": "Title of the subject. For import_completed and import_failed it is \"<processed>|<failed>\".",
          "type": "string"
        },
        "documentUri": {
          "description": "The article, comic chapter or strip, or comic series the notification is about. Null for subscriptions and imports.",
          "format": "at-uri",
          "type": "string"
        },
        "id": {
          "minimum": 0,
          "type": "integer"
        },
        "isRead": {
          "type": "boolean"
        },
        "type": {
          "knownValues": [
            "new_article",
            "like",
            "subscription",
            "comment",
            "reply",
            "import_completed",
            "import_failed",
            "new_comic",
            "comic_like",
            "comic_comment",
            "comic_reply",
            "comic_subscription"
          ],
          "type": "string"
        },
        "url": {
          "description": "Absolute URL of the mochott page the notification opens: the article, the comic chapter, strip or series, or the subscriber's profile. Absent for imports and for works no longer indexed.",
          "format": "uri",
          "type": "string"
        }
      },
      "required": [
        "id",
        "type",
        "actor",
        "documentUri",
        "documentTitle",
        "isRead",
        "createdAt"
      ],
      "type": "object"
    }
  },
  "description": "Shared definitions for mochott notifications.",
  "id": "site.mochott.notification.defs",
  "lexicon": 1,
  "revision": 1
}
```
