{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "wurker_command": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "slug": { "type": "string" },
          "name": { "type": "string" },
          "description": { "type": "string" },
          "command": { "type": "string" },
          "is_module": { "type": "boolean" },
          "delete": { "type": "boolean" }
        },
        "required": ["slug"]
      }
    },
    "wurker_cron": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": { "type": "string" },
          "slug": { "type": "string" },
          "cron": { "type": ["string", "null"] },
          "overrun": { "type": "integer" },
          "delete": { "type": "boolean" }
        },
        "required": ["slug"]
      }
    },
    "wurker_bee": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": { "type": "string" },
          "slug": { "type": "string" },
          "description": { "type": "string" },
          "command_slug": { "type": "string" },
          "args": {
            "oneOf": [
              {
                "type": "array",
                "items": { "type": "string" }
              },
              {
                "type": "object",
                "additionalProperties": { "type": ["string", "integer"] }
              }
            ]
          },
          "enabled": { "type": "boolean" },
          "delete": { "type": "boolean" }
        },
        "required": ["slug"]
      }
    },
    "wurker_bee_cron": {
      "type": "object",
      "additionalProperties": { "type": "string" }
    }
  },
  "oneOf": [
    { "required": ["wurker_command"] },
    { "required": ["wurker_cron"] },
    { "required": ["wurker_bee"] },
    { "required": ["wurker_bee_cron"] }
  ]
}
