# com.getorbyt.notification.defs

> Published by [getorbyt.com](https://lexicon.garden/identity/did:plc:2xrqztnmzlckb3xfuuukupso)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:2xrqztnmzlckb3xfuuukupso/com.getorbyt.notification.defs)
- [Documentation](https://lexicon.garden/lexicon/did:plc:2xrqztnmzlckb3xfuuukupso/com.getorbyt.notification.defs/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:2xrqztnmzlckb3xfuuukupso/com.getorbyt.notification.defs/examples)

## Definitions

### `com.getorbyt.notification.defs#display`

**Type**: `object`

A server-written Activity row.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `badge` | `string` | No | What sits on the lead image's corner: the author's face, up to three faces from `authors`, or the Community's art. Absent means nothing. |
| `lead` | `string` | Yes | Whose image leads the row, and whose name heads it: the author's face and handle, or the Community's art and `/name`. The row comes from whoever the reader would say it came from. |
| `link` | `string` (uri) | Yes | What tapping the row opens, as an `orbyt://` link. |
| `links` | `array` | No | Spans of `text` that open something of their own. |
| `text` | `string` | Yes | The sentence after the row's heading, such as `spotlight.orbyt.video and 2 others joined`. |

### `com.getorbyt.notification.defs#displayLink`

**Type**: `object`

A span of display text, by UTF-8 byte offsets as rich text facets count them, and what it opens.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `byteEnd` | `integer` | Yes |  |
| `byteStart` | `integer` | Yes |  |
| `uri` | `string` (uri) | Yes |  |

### `com.getorbyt.notification.defs#notificationView`

**Type**: `object`

One Orbyt activity item. Computed when read from Orbyt records and Community service state, never stored.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `author` | `ref` → `com.getorbyt.actor.defs#profileView` | Yes |  |
| `authors` | `array` | No | The newest distinct authors of a gathered item, newest first; the first is `author`. Absent when the item has one author. |
| `community` | `ref` → `com.getorbyt.community.defs#view` | No | The Community a `community*` reason is about. Absent for other reasons, and absent when the Community can no longer be shown. |
| `count` | `integer` | No | How many events this item gathers: the joins to one Community in one day, the open reports on one post, or the messages in one Modmail thread. Absent means one. `author` and `indexedAt` are the newest event's. |
| `display` | `ref` → `#display` | No | How the row reads, written by the service so wording, grouping and destinations change without a client release. A client that understands it draws the row from it and keeps its own per-reason wording only for items without one. |
| `indexedAt` | `string` (datetime) | Yes |  |
| `isRead` | `boolean` | Yes |  |
| `reason` | `string` | Yes | `follow`: the author followed the viewer on Orbyt. `followImport`: the author's follow came from importing their network follows, so the network never announced it; clients may group these. `friendJoined`: an account the viewer follows on the connected network joined Orbyt. `communityJoined`: the author joined a Community the viewer administers. `communityPostRemoved`: the author, a moderator, removed the viewer's post from a Community; it stays listed while the post is removed. `communityReport`: the author reported a post in a Community the viewer moderates; it stays listed while the report is open. `communityTransferOffered`: the author offered the viewer ownership of a Community; it stays listed while the offer is pending. `communityModmail`: the author, a member, wrote to the mod team of a Community where the viewer holds manage-mail; it stays listed while the thread is open. `communityModmailReply`: the mod team of a Community answered the viewer's Modmail; the author is the Community's own account, because the reply speaks for the team. `communityAnnouncement`: the mod team of a Community the viewer belongs to set or changed its announcement since the viewer joined; the author is the Community's own account, and it stays listed while the announcement does. A client that mirrors follows to the network may leave out `follow`, which the network already reports. A client renders a reason it does not recognise generically or skips it. |
| `uri` | `string` (at-uri) | Yes | The record behind the item: the follow record; for `friendJoined` the joining account's repository (`at://<did>`); for `communityJoined` the membership record; for `communityPostRemoved` and `communityReport` the post; for `communityTransferOffered`, `communityModmail`, `communityModmailReply` and `communityAnnouncement` the Community. |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "display": {
      "description": "A server-written Activity row.",
      "properties": {
        "badge": {
          "description": "What sits on the lead image's corner: the author's face, up to three faces from `authors`, or the Community's art. Absent means nothing.",
          "knownValues": [
            "author",
            "authors",
            "community"
          ],
          "type": "string"
        },
        "lead": {
          "description": "Whose image leads the row, and whose name heads it: the author's face and handle, or the Community's art and `/name`. The row comes from whoever the reader would say it came from.",
          "knownValues": [
            "author",
            "community"
          ],
          "type": "string"
        },
        "link": {
          "description": "What tapping the row opens, as an `orbyt://` link.",
          "format": "uri",
          "type": "string"
        },
        "links": {
          "description": "Spans of `text` that open something of their own.",
          "items": {
            "ref": "#displayLink",
            "type": "ref"
          },
          "maxLength": 8,
          "type": "array"
        },
        "text": {
          "description": "The sentence after the row's heading, such as `spotlight.orbyt.video and 2 others joined`.",
          "maxGraphemes": 300,
          "maxLength": 600,
          "type": "string"
        }
      },
      "required": [
        "lead",
        "text",
        "link"
      ],
      "type": "object"
    },
    "displayLink": {
      "description": "A span of display text, by UTF-8 byte offsets as rich text facets count them, and what it opens.",
      "properties": {
        "byteEnd": {
          "minimum": 0,
          "type": "integer"
        },
        "byteStart": {
          "minimum": 0,
          "type": "integer"
        },
        "uri": {
          "format": "uri",
          "type": "string"
        }
      },
      "required": [
        "byteStart",
        "byteEnd",
        "uri"
      ],
      "type": "object"
    },
    "notificationView": {
      "description": "One Orbyt activity item. Computed when read from Orbyt records and Community service state, never stored.",
      "properties": {
        "author": {
          "ref": "com.getorbyt.actor.defs#profileView",
          "type": "ref"
        },
        "authors": {
          "description": "The newest distinct authors of a gathered item, newest first; the first is `author`. Absent when the item has one author.",
          "items": {
            "ref": "com.getorbyt.actor.defs#profileView",
            "type": "ref"
          },
          "maxLength": 3,
          "type": "array"
        },
        "community": {
          "description": "The Community a `community*` reason is about. Absent for other reasons, and absent when the Community can no longer be shown.",
          "ref": "com.getorbyt.community.defs#view",
          "type": "ref"
        },
        "count": {
          "description": "How many events this item gathers: the joins to one Community in one day, the open reports on one post, or the messages in one Modmail thread. Absent means one. `author` and `indexedAt` are the newest event's.",
          "minimum": 1,
          "type": "integer"
        },
        "display": {
          "description": "How the row reads, written by the service so wording, grouping and destinations change without a client release. A client that understands it draws the row from it and keeps its own per-reason wording only for items without one.",
          "ref": "#display",
          "type": "ref"
        },
        "indexedAt": {
          "format": "datetime",
          "type": "string"
        },
        "isRead": {
          "type": "boolean"
        },
        "reason": {
          "description": "`follow`: the author followed the viewer on Orbyt. `followImport`: the author's follow came from importing their network follows, so the network never announced it; clients may group these. `friendJoined`: an account the viewer follows on the connected network joined Orbyt. `communityJoined`: the author joined a Community the viewer administers. `communityPostRemoved`: the author, a moderator, removed the viewer's post from a Community; it stays listed while the post is removed. `communityReport`: the author reported a post in a Community the viewer moderates; it stays listed while the report is open. `communityTransferOffered`: the author offered the viewer ownership of a Community; it stays listed while the offer is pending. `communityModmail`: the author, a member, wrote to the mod team of a Community where the viewer holds manage-mail; it stays listed while the thread is open. `communityModmailReply`: the mod team of a Community answered the viewer's Modmail; the author is the Community's own account, because the reply speaks for the team. `communityAnnouncement`: the mod team of a Community the viewer belongs to set or changed its announcement since the viewer joined; the author is the Community's own account, and it stays listed while the announcement does. A client that mirrors follows to the network may leave out `follow`, which the network already reports. A client renders a reason it does not recognise generically or skips it.",
          "knownValues": [
            "follow",
            "followImport",
            "friendJoined",
            "communityJoined",
            "communityPostRemoved",
            "communityReport",
            "communityTransferOffered",
            "communityModmail",
            "communityModmailReply",
            "communityAnnouncement"
          ],
          "type": "string"
        },
        "uri": {
          "description": "The record behind the item: the follow record; for `friendJoined` the joining account's repository (`at://<did>`); for `communityJoined` the membership record; for `communityPostRemoved` and `communityReport` the post; for `communityTransferOffered`, `communityModmail`, `communityModmailReply` and `communityAnnouncement` the Community.",
          "format": "at-uri",
          "type": "string"
        }
      },
      "required": [
        "uri",
        "reason",
        "author",
        "isRead",
        "indexedAt"
      ],
      "type": "object"
    }
  },
  "id": "com.getorbyt.notification.defs",
  "lexicon": 1
}
```
