{
  "openapi": "3.1.0",
  "info": {
    "title": "MineCards Read-only API",
    "version": "1.1.0",
    "description": "All business reads require a personal API key. 60 requests/minute shared across all keys of one account. No mutation endpoints. Responses are no-store. Paginated lists expose hasMore and nextPage, with no total count."
  },
  "servers": [
    {
      "url": "/api/v1"
    }
  ],
  "security": [
    {
      "BearerApiKey": []
    }
  ],
  "paths": {
    "/cards": {
      "get": {
        "operationId": "listCards",
        "summary": "Public catalog including inactive or unclassified cards; secret cards are always excluded, even for their owner. active indicates booster availability.",
        "description": "A Bearer API key is required; cookies are not accepted. Unknown or repeated query parameters return 400. Successful and failed authenticated requests consume the shared per-account quota.",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "default": 1
            },
            "description": "Page number; nextPage is null at page 1000 even if hasMore is true."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            },
            "description": "Maximum number of returned items."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "description": "Case-insensitive substring of card id or name (French or English)."
          },
          {
            "name": "rarity",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "CHARBON",
                "CUIVRE",
                "FER",
                "OR",
                "DIAMANT",
                "NETHERITE",
                "MYTHIQUE"
              ]
            },
            "description": "Exact rarity."
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "description": "Exact category."
          },
          {
            "name": "dimension",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "description": "Exact dimension."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              },
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer",
                  "const": 60
                }
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Reset timestamp in Unix seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Card"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  },
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unknown query parameter.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or not visible.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Only GET and OPTIONS are supported.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                },
                "description": "Seconds to wait before retrying."
              },
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer",
                  "enum": [
                    30,
                    60
                  ]
                },
                "description": "60 per account for valid keys; repeated invalid or revoked keys have a separate 30 per IP limit."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Reset timestamp in Unix seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "options": {
        "operationId": "listCardsPreflight",
        "security": [],
        "summary": "CORS preflight",
        "responses": {
          "204": {
            "description": "No content",
            "headers": {
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              },
              "Access-Control-Allow-Methods": {
                "schema": {
                  "type": "string",
                  "const": "GET, OPTIONS"
                }
              },
              "Access-Control-Allow-Headers": {
                "schema": {
                  "type": "string",
                  "const": "Authorization, Content-Type"
                }
              },
              "Allow": {
                "schema": {
                  "type": "string",
                  "const": "GET, OPTIONS"
                }
              }
            }
          }
        }
      }
    },
    "/cards/{id}": {
      "get": {
        "operationId": "getCard",
        "summary": "One public catalog card by stable id. A secret or missing id returns the same 404 response, including for its owner.",
        "description": "A Bearer API key is required; cookies are not accepted. Unknown or repeated query parameters return 400. Successful and failed authenticated requests consume the shared per-account quota.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              },
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer",
                  "const": 60
                }
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Reset timestamp in Unix seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Card"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unknown query parameter.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or not visible.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Only GET and OPTIONS are supported.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                },
                "description": "Seconds to wait before retrying."
              },
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer",
                  "enum": [
                    30,
                    60
                  ]
                },
                "description": "60 per account for valid keys; repeated invalid or revoked keys have a separate 30 per IP limit."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Reset timestamp in Unix seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "options": {
        "operationId": "getCardPreflight",
        "security": [],
        "summary": "CORS preflight",
        "responses": {
          "204": {
            "description": "No content",
            "headers": {
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              },
              "Access-Control-Allow-Methods": {
                "schema": {
                  "type": "string",
                  "const": "GET, OPTIONS"
                }
              },
              "Access-Control-Allow-Headers": {
                "schema": {
                  "type": "string",
                  "const": "Authorization, Content-Type"
                }
              },
              "Allow": {
                "schema": {
                  "type": "string",
                  "const": "GET, OPTIONS"
                }
              }
            }
          }
        }
      }
    },
    "/me/cards": {
      "get": {
        "operationId": "listMyCards",
        "summary": "Available inventory of the account that owns the API key, including owned secret cards. Each base card has total, standard and holographic quantities; reserved copies are excluded.",
        "description": "A Bearer API key is required; cookies are not accepted. Unknown or repeated query parameters return 400. Successful and failed authenticated requests consume the shared per-account quota.",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "default": 1
            },
            "description": "Page number; nextPage is null at page 1000 even if hasMore is true."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            },
            "description": "Maximum number of returned items."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "description": "Case-insensitive substring of card id or name (French or English)."
          },
          {
            "name": "rarity",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "CHARBON",
                "CUIVRE",
                "FER",
                "OR",
                "DIAMANT",
                "NETHERITE",
                "MYTHIQUE"
              ]
            },
            "description": "Exact rarity."
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "description": "Exact category."
          },
          {
            "name": "dimension",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "description": "Exact dimension."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              },
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer",
                  "const": 60
                }
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Reset timestamp in Unix seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/OwnCard"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  },
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unknown query parameter.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or not visible.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Only GET and OPTIONS are supported.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                },
                "description": "Seconds to wait before retrying."
              },
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer",
                  "enum": [
                    30,
                    60
                  ]
                },
                "description": "60 per account for valid keys; repeated invalid or revoked keys have a separate 30 per IP limit."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Reset timestamp in Unix seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "options": {
        "operationId": "listMyCardsPreflight",
        "security": [],
        "summary": "CORS preflight",
        "responses": {
          "204": {
            "description": "No content",
            "headers": {
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              },
              "Access-Control-Allow-Methods": {
                "schema": {
                  "type": "string",
                  "const": "GET, OPTIONS"
                }
              },
              "Access-Control-Allow-Headers": {
                "schema": {
                  "type": "string",
                  "const": "Authorization, Content-Type"
                }
              },
              "Allow": {
                "schema": {
                  "type": "string",
                  "const": "GET, OPTIONS"
                }
              }
            }
          }
        }
      }
    },
    "/me/boosters": {
      "get": {
        "operationId": "getMyBoosters",
        "summary": "Computed booster availability without claiming, opening or persisting accrued boosters.",
        "description": "A Bearer API key is required; cookies are not accepted. Unknown or repeated query parameters return 400. Successful and failed authenticated requests consume the shared per-account quota.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              },
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer",
                  "const": 60
                }
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Reset timestamp in Unix seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Boosters"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unknown query parameter.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or not visible.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Only GET and OPTIONS are supported.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                },
                "description": "Seconds to wait before retrying."
              },
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer",
                  "enum": [
                    30,
                    60
                  ]
                },
                "description": "60 per account for valid keys; repeated invalid or revoked keys have a separate 30 per IP limit."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Reset timestamp in Unix seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "options": {
        "operationId": "getMyBoostersPreflight",
        "security": [],
        "summary": "CORS preflight",
        "responses": {
          "204": {
            "description": "No content",
            "headers": {
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              },
              "Access-Control-Allow-Methods": {
                "schema": {
                  "type": "string",
                  "const": "GET, OPTIONS"
                }
              },
              "Access-Control-Allow-Headers": {
                "schema": {
                  "type": "string",
                  "const": "Authorization, Content-Type"
                }
              },
              "Allow": {
                "schema": {
                  "type": "string",
                  "const": "GET, OPTIONS"
                }
              }
            }
          }
        }
      }
    },
    "/profiles": {
      "get": {
        "operationId": "listProfiles",
        "summary": "Public, non-banned profiles only.",
        "description": "A Bearer API key is required; cookies are not accepted. Unknown or repeated query parameters return 400. Successful and failed authenticated requests consume the shared per-account quota.",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "default": 1
            },
            "description": "Page number; nextPage is null at page 1000 even if hasMore is true."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            },
            "description": "Maximum number of returned items."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "description": "Case-insensitive substring of username."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              },
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer",
                  "const": 60
                }
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Reset timestamp in Unix seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Profile"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  },
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unknown query parameter.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or not visible.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Only GET and OPTIONS are supported.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                },
                "description": "Seconds to wait before retrying."
              },
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer",
                  "enum": [
                    30,
                    60
                  ]
                },
                "description": "60 per account for valid keys; repeated invalid or revoked keys have a separate 30 per IP limit."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Reset timestamp in Unix seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "options": {
        "operationId": "listProfilesPreflight",
        "security": [],
        "summary": "CORS preflight",
        "responses": {
          "204": {
            "description": "No content",
            "headers": {
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              },
              "Access-Control-Allow-Methods": {
                "schema": {
                  "type": "string",
                  "const": "GET, OPTIONS"
                }
              },
              "Access-Control-Allow-Headers": {
                "schema": {
                  "type": "string",
                  "const": "Authorization, Content-Type"
                }
              },
              "Allow": {
                "schema": {
                  "type": "string",
                  "const": "GET, OPTIONS"
                }
              }
            }
          }
        }
      }
    },
    "/profiles/{id}": {
      "get": {
        "operationId": "getProfile",
        "summary": "Public profile respecting collection/activity privacy. No owner or admin exception. No full inventory.",
        "description": "A Bearer API key is required; cookies are not accepted. Unknown or repeated query parameters return 400. Successful and failed authenticated requests consume the shared per-account quota.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              },
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer",
                  "const": 60
                }
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Reset timestamp in Unix seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ProfileDetail"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unknown query parameter.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or not visible.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Only GET and OPTIONS are supported.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                },
                "description": "Seconds to wait before retrying."
              },
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer",
                  "enum": [
                    30,
                    60
                  ]
                },
                "description": "60 per account for valid keys; repeated invalid or revoked keys have a separate 30 per IP limit."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Reset timestamp in Unix seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "options": {
        "operationId": "getProfilePreflight",
        "security": [],
        "summary": "CORS preflight",
        "responses": {
          "204": {
            "description": "No content",
            "headers": {
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              },
              "Access-Control-Allow-Methods": {
                "schema": {
                  "type": "string",
                  "const": "GET, OPTIONS"
                }
              },
              "Access-Control-Allow-Headers": {
                "schema": {
                  "type": "string",
                  "const": "Authorization, Content-Type"
                }
              },
              "Allow": {
                "schema": {
                  "type": "string",
                  "const": "GET, OPTIONS"
                }
              }
            }
          }
        }
      }
    },
    "/arenas": {
      "get": {
        "operationId": "listArenas",
        "summary": "Arenas and effective defenders; no battle is launched.",
        "description": "A Bearer API key is required; cookies are not accepted. Unknown or repeated query parameters return 400. Successful and failed authenticated requests consume the shared per-account quota.",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "default": 1
            },
            "description": "Page number; nextPage is null at page 1000 even if hasMore is true."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            },
            "description": "Maximum number of returned items."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              },
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer",
                  "const": 60
                }
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Reset timestamp in Unix seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Arena"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  },
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unknown query parameter.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or not visible.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Only GET and OPTIONS are supported.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                },
                "description": "Seconds to wait before retrying."
              },
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer",
                  "enum": [
                    30,
                    60
                  ]
                },
                "description": "60 per account for valid keys; repeated invalid or revoked keys have a separate 30 per IP limit."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Reset timestamp in Unix seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "options": {
        "operationId": "listArenasPreflight",
        "security": [],
        "summary": "CORS preflight",
        "responses": {
          "204": {
            "description": "No content",
            "headers": {
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              },
              "Access-Control-Allow-Methods": {
                "schema": {
                  "type": "string",
                  "const": "GET, OPTIONS"
                }
              },
              "Access-Control-Allow-Headers": {
                "schema": {
                  "type": "string",
                  "const": "Authorization, Content-Type"
                }
              },
              "Allow": {
                "schema": {
                  "type": "string",
                  "const": "GET, OPTIONS"
                }
              }
            }
          }
        }
      }
    },
    "/arenas/{id}": {
      "get": {
        "operationId": "getArena",
        "summary": "One arena and its effective defender.",
        "description": "A Bearer API key is required; cookies are not accepted. Unknown or repeated query parameters return 400. Successful and failed authenticated requests consume the shared per-account quota.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              },
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer",
                  "const": 60
                }
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Reset timestamp in Unix seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Arena"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unknown query parameter.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or not visible.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Only GET and OPTIONS are supported.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                },
                "description": "Seconds to wait before retrying."
              },
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer",
                  "enum": [
                    30,
                    60
                  ]
                },
                "description": "60 per account for valid keys; repeated invalid or revoked keys have a separate 30 per IP limit."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Reset timestamp in Unix seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "options": {
        "operationId": "getArenaPreflight",
        "security": [],
        "summary": "CORS preflight",
        "responses": {
          "204": {
            "description": "No content",
            "headers": {
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              },
              "Access-Control-Allow-Methods": {
                "schema": {
                  "type": "string",
                  "const": "GET, OPTIONS"
                }
              },
              "Access-Control-Allow-Headers": {
                "schema": {
                  "type": "string",
                  "const": "Authorization, Content-Type"
                }
              },
              "Allow": {
                "schema": {
                  "type": "string",
                  "const": "GET, OPTIONS"
                }
              }
            }
          }
        }
      }
    },
    "/auctions": {
      "get": {
        "operationId": "listAuctions",
        "summary": "Auctions are never settled by this read. settled confirms settlement; effectiveStatus is time-adjusted.",
        "description": "A Bearer API key is required; cookies are not accepted. Unknown or repeated query parameters return 400. Successful and failed authenticated requests consume the shared per-account quota.",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "default": 1
            },
            "description": "Page number; nextPage is null at page 1000 even if hasMore is true."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            },
            "description": "Maximum number of returned items."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "ACTIVE",
                "SOLD",
                "EXPIRED",
                "CANCELLED",
                "ALL"
              ],
              "default": "ACTIVE"
            },
            "description": "Filters the stored status, not effectiveStatus. ACTIVE can include expired unsettled auctions."
          },
          {
            "name": "rarity",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "CHARBON",
                "CUIVRE",
                "FER",
                "OR",
                "DIAMANT",
                "NETHERITE",
                "MYTHIQUE"
              ]
            },
            "description": "Exact rarity of the listed card."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              },
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer",
                  "const": 60
                }
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Reset timestamp in Unix seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Auction"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  },
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unknown query parameter.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or not visible.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Only GET and OPTIONS are supported.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                },
                "description": "Seconds to wait before retrying."
              },
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer",
                  "enum": [
                    30,
                    60
                  ]
                },
                "description": "60 per account for valid keys; repeated invalid or revoked keys have a separate 30 per IP limit."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Reset timestamp in Unix seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "options": {
        "operationId": "listAuctionsPreflight",
        "security": [],
        "summary": "CORS preflight",
        "responses": {
          "204": {
            "description": "No content",
            "headers": {
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              },
              "Access-Control-Allow-Methods": {
                "schema": {
                  "type": "string",
                  "const": "GET, OPTIONS"
                }
              },
              "Access-Control-Allow-Headers": {
                "schema": {
                  "type": "string",
                  "const": "Authorization, Content-Type"
                }
              },
              "Allow": {
                "schema": {
                  "type": "string",
                  "const": "GET, OPTIONS"
                }
              }
            }
          }
        }
      }
    },
    "/auctions/{id}": {
      "get": {
        "operationId": "getAuction",
        "summary": "One auction, without settlement or mutation.",
        "description": "A Bearer API key is required; cookies are not accepted. Unknown or repeated query parameters return 400. Successful and failed authenticated requests consume the shared per-account quota.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              },
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer",
                  "const": 60
                }
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Reset timestamp in Unix seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Auction"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unknown query parameter.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or not visible.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Only GET and OPTIONS are supported.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                },
                "description": "Seconds to wait before retrying."
              },
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer",
                  "enum": [
                    30,
                    60
                  ]
                },
                "description": "60 per account for valid keys; repeated invalid or revoked keys have a separate 30 per IP limit."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Reset timestamp in Unix seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "options": {
        "operationId": "getAuctionPreflight",
        "security": [],
        "summary": "CORS preflight",
        "responses": {
          "204": {
            "description": "No content",
            "headers": {
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              },
              "Access-Control-Allow-Methods": {
                "schema": {
                  "type": "string",
                  "const": "GET, OPTIONS"
                }
              },
              "Access-Control-Allow-Headers": {
                "schema": {
                  "type": "string",
                  "const": "Authorization, Content-Type"
                }
              },
              "Allow": {
                "schema": {
                  "type": "string",
                  "const": "GET, OPTIONS"
                }
              }
            }
          }
        }
      }
    },
    "/leaderboard": {
      "get": {
        "operationId": "getLeaderboard",
        "summary": "Public collection ranking by distinct available cards, descending, with stable user-id tie break.",
        "description": "A Bearer API key is required; cookies are not accepted. Unknown or repeated query parameters return 400. Successful and failed authenticated requests consume the shared per-account quota.",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "default": 1
            },
            "description": "Page number; nextPage is null at page 1000 even if hasMore is true."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            },
            "description": "Maximum number of returned items."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              },
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer",
                  "const": 60
                }
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Reset timestamp in Unix seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/LeaderboardEntry"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  },
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unknown query parameter.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or not visible.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Only GET and OPTIONS are supported.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                },
                "description": "Seconds to wait before retrying."
              },
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer",
                  "enum": [
                    30,
                    60
                  ]
                },
                "description": "60 per account for valid keys; repeated invalid or revoked keys have a separate 30 per IP limit."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Reset timestamp in Unix seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "options": {
        "operationId": "getLeaderboardPreflight",
        "security": [],
        "summary": "CORS preflight",
        "responses": {
          "204": {
            "description": "No content",
            "headers": {
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              },
              "Access-Control-Allow-Methods": {
                "schema": {
                  "type": "string",
                  "const": "GET, OPTIONS"
                }
              },
              "Access-Control-Allow-Headers": {
                "schema": {
                  "type": "string",
                  "const": "Authorization, Content-Type"
                }
              },
              "Allow": {
                "schema": {
                  "type": "string",
                  "const": "GET, OPTIONS"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "BearerApiKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "MineCards API key",
        "description": "Create a key in MineCards Settings. Send the full token in Authorization; never put it in a URL or public frontend."
      }
    },
    "schemas": {
      "Card": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "nameEn": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "descriptionEn": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "dimension": {
            "type": "string"
          },
          "minecraftVersion": {
            "type": "string"
          },
          "image": {
            "anyOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "string",
                "const": ""
              }
            ],
            "description": "Absolute artwork URL, or empty string for a draft with no artwork."
          },
          "wikiUrl": {
            "anyOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ],
            "description": "Null when the card has no relevant Minecraft Wiki entry."
          },
          "isSecret": {
            "type": "boolean"
          },
          "rarity": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "CHARBON",
                  "CUIVRE",
                  "FER",
                  "OR",
                  "DIAMANT",
                  "NETHERITE",
                  "MYTHIQUE"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "attack": {
            "type": "integer",
            "examples": [
              35
            ]
          },
          "defense": {
            "type": "integer",
            "examples": [
              100
            ]
          },
          "power": {
            "type": "integer",
            "description": "Deterministic card power: attack + Math.floor(defense * 0.65), without random battle bonuses. Arena defense cards use their saved attack and defense stats, which may differ from the current catalog.",
            "examples": [
              100
            ]
          },
          "active": {
            "type": "boolean"
          },
          "finish": {
            "$ref": "#/components/schemas/CardFinish",
            "description": "Present for a specific copy in a showcase or auction; absent from catalogue and aggregated inventory entries."
          }
        },
        "required": [
          "id",
          "name",
          "nameEn",
          "description",
          "descriptionEn",
          "category",
          "dimension",
          "minecraftVersion",
          "image",
          "wikiUrl",
          "isSecret",
          "rarity",
          "attack",
          "defense",
          "power",
          "active"
        ],
        "additionalProperties": false
      },
      "OwnCard": {
        "type": "object",
        "properties": {
          "cardId": {
            "type": "string"
          },
          "quantity": {
            "type": "integer",
            "minimum": 1,
            "description": "Total available copies across both finishes, excluding copies reserved by trades or auctions. Equals standardQuantity + holographicQuantity."
          },
          "standardQuantity": {
            "type": "integer",
            "minimum": 0
          },
          "holographicQuantity": {
            "type": "integer",
            "minimum": 0
          },
          "card": {
            "$ref": "#/components/schemas/Card"
          }
        },
        "required": [
          "cardId",
          "quantity",
          "standardQuantity",
          "holographicQuantity",
          "card"
        ],
        "additionalProperties": false
      },
      "Identity": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "avatarId": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "username",
          "avatarId"
        ],
        "additionalProperties": false
      },
      "Badge": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "labelEn": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "type": "string"
          },
          "descriptionEn": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "color": {
            "type": "string"
          },
          "icon": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "active": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "label",
          "labelEn",
          "description",
          "descriptionEn",
          "color",
          "icon",
          "source",
          "active"
        ],
        "additionalProperties": false
      },
      "ShowcaseBadge": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "labelEn": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "type": "string"
          },
          "descriptionEn": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "color": {
            "type": "string"
          },
          "icon": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "active": {
            "type": "boolean"
          },
          "earnedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "label",
          "labelEn",
          "description",
          "descriptionEn",
          "color",
          "icon",
          "source",
          "active",
          "earnedAt"
        ],
        "additionalProperties": false
      },
      "Profile": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "avatarId": {
            "type": "string"
          },
          "bio": {
            "type": "string"
          },
          "bannerId": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "premium": {
            "type": "boolean"
          },
          "showCollection": {
            "type": "boolean"
          },
          "showActivity": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "username",
          "avatarId",
          "bio",
          "bannerId",
          "createdAt",
          "premium",
          "showCollection",
          "showActivity"
        ],
        "additionalProperties": false
      },
      "Activity": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "BOOSTER",
              "BATTLE",
              "ARENA",
              "TRADE",
              "ACHIEVEMENT"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "boosterKind": {
            "type": "string",
            "enum": [
              "standard",
              "premium",
              "special"
            ]
          },
          "won": {
            "type": "boolean"
          },
          "arenaId": {
            "type": "string"
          },
          "achievementId": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "occurredAt"
        ],
        "additionalProperties": false
      },
      "ProfileDetail": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "avatarId": {
            "type": "string"
          },
          "bio": {
            "type": "string"
          },
          "bannerId": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "premium": {
            "type": "boolean"
          },
          "showCollection": {
            "type": "boolean"
          },
          "showActivity": {
            "type": "boolean"
          },
          "showcaseCards": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Card"
            },
            "maxItems": 6
          },
          "showcaseBadges": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ShowcaseBadge"
            },
            "maxItems": 3
          },
          "collection": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "uniqueCards": {
                    "type": "integer"
                  },
                  "totalCards": {
                    "type": "integer"
                  }
                },
                "required": [
                  "uniqueCards",
                  "totalCards"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "activity": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Activity"
                },
                "maxItems": 20
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "username",
          "avatarId",
          "bio",
          "bannerId",
          "createdAt",
          "premium",
          "showCollection",
          "showActivity",
          "showcaseCards",
          "showcaseBadges",
          "collection",
          "activity"
        ],
        "additionalProperties": false
      },
      "Boosters": {
        "type": "object",
        "properties": {
          "available": {
            "type": "integer"
          },
          "capacity": {
            "type": "integer"
          },
          "intervalSeconds": {
            "type": "integer",
            "enum": [
              180,
              600
            ]
          },
          "accruedAt": {
            "type": "string",
            "format": "date-time"
          },
          "giftedStandard": {
            "type": "integer",
            "description": "Available bonus classic boosters from gifts, game rewards or the duplicate-card recycler, separate from timed free boosters."
          },
          "giftedPremium": {
            "type": "integer"
          },
          "nextAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "premiumAvailable": {
            "type": "boolean"
          },
          "premiumNextAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "premiumIntervalSeconds": {
            "type": "integer",
            "const": 18000
          },
          "specialAvailable": {
            "type": "boolean"
          },
          "specialNextAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "specialIntervalSeconds": {
            "type": "integer",
            "const": 43200
          },
          "dailyPremiumAvailable": {
            "type": "boolean",
            "description": "Compatibility alias of premiumAvailable; this is not a daily reset."
          },
          "serverTime": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "available",
          "capacity",
          "intervalSeconds",
          "accruedAt",
          "giftedStandard",
          "giftedPremium",
          "nextAt",
          "premiumAvailable",
          "premiumNextAt",
          "premiumIntervalSeconds",
          "specialAvailable",
          "specialNextAt",
          "specialIntervalSeconds",
          "dailyPremiumAvailable",
          "serverTime"
        ],
        "additionalProperties": false
      },
      "Arena": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "nameEn": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "descriptionEn": {
            "type": "string"
          },
          "dimension": {
            "type": "string"
          },
          "color": {
            "type": "string"
          },
          "badge": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Badge"
              },
              {
                "type": "null"
              }
            ]
          },
          "champion": {
            "type": "object",
            "properties": {
              "id": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "username": {
                "type": "string"
              },
              "usernameEn": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "avatarId": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "isNpc": {
                "type": "boolean"
              }
            },
            "required": [
              "id",
              "username",
              "usernameEn",
              "avatarId",
              "isNpc"
            ],
            "additionalProperties": false
          },
          "defense": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Card"
            },
            "maxItems": 3,
            "description": "Saved defense stats, which can differ from current catalog stats. Each card power is calculated from its saved attack and defense."
          },
          "score": {
            "type": "integer"
          }
        },
        "required": [
          "id",
          "name",
          "nameEn",
          "description",
          "descriptionEn",
          "dimension",
          "color",
          "badge",
          "champion",
          "defense",
          "score"
        ],
        "additionalProperties": false
      },
      "Auction": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "card": {
            "$ref": "#/components/schemas/Card"
          },
          "finish": {
            "$ref": "#/components/schemas/CardFinish"
          },
          "startingPrice": {
            "type": "integer"
          },
          "currentBid": {
            "type": "integer"
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "SOLD",
              "EXPIRED",
              "CANCELLED"
            ]
          },
          "effectiveStatus": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "SOLD",
              "EXPIRED",
              "CANCELLED"
            ],
            "description": "Time-adjusted status; SOLD alone does not imply that settlement has completed."
          },
          "hasEnded": {
            "type": "boolean"
          },
          "settled": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "endsAt": {
            "type": "string",
            "format": "date-time"
          },
          "settledAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "seller": {
            "$ref": "#/components/schemas/Identity"
          },
          "highestBidder": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Identity"
              },
              {
                "type": "null"
              }
            ]
          },
          "bidCount": {
            "type": "integer"
          }
        },
        "required": [
          "id",
          "card",
          "finish",
          "startingPrice",
          "currentBid",
          "status",
          "effectiveStatus",
          "hasEnded",
          "settled",
          "createdAt",
          "endsAt",
          "settledAt",
          "seller",
          "highestBidder",
          "bidCount"
        ],
        "additionalProperties": false
      },
      "LeaderboardEntry": {
        "type": "object",
        "properties": {
          "rank": {
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "avatarId": {
            "type": "string"
          },
          "premium": {
            "type": "boolean"
          },
          "score": {
            "type": "integer",
            "description": "Number of distinct available cards. Private and banned profiles are excluded."
          }
        },
        "required": [
          "rank",
          "id",
          "username",
          "avatarId",
          "premium",
          "score"
        ],
        "additionalProperties": false
      },
      "Pagination": {
        "type": "object",
        "properties": {
          "page": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          },
          "hasMore": {
            "type": "boolean"
          },
          "nextPage": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 2,
                "maximum": 1000
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "page",
          "limit",
          "hasMore",
          "nextPage"
        ],
        "additionalProperties": false
      },
      "CardFinish": {
        "type": "string",
        "enum": [
          "STANDARD",
          "HOLOGRAPHIC"
        ],
        "description": "Cosmetic finish only; attack, defense, power and base catalogue identity are unchanged."
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "error"
        ],
        "additionalProperties": false
      }
    }
  }
}
