{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/asap-cool/json-schema/asap-cool-org-state-view-schema.json",
  "title": "OrgStateView",
  "description": "The org's automation state.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/asap-cool-automation-api-openapi.yml#/components/schemas/OrgStateView",
  "type": "object",
  "required": [
    "state",
    "paused",
    "cancel_window_minutes"
  ],
  "properties": {
    "cancel_window_minutes": {
      "type": "integer",
      "format": "int32",
      "description": "Minutes a `t3a` / `t3b` proposal waits, cancellable, before it runs:\nthe org's choice (15 to 1440), 60 when it never chose."
    },
    "changed_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "Last change; null when the org never changed anything."
    },
    "paused": {
      "type": "boolean",
      "description": "Global pause for all automation of the org."
    },
    "reason": {
      "type": [
        "string",
        "null"
      ],
      "description": "Why the state changed: a fixed token, never content."
    },
    "state": {
      "type": "string",
      "description": "`normal`, or `demoted` once the breaker tripped (every kind is then\ncapped at T2 until the user re-enables automation)."
    }
  }
}