{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Fetch the stored document body and URL for a Gyoka document type.",
      "errors": [
        {
          "description": "Returned when service authentication is required and the caller is not authenticated.",
          "name": "AuthenticationRequired"
        },
        {
          "description": "Returned when the authenticated caller is not in the admin allowlist.",
          "name": "Forbidden"
        },
        {
          "description": "Returned when the query parameters are invalid.",
          "name": "BadRequest"
        },
        {
          "description": "Returned when the requested document has not been stored.",
          "name": "NotFound"
        },
        {
          "description": "Returned when the document cannot be loaded.",
          "name": "InternalServerError"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "nullable": [
            "url",
            "content"
          ],
          "properties": {
            "content": {
              "maxLength": 32768,
              "type": "string"
            },
            "docType": {
              "knownValues": [
                "tos",
                "privacy_policy"
              ],
              "type": "string"
            },
            "url": {
              "format": "uri",
              "maxLength": 2048,
              "type": "string"
            }
          },
          "required": [
            "docType",
            "url",
            "content"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "docType": {
            "description": "Document type to fetch.",
            "knownValues": [
              "tos",
              "privacy_policy"
            ],
            "type": "string"
          }
        },
        "required": [
          "docType"
        ],
        "type": "params"
      },
      "type": "query"
    }
  },
  "id": "net.nusno.gyoka.document.getDocument",
  "lexicon": 1
}
