{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://interchange.stellarview.net/schemas/pipeline.schema.json",
  "title": "The pipeline as data: the order an item passes through the Collector, and the Interchange's listeners",
  "type": "object",
  "required": [
    "collector",
    "interchange"
  ],
  "additionalProperties": false,
  "properties": {
    "about": {
      "type": "string"
    },
    "collector": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "required": [
          "stage",
          "does"
        ],
        "additionalProperties": false,
        "properties": {
          "stage": {
            "enum": [
              "store",
              "verify",
              "classify",
              "check",
              "dedupe",
              "order",
              "enrich",
              "video",
              "trap",
              "handoff"
            ]
          },
          "does": {
            "type": "string"
          }
        }
      }
    },
    "interchange": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "required": [
          "listener",
          "does"
        ],
        "additionalProperties": false,
        "properties": {
          "listener": {
            "enum": [
              "select_path",
              "log",
              "history",
              "action",
              "alert",
              "ticket",
              "cmms",
              "analysis",
              "twin",
              "hub"
            ]
          },
          "does": {
            "type": "string"
          }
        }
      }
    }
  }
}