{
  "$defs": {
    "__schema0": {
      "enum": [
        "boolean",
        "integer",
        "number",
        "string",
        "enum",
        "message"
      ],
      "type": "string"
    },
    "__schema1": {
      "default": false,
      "type": "boolean"
    },
    "__schema2": {
      "anyOf": [
        {
          "anyOf": [
            {
              "type": "null"
            },
            {
              "type": "boolean"
            },
            {
              "type": "number"
            },
            {
              "type": "string"
            }
          ]
        },
        {
          "additionalProperties": false,
          "properties": {
            "$message": {
              "pattern": "^[A-Za-z][A-Za-z0-9_-]*(?:\\.[A-Za-z][A-Za-z0-9_-]*)+$",
              "title": "NamedMessageKey",
              "type": "string"
            }
          },
          "required": [
            "$message"
          ],
          "type": "object"
        }
      ]
    },
    "__schema3": {
      "default": "global",
      "enum": [
        "global"
      ],
      "type": "string"
    },
    "__schema4": {
      "items": {
        "type": "string"
      },
      "type": "array"
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "data": {
      "additionalProperties": false,
      "properties": {
        "enumValues": {
          "$ref": "#/$defs/__schema4"
        },
        "nullable": {
          "$ref": "#/$defs/__schema1"
        },
        "scope": {
          "$ref": "#/$defs/__schema3"
        },
        "type": {
          "$ref": "#/$defs/__schema0"
        },
        "value": {
          "$ref": "#/$defs/__schema2"
        }
      },
      "required": [
        "type",
        "value"
      ],
      "type": "object",
      "x-noveltea-documentation": {
        "constraints": [
          "value must match the declared type and nullability.",
          "Enum Variables require at least one non-empty enumValues entry; entries must be unique. Non-null values must equal one declared entry; null is permitted when nullable is true."
        ]
      }
    },
    "description": {
      "type": "string"
    },
    "id": {
      "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
      "title": "EntityId",
      "type": "string"
    },
    "label": {
      "minLength": 1,
      "type": "string"
    },
    "narrativeRefs": {
      "items": {
        "pattern": "^(?:creative-direction|arc|milestone|event|character|fact|world-entity|relationship|revelation|choice-point|puzzle|authored-content|narrative-position)\\.[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
        "type": "string"
      },
      "type": "array"
    }
  },
  "required": [
    "id",
    "label",
    "data"
  ],
  "type": "object"
}
