{
  "$defs": {
    "IntentCitationV1": {
      "properties": {
        "content_hash": {
          "type": [
            "string",
            "null"
          ]
        },
        "label": {
          "type": [
            "string",
            "null"
          ]
        },
        "uri": {
          "type": "string"
        }
      },
      "required": [
        "uri"
      ],
      "type": "object"
    },
    "IntentElementV1": {
      "properties": {
        "attributes": {
          "additionalProperties": true,
          "type": "object"
        },
        "citations": {
          "items": {
            "$ref": "#/$defs/IntentCitationV1"
          },
          "type": "array"
        },
        "description": {
          "type": [
            "string",
            "null"
          ]
        },
        "icon": {
          "type": [
            "string",
            "null"
          ]
        },
        "id": {
          "type": "string"
        },
        "kind": {
          "type": "string"
        },
        "label": {
          "type": "string"
        },
        "parent": {
          "type": [
            "string",
            "null"
          ]
        },
        "source_span": {
          "anyOf": [
            {
              "$ref": "#/$defs/SourceSpan"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "id",
        "label",
        "kind"
      ],
      "type": "object"
    },
    "IntentRelationshipV1": {
      "properties": {
        "attributes": {
          "additionalProperties": true,
          "type": "object"
        },
        "citations": {
          "items": {
            "$ref": "#/$defs/IntentCitationV1"
          },
          "type": "array"
        },
        "delivery": {
          "anyOf": [
            {
              "$ref": "#/$defs/MessageDeliveryV1"
            },
            {
              "type": "null"
            }
          ]
        },
        "id": {
          "type": "string"
        },
        "kind": {
          "type": "string"
        },
        "label": {
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "source_span": {
          "anyOf": [
            {
              "$ref": "#/$defs/SourceSpan"
            },
            {
              "type": "null"
            }
          ]
        },
        "target": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "source",
        "target",
        "label",
        "kind"
      ],
      "type": "object"
    },
    "IntentStoryV1": {
      "properties": {
        "id": {
          "type": "string"
        },
        "source_span": {
          "anyOf": [
            {
              "$ref": "#/$defs/SourceSpan"
            },
            {
              "type": "null"
            }
          ]
        },
        "step_count": {
          "format": "uint",
          "minimum": 0,
          "type": "integer"
        },
        "title": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "title",
        "step_count"
      ],
      "type": "object"
    },
    "MessageDeliveryV1": {
      "enum": [
        "call",
        "return",
        "async"
      ],
      "type": "string"
    },
    "SourcePosition": {
      "properties": {
        "byte_offset": {
          "description": "Zero-based byte offset in the original source.",
          "format": "uint",
          "minimum": 0,
          "type": "integer"
        },
        "column": {
          "description": "One-based Unicode-byte column number.",
          "format": "uint",
          "minimum": 0,
          "type": "integer"
        },
        "line": {
          "description": "One-based line number.",
          "format": "uint",
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "line",
        "column",
        "byte_offset"
      ],
      "type": "object"
    },
    "SourceSpan": {
      "description": "A half-open source range: `start` is included and `end` is excluded.",
      "properties": {
        "end": {
          "$ref": "#/$defs/SourcePosition"
        },
        "start": {
          "$ref": "#/$defs/SourcePosition"
        }
      },
      "required": [
        "start",
        "end"
      ],
      "type": "object"
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "citations": {
      "items": {
        "$ref": "#/$defs/IntentCitationV1"
      },
      "type": "array"
    },
    "direction": {
      "type": "string"
    },
    "elements": {
      "items": {
        "$ref": "#/$defs/IntentElementV1"
      },
      "type": "array"
    },
    "id": {
      "type": "string"
    },
    "options": {
      "additionalProperties": true,
      "type": "object"
    },
    "profile": {
      "type": "string"
    },
    "relationships": {
      "items": {
        "$ref": "#/$defs/IntentRelationshipV1"
      },
      "type": "array"
    },
    "schema_version": {
      "type": "string"
    },
    "source_span": {
      "anyOf": [
        {
          "$ref": "#/$defs/SourceSpan"
        },
        {
          "type": "null"
        }
      ]
    },
    "stories": {
      "items": {
        "$ref": "#/$defs/IntentStoryV1"
      },
      "type": "array"
    },
    "theme": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "variant": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "schema_version",
    "id",
    "title",
    "profile",
    "theme",
    "direction",
    "elements",
    "relationships",
    "stories"
  ],
  "title": "DiagramIntentV1",
  "type": "object"
}
