{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "canvas": {
      "description": "A canvas, as it is now.",
      "properties": {
        "name": {
          "maxLength": 80,
          "type": "string"
        },
        "tiles": {
          "description": "Its tiles in strip order: each column's head, then the tiles stacked under it.",
          "items": {
            "ref": "place.hud.defs#sharedTile",
            "type": "ref"
          },
          "maxLength": 200,
          "type": "array"
        }
      },
      "required": [
        "name",
        "tiles"
      ],
      "type": "object"
    },
    "chat": {
      "description": "A chat's answer, as it was shared.",
      "properties": {
        "question": {
          "description": "What the person asked.",
          "maxLength": 10000,
          "type": "string"
        },
        "steps": {
          "description": "The tool calls the model made: each its tool and how it went, a query's method its one argument kept, never what the call answered.",
          "items": {
            "ref": "place.hud.chatDefs#step",
            "type": "ref"
          },
          "type": "array"
        },
        "text": {
          "description": "The model's words, Markdown.",
          "maxLength": 10000,
          "type": "string"
        },
        "tiles": {
          "description": "What the answer drew, in order.",
          "items": {
            "ref": "place.hud.defs#sharedCall",
            "type": "ref"
          },
          "type": "array"
        }
      },
      "required": [
        "question",
        "text",
        "steps",
        "tiles"
      ],
      "type": "object"
    },
    "main": {
      "description": "What a link shares, for anyone who has it: a canvas's name and tiles as they are now; a tile's call; or a chat's answer as it was shared, its question, words, steps and tiles' calls. Never a tile's result: the page calls each tile as whoever opens it (callTool signed in, callSharedTool signed out). Nothing but what was shared: no member, no canvas's or chat's id. No auth required (a web session it carries is read only to say whether it is enough to see the page as the person); each address asks at most 120 times a minute, with callSharedTool.",
      "errors": [
        {
          "description": "No link of this id: never one, or deleted, or what it shared was.",
          "name": "NotFound"
        },
        {
          "description": "The input is not what the method takes.",
          "name": "InvalidRequest"
        },
        {
          "description": "This address asked for shared pages and their tiles too often in the last minute: ask again in a minute.",
          "name": "RateLimitExceeded"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "by": {
              "description": "Who shared it.",
              "ref": "place.hud.defs#actor",
              "type": "ref"
            },
            "canvas": {
              "ref": "#canvas",
              "type": "ref"
            },
            "chat": {
              "ref": "#chat",
              "type": "ref"
            },
            "createdAt": {
              "description": "When it was shared.",
              "format": "datetime",
              "type": "string"
            },
            "key": {
              "description": "The link's key, as its URL names it.",
              "maxLength": 26,
              "minLength": 26,
              "type": "string"
            },
            "kind": {
              "description": "What it shares: canvas, tile or chat, whose field holds it.",
              "knownValues": [
                "canvas",
                "tile",
                "chat"
              ],
              "type": "string"
            },
            "servesChat": {
              "description": "Whether this HUD serves the chat, at /chat: with no model to chat with it does not, and the page offers no Ask your own nor Ask about this.",
              "type": "boolean"
            },
            "signInAgain": {
              "description": "Whether the web session the request carries is short of what seeing a shared page as the person needs: the page asks to sign in again. Left out signed out.",
              "type": "boolean"
            },
            "tile": {
              "ref": "place.hud.defs#sharedCall",
              "type": "ref"
            },
            "title": {
              "description": "The canvas's name, the tile's title, or the question.",
              "maxLength": 200,
              "type": "string"
            }
          },
          "required": [
            "key",
            "kind",
            "by",
            "title",
            "createdAt"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "link": {
            "description": "The link's key, as its URL names it.",
            "maxLength": 26,
            "minLength": 26,
            "type": "string"
          }
        },
        "required": [
          "link"
        ],
        "type": "params"
      },
      "type": "query"
    }
  },
  "description": "What a link shares.",
  "id": "place.hud.getShared",
  "lexicon": 1
}
