# social.grain.story.defs

- Kind: defs
- Authority: story.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.story.defs)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:e7rftrdyz5e2rw4y6ocszew2/social.grain.story.defs/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:e7rftrdyz5e2rw4y6ocszew2/social.grain.story.defs/analytics)

## #storyView (`social.grain.story.defs#storyView`)

Type: object

### Properties

- `address` (ref)
  - Reference: `community.lexicon.location.address`
- `aspectRatio` (ref, required)
  - Reference: `social.grain.defs#aspectRatio`
- `cid` (string · cid, required)
- `commentCount` (integer)
- `createdAt` (string · datetime, required)
- `creator` (ref, required)
  - Reference: `social.grain.actor.defs#profileView`
- `crossPost` (ref)
  - Reference: `social.grain.gallery.defs#crossPostInfo`
- `expired` (boolean): Whether the story has passed its 24-hour window.
- `fullsize` (string · uri, required): Full-size URL for the story image.
- `labels` (array)
  - `items` (ref)
    - Reference: `com.atproto.label.defs#label`
- `location` (ref)
  - Reference: `community.lexicon.location.hthree`
- `locationDisplay` (string): Formatted location label for display.
- `thumb` (string · uri, required): Thumbnail URL for the story image.
- `uri` (string · at-uri, required)
- `viewer` (ref)
  - Reference: `#viewerState`

## #viewerState (`social.grain.story.defs#viewerState`)

Type: object

Metadata about the requesting account's relationship with the story.

### Properties

- `fav` (string · at-uri)
- `viewed` (boolean): Whether the requesting account has watched this story. Only present when true.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "storyView": {
      "properties": {
        "address": {
          "ref": "community.lexicon.location.address",
          "type": "ref"
        },
        "aspectRatio": {
          "ref": "social.grain.defs#aspectRatio",
          "type": "ref"
        },
        "cid": {
          "format": "cid",
          "type": "string"
        },
        "commentCount": {
          "type": "integer"
        },
        "createdAt": {
          "format": "datetime",
          "type": "string"
        },
        "creator": {
          "ref": "social.grain.actor.defs#profileView",
          "type": "ref"
        },
        "crossPost": {
          "ref": "social.grain.gallery.defs#crossPostInfo",
          "type": "ref"
        },
        "expired": {
          "description": "Whether the story has passed its 24-hour window.",
          "type": "boolean"
        },
        "fullsize": {
          "description": "Full-size URL for the story image.",
          "format": "uri",
          "type": "string"
        },
        "labels": {
          "items": {
            "ref": "com.atproto.label.defs#label",
            "type": "ref"
          },
          "type": "array"
        },
        "location": {
          "ref": "community.lexicon.location.hthree",
          "type": "ref"
        },
        "locationDisplay": {
          "description": "Formatted location label for display.",
          "type": "string"
        },
        "thumb": {
          "description": "Thumbnail URL for the story image.",
          "format": "uri",
          "type": "string"
        },
        "uri": {
          "format": "at-uri",
          "type": "string"
        },
        "viewer": {
          "ref": "#viewerState",
          "type": "ref"
        }
      },
      "required": [
        "uri",
        "cid",
        "creator",
        "thumb",
        "fullsize",
        "aspectRatio",
        "createdAt"
      ],
      "type": "object"
    },
    "viewerState": {
      "description": "Metadata about the requesting account's relationship with the story.",
      "properties": {
        "fav": {
          "format": "at-uri",
          "type": "string"
        },
        "viewed": {
          "description": "Whether the requesting account has watched this story. Only present when true.",
          "type": "boolean"
        }
      },
      "type": "object"
    }
  },
  "id": "social.grain.story.defs",
  "lexicon": 1
}
```
