type: object
description: |
    Public projection of a room — `PublicRoom` from
    [`cloud/src/Schemas.ts`](../../../../cloud/src/Schemas.ts). The
    sanitised view returned to VR clients from cloud-api room endpoints
    (`/room`, `/room/{roomId}`, `/rooms`, etc.).

    Distinct from [`LiveRoom`](./LiveRoom.yaml) (the internal
    Redis-backed shape used by admin endpoints). The cloud_api builds a
    `PublicRoom` from a `LiveRoom` + the requesting user's context;
    `me` and `localScreenId`-flavored fields are personalised per
    request.
required: [roomId]
properties:
    roomId: { type: string }
    inviteCode: { type: string }
    createdAt:
        type: integer
        description: Unix milliseconds — from the underlying `StoredRoom`.
    instanceCreatedAt:
        type: integer
        description: Unix milliseconds — when the live instance was bootstrapped.
    ownerSocialProfile:
        description: |
            `SocialProfile` of the room owner — unset for unowned rooms
            (lobbies, TV channels).
        oneOf:
            - $ref: "./SocialProfile.yaml"
            - type: "null"
    name: { type: string }
    description: { type: string }
    category:
        type: string
        description: "`RoomCategory` enum."
    environmentId: { type: string }
    size: { type: integer }
    version:
        type: string
        description: App version associated with the room (Unity version of the creator).
    roomType:
        type: string
        description: "`RoomType` — `Room`, `Channel`, `Lobby`, etc."
    visibility:
        type: string
        description: "`RoomVisibility` — `Public`, `Private`, `FriendsOnly`."
    status:
        type: string
        description: "`LiveRoomStatus` — surfaced so clients can detect migrations or room errors."
    adminUserIds:
        type: array
        items: { type: string }
    mediaServer:
        type: object
        description: "`PublicMediaServer` — sanitised media-server descriptor."
        additionalProperties: true
    me:
        type: object
        description: |
            `LocalUser` — the requesting user's own user-state in this
            room. Only populated when the requesting user is in the room.
        additionalProperties: true
    remoteUsers:
        type: array
        description: "`RemoteUser[]` — public projection of the other participants."
        items:
            type: object
            additionalProperties: true
    participants:
        type: integer
        description: Quick count of participants in the room.
    blockedSocialIds:
        type: array
        items: { type: string }
        description: Social ids the requesting user has blocked who are also in this room.
    screens:
        type: array
        description: Screens currently in the room (`PublicScreen[]`).
        items: { $ref: "./Screen.yaml" }
    microphonePolicy:
        type: string
        description: "`RoomAdminPolicy.MicrophonePolicy`."
    movementSoundsPolicy:
        type: string
        description: "`RoomAdminPolicy.MovementSoundsPolicy`."
    drawingVisibility:
        type: string
        description: "`RoomAdminPolicy.DrawingVisibility`."
    avatarNameVisibility:
        type: string
        description: "`RoomAdminPolicy.AvatarNameVisibility`."
    poseVisibility:
        type: string
        description: "`RoomAdminPolicy.PoseVisibility`."
    toySpawnability:
        type: string
        description: "`RoomAdminPolicy.ToySpawnability`."
    preferredUserType:
        type: string
        description: "`RoomAdminPolicy.PreferredUserType`."
    stagedSocialIds:
        type: array
        items: { type: string }
    modSocialIds:
        type: array
        items: { type: string }
example:
    roomId: "room:abc1234567"
    inviteCode: "BLUE-LION-9421"
    createdAt: 1761127240000
    instanceCreatedAt: 1762462000000
    name: "Movie Night"
    description: ""
    category: "Movies"
    environmentId: "env-cinema-2"
    size: 12
    version: "1.42.0"
    roomType: "Room"
    visibility: "FriendsOnly"
    status: "OK"
    adminUserIds: ["sess_01HZP12345"]
    participants: 3
    blockedSocialIds: []
    screens: []
    stagedSocialIds: []
    modSocialIds: []
