{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "id": "http://api.iadvize.com/connectors/jsonschemas/bot/bot.json",
  "type": "object",
  "title": "iAdvize schema - interaction / bot",
  "additionalProperties": false,
  "properties": {
    "idOperator": {
      "type": "string"
    },
    "external": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "idBot": {
          "type": "string"
        },
        "name": {
          "type": ["string", "null"]
        },
        "description": {
          "type": ["string", "null"]
        },
        "editorUrl": {
          "type": "string",
          "format": "uri"
        }
      },
      "required": [
        "idBot",
        "editorUrl"
      ]
    },
    "distributionRules": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          },
          "label": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "label"
        ]
      }
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    }
  },
  "required": [
    "idOperator",
    "external",
    "createdAt",
    "updatedAt"
  ]
}
