{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/logbrew/json-schema/logbrew-feed-ticket-response-schema.json",
  "title": "FeedTicketResponse",
  "description": "Response body after creating a short-lived live-feed WebSocket ticket.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/logbrew-live-feed-api-openapi.yml#/components/schemas/FeedTicketResponse",
  "properties": {
    "expires_in_seconds": {
      "description": "Number of seconds the ticket remains usable.",
      "format": "int64",
      "type": "integer"
    },
    "next": {
      "description": "User-facing next step after creating the ticket.",
      "type": "string"
    },
    "next_action": {
      "$ref": "#/$defs/FeedTicketNextActionResponse",
      "description": "Machine-readable next action after creating the ticket."
    },
    "ticket": {
      "description": "Short-lived ticket for `/api/feed/live`.",
      "type": "string"
    }
  },
  "required": [
    "ticket",
    "expires_in_seconds",
    "next",
    "next_action"
  ],
  "type": "object",
  "$defs": {
    "FeedTicketNextActionCode": {
      "description": "Stable live-feed ticket action code.",
      "oneOf": [
        {
          "const": "connect_live_feed",
          "description": "Connect to the live-feed WebSocket before the ticket expires.",
          "type": "string"
        }
      ]
    },
    "FeedTicketNextActionResponse": {
      "description": "Machine-readable next action for feed ticket responses.",
      "properties": {
        "code": {
          "$ref": "#/$defs/FeedTicketNextActionCode",
          "description": "Stable action code."
        },
        "target": {
          "$ref": "#/$defs/FeedTicketNextActionTarget",
          "description": "Stable action target."
        }
      },
      "required": [
        "code",
        "target"
      ],
      "type": "object"
    },
    "FeedTicketNextActionTarget": {
      "description": "Stable live-feed ticket action target.",
      "oneOf": [
        {
          "const": "live_feed",
          "description": "Live-feed WebSocket connection.",
          "type": "string"
        }
      ]
    }
  }
}