{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/contraforce/json-schema/contraforce-api-response-of-run-gamebook-response-schema.json",
  "title": "ApiResponseOfRunGamebookResponse",
  "description": "Standard v2 API response envelope for single-item responses.",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/contraforce-gamebooks-api-openapi.yml#/components/schemas/ApiResponseOfRunGamebookResponse",
  "type": "object",
  "properties": {
    "data": {
      "description": "Public result of submitting a gamebook, without workspace or incident target details.",
      "$ref": "#/$defs/RunGamebookResponse"
    },
    "meta": {
      "$ref": "#/$defs/ResponseMeta"
    }
  },
  "$defs": {
    "ResponseMeta": {
      "type": "object",
      "properties": {
        "requestId": {
          "type": [
            "null",
            "string"
          ]
        },
        "timestamp": {
          "type": [
            "null",
            "string"
          ]
        }
      }
    },
    "RunGamebookResponse": {
      "required": [
        "id",
        "status",
        "isQueued"
      ],
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Identifier of the submitted gamebook, for subsequent history lookups."
        },
        "status": {
          "description": "Current execution status of the submitted gamebook.",
          "$ref": "#/$defs/RunGamebookStatus"
        },
        "isQueued": {
          "type": "boolean",
          "description": "Whether the gamebook is waiting for portal approval rather than executing."
        }
      },
      "description": "Public result of submitting a gamebook, without workspace or incident target details."
    },
    "RunGamebookStatus": {
      "enum": [
        "Pending",
        "Running",
        "Finished",
        "Failed",
        "Queued",
        "Denied",
        "Cancelled"
      ],
      "description": "Execution states exposed by the public v2 gamebook submission result."
    }
  }
}