{
  "additionalProperties": false,
  "description": "Calculation over distinct facts in a preceding knowledge-time window.\n\nEach fact contributes its latest eligible version. Corrections change its\nvalue without refreshing its original publication age. The interval includes\nits start and excludes the current read instant. Count, sum and distinct\ncount return zero for an empty complete window; minimum and maximum are\nmissing. Missing required fields or publication metadata remain missing.",
  "properties": {
    "clock": {
      "const": "knowledge",
      "default": "knowledge",
      "title": "Clock",
      "type": "string"
    },
    "event_field": {
      "anyOf": [
        {
          "maxLength": 128,
          "minLength": 1,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Payload field for sum, distinct count, minimum or maximum. Omit for count.",
      "title": "Event Field"
    },
    "event_type_id": {
      "description": "Event type from list_event_types().",
      "minLength": 1,
      "title": "Event Type Id",
      "type": "string"
    },
    "kind": {
      "const": "event_window",
      "default": "event_window",
      "title": "Kind",
      "type": "string"
    },
    "operation": {
      "enum": [
        "count",
        "sum",
        "count_distinct",
        "min",
        "max"
      ],
      "title": "Operation",
      "type": "string"
    },
    "resolution": {
      "default": null,
      "description": "Unsupported on this value ref; only null is accepted.",
      "type": "null"
    },
    "symbol": {
      "default": null,
      "description": "Unsupported on this value ref; only null is accepted.",
      "type": "null"
    },
    "window_minutes": {
      "description": "Length of the preceding knowledge-time window, in minutes.",
      "minimum": 1,
      "title": "Window Minutes",
      "type": "integer"
    }
  },
  "required": [
    "event_type_id",
    "operation",
    "window_minutes"
  ],
  "title": "EventWindowValueRef",
  "type": "object"
}
