{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/actionbox-cloud/json-schema/actionbox-cloud-user-watch-create-schema.json",
  "title": "UserWatchCreate",
  "description": "User-session creation names the Source; Source auth already supplies it.",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/actionbox-cloud-openapi.json#/components/schemas/UserWatchCreate",
  "properties": {
    "source_id": {
      "type": "string",
      "maxLength": 64,
      "minLength": 1,
      "title": "Source Id"
    },
    "name": {
      "type": "string",
      "maxLength": 120,
      "minLength": 1,
      "title": "Name"
    },
    "schedule_type": {
      "type": "string",
      "enum": [
        "interval",
        "cron"
      ],
      "title": "Schedule Type"
    },
    "interval_seconds": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 60.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Interval Seconds"
    },
    "cron_expression": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 120,
          "minLength": 1
        },
        {
          "type": "null"
        }
      ],
      "title": "Cron Expression"
    },
    "timezone": {
      "type": "string",
      "maxLength": 64,
      "minLength": 1,
      "title": "Timezone",
      "default": "UTC"
    },
    "grace_seconds": {
      "type": "integer",
      "minimum": 0.0,
      "title": "Grace Seconds",
      "default": 0
    },
    "max_runtime_seconds": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 1.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Max Runtime Seconds"
    },
    "priority": {
      "$ref": "#/$defs/Priority",
      "default": "normal"
    },
    "runbook_url": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2048,
          "minLength": 1,
          "format": "uri"
        },
        {
          "type": "null"
        }
      ],
      "title": "Runbook Url"
    },
    "signal_method": {
      "type": "string",
      "enum": [
        "any",
        "post"
      ],
      "title": "Signal Method",
      "default": "any"
    }
  },
  "type": "object",
  "required": [
    "source_id",
    "name",
    "schedule_type"
  ],
  "$defs": {
    "Priority": {
      "type": "string",
      "enum": [
        "low",
        "normal",
        "high",
        "urgent"
      ],
      "title": "Priority"
    }
  }
}