{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sealgate-ai/json-schema/sealgate-ai-insights-response-schema.json",
  "title": "InsightsResponse",
  "description": "Response for insights endpoints (dynamic structure from InsightService).",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sealgate-ai-insights-api-openapi.yml#/components/schemas/InsightsResponse",
  "properties": {
    "insights": {
      "items": {
        "additionalProperties": true,
        "type": "object"
      },
      "type": "array",
      "title": "Insights",
      "description": "List of AI-generated insights"
    },
    "generated_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Generated At",
      "description": "When insights were generated (ISO 8601)"
    },
    "next_run_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Next Run At",
      "description": "Next scheduled generation (ISO 8601)"
    },
    "refreshing": {
      "type": "boolean",
      "title": "Refreshing",
      "description": "Whether a refresh is in progress",
      "default": false
    },
    "last_error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Last Error",
      "description": "Last error message if any"
    },
    "interval_seconds": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Interval Seconds",
      "description": "Refresh interval in seconds"
    }
  },
  "type": "object"
}