type: object
description: |
    An edge in the social graph — friend, follow, block, or mute. Mirrors
    `SocialGraphItem` (extends `DocumentDatabase.BaseItem`) in
    [`cloud/src/SocialAPI/Schemas.ts`](../../../../cloud/src/SocialAPI/Schemas.ts).

    Edges have an *owner* and a *target*. Edge directionality varies by type:
    - `Friends` (mutual) — two rows are written, one per direction.
    - `Blocked` (uni-directional) — only the blocker can delete; target should
      not be able to detect the edge by query.
    - `Following` / `Muted` (uni-directional) — only the owner can delete.

    The id is a deterministic `sha256(owner, target, type)` (with the two
    accounts sorted lexicographically for `Blocked`), so re-asserting an
    edge upserts the same row.
required: [id, ownerBigscreenAccountId, targetBigscreenAccountId, socialGraphType]
properties:
    id:
        type: string
        description: SHA-256 hex digest — see description for the hash inputs.
    createdAt:
        type: integer
        description: Edge creation, Unix timestamp in **milliseconds** (from `BaseItem`).
    ownerBigscreenAccountId:
        type: string
        description: Account that initiated the edge (the blocker, the friender, etc.).
    targetBigscreenAccountId:
        type: string
        description: Account on the receiving side of the edge.
    ownerSocialId:
        type: string
        description: Social profile id for the owner — convenience copy.
    targetSocialId:
        type: string
        description: Social profile id for the target — convenience copy.
    socialGraphType:
        $ref: "./SocialGraphType.yaml"
    targetSocialProfileSnapshot:
        description: |
            Denormalized `PublicSocialProfile` for the target at edge-creation
            time, so the edge can render a name + avatar without a join even
            after profile mutation. Shape is loose — older rows may be
            partial.
        oneOf:
            - $ref: "./PublicSocialProfile.yaml"
            - type: "null"
    metaData:
        type: object
        description: Free-form payload attached at write time.
        additionalProperties: true
example:
    id: "0a1b2c3d4e5f6789abcdef0123456789abcdef0123456789abcdef0123456789"
    createdAt: 1761127240000
    ownerBigscreenAccountId: "acct_01HXJ4Q12345"
    targetBigscreenAccountId: "acct_01HXJ4Q67890"
    ownerSocialId: "soc_01HZR12345ABC678DEF90GHJKM"
    targetSocialId: "soc_01HZR67890ABC678DEF90GHJKM"
    socialGraphType: 2
    targetSocialProfileSnapshot:
        socialId: "soc_01HZR67890ABC678DEF90GHJKM"
        username: "bob"
        smallImageUrl: "https://cdn.bigscreenvr.com/avatars/bob_sm.png"
    metaData: {}
