type: object
description: |
    Stored notification — the **admin** shape returned from
    `/admin/account/{id}/social/notifications` and the admin notification
    routes. Mirrors `Notification` (extends `DocumentDatabase.BaseItem`) in
    [`cloud/src/SocialAPI/Schemas.ts`](../../../../cloud/src/SocialAPI/Schemas.ts).

    - `id` is a deterministic SHA-256 of
      `(sender, recipient, type [, metaData])` — re-asserting upserts.
    - `notificationStatus` is the field name (the natural `status` is reserved
      in DynamoDB query filter expressions).
    - The public-facing shape returned to the recipient client is
      [`PublicNotification`](./PublicNotification.yaml) — it resolves
      `senderBigscreenAccountId` into a `senderSocialProfile` and renames
      `id` to `notificationId`.
required: [id, recipientBigscreenAccountId, notificationType, notificationStatus]
properties:
    id:
        type: string
        description: SHA-256 hex digest — see description for the hash inputs.
    createdAt:
        type: integer
        description: Creation time, Unix timestamp in **milliseconds** (from `BaseItem`).
    senderBigscreenAccountId:
        type: string
        description: Account that triggered the notification. Empty for system / marketing messages.
    recipientBigscreenAccountId:
        type: string
        description: Account the notification is delivered to.
    notificationType:
        $ref: "./NotificationType.yaml"
    notificationStatus:
        $ref: "./NotificationStatus.yaml"
    ttl:
        type: integer
        description: |
            DynamoDB row-TTL, Unix timestamp in **seconds**. `-1` when unset.
    expiryDate:
        type: integer
        description: |
            Application-level expiry (default `now + 30 days`), Unix timestamp
            in **seconds**. The client hides expired notifications even if the
            row is still present.
    title: { type: string }
    body: { type: string }
    metaData:
        type: object
        description: |
            `NotificationMetaData` — free-form per-`notificationType` payload.
            Common keys: `roomId` (for `RoomInvite` / `KnockKnock`), `version`.
        properties:
            roomId: { type: string }
            version: { type: string }
        additionalProperties: true
example:
    id: "0a1b2c3d4e5f6789abcdef0123456789abcdef0123456789abcdef0123456789"
    createdAt: 1762462440000
    senderBigscreenAccountId: "acct_01HXJ4Q12345"
    recipientBigscreenAccountId: "acct_01HXJ4Q67890"
    notificationType: FriendRequest
    notificationStatus: Unread
    ttl: -1
    expiryDate: 1765054440
    title: "alice wants to be your friend"
    body: ""
    metaData: {}
