{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/amigo/main/json-schema/amigo-update-operator-request-schema.json",
  "title": "UpdateOperatorRequest",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amigo-operators-api-openapi.yml#/components/schemas/UpdateOperatorRequest",
  "properties": {
    "name": {
      "anyOf": [
        {
          "$ref": "#/$defs/NameString"
        },
        {
          "type": "null"
        }
      ]
    },
    "email": {
      "anyOf": [
        {
          "type": "string",
          "format": "email"
        },
        {
          "type": "null"
        }
      ],
      "title": "Email"
    },
    "type": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "clinical",
            "administrative",
            "crisis_counselor"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Type"
    },
    "skills": {
      "anyOf": [
        {
          "items": {
            "type": "string",
            "maxLength": 64,
            "minLength": 1
          },
          "type": "array",
          "maxItems": 50
        },
        {
          "type": "null"
        }
      ],
      "title": "Skills"
    },
    "connection_method": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "browser",
            "phone"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Connection Method"
    },
    "phone_number": {
      "anyOf": [
        {
          "$ref": "#/$defs/PhoneE164"
        },
        {
          "type": "null"
        }
      ]
    },
    "role": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "operator",
            "supervisor",
            "admin"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Role"
    },
    "status": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "online",
            "busy",
            "offline"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Status"
    }
  },
  "type": "object",
  "$defs": {
    "NameString": {
      "type": "string",
      "maxLength": 256,
      "minLength": 1
    },
    "PhoneE164": {
      "type": "string",
      "maxLength": 16,
      "minLength": 2
    }
  }
}