{
  "openapi": "3.1.0",
  "info": {
    "title": "COGGS public routes",
    "version": "0.1.0",
    "description": "Public catalog and play routes, signed-in Maker APIs, and the MCP publishing surface."
  },
  "servers": [
    {
      "url": "/"
    }
  ],
  "paths": {
    "/api/mcp": {
      "post": {
        "summary": "The MCP server, one tool, publish_build",
        "description": "Streamable HTTP, MCP revision 2026-07-28. Answers 503 until the operator turns host sign-in on.",
        "security": [
          {
            "mcpOAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "A JSON-RPC 2.0 message as the MCP specification defines it."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The JSON-RPC answer."
          },
          "401": {
            "description": "No valid token. The WWW-Authenticate header names the discovery document."
          },
          "403": {
            "description": "A foreign Origin or Host."
          },
          "503": {
            "description": "Host sign-in is not switched on."
          }
        }
      }
    },
    "/.well-known/oauth-protected-resource/api/mcp": {
      "get": {
        "summary": "Which issuer signs a host in to the MCP server",
        "responses": {
          "200": {
            "description": "The resource and its authorization server.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "resource",
                    "authorization_servers"
                  ],
                  "properties": {
                    "resource": {
                      "type": "string",
                      "format": "uri"
                    },
                    "authorization_servers": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uri"
                      }
                    },
                    "bearer_methods_supported": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Host sign-in is not switched on."
          }
        }
      }
    },
    "/api/feed": {
      "get": {
        "summary": "The published games, newest first, to anyone",
        "parameters": [
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "The next value of the previous page."
          },
          {
            "name": "game",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[a-z2-7]{16}$"
            },
            "description": "Only the game with this slug."
          }
        ],
        "responses": {
          "200": {
            "description": "One page.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "next"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "slug",
                          "title",
                          "maker",
                          "handle",
                          "playPath",
                          "publishedAt"
                        ],
                        "properties": {
                          "slug": {
                            "type": "string"
                          },
                          "title": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "maker": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "handle": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "playPath": {
                            "type": "string"
                          },
                          "publishedAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "next": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A cursor the list did not give."
          }
        }
      }
    },
    "/play/{slug}/": {
      "get": {
        "summary": "A published game",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z2-7]{16}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The game's page. A client that sends no Sec-Fetch-Dest header, such as a link-preview crawler, receives a small page with the title and picture tags instead.",
            "content": {
              "text/html": {}
            }
          },
          "404": {
            "description": "Not published, withdrawn or never existed. The three answers are identical."
          }
        }
      }
    },
    "/api/market": {
      "get": {
        "summary": "Browse free public Game Templates, Game Systems or Mixer presets",
        "parameters": [
          {
            "name": "kind",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "templates",
                "systems",
                "presets"
              ]
            }
          },
          {
            "name": "genre",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/GameGenre"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "The next value from the previous page of the same kind and genre.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Browse free public Game Templates, Game Systems or Mixer presets",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarketPage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request."
          }
        }
      }
    },
    "/api/runs/{id}/publish": {
      "post": {
        "summary": "Review and publish an owned build with an optional title and Game Template genre",
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublishBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Review and publish an owned build with an optional Game Template genre",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Publication"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request."
          },
          "401": {
            "description": "Sign-in required."
          },
          "404": {
            "description": "The resource is unavailable to this caller."
          }
        }
      }
    },
    "/api/presets": {
      "get": {
        "summary": "List your saved Mixer presets",
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "List your saved Mixer presets",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PresetList"
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required."
          }
        }
      },
      "post": {
        "summary": "Save a private Mixer preset",
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePreset"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Save a private Mixer preset",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MixerPreset"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request."
          },
          "401": {
            "description": "Sign-in required."
          }
        }
      }
    },
    "/api/presets/{id}/publish": {
      "post": {
        "summary": "Set the visibility of your Mixer preset",
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublishPreset"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Set the visibility of your Mixer preset",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MixerPreset"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request."
          },
          "401": {
            "description": "Sign-in required."
          },
          "404": {
            "description": "The resource is unavailable to this caller."
          }
        }
      }
    },
    "/api/presets/{id}": {
      "delete": {
        "summary": "Delete your Mixer preset",
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Delete your Mixer preset"
          },
          "400": {
            "description": "Invalid request."
          },
          "401": {
            "description": "Sign-in required."
          },
          "404": {
            "description": "The resource is unavailable to this caller."
          }
        }
      }
    },
    "/api/console/usage": {
      "get": {
        "summary": "Read per-day usage in Asia/Seoul, including gross run-start Credit debits",
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 366,
              "default": 30
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Read per-day usage in Asia/Seoul, including gross run-start Credit debits",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Usage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request."
          },
          "401": {
            "description": "Sign-in required."
          }
        }
      }
    },
    "/api/console/deploys": {
      "get": {
        "summary": "Read your publications and Mastering states",
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Read your publications and Mastering states",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Deploys"
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required."
          }
        }
      }
    },
    "/api/rewards": {
      "get": {
        "summary": "Read qualified plays and Remakes of your publications",
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Read qualified plays and Remakes of your publications",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Rewards"
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required."
          }
        }
      }
    },
    "/api/makers/{handle}": {
      "get": {
        "summary": "View a public Maker profile and published games",
        "parameters": [
          {
            "name": "handle",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "The next value from the previous page.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "View a public Maker profile and published games",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MakerPage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request."
          },
          "404": {
            "description": "The resource is unavailable to this caller."
          }
        }
      }
    },
    "/api/publications/{slug}/remakes": {
      "get": {
        "summary": "View direct public children of a public game",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "The next value from the previous page.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "View direct public children of a public game",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicGames"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request."
          },
          "404": {
            "description": "The resource is unavailable to this caller."
          }
        }
      }
    },
    "/api/judge/tests": {
      "get": {
        "summary": "List the Arena lists open to the caller, signed in or not",
        "responses": {
          "200": {
            "description": "List the Arena lists open to the caller, signed in or not",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArenaListIndex"
                }
              }
            }
          }
        }
      }
    },
    "/api/invites": {
      "get": {
        "summary": "List your invitations and remaining quota",
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "List your invitations and remaining quota",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invites"
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required."
          },
          "403": {
            "description": "Allowlist access required."
          }
        }
      },
      "post": {
        "summary": "Invite one email address from your allowlisted account",
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInvite"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Invite one email address from your allowlisted account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invite"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request."
          },
          "401": {
            "description": "Sign-in required."
          },
          "403": {
            "description": "Allowlist access required."
          },
          "409": {
            "description": "Address already on the allowlist."
          },
          "429": {
            "description": "Invitation quota reached."
          }
        }
      }
    },
    "/api/runs/{id}/patch": {
      "post": {
        "summary": "Start a Patch from your finished, picked build",
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Start a Patch from your finished, picked build",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicRun"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request."
          },
          "401": {
            "description": "Sign-in required."
          },
          "404": {
            "description": "The resource is unavailable to this caller."
          }
        }
      }
    },
    "/api/runs/{id}/patch-notes": {
      "get": {
        "summary": "Read your Patch Notes chain and direct children",
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Read your Patch Notes chain and direct children",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PatchNotes"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request."
          },
          "401": {
            "description": "Sign-in required."
          },
          "404": {
            "description": "The resource is unavailable to this caller."
          }
        }
      }
    },
    "/api/templates": {
      "get": {
        "summary": "Editable starter recipes by game genre",
        "security": [],
        "responses": {
          "200": {
            "description": "Genre recipes with Korean prompts and starting controls",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "templates"
                  ],
                  "properties": {
                    "templates": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "genre",
                          "prompt",
                          "systems",
                          "mixer",
                          "recipe"
                        ],
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "genre": {
                            "type": "string"
                          },
                          "prompt": {
                            "type": "string"
                          },
                          "recipe": {
                            "type": "string"
                          },
                          "systems": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "settings",
                                "achievements",
                                "local-high-scores",
                                "health",
                                "save-game",
                                "leveling",
                                "currency",
                                "inventory",
                                "equipment",
                                "loot-tables",
                                "wave-spawner",
                                "quests",
                                "bestiary",
                                "pets",
                                "platformer-controller",
                                "turn-manager",
                                "base-building",
                                "crafting"
                              ]
                            }
                          },
                          "mixer": {
                            "type": "object",
                            "required": [
                              "graphics",
                              "creativity",
                              "playtime",
                              "dimensionTrim"
                            ],
                            "properties": {
                              "graphics": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 10
                              },
                              "creativity": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 10
                              },
                              "playtime": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 2
                              },
                              "dimensionTrim": {
                                "type": "integer",
                                "minimum": -2,
                                "maximum": 2
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/starters": {
      "get": {
        "summary": "Four example prompts from the starter pool",
        "parameters": [
          {
            "name": "not",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "maxItems": 20,
              "items": {
                "type": "string",
                "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
              }
            }
          }
        ],
        "description": "Four genres per draw, uncached. Each card has a short Korean label for the example key and a full prompt to insert when selected.",
        "security": [],
        "responses": {
          "200": {
            "description": "Example prompts for Make",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "maxItems": 4,
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "genre",
                          "label",
                          "prompt"
                        ],
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "genre": {
                            "type": "string",
                            "enum": [
                              "Action-Adventure",
                              "Card Game",
                              "City Builder",
                              "Fighting",
                              "Platformer",
                              "Racing",
                              "RPG",
                              "Shooter",
                              "Simulation",
                              "Sports"
                            ]
                          },
                          "label": {
                            "type": "string",
                            "minLength": 6,
                            "maxLength": 14,
                            "description": "Everyday Korean naming the activity and its twist, without trailing punctuation."
                          },
                          "prompt": {
                            "type": "string"
                          }
                        },
                        "additionalProperties": false
                      }
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/reference-images": {
      "post": {
        "summary": "Upload a reference image for the next run",
        "description": "Send the image as the raw body with its Content-Type (image/png, image/jpeg or image/webp, up to 3,750,000 bytes and 2,000 pixels on a side). The server measures the bytes and answers the ReferenceImage to pass as referenceImage when you create a run. Repeating identical bytes refreshes the same attachment. An unused upload expires after 24 hours.",
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "image/png": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            },
            "image/jpeg": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            },
            "image/webp": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The stored image description.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReferenceImage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request."
          },
          "401": {
            "description": "Sign-in required."
          },
          "413": {
            "description": "The image is over the byte limit."
          }
        }
      }
    },
    "/api/reference-images/{sha256}": {
      "delete": {
        "summary": "Release an uploaded reference image",
        "description": "Releases your own draft attachment and answers 204 whether or not it exists. A run that already took the image keeps its own copy.",
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "sha256",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Released."
          },
          "400": {
            "description": "Invalid request."
          },
          "401": {
            "description": "Sign-in required."
          }
        }
      }
    },
    "/api/runs": {
      "post": {
        "summary": "Start a game run",
        "description": "Sign in with an eligible account. Upload an optional reference image first and pass its returned descriptor. Reuse the same idempotencyKey when retrying this request.",
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRunBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The new or previously admitted run.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicRun"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request or image metadata."
          },
          "401": {
            "description": "Sign-in required."
          },
          "402": {
            "description": "Insufficient Credit."
          },
          "403": {
            "description": "This account cannot start this run."
          },
          "404": {
            "description": "The source is unavailable to this caller."
          },
          "409": {
            "description": "An active run or conflicting idempotency key."
          },
          "413": {
            "description": "The request body is too large."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "mcpOAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "An OAuth 2.1 access token from the issuer the discovery document names, obtained by authorization code with PKCE and the MCP resource in both exchanges."
      },
      "sessionBearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "The signed-in Maker’s Supabase access token."
      }
    },
    "schemas": {
      "GameGenre": {
        "type": "string",
        "enum": [
          "Action-Adventure",
          "Card Game",
          "City Builder",
          "Fighting",
          "Platformer",
          "Racing",
          "RPG",
          "Shooter",
          "Simulation",
          "Sports"
        ]
      },
      "MarketPage": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "templates"
              },
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "slug": {
                      "type": "string",
                      "pattern": "^[a-z2-7]{16}$"
                    },
                    "title": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "maker": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "handle": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "genre": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "Action-Adventure",
                            "Card Game",
                            "City Builder",
                            "Fighting",
                            "Platformer",
                            "Racing",
                            "RPG",
                            "Shooter",
                            "Simulation",
                            "Sports"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "qualifiedPlays": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "remakeCount": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "price": {
                      "type": "number",
                      "const": 0
                    }
                  },
                  "required": [
                    "slug",
                    "title",
                    "maker",
                    "handle",
                    "genre",
                    "qualifiedPlays",
                    "remakeCount",
                    "createdAt",
                    "price"
                  ],
                  "additionalProperties": false
                }
              },
              "next": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^[a-z2-7]{16}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "kind",
              "items",
              "next"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "systems"
              },
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "enum": [
                        "settings",
                        "achievements",
                        "local-high-scores",
                        "health",
                        "save-game",
                        "leveling",
                        "currency",
                        "inventory",
                        "equipment",
                        "loot-tables",
                        "wave-spawner",
                        "quests",
                        "bestiary",
                        "pets",
                        "platformer-controller",
                        "turn-manager",
                        "base-building",
                        "crafting"
                      ]
                    },
                    "version": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    },
                    "exposes": {
                      "type": "string"
                    },
                    "stores": {
                      "type": "string"
                    },
                    "never": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "name",
                    "version",
                    "label",
                    "exposes",
                    "stores",
                    "never"
                  ],
                  "additionalProperties": false
                }
              },
              "next": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "settings",
                      "achievements",
                      "local-high-scores",
                      "health",
                      "save-game",
                      "leveling",
                      "currency",
                      "inventory",
                      "equipment",
                      "loot-tables",
                      "wave-spawner",
                      "quests",
                      "bestiary",
                      "pets",
                      "platformer-controller",
                      "turn-manager",
                      "base-building",
                      "crafting"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "kind",
              "items",
              "next"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "presets"
              },
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "values": {
                      "type": "object",
                      "properties": {
                        "graphics": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 10
                        },
                        "creativity": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 10
                        },
                        "playtime": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2
                        },
                        "dimensionTrim": {
                          "type": "integer",
                          "minimum": -2,
                          "maximum": 2
                        }
                      },
                      "required": [
                        "graphics",
                        "creativity",
                        "playtime",
                        "dimensionTrim"
                      ],
                      "additionalProperties": false
                    },
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "public": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    }
                  },
                  "required": [
                    "name",
                    "values",
                    "id",
                    "public",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              },
              "next": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "kind",
              "items",
              "next"
            ],
            "additionalProperties": false
          }
        ]
      },
      "Publication": {
        "type": "object",
        "properties": {
          "state": {
            "type": "string",
            "enum": [
              "private",
              "reviewing",
              "held",
              "published",
              "rejected"
            ]
          },
          "genre": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "Action-Adventure",
                  "Card Game",
                  "City Builder",
                  "Fighting",
                  "Platformer",
                  "Racing",
                  "RPG",
                  "Shooter",
                  "Simulation",
                  "Sports"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "checks": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "check": {
                  "type": "string",
                  "enum": [
                    "loads",
                    "plays",
                    "sounds",
                    "widths",
                    "network",
                    "secrets"
                  ]
                },
                "pass": {
                  "type": "boolean"
                },
                "reasons": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "check",
                "pass",
                "reasons"
              ],
              "additionalProperties": false
            }
          },
          "allowRemake": {
            "type": "boolean"
          },
          "playPath": {
            "anyOf": [
              {
                "type": "string",
                "format": "starts_with",
                "pattern": "^\\/play\\/.*"
              },
              {
                "type": "null"
              }
            ]
          },
          "failed": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "loads",
                "plays",
                "sounds",
                "widths",
                "network",
                "secrets",
                "founder"
              ]
            }
          },
          "sound": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "music": {
                    "type": "boolean"
                  },
                  "effects": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "music",
                  "effects"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "title": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 70,
                "description": "Trimmed game title, in Unicode code points. Omitting it preserves the stored title."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "state",
          "playPath",
          "failed",
          "sound"
        ],
        "additionalProperties": false
      },
      "PublishBody": {
        "type": "object",
        "properties": {
          "side": {
            "type": "string",
            "enum": [
              "left",
              "right"
            ]
          },
          "genre": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "Action-Adventure",
                  "Card Game",
                  "City Builder",
                  "Fighting",
                  "Platformer",
                  "Racing",
                  "RPG",
                  "Shooter",
                  "Simulation",
                  "Sports"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "allowRemake": {
            "type": "boolean"
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 70,
            "description": "Trimmed game title, in Unicode code points. Omitting it preserves the stored title."
          }
        },
        "required": [
          "side"
        ],
        "additionalProperties": false
      },
      "PresetList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 80
                },
                "values": {
                  "type": "object",
                  "properties": {
                    "graphics": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 10
                    },
                    "creativity": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 10
                    },
                    "playtime": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 2
                    },
                    "dimensionTrim": {
                      "type": "integer",
                      "minimum": -2,
                      "maximum": 2
                    }
                  },
                  "required": [
                    "graphics",
                    "creativity",
                    "playtime",
                    "dimensionTrim"
                  ],
                  "additionalProperties": false
                },
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "public": {
                  "type": "boolean"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                }
              },
              "required": [
                "name",
                "values",
                "id",
                "public",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": false
      },
      "MixerPreset": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "values": {
            "type": "object",
            "properties": {
              "graphics": {
                "type": "integer",
                "minimum": 0,
                "maximum": 10
              },
              "creativity": {
                "type": "integer",
                "minimum": 0,
                "maximum": 10
              },
              "playtime": {
                "type": "integer",
                "minimum": 0,
                "maximum": 2
              },
              "dimensionTrim": {
                "type": "integer",
                "minimum": -2,
                "maximum": 2
              }
            },
            "required": [
              "graphics",
              "creativity",
              "playtime",
              "dimensionTrim"
            ],
            "additionalProperties": false
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "public": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          }
        },
        "required": [
          "name",
          "values",
          "id",
          "public",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "CreatePreset": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "values": {
            "type": "object",
            "properties": {
              "graphics": {
                "type": "integer",
                "minimum": 0,
                "maximum": 10
              },
              "creativity": {
                "type": "integer",
                "minimum": 0,
                "maximum": 10
              },
              "playtime": {
                "type": "integer",
                "minimum": 0,
                "maximum": 2
              },
              "dimensionTrim": {
                "type": "integer",
                "minimum": -2,
                "maximum": 2
              }
            },
            "required": [
              "graphics",
              "creativity",
              "playtime",
              "dimensionTrim"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "name",
          "values"
        ],
        "additionalProperties": false
      },
      "PublishPreset": {
        "type": "object",
        "properties": {
          "public": {
            "type": "boolean"
          }
        },
        "required": [
          "public"
        ],
        "additionalProperties": false
      },
      "Usage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "day": {
                  "type": "string",
                  "format": "date",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                },
                "runsStarted": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "vmSeconds": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "creditsSpent": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "day",
                "runsStarted",
                "vmSeconds",
                "creditsSpent"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": false
      },
      "Deploys": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "runId": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "side": {
                  "type": "string",
                  "enum": [
                    "left",
                    "right"
                  ]
                },
                "title": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "slug": {
                  "type": "string",
                  "pattern": "^[a-z2-7]{16}$"
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "private",
                    "reviewing",
                    "held",
                    "published",
                    "rejected"
                  ]
                },
                "reviewVerdict": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "publish",
                        "hold",
                        "reject"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "qualifiedPlays": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "runId",
                "side",
                "title",
                "slug",
                "state",
                "reviewVerdict",
                "qualifiedPlays"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": false
      },
      "Rewards": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "qualifiedPlays": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "remakeCount": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "slug": {
                  "type": "string",
                  "pattern": "^[a-z2-7]{16}$"
                },
                "title": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "qualifiedPlays",
                "remakeCount",
                "slug",
                "title"
              ],
              "additionalProperties": false
            }
          },
          "totals": {
            "type": "object",
            "properties": {
              "qualifiedPlays": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "remakeCount": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "qualifiedPlays",
              "remakeCount"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "items",
          "totals"
        ],
        "additionalProperties": false
      },
      "MakerPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "slug": {
                  "type": "string",
                  "pattern": "^[a-z2-7]{16}$"
                },
                "title": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "maker": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "handle": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^[A-Za-z0-9_]{5,15}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "playPath": {
                  "type": "string",
                  "format": "starts_with",
                  "pattern": "^\\/play\\/.*"
                },
                "publishedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                "canRemake": {
                  "type": "boolean"
                },
                "lineage": {
                  "type": "array",
                  "items": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "title": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "maker": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "playPath": {
                            "type": "string",
                            "format": "starts_with",
                            "pattern": "^\\/play\\/.*"
                          }
                        },
                        "required": [
                          "title",
                          "maker",
                          "playPath"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              },
              "required": [
                "slug",
                "title",
                "maker",
                "handle",
                "playPath",
                "publishedAt"
              ],
              "additionalProperties": false
            }
          },
          "next": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[a-z2-7]{16}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "displayName": {
            "type": [
              "string",
              "null"
            ]
          },
          "handle": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_]{5,15}$"
          }
        },
        "required": [
          "items",
          "next",
          "displayName",
          "handle"
        ],
        "additionalProperties": false
      },
      "PublicGames": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "slug": {
                  "type": "string",
                  "pattern": "^[a-z2-7]{16}$"
                },
                "title": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "maker": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "handle": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^[A-Za-z0-9_]{5,15}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "playPath": {
                  "type": "string",
                  "format": "starts_with",
                  "pattern": "^\\/play\\/.*"
                },
                "publishedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                "canRemake": {
                  "type": "boolean"
                },
                "lineage": {
                  "type": "array",
                  "items": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "title": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "maker": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "playPath": {
                            "type": "string",
                            "format": "starts_with",
                            "pattern": "^\\/play\\/.*"
                          }
                        },
                        "required": [
                          "title",
                          "maker",
                          "playPath"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              },
              "required": [
                "slug",
                "title",
                "maker",
                "handle",
                "playPath",
                "publishedAt"
              ],
              "additionalProperties": false
            }
          },
          "next": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[a-z2-7]{16}$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "items",
          "next"
        ],
        "additionalProperties": false
      },
      "ArenaListIndex": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "maxLength": 80,
                  "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                },
                "title": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 80
                },
                "count": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "answered": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "picks": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "published": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "id",
                "title",
                "count",
                "answered",
                "picks",
                "published"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": false
      },
      "Invites": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "email": {
                  "type": "string",
                  "format": "email",
                  "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                }
              },
              "required": [
                "email",
                "createdAt"
              ],
              "additionalProperties": false
            }
          },
          "remaining": {
            "type": "integer",
            "minimum": 0,
            "maximum": 3
          }
        },
        "required": [
          "items",
          "remaining"
        ],
        "additionalProperties": false
      },
      "Invite": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          }
        },
        "required": [
          "email",
          "createdAt"
        ],
        "additionalProperties": false
      },
      "CreateInvite": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "maxLength": 254,
            "format": "email",
            "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
          }
        },
        "required": [
          "email"
        ],
        "additionalProperties": false
      },
      "PublicRun": {
        "type": "object",
        "description": "The owner’s PublicRun, including patchParent when created by Patch.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "patchParent": {
            "type": "object",
            "properties": {
              "run": {
                "type": "string",
                "format": "uuid"
              },
              "side": {
                "enum": [
                  "left",
                  "right"
                ]
              }
            },
            "required": [
              "run",
              "side"
            ]
          }
        },
        "required": [
          "id"
        ]
      },
      "PatchBody": {
        "type": "object",
        "properties": {
          "side": {
            "type": "string",
            "enum": [
              "left",
              "right"
            ]
          },
          "prompt": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          },
          "systems": {
            "type": "array",
            "uniqueItems": true,
            "items": {
              "type": "string",
              "enum": [
                "settings",
                "achievements",
                "local-high-scores",
                "health",
                "save-game",
                "leveling",
                "currency",
                "inventory",
                "equipment",
                "loot-tables",
                "wave-spawner",
                "quests",
                "bestiary",
                "pets",
                "platformer-controller",
                "turn-manager",
                "base-building",
                "crafting",
                "local-best-scores"
              ]
            },
            "description": "Game Systems for the new run. Omit it and the Patch keeps the systems of the run it patches. Accepted aliases, stored as the current id: local-best-scores for local-high-scores."
          },
          "referenceImage": {
            "$ref": "#/components/schemas/ReferenceImage"
          }
        },
        "required": [
          "side",
          "prompt"
        ],
        "additionalProperties": false
      },
      "PatchNotes": {
        "type": "object",
        "properties": {
          "notes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "run": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "parentRun": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "parentSide": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "left",
                        "right"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "prompt": {
                  "type": "string"
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "queued",
                    "booting",
                    "running",
                    "done",
                    "cancelled",
                    "failed"
                  ]
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                "systemsAdded": {
                  "type": "array",
                  "uniqueItems": true,
                  "items": {
                    "type": "string",
                    "enum": [
                      "settings",
                      "achievements",
                      "local-high-scores",
                      "health",
                      "save-game",
                      "leveling",
                      "currency",
                      "inventory",
                      "equipment",
                      "loot-tables",
                      "wave-spawner",
                      "quests",
                      "bestiary",
                      "pets",
                      "platformer-controller",
                      "turn-manager",
                      "base-building",
                      "crafting"
                    ]
                  },
                  "description": "Game Systems this Patch added to its parent run."
                },
                "systemsRemoved": {
                  "type": "array",
                  "uniqueItems": true,
                  "items": {
                    "type": "string",
                    "enum": [
                      "settings",
                      "achievements",
                      "local-high-scores",
                      "health",
                      "save-game",
                      "leveling",
                      "currency",
                      "inventory",
                      "equipment",
                      "loot-tables",
                      "wave-spawner",
                      "quests",
                      "bestiary",
                      "pets",
                      "platformer-controller",
                      "turn-manager",
                      "base-building",
                      "crafting"
                    ]
                  },
                  "description": "Game Systems this Patch removed from its parent run."
                }
              },
              "required": [
                "run",
                "parentRun",
                "parentSide",
                "prompt",
                "state",
                "createdAt",
                "systemsAdded",
                "systemsRemoved"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "notes"
        ],
        "additionalProperties": false
      },
      "ReferenceImage": {
        "type": "object",
        "properties": {
          "sha256": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "type": {
            "type": "string",
            "enum": [
              "image/png",
              "image/jpeg",
              "image/webp"
            ]
          },
          "bytes": {
            "type": "integer",
            "minimum": 1,
            "maximum": 3750000
          },
          "width": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2000
          },
          "height": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2000
          }
        },
        "required": [
          "sha256",
          "type",
          "bytes",
          "width",
          "height"
        ],
        "additionalProperties": false
      },
      "CreateRunBody": {
        "type": "object",
        "properties": {
          "exportToArena": {
            "type": "boolean"
          },
          "prompt": {
            "type": "string"
          },
          "test": {
            "default": "ab",
            "type": "string",
            "enum": [
              "ab",
              "bc",
              "ad",
              "ce"
            ]
          },
          "capMinutes": {
            "default": 20,
            "type": "number",
            "const": 20
          },
          "idempotencyKey": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "start": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "references": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "pattern": "^[^\\p{Cc}\\p{Zl}\\p{Zp}]+$"
                    }
                  }
                },
                "required": [
                  "references"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "genres": {
                    "minItems": 1,
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "Action-Adventure",
                        "Card Game",
                        "City Builder",
                        "Fighting",
                        "Platformer",
                        "Racing",
                        "RPG",
                        "Shooter",
                        "Simulation",
                        "Sports"
                      ]
                    }
                  },
                  "references": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "pattern": "^[^\\p{Cc}\\p{Zl}\\p{Zp}]+$"
                    }
                  },
                  "publication": {
                    "type": "string",
                    "pattern": "^[a-z2-7]{16}$"
                  }
                },
                "required": [
                  "genres"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "template": {
                    "type": "string",
                    "maxLength": 48,
                    "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                  }
                },
                "required": [
                  "template"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "publication": {
                    "type": "string",
                    "pattern": "^[a-z2-7]{16}$"
                  }
                },
                "required": [
                  "publication"
                ],
                "additionalProperties": false
              }
            ]
          },
          "referenceImage": {
            "$ref": "#/components/schemas/ReferenceImage"
          },
          "systems": {
            "type": "array",
            "uniqueItems": true,
            "items": {
              "type": "string",
              "enum": [
                "settings",
                "achievements",
                "local-high-scores",
                "health",
                "save-game",
                "leveling",
                "currency",
                "inventory",
                "equipment",
                "loot-tables",
                "wave-spawner",
                "quests",
                "bestiary",
                "pets",
                "platformer-controller",
                "turn-manager",
                "base-building",
                "crafting",
                "local-best-scores"
              ]
            },
            "description": "Game Systems for the new run. Omit it and the Patch keeps the systems of the run it patches. Accepted aliases, stored as the current id: local-best-scores for local-high-scores."
          },
          "mixer": {
            "type": "object",
            "properties": {
              "graphics": {
                "type": "integer",
                "minimum": 0,
                "maximum": 10
              },
              "creativity": {
                "type": "integer",
                "minimum": 0,
                "maximum": 10
              },
              "playtime": {
                "type": "integer",
                "minimum": 0,
                "maximum": 2
              },
              "dimensionTrim": {
                "type": "integer",
                "minimum": -2,
                "maximum": 2
              }
            },
            "required": [
              "graphics",
              "creativity",
              "playtime",
              "dimensionTrim"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "prompt",
          "idempotencyKey"
        ],
        "additionalProperties": false
      }
    }
  }
}
