{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://spec.super-arc.com/0.1.0/event.json",
  "title": "Event",
  "description": "A Event in the Narrative Spec. Required core is deliberately tiny: a stub is valid, and depth is scored rather than demanded. Depth groups are the optional top-level objects below; a group is started when its key is present and its value is a non-null object, including {}.",
  "type": "object",
  "required": [
    "id",
    "specType",
    "specVersion",
    "name",
    "when"
  ],
  "properties": {
    "id": {
      "$ref": "common.json#/$defs/id"
    },
    "specType": {
      "const": "event"
    },
    "specVersion": {
      "$ref": "common.json#/$defs/specVersion"
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "description": "Display name. May change; the slug in id may not."
    },
    "status": {
      "$ref": "common.json#/$defs/status"
    },
    "extensions": {
      "$ref": "common.json#/$defs/extensions"
    },
    "when": {
      "type": "string",
      "description": "In-world time. Free text against the world calendar in v0."
    },
    "causes": {
      "type": [
        "object",
        "null"
      ],
      "description": "What made it happen.",
      "properties": {
        "events": {
          "type": "array",
          "items": {
            "$ref": "common.json#/$defs/ref"
          }
        },
        "notes": {
          "type": "string"
        }
      }
    },
    "effects": {
      "type": [
        "object",
        "null"
      ],
      "description": "What it changed.",
      "properties": {
        "events": {
          "type": "array",
          "items": {
            "$ref": "common.json#/$defs/ref"
          }
        },
        "notes": {
          "type": "string"
        }
      }
    },
    "witnesses": {
      "type": [
        "object",
        "null"
      ],
      "description": "Who saw it, and who only heard about it.",
      "properties": {
        "present": {
          "type": "array",
          "items": {
            "$ref": "common.json#/$defs/ref"
          }
        },
        "secondhand": {
          "type": "array",
          "items": {
            "$ref": "common.json#/$defs/ref"
          }
        }
      }
    }
  },
  "x-depthOrder": [
    "causes",
    "effects",
    "witnesses"
  ]
}
