{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://xovris.ai/schemas/extension-component.json",
  "title": "Xovris command-centre component",
  "oneOf": [
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "title": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "kind": {
          "enum": [
            "issue_link"
          ]
        },
        "label": {
          "type": "string",
          "minLength": 1,
          "maxLength": 60
        },
        "href": {
          "type": "string",
          "format": "uri",
          "pattern": "^https://[^/?#@\\s]+([/?#].*)?$"
        },
        "reference": {
          "type": "string",
          "minLength": 1,
          "maxLength": 40
        }
      },
      "required": [
        "id",
        "title",
        "kind",
        "label",
        "href"
      ]
    },
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "title": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "kind": {
          "enum": [
            "status_badge"
          ]
        },
        "label": {
          "type": "string",
          "minLength": 1,
          "maxLength": 40
        },
        "tone": {
          "enum": [
            "success",
            "warning",
            "error",
            "info",
            "neutral"
          ]
        }
      },
      "required": [
        "id",
        "title",
        "kind",
        "label",
        "tone"
      ]
    },
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "title": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "kind": {
          "enum": [
            "alert_action"
          ]
        },
        "label": {
          "type": "string",
          "minLength": 1,
          "maxLength": 40
        },
        "description": {
          "type": "string",
          "minLength": 1,
          "maxLength": 240
        },
        "fields": {
          "type": "array",
          "maxItems": 8,
          "items": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 40
              },
              "label": {
                "type": "string",
                "minLength": 1,
                "maxLength": 60
              },
              "input": {
                "enum": [
                  "text",
                  "textarea",
                  "select"
                ]
              },
              "options": {
                "type": "array",
                "maxItems": 20,
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 60
                }
              },
              "required": {
                "type": "boolean"
              }
            },
            "required": [
              "name",
              "label",
              "input"
            ]
          }
        }
      },
      "required": [
        "id",
        "title",
        "kind",
        "label",
        "fields"
      ]
    },
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "title": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "kind": {
          "enum": [
            "fix_review"
          ]
        },
        "change": {
          "type": "string",
          "minLength": 1,
          "maxLength": 400
        },
        "reason": {
          "type": "string",
          "minLength": 1,
          "maxLength": 400
        },
        "evidence": {
          "type": "array",
          "minItems": 1,
          "maxItems": 8,
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 240
          }
        },
        "test": {
          "type": "string",
          "minLength": 1,
          "maxLength": 240
        },
        "expectedEffect": {
          "type": "string",
          "minLength": 1,
          "maxLength": 240
        },
        "wayBack": {
          "type": "string",
          "minLength": 1,
          "maxLength": 240
        },
        "href": {
          "type": "string",
          "format": "uri",
          "pattern": "^https://[^/?#@\\s]+([/?#].*)?$"
        }
      },
      "required": [
        "id",
        "title",
        "kind",
        "change",
        "reason",
        "evidence",
        "test",
        "expectedEffect",
        "wayBack"
      ]
    },
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "title": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "kind": {
          "enum": [
            "timeline_entry"
          ]
        },
        "at": {
          "type": "string",
          "minLength": 1,
          "maxLength": 40
        },
        "text": {
          "type": "string",
          "minLength": 1,
          "maxLength": 240
        },
        "href": {
          "type": "string",
          "format": "uri",
          "pattern": "^https://[^/?#@\\s]+([/?#].*)?$"
        }
      },
      "required": [
        "id",
        "title",
        "kind",
        "at",
        "text"
      ]
    },
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "title": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "kind": {
          "enum": [
            "asset_panel"
          ]
        },
        "rows": {
          "type": "array",
          "minItems": 1,
          "maxItems": 12,
          "items": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "label": {
                "type": "string",
                "minLength": 1,
                "maxLength": 60
              },
              "value": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "tone": {
                "enum": [
                  "success",
                  "warning",
                  "error",
                  "info",
                  "neutral"
                ]
              }
            },
            "required": [
              "label",
              "value"
            ]
          }
        },
        "href": {
          "type": "string",
          "format": "uri",
          "pattern": "^https://[^/?#@\\s]+([/?#].*)?$"
        }
      },
      "required": [
        "id",
        "title",
        "kind",
        "rows"
      ]
    },
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "title": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "kind": {
          "enum": [
            "settings_page"
          ]
        },
        "fields": {
          "type": "array",
          "minItems": 1,
          "maxItems": 12,
          "items": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 40
              },
              "label": {
                "type": "string",
                "minLength": 1,
                "maxLength": 60
              },
              "value": {
                "type": "string",
                "minLength": 1,
                "maxLength": 240
              },
              "input": {
                "enum": [
                  "text",
                  "toggle"
                ]
              }
            },
            "required": [
              "name",
              "label",
              "input"
            ]
          }
        }
      },
      "required": [
        "id",
        "title",
        "kind",
        "fields"
      ]
    },
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "title": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "kind": {
          "enum": [
            "app_frame"
          ]
        },
        "src": {
          "type": "string",
          "format": "uri",
          "pattern": "^https://[^/?#@\\s]+([/?#].*)?$"
        },
        "height": {
          "type": "integer",
          "minimum": 120,
          "maximum": 2000
        }
      },
      "required": [
        "id",
        "title",
        "kind",
        "src"
      ]
    }
  ]
}