{
  "lexicon": 1,
  "id": "space.polymodel.actor.defs",
  "defs": {
    "profileListView": {
      "type": "object",
      "description": "A list authored by the profile actor, with enough metadata for profile tabs and links into space.polymodel.graph.getList.",
      "required": [
        "uri",
        "cid",
        "name",
        "itemCount",
        "createdAt"
      ],
      "properties": {
        "cid": {
          "type": "string",
          "format": "cid"
        },
        "createdAt": {
          "type": "string",
          "format": "datetime"
        },
        "description": {
          "type": "string"
        },
        "itemCount": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        },
        "purpose": {
          "type": "string"
        },
        "uri": {
          "type": "string",
          "format": "at-uri"
        }
      }
    },
    "profileView": {
      "type": "object",
      "description": "Polymodel actor profile view (union variant). Hydrated from the space.polymodel.actor.profile record plus SQLite-derived stats and viewer relationship state. Returned when the actor authored a polymodel profile record; otherwise getProfile returns the app.bsky.actor.defs#profileViewDetailed variant.",
      "required": [
        "did",
        "handle",
        "record"
      ],
      "properties": {
        "avatar": {
          "type": "string",
          "description": "Resolved avatar URL (CDN). Null until the app view resolves the polymodel profile avatar blob.",
          "format": "uri"
        },
        "defaultLicense": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "did": {
          "type": "string",
          "format": "did"
        },
        "displayName": {
          "type": "string"
        },
        "followerCount": {
          "type": "integer"
        },
        "followingCount": {
          "type": "integer"
        },
        "handle": {
          "type": "string"
        },
        "indexedAt": {
          "type": "string",
          "format": "datetime"
        },
        "links": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "uri"
          }
        },
        "lists": {
          "type": "array",
          "items": {
            "type": "ref",
            "ref": "space.polymodel.actor.defs#profileListView"
          }
        },
        "printers": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "pronouns": {
          "type": "string"
        },
        "record": {
          "type": "unknown",
          "description": "The raw space.polymodel.actor.profile record."
        },
        "thingCount": {
          "type": "integer"
        },
        "totalLikes": {
          "type": "integer"
        },
        "viewer": {
          "type": "ref",
          "ref": "space.polymodel.library.defs#actorViewerState"
        }
      }
    },
    "profileViewUnion": {
      "type": "union",
      "description": "Discriminates a polymodel-native actor (space.polymodel.actor.defs#profileView, hydrated from the local profile record + stats) from a bluesky-only actor (app.bsky.actor.defs#profileViewDetailed, fetched from the public AppView). Clients render based on $type.",
      "refs": [
        "space.polymodel.actor.defs#profileView",
        "app.bsky.actor.defs#profileViewDetailed"
      ],
      "closed": true
    }
  }
}