{
  "$id": "https://betterstood.com/developers/v31/schemas/mcp/scenario_knowledge_stage_source.input.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "expectedRevision": {
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991,
      "type": "integer"
    },
    "idempotencyKey": {
      "maxLength": 128,
      "minLength": 8,
      "type": "string"
    },
    "scenarioId": {
      "maxLength": 128,
      "minLength": 1,
      "type": "string"
    },
    "source": {
      "oneOf": [
        {
          "additionalProperties": false,
          "properties": {
            "contentBase64": {
              "maxLength": 174764,
              "minLength": 4,
              "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$",
              "type": "string"
            },
            "fileName": {
              "maxLength": 160,
              "minLength": 1,
              "type": "string"
            },
            "kind": {
              "const": "file",
              "type": "string"
            }
          },
          "required": [
            "kind",
            "fileName",
            "contentBase64"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "kind": {
              "const": "url",
              "type": "string"
            },
            "url": {
              "format": "uri",
              "maxLength": 2048,
              "type": "string"
            }
          },
          "required": [
            "kind",
            "url"
          ],
          "type": "object"
        }
      ]
    }
  },
  "required": [
    "scenarioId",
    "expectedRevision",
    "idempotencyKey",
    "source"
  ],
  "title": "scenario_knowledge_stage_source input",
  "type": "object"
}
