{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$defs": {},
  "operationId": "toc.editEntry",
  "schemas": {
    "input": {
      "type": "object",
      "properties": {
        "target": {
          "type": "object",
          "properties": {
            "kind": {
              "const": "inline"
            },
            "nodeType": {
              "const": "tableOfContentsEntry"
            },
            "nodeId": {
              "type": "string"
            }
          },
          "additionalProperties": false,
          "required": [
            "kind",
            "nodeType",
            "nodeId"
          ]
        },
        "patch": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "level": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9
            },
            "tableIdentifier": {
              "type": "string"
            },
            "omitPageNumber": {
              "type": "boolean"
            }
          },
          "additionalProperties": false
        }
      },
      "additionalProperties": false,
      "required": [
        "target",
        "patch"
      ]
    },
    "output": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "success": {
              "const": true
            },
            "entry": {
              "type": "object",
              "properties": {
                "kind": {
                  "const": "inline"
                },
                "nodeType": {
                  "const": "tableOfContentsEntry"
                },
                "nodeId": {
                  "type": "string"
                }
              },
              "additionalProperties": false,
              "required": [
                "kind",
                "nodeType",
                "nodeId"
              ]
            }
          },
          "additionalProperties": false,
          "required": [
            "success",
            "entry"
          ]
        },
        {
          "type": "object",
          "properties": {
            "success": {
              "const": false
            },
            "failure": {
              "type": "object",
              "properties": {
                "code": {
                  "enum": [
                    "NO_OP",
                    "INVALID_TARGET",
                    "TARGET_NOT_FOUND",
                    "CAPABILITY_UNAVAILABLE",
                    "INVALID_INSERTION_CONTEXT",
                    "INVALID_INPUT"
                  ]
                },
                "message": {
                  "type": "string"
                },
                "details": {}
              },
              "additionalProperties": false,
              "required": [
                "code",
                "message"
              ]
            }
          },
          "additionalProperties": false,
          "required": [
            "success",
            "failure"
          ]
        }
      ]
    },
    "success": {
      "type": "object",
      "properties": {
        "success": {
          "const": true
        },
        "entry": {
          "type": "object",
          "properties": {
            "kind": {
              "const": "inline"
            },
            "nodeType": {
              "const": "tableOfContentsEntry"
            },
            "nodeId": {
              "type": "string"
            }
          },
          "additionalProperties": false,
          "required": [
            "kind",
            "nodeType",
            "nodeId"
          ]
        }
      },
      "additionalProperties": false,
      "required": [
        "success",
        "entry"
      ]
    },
    "failure": {
      "type": "object",
      "properties": {
        "success": {
          "const": false
        },
        "failure": {
          "type": "object",
          "properties": {
            "code": {
              "enum": [
                "NO_OP",
                "INVALID_TARGET",
                "TARGET_NOT_FOUND",
                "CAPABILITY_UNAVAILABLE",
                "INVALID_INSERTION_CONTEXT",
                "INVALID_INPUT"
              ]
            },
            "message": {
              "type": "string"
            },
            "details": {}
          },
          "additionalProperties": false,
          "required": [
            "code",
            "message"
          ]
        }
      },
      "additionalProperties": false,
      "required": [
        "success",
        "failure"
      ]
    }
  }
}
