{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Every `dev.cocore.account.friend` record whose subject equals the queried DID — \"who has trusted me with work?\". Newest first; frienders are hydrated to a handle via the public Bluesky AppView when no local profile exists.",
      "errors": [
        {
          "description": "The `did` parameter is missing or not a DID.",
          "name": "InvalidRequest"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "friends": {
              "items": {
                "properties": {
                  "createdAt": {
                    "format": "datetime",
                    "type": "string"
                  },
                  "friender": {
                    "format": "did",
                    "type": "string"
                  },
                  "frienderHandle": {
                    "type": "string"
                  },
                  "subject": {
                    "format": "did",
                    "type": "string"
                  },
                  "uri": {
                    "format": "at-uri",
                    "type": "string"
                  }
                },
                "required": [
                  "friender",
                  "subject"
                ],
                "type": "object"
              },
              "type": "array"
            },
            "total": {
              "type": "integer"
            }
          },
          "required": [
            "friends",
            "total"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "did": {
            "format": "did",
            "type": "string"
          },
          "limit": {
            "default": 50,
            "maximum": 200,
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "did"
        ],
        "type": "params"
      },
      "type": "query"
    }
  },
  "id": "dev.cocore.account.listIncomingFriends",
  "lexicon": 1
}
