{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Update 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 request payload is invalid.",
          "name": "BadRequest"
        },
        {
          "description": "Returned when the document cannot be updated.",
          "name": "InternalServerError"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "nullable": [
            "url",
            "content"
          ],
          "properties": {
            "content": {
              "description": "Optional inline content for the document.",
              "maxLength": 32768,
              "type": "string"
            },
            "docType": {
              "description": "Document type to update.",
              "knownValues": [
                "tos",
                "privacy_policy"
              ],
              "type": "string"
            },
            "url": {
              "description": "Optional source URL for the document.",
              "format": "uri",
              "maxLength": 2048,
              "type": "string"
            }
          },
          "required": [
            "docType"
          ],
          "type": "object"
        }
      },
      "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"
        }
      },
      "type": "procedure"
    }
  },
  "id": "net.nusno.gyoka.document.updateDocument",
  "lexicon": 1
}
