{
  "openapi": "3.0.3",
  "info": {
    "title": "Forge API",
    "description": "Rest API to manipulate items",
    "version": "0.0.1"
  },
  "servers": [
    {
      "url": "https://forgegames.org/api"
    }
  ],
  "security": [
    {
      "BasicAuth": []
    }
  ],
  "tags": [
    {
      "name": "attributes",
      "description": "Attributes"
    },
    {
      "name": "classifiers",
      "description": "Classifiers"
    },
    {
      "name": "item-instance-spaces",
      "description": "Item Instance Spaces"
    },
    {
      "name": "spaces",
      "description": "Spaces"
    },
    {
      "name": "users",
      "description": "Users"
    },
    {
      "name": "user-spaces",
      "description": "User Spaces"
    },
    {
      "name": "items",
      "description": "Items"
    },
    {
      "name": "item-instances",
      "description": "Item Instances"
    }
  ],
  "externalDocs": {
    "url": "https://docs.forgegames.org"
  },
  "paths": {
    "/attributes": {
      "post": {
        "operationId": "attributes-createAttribute",
        "summary": "Create Attribute",
        "description": "Creates a new attribute for the specified team with name and optional min/max values.",
        "tags": [
          "attributes"
        ],
        "security": [
          {
            "BasicAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 191
                  },
                  "min": {
                    "type": "number"
                  },
                  "max": {
                    "type": "number"
                  }
                },
                "required": [
                  "name",
                  "min",
                  "max"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 191
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 191
                    },
                    "min": {
                      "type": "number"
                    },
                    "max": {
                      "type": "number"
                    },
                    "teamId": {
                      "type": "string",
                      "maxLength": 191
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "min",
                    "max",
                    "teamId"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "attributes-list",
        "summary": "List Attributes",
        "description": "Lists all attributes associated with the specified team. Attributes define properties that can be assigned to items or instances within the team context.",
        "tags": [
          "attributes"
        ],
        "security": [
          {
            "BasicAuth": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "id",
            "schema": {
              "type": "string",
              "maxLength": 191
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 191
                      },
                      "name": {
                        "type": "string",
                        "maxLength": 191
                      },
                      "min": {
                        "type": "number"
                      },
                      "max": {
                        "type": "number"
                      },
                      "teamId": {
                        "type": "string",
                        "maxLength": 191
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "min",
                      "max",
                      "teamId"
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/attributes/{id}": {
      "put": {
        "operationId": "attributes-updateAttribute",
        "summary": "Update Attribute",
        "description": "Updates an existing attribute's properties including name, min, and max values.",
        "tags": [
          "attributes"
        ],
        "security": [
          {
            "BasicAuth": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 191
                  },
                  "min": {
                    "type": "number"
                  },
                  "max": {
                    "type": "number"
                  },
                  "teamId": {
                    "type": "string",
                    "maxLength": 191
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 191
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 191
                    },
                    "min": {
                      "type": "number"
                    },
                    "max": {
                      "type": "number"
                    },
                    "teamId": {
                      "type": "string",
                      "maxLength": 191
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "min",
                    "max",
                    "teamId"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "attributes-delete",
        "summary": "Delete Attribute",
        "description": "Deletes an attribute from the team. Note: Will fail if attribute is attached to items.",
        "tags": [
          "attributes"
        ],
        "security": [
          {
            "BasicAuth": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "maxLength": 191
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/classifiers": {
      "post": {
        "operationId": "classifiers-createClassifier",
        "summary": "Create Classifier",
        "description": "Creates a new classifier with associated options for a team",
        "tags": [
          "classifiers"
        ],
        "security": [
          {
            "BasicAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "classifierOptions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "dropRateMultiplier": {
                          "type": "number",
                          "nullable": true
                        }
                      },
                      "required": [
                        "name"
                      ]
                    }
                  }
                },
                "required": [
                  "name",
                  "classifierOptions"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 191
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 191
                    },
                    "teamId": {
                      "type": "string",
                      "maxLength": 191
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string",
                      "nullable": true
                    },
                    "classifierOptions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "maxLength": 191
                          },
                          "name": {
                            "type": "string",
                            "maxLength": 191
                          },
                          "dropRateMultiplier": {
                            "type": "number",
                            "nullable": true
                          },
                          "classifierId": {
                            "type": "string",
                            "maxLength": 191
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "dropRateMultiplier",
                          "classifierId"
                        ]
                      }
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "teamId",
                    "createdAt",
                    "updatedAt",
                    "classifierOptions"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "classifiers-list",
        "summary": "List Classifiers",
        "description": "Lists the classifiers defined for a specific team. Classifiers group items and manage item-related properties.",
        "tags": [
          "classifiers"
        ],
        "security": [
          {
            "BasicAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 191
                      },
                      "name": {
                        "type": "string",
                        "maxLength": 191
                      },
                      "teamId": {
                        "type": "string",
                        "maxLength": 191
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string",
                        "nullable": true
                      },
                      "classifierOptions": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "maxLength": 191
                            },
                            "name": {
                              "type": "string",
                              "maxLength": 191
                            },
                            "dropRateMultiplier": {
                              "type": "number",
                              "nullable": true
                            },
                            "classifierId": {
                              "type": "string",
                              "maxLength": 191
                            }
                          },
                          "required": [
                            "id",
                            "name",
                            "dropRateMultiplier",
                            "classifierId"
                          ]
                        }
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "teamId",
                      "createdAt",
                      "updatedAt",
                      "classifierOptions"
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/classifiers/{id}": {
      "put": {
        "operationId": "classifiers-updateClassifier",
        "summary": "Update Classifier",
        "description": "Updates an existing classifier's properties",
        "tags": [
          "classifiers"
        ],
        "security": [
          {
            "BasicAuth": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 191
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 191
                    },
                    "teamId": {
                      "type": "string",
                      "maxLength": 191
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string",
                      "nullable": true
                    },
                    "classifierOptions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "maxLength": 191
                          },
                          "name": {
                            "type": "string",
                            "maxLength": 191
                          },
                          "dropRateMultiplier": {
                            "type": "number",
                            "nullable": true
                          },
                          "classifierId": {
                            "type": "string",
                            "maxLength": 191
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "dropRateMultiplier",
                          "classifierId"
                        ]
                      }
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "teamId",
                    "createdAt",
                    "updatedAt",
                    "classifierOptions"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "classifiers-delete",
        "summary": "Delete Classifier",
        "description": "Deletes a classifier and its associated options",
        "tags": [
          "classifiers"
        ],
        "security": [
          {
            "BasicAuth": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/items": {
      "post": {
        "operationId": "items-create",
        "summary": "Create Item",
        "description": "Creates a new item blueprint with specified attributes and classifiers.",
        "tags": [
          "items"
        ],
        "security": [
          {
            "BasicAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "maxLength": 191
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 191
                  },
                  "thumbnail": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 191
                  },
                  "rollNumerator": {
                    "type": "number"
                  },
                  "createdAt": {
                    "type": "string"
                  },
                  "updatedAt": {
                    "type": "string",
                    "nullable": true
                  },
                  "classifierOptionIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "The classifier options to which this item has been assigned"
                  },
                  "itemAttributes": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "attributeId": {
                          "type": "string"
                        },
                        "min": {
                          "type": "number"
                        },
                        "max": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "attributeId",
                        "min",
                        "max"
                      ]
                    }
                  }
                },
                "required": [
                  "name",
                  "rollNumerator",
                  "classifierOptionIds",
                  "itemAttributes"
                ],
                "description": "Creates a item"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 191
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 191
                    },
                    "thumbnail": {
                      "type": "string",
                      "nullable": true,
                      "maxLength": 191
                    },
                    "rollNumerator": {
                      "type": "number"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string",
                      "nullable": true
                    },
                    "teamId": {
                      "type": "string",
                      "maxLength": 191
                    },
                    "classifiers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "classifierId": {
                            "type": "string",
                            "maxLength": 191
                          },
                          "classifierOption": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "maxLength": 191
                              },
                              "name": {
                                "type": "string",
                                "maxLength": 191
                              },
                              "dropRateMultiplier": {
                                "type": "number",
                                "nullable": true
                              },
                              "classifierId": {
                                "type": "string",
                                "maxLength": 191
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "dropRateMultiplier",
                              "classifierId"
                            ]
                          }
                        },
                        "required": [
                          "classifierId",
                          "classifierOption"
                        ]
                      }
                    },
                    "attributes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "maxLength": 191
                          },
                          "itemId": {
                            "type": "string",
                            "maxLength": 191
                          },
                          "attributeId": {
                            "type": "string",
                            "maxLength": 191
                          },
                          "min": {
                            "type": "number"
                          },
                          "max": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "id",
                          "itemId",
                          "attributeId",
                          "min",
                          "max"
                        ]
                      }
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "thumbnail",
                    "rollNumerator",
                    "createdAt",
                    "updatedAt",
                    "teamId",
                    "classifiers",
                    "attributes"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "items-list",
        "summary": "List Items",
        "description": "Lists all items associated with the specified team. Items are blueprints that can be rolled, modified, or assigned attributes.",
        "tags": [
          "items"
        ],
        "security": [
          {
            "BasicAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 191
                      },
                      "name": {
                        "type": "string",
                        "maxLength": 191
                      },
                      "thumbnail": {
                        "type": "string",
                        "nullable": true,
                        "maxLength": 191
                      },
                      "rollNumerator": {
                        "type": "number"
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string",
                        "nullable": true
                      },
                      "teamId": {
                        "type": "string",
                        "maxLength": 191
                      },
                      "classifiers": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "classifierId": {
                              "type": "string",
                              "maxLength": 191
                            },
                            "classifierOption": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "maxLength": 191
                                },
                                "name": {
                                  "type": "string",
                                  "maxLength": 191
                                },
                                "dropRateMultiplier": {
                                  "type": "number",
                                  "nullable": true
                                },
                                "classifierId": {
                                  "type": "string",
                                  "maxLength": 191
                                }
                              },
                              "required": [
                                "id",
                                "name",
                                "dropRateMultiplier",
                                "classifierId"
                              ]
                            }
                          },
                          "required": [
                            "classifierId",
                            "classifierOption"
                          ]
                        }
                      },
                      "attributes": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "maxLength": 191
                            },
                            "itemId": {
                              "type": "string",
                              "maxLength": 191
                            },
                            "attributeId": {
                              "type": "string",
                              "maxLength": 191
                            },
                            "min": {
                              "type": "number"
                            },
                            "max": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "id",
                            "itemId",
                            "attributeId",
                            "min",
                            "max"
                          ]
                        }
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "thumbnail",
                      "rollNumerator",
                      "createdAt",
                      "updatedAt",
                      "teamId",
                      "classifiers",
                      "attributes"
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/items/{id}": {
      "put": {
        "operationId": "items-update",
        "summary": "Update Item",
        "description": "Updates an existing item's properties, attributes, and classifiers.",
        "tags": [
          "items"
        ],
        "security": [
          {
            "BasicAuth": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "thumbnail": {
                    "type": "string",
                    "description": "Thumbnail for the item when viewed inside of a space"
                  },
                  "rollNumerator": {
                    "type": "number"
                  },
                  "classifierOptionIds": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "attributes": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "attributeId": {
                          "type": "string"
                        },
                        "min": {
                          "type": "number"
                        },
                        "max": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "attributeId",
                        "min",
                        "max"
                      ]
                    }
                  }
                },
                "required": [
                  "name",
                  "rollNumerator",
                  "attributes"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 191
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 191
                    },
                    "thumbnail": {
                      "type": "string",
                      "nullable": true,
                      "maxLength": 191
                    },
                    "rollNumerator": {
                      "type": "number"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string",
                      "nullable": true
                    },
                    "teamId": {
                      "type": "string",
                      "maxLength": 191
                    },
                    "classifiers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "classifierId": {
                            "type": "string",
                            "maxLength": 191
                          },
                          "classifierOption": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "maxLength": 191
                              },
                              "name": {
                                "type": "string",
                                "maxLength": 191
                              },
                              "dropRateMultiplier": {
                                "type": "number",
                                "nullable": true
                              },
                              "classifierId": {
                                "type": "string",
                                "maxLength": 191
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "dropRateMultiplier",
                              "classifierId"
                            ]
                          }
                        },
                        "required": [
                          "classifierId",
                          "classifierOption"
                        ]
                      }
                    },
                    "attributes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "maxLength": 191
                          },
                          "itemId": {
                            "type": "string",
                            "maxLength": 191
                          },
                          "attributeId": {
                            "type": "string",
                            "maxLength": 191
                          },
                          "min": {
                            "type": "number"
                          },
                          "max": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "id",
                          "itemId",
                          "attributeId",
                          "min",
                          "max"
                        ]
                      }
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "thumbnail",
                    "rollNumerator",
                    "createdAt",
                    "updatedAt",
                    "teamId",
                    "classifiers",
                    "attributes"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "items-delete",
        "summary": "Delete Item",
        "description": "Deletes an item and its associated attributes and classifiers.",
        "tags": [
          "items"
        ],
        "security": [
          {
            "BasicAuth": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/items/roll": {
      "post": {
        "operationId": "items-roll",
        "summary": "Roll an item",
        "description": "Generates a randomized variation of an item. This endpoint is commonly used for loot drops or creating unique instances in games.",
        "tags": [
          "items"
        ],
        "security": [
          {
            "BasicAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "item": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "maxLength": 191
                        },
                        "name": {
                          "type": "string",
                          "maxLength": 191
                        },
                        "thumbnail": {
                          "type": "string",
                          "nullable": true,
                          "maxLength": 191
                        },
                        "rollNumerator": {
                          "type": "number"
                        },
                        "createdAt": {
                          "type": "string"
                        },
                        "updatedAt": {
                          "type": "string",
                          "nullable": true
                        },
                        "teamId": {
                          "type": "string",
                          "maxLength": 191
                        },
                        "classifiers": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "maxLength": 191
                              },
                              "itemId": {
                                "type": "string",
                                "maxLength": 191
                              },
                              "classifierId": {
                                "type": "string",
                                "maxLength": 191
                              },
                              "classifierOptionId": {
                                "type": "string",
                                "maxLength": 191
                              },
                              "classifierOption": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "maxLength": 191
                                  },
                                  "name": {
                                    "type": "string",
                                    "maxLength": 191
                                  },
                                  "dropRateMultiplier": {
                                    "type": "number",
                                    "nullable": true
                                  },
                                  "classifierId": {
                                    "type": "string",
                                    "maxLength": 191
                                  }
                                },
                                "required": [
                                  "id",
                                  "name",
                                  "dropRateMultiplier",
                                  "classifierId"
                                ]
                              }
                            },
                            "required": [
                              "id",
                              "itemId",
                              "classifierId",
                              "classifierOptionId",
                              "classifierOption"
                            ]
                          }
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "thumbnail",
                        "rollNumerator",
                        "createdAt",
                        "updatedAt",
                        "teamId",
                        "classifiers"
                      ]
                    },
                    "itemAttributeInstances": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "itemAttributeId": {
                            "type": "string"
                          },
                          "value": {
                            "type": "number"
                          },
                          "attribute": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "maxLength": 191
                              },
                              "name": {
                                "type": "string",
                                "maxLength": 191
                              },
                              "min": {
                                "type": "number"
                              },
                              "max": {
                                "type": "number"
                              },
                              "teamId": {
                                "type": "string",
                                "maxLength": 191
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "min",
                              "max",
                              "teamId"
                            ]
                          }
                        },
                        "required": [
                          "itemAttributeId",
                          "value",
                          "attribute"
                        ]
                      }
                    }
                  },
                  "required": [
                    "item",
                    "itemAttributeInstances"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/item-instances": {
      "post": {
        "operationId": "itemInstances-create",
        "summary": "Create an Item Instance",
        "description": "Creates an instance of an item within the specified team. Instances are generated from item templates and can have custom attributes and configurations.",
        "tags": [
          "item-instances"
        ],
        "security": [
          {
            "BasicAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "itemId": {
                    "type": "string",
                    "maxLength": 191
                  },
                  "itemAttributeInstances": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "itemAttributeId": {
                          "type": "string",
                          "maxLength": 191
                        },
                        "value": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "itemAttributeId",
                        "value"
                      ]
                    }
                  },
                  "userId": {
                    "type": "string"
                  },
                  "userSpaceId": {
                    "type": "string"
                  }
                },
                "required": [
                  "itemId",
                  "itemAttributeInstances",
                  "userId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 191
                    },
                    "itemId": {
                      "type": "string",
                      "maxLength": 191
                    },
                    "teamId": {
                      "type": "string",
                      "maxLength": 191
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "required": [
                    "id",
                    "itemId",
                    "teamId",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "itemInstances-list",
        "summary": "List Item Instances",
        "description": "Lists all item instances within the specified team. Item instances represent individual occurrences of items with specific attributes and configurations.",
        "tags": [
          "item-instances"
        ],
        "security": [
          {
            "BasicAuth": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "userId",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "userSpaceId",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "itemId",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "instanceIds",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "in": "query",
            "name": "classifierOptionIds",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "item": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "maxLength": 191
                          },
                          "name": {
                            "type": "string",
                            "maxLength": 191
                          },
                          "thumbnail": {
                            "type": "string",
                            "nullable": true,
                            "maxLength": 191
                          },
                          "rollNumerator": {
                            "type": "number"
                          },
                          "createdAt": {
                            "type": "string"
                          },
                          "updatedAt": {
                            "type": "string",
                            "nullable": true
                          },
                          "teamId": {
                            "type": "string",
                            "maxLength": 191
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "thumbnail",
                          "rollNumerator",
                          "createdAt",
                          "updatedAt",
                          "teamId"
                        ]
                      },
                      "itemInstanceSpace": {
                        "type": "object",
                        "nullable": true,
                        "properties": {
                          "id": {
                            "type": "string",
                            "maxLength": 191
                          },
                          "itemInstanceId": {
                            "type": "string",
                            "maxLength": 191
                          },
                          "teamUserSpaceId": {
                            "type": "string",
                            "maxLength": 191
                          },
                          "spacePositionX": {
                            "type": "number"
                          },
                          "spacePositionY": {
                            "type": "number"
                          },
                          "teamId": {
                            "type": "string",
                            "maxLength": 191
                          },
                          "createdAt": {
                            "type": "string"
                          },
                          "updatedAt": {
                            "type": "string",
                            "nullable": true
                          }
                        },
                        "required": [
                          "id",
                          "itemInstanceId",
                          "teamUserSpaceId",
                          "spacePositionX",
                          "spacePositionY",
                          "teamId",
                          "createdAt",
                          "updatedAt"
                        ]
                      },
                      "classifiers": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "classifierOption": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "name"
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "name",
                            "classifierOption"
                          ]
                        }
                      },
                      "attributes": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "attributeId": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "value": {
                              "type": "number"
                            },
                            "min": {
                              "type": "number"
                            },
                            "max": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "id",
                            "attributeId",
                            "name",
                            "value",
                            "min",
                            "max"
                          ]
                        }
                      }
                    },
                    "required": [
                      "id",
                      "item",
                      "itemInstanceSpace",
                      "classifiers",
                      "attributes"
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/item-instances/{id}": {
      "delete": {
        "operationId": "itemInstances-delete",
        "summary": "Delete an Item Instance",
        "tags": [
          "item-instances"
        ],
        "security": [
          {
            "BasicAuth": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "maxLength": 191
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/item-instances/{id}/move": {
      "post": {
        "operationId": "itemInstances-move",
        "summary": "Move an Item Instance",
        "description": "Moves a specified item instance to a new location within the user's space grid.",
        "tags": [
          "item-instances"
        ],
        "security": [
          {
            "BasicAuth": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "userId": {
                    "type": "string"
                  },
                  "spaceId": {
                    "type": "string"
                  },
                  "spacePositionX": {
                    "type": "number",
                    "description": "The X coordinate in the grid in which to move the item"
                  },
                  "spacePositionY": {
                    "type": "number",
                    "description": "The Y coordinate in the grid in which to move the item"
                  }
                },
                "required": [
                  "userId",
                  "spacePositionX",
                  "spacePositionY"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/roll-events": {
      "post": {
        "operationId": "rollEvents-trackRollEvent",
        "summary": "Track Roll Event",
        "description": "Records a roll event for telemetry. Stores team-level data only, no user-identifying information.",
        "tags": [
          "roll-events"
        ],
        "security": [
          {
            "BasicAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "templateId": {
                    "type": "string"
                  },
                  "itemId": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {}
                  }
                },
                "required": [
                  "itemId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "timestamp"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/roll-events/stats": {
      "get": {
        "operationId": "rollEvents-getAggregatedStats",
        "summary": "Get Aggregated Roll Statistics",
        "description": "Returns team-level roll statistics including total rolls, unique items, and time-series data. Privacy-first: no individual roll exposure.",
        "tags": [
          "roll-events"
        ],
        "security": [
          {
            "BasicAuth": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "startDate",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "endDate",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "templateId",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "totalRolls": {
                      "type": "number"
                    },
                    "uniqueItems": {
                      "type": "number"
                    },
                    "rollsByTemplate": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "number"
                      }
                    },
                    "rollsByDay": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "date": {
                            "type": "string"
                          },
                          "count": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "date",
                          "count"
                        ]
                      }
                    }
                  },
                  "required": [
                    "totalRolls",
                    "uniqueItems",
                    "rollsByTemplate",
                    "rollsByDay"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/roll-events/drop-rates": {
      "get": {
        "operationId": "rollEvents-getItemDropRates",
        "summary": "Get Item Drop Rates",
        "description": "Returns actual drop rates for items based on roll history. Useful for comparing expected vs actual drop rates.",
        "tags": [
          "roll-events"
        ],
        "security": [
          {
            "BasicAuth": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "templateId",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "number",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "itemId": {
                        "type": "string"
                      },
                      "itemName": {
                        "type": "string"
                      },
                      "dropCount": {
                        "type": "number"
                      },
                      "dropRate": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "itemId",
                      "itemName",
                      "dropCount",
                      "dropRate"
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/spaces": {
      "post": {
        "operationId": "spaces-create",
        "summary": "Create Space",
        "description": "Creates a new space for the specified team.",
        "tags": [
          "spaces"
        ],
        "security": [
          {
            "BasicAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "cols": {
                    "type": "number"
                  },
                  "rows": {
                    "type": "number"
                  }
                },
                "required": [
                  "name",
                  "cols",
                  "rows"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 191
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 191
                    },
                    "cols": {
                      "type": "number"
                    },
                    "rows": {
                      "type": "number"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string",
                      "nullable": true
                    },
                    "teamId": {
                      "type": "string",
                      "maxLength": 191
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "cols",
                    "rows",
                    "createdAt",
                    "updatedAt",
                    "teamId"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "spaces-list",
        "summary": "List Spaces",
        "description": "Lists the spaces defined within a specific team. Spaces represent areas or containers where item instances can be stored.",
        "tags": [
          "spaces"
        ],
        "security": [
          {
            "BasicAuth": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "userId",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 191
                      },
                      "name": {
                        "type": "string",
                        "maxLength": 191
                      },
                      "cols": {
                        "type": "number"
                      },
                      "rows": {
                        "type": "number"
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string",
                        "nullable": true
                      },
                      "teamId": {
                        "type": "string",
                        "maxLength": 191
                      },
                      "userSpaces": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "maxLength": 191
                            },
                            "userId": {
                              "type": "string",
                              "maxLength": 191
                            }
                          },
                          "required": [
                            "id",
                            "userId"
                          ]
                        }
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "cols",
                      "rows",
                      "createdAt",
                      "updatedAt",
                      "teamId",
                      "userSpaces"
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/spaces/{id}": {
      "put": {
        "operationId": "spaces-update",
        "summary": "Update Space",
        "description": "Updates an existing space's properties.",
        "tags": [
          "spaces"
        ],
        "security": [
          {
            "BasicAuth": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "cols": {
                    "type": "number"
                  },
                  "rows": {
                    "type": "number"
                  }
                },
                "required": [
                  "name",
                  "cols",
                  "rows"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 191
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 191
                    },
                    "cols": {
                      "type": "number"
                    },
                    "rows": {
                      "type": "number"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string",
                      "nullable": true
                    },
                    "teamId": {
                      "type": "string",
                      "maxLength": 191
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "cols",
                    "rows",
                    "createdAt",
                    "updatedAt",
                    "teamId"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "spaces-delete",
        "summary": "Delete Space",
        "description": "Deletes a space from the team.",
        "tags": [
          "spaces"
        ],
        "security": [
          {
            "BasicAuth": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/templates": {
      "post": {
        "operationId": "templates-create",
        "summary": "Create Template",
        "description": "Creates a new template with specified type and configuration for gacha, roguelike, idle, or card pack systems.",
        "tags": [
          "templates"
        ],
        "security": [
          {
            "BasicAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "gacha",
                      "roguelike",
                      "idle",
                      "card_pack"
                    ]
                  },
                  "config": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "pityThreshold": {
                            "type": "integer",
                            "minimum": 0,
                            "exclusiveMinimum": true
                          },
                          "rateUpMultiplier": {
                            "type": "number",
                            "minimum": 0,
                            "exclusiveMinimum": true
                          },
                          "sparkCurrency": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "baseRates": {
                            "type": "object",
                            "additionalProperties": {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 1
                            }
                          }
                        },
                        "required": [
                          "pityThreshold",
                          "rateUpMultiplier",
                          "sparkCurrency",
                          "baseRates"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "roomRewards": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "itemId": {
                                  "type": "string"
                                },
                                "probability": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 1
                                },
                                "quantity": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "exclusiveMinimum": true
                                }
                              },
                              "required": [
                                "itemId",
                                "probability",
                                "quantity"
                              ]
                            }
                          },
                          "bossDrops": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "itemId": {
                                  "type": "string"
                                },
                                "probability": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 1
                                },
                                "quantity": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "exclusiveMinimum": true
                                },
                                "bossLevel": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "exclusiveMinimum": true
                                },
                                "bossType": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "itemId",
                                "probability",
                                "quantity",
                                "bossLevel"
                              ]
                            }
                          },
                          "floorProgression": {
                            "type": "object",
                            "properties": {
                              "difficultyMultiplier": {
                                "type": "number",
                                "minimum": 0,
                                "exclusiveMinimum": true
                              },
                              "rewardMultiplier": {
                                "type": "number",
                                "minimum": 0,
                                "exclusiveMinimum": true
                              },
                              "maxFloor": {
                                "type": "integer",
                                "minimum": 0,
                                "exclusiveMinimum": true
                              }
                            },
                            "required": [
                              "difficultyMultiplier",
                              "rewardMultiplier"
                            ]
                          }
                        },
                        "required": [
                          "roomRewards",
                          "bossDrops",
                          "floorProgression"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "offlineMultiplier": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1
                          },
                          "maxAccumulation": {
                            "type": "integer",
                            "minimum": 0,
                            "exclusiveMinimum": true
                          },
                          "tickRate": {
                            "type": "integer",
                            "minimum": 0,
                            "exclusiveMinimum": true
                          }
                        },
                        "required": [
                          "offlineMultiplier",
                          "maxAccumulation",
                          "tickRate"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "duplicateProtection": {
                            "type": "boolean"
                          },
                          "wildcardRate": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1
                          },
                          "packSize": {
                            "type": "integer",
                            "minimum": 0,
                            "exclusiveMinimum": true
                          }
                        },
                        "required": [
                          "duplicateProtection",
                          "wildcardRate",
                          "packSize"
                        ]
                      }
                    ]
                  },
                  "createdAt": {
                    "type": "string"
                  },
                  "updatedAt": {
                    "type": "string",
                    "nullable": true
                  }
                },
                "required": [
                  "name",
                  "type",
                  "config"
                ],
                "description": "Creates a template with type-specific configuration"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "teamId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "gacha",
                        "roguelike",
                        "idle",
                        "card_pack"
                      ]
                    },
                    "config": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "pityThreshold": {
                              "type": "integer",
                              "minimum": 0,
                              "exclusiveMinimum": true
                            },
                            "rateUpMultiplier": {
                              "type": "number",
                              "minimum": 0,
                              "exclusiveMinimum": true
                            },
                            "sparkCurrency": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "baseRates": {
                              "type": "object",
                              "additionalProperties": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 1
                              }
                            }
                          },
                          "required": [
                            "pityThreshold",
                            "rateUpMultiplier",
                            "sparkCurrency",
                            "baseRates"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "roomRewards": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "itemId": {
                                    "type": "string"
                                  },
                                  "probability": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1
                                  },
                                  "quantity": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "exclusiveMinimum": true
                                  }
                                },
                                "required": [
                                  "itemId",
                                  "probability",
                                  "quantity"
                                ]
                              }
                            },
                            "bossDrops": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "itemId": {
                                    "type": "string"
                                  },
                                  "probability": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1
                                  },
                                  "quantity": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "exclusiveMinimum": true
                                  },
                                  "bossLevel": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "exclusiveMinimum": true
                                  },
                                  "bossType": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "itemId",
                                  "probability",
                                  "quantity",
                                  "bossLevel"
                                ]
                              }
                            },
                            "floorProgression": {
                              "type": "object",
                              "properties": {
                                "difficultyMultiplier": {
                                  "type": "number",
                                  "minimum": 0,
                                  "exclusiveMinimum": true
                                },
                                "rewardMultiplier": {
                                  "type": "number",
                                  "minimum": 0,
                                  "exclusiveMinimum": true
                                },
                                "maxFloor": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "exclusiveMinimum": true
                                }
                              },
                              "required": [
                                "difficultyMultiplier",
                                "rewardMultiplier"
                              ]
                            }
                          },
                          "required": [
                            "roomRewards",
                            "bossDrops",
                            "floorProgression"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "offlineMultiplier": {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 1
                            },
                            "maxAccumulation": {
                              "type": "integer",
                              "minimum": 0,
                              "exclusiveMinimum": true
                            },
                            "tickRate": {
                              "type": "integer",
                              "minimum": 0,
                              "exclusiveMinimum": true
                            }
                          },
                          "required": [
                            "offlineMultiplier",
                            "maxAccumulation",
                            "tickRate"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "duplicateProtection": {
                              "type": "boolean"
                            },
                            "wildcardRate": {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 1
                            },
                            "packSize": {
                              "type": "integer",
                              "minimum": 0,
                              "exclusiveMinimum": true
                            }
                          },
                          "required": [
                            "duplicateProtection",
                            "wildcardRate",
                            "packSize"
                          ]
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "required": [
                    "id",
                    "teamId",
                    "name",
                    "type",
                    "config",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "templates-list",
        "summary": "List Templates",
        "description": "Lists all templates associated with the specified team. Templates define game system configurations like gacha, roguelike, idle, or card pack mechanics.",
        "tags": [
          "templates"
        ],
        "security": [
          {
            "BasicAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "teamId": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "type": {
                        "type": "string",
                        "enum": [
                          "gacha",
                          "roguelike",
                          "idle",
                          "card_pack"
                        ]
                      },
                      "config": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "pityThreshold": {
                                "type": "integer",
                                "minimum": 0,
                                "exclusiveMinimum": true
                              },
                              "rateUpMultiplier": {
                                "type": "number",
                                "minimum": 0,
                                "exclusiveMinimum": true
                              },
                              "sparkCurrency": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "baseRates": {
                                "type": "object",
                                "additionalProperties": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 1
                                }
                              }
                            },
                            "required": [
                              "pityThreshold",
                              "rateUpMultiplier",
                              "sparkCurrency",
                              "baseRates"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "roomRewards": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "itemId": {
                                      "type": "string"
                                    },
                                    "probability": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 1
                                    },
                                    "quantity": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "exclusiveMinimum": true
                                    }
                                  },
                                  "required": [
                                    "itemId",
                                    "probability",
                                    "quantity"
                                  ]
                                }
                              },
                              "bossDrops": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "itemId": {
                                      "type": "string"
                                    },
                                    "probability": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 1
                                    },
                                    "quantity": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "exclusiveMinimum": true
                                    },
                                    "bossLevel": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "exclusiveMinimum": true
                                    },
                                    "bossType": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "itemId",
                                    "probability",
                                    "quantity",
                                    "bossLevel"
                                  ]
                                }
                              },
                              "floorProgression": {
                                "type": "object",
                                "properties": {
                                  "difficultyMultiplier": {
                                    "type": "number",
                                    "minimum": 0,
                                    "exclusiveMinimum": true
                                  },
                                  "rewardMultiplier": {
                                    "type": "number",
                                    "minimum": 0,
                                    "exclusiveMinimum": true
                                  },
                                  "maxFloor": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "exclusiveMinimum": true
                                  }
                                },
                                "required": [
                                  "difficultyMultiplier",
                                  "rewardMultiplier"
                                ]
                              }
                            },
                            "required": [
                              "roomRewards",
                              "bossDrops",
                              "floorProgression"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "offlineMultiplier": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 1
                              },
                              "maxAccumulation": {
                                "type": "integer",
                                "minimum": 0,
                                "exclusiveMinimum": true
                              },
                              "tickRate": {
                                "type": "integer",
                                "minimum": 0,
                                "exclusiveMinimum": true
                              }
                            },
                            "required": [
                              "offlineMultiplier",
                              "maxAccumulation",
                              "tickRate"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "duplicateProtection": {
                                "type": "boolean"
                              },
                              "wildcardRate": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 1
                              },
                              "packSize": {
                                "type": "integer",
                                "minimum": 0,
                                "exclusiveMinimum": true
                              }
                            },
                            "required": [
                              "duplicateProtection",
                              "wildcardRate",
                              "packSize"
                            ]
                          }
                        ]
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string",
                        "nullable": true
                      }
                    },
                    "required": [
                      "id",
                      "teamId",
                      "name",
                      "type",
                      "config",
                      "createdAt",
                      "updatedAt"
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/templates/{id}": {
      "put": {
        "operationId": "templates-update",
        "summary": "Update Template",
        "description": "Updates an existing template's name, type, or configuration.",
        "tags": [
          "templates"
        ],
        "security": [
          {
            "BasicAuth": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "gacha",
                      "roguelike",
                      "idle",
                      "card_pack"
                    ]
                  },
                  "config": {
                    "type": "object",
                    "additionalProperties": {}
                  }
                },
                "description": "Updates a template"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "teamId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "gacha",
                        "roguelike",
                        "idle",
                        "card_pack"
                      ]
                    },
                    "config": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "pityThreshold": {
                              "type": "integer",
                              "minimum": 0,
                              "exclusiveMinimum": true
                            },
                            "rateUpMultiplier": {
                              "type": "number",
                              "minimum": 0,
                              "exclusiveMinimum": true
                            },
                            "sparkCurrency": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "baseRates": {
                              "type": "object",
                              "additionalProperties": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 1
                              }
                            }
                          },
                          "required": [
                            "pityThreshold",
                            "rateUpMultiplier",
                            "sparkCurrency",
                            "baseRates"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "roomRewards": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "itemId": {
                                    "type": "string"
                                  },
                                  "probability": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1
                                  },
                                  "quantity": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "exclusiveMinimum": true
                                  }
                                },
                                "required": [
                                  "itemId",
                                  "probability",
                                  "quantity"
                                ]
                              }
                            },
                            "bossDrops": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "itemId": {
                                    "type": "string"
                                  },
                                  "probability": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1
                                  },
                                  "quantity": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "exclusiveMinimum": true
                                  },
                                  "bossLevel": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "exclusiveMinimum": true
                                  },
                                  "bossType": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "itemId",
                                  "probability",
                                  "quantity",
                                  "bossLevel"
                                ]
                              }
                            },
                            "floorProgression": {
                              "type": "object",
                              "properties": {
                                "difficultyMultiplier": {
                                  "type": "number",
                                  "minimum": 0,
                                  "exclusiveMinimum": true
                                },
                                "rewardMultiplier": {
                                  "type": "number",
                                  "minimum": 0,
                                  "exclusiveMinimum": true
                                },
                                "maxFloor": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "exclusiveMinimum": true
                                }
                              },
                              "required": [
                                "difficultyMultiplier",
                                "rewardMultiplier"
                              ]
                            }
                          },
                          "required": [
                            "roomRewards",
                            "bossDrops",
                            "floorProgression"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "offlineMultiplier": {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 1
                            },
                            "maxAccumulation": {
                              "type": "integer",
                              "minimum": 0,
                              "exclusiveMinimum": true
                            },
                            "tickRate": {
                              "type": "integer",
                              "minimum": 0,
                              "exclusiveMinimum": true
                            }
                          },
                          "required": [
                            "offlineMultiplier",
                            "maxAccumulation",
                            "tickRate"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "duplicateProtection": {
                              "type": "boolean"
                            },
                            "wildcardRate": {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 1
                            },
                            "packSize": {
                              "type": "integer",
                              "minimum": 0,
                              "exclusiveMinimum": true
                            }
                          },
                          "required": [
                            "duplicateProtection",
                            "wildcardRate",
                            "packSize"
                          ]
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "required": [
                    "id",
                    "teamId",
                    "name",
                    "type",
                    "config",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "templates-delete",
        "summary": "Delete Template",
        "description": "Deletes a template by ID.",
        "tags": [
          "templates"
        ],
        "security": [
          {
            "BasicAuth": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "templates-getById",
        "summary": "Get Template by ID",
        "description": "Retrieves a single template by its unique identifier.",
        "tags": [
          "templates"
        ],
        "security": [
          {
            "BasicAuth": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "teamId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "gacha",
                        "roguelike",
                        "idle",
                        "card_pack"
                      ]
                    },
                    "config": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "pityThreshold": {
                              "type": "integer",
                              "minimum": 0,
                              "exclusiveMinimum": true
                            },
                            "rateUpMultiplier": {
                              "type": "number",
                              "minimum": 0,
                              "exclusiveMinimum": true
                            },
                            "sparkCurrency": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "baseRates": {
                              "type": "object",
                              "additionalProperties": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 1
                              }
                            }
                          },
                          "required": [
                            "pityThreshold",
                            "rateUpMultiplier",
                            "sparkCurrency",
                            "baseRates"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "roomRewards": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "itemId": {
                                    "type": "string"
                                  },
                                  "probability": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1
                                  },
                                  "quantity": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "exclusiveMinimum": true
                                  }
                                },
                                "required": [
                                  "itemId",
                                  "probability",
                                  "quantity"
                                ]
                              }
                            },
                            "bossDrops": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "itemId": {
                                    "type": "string"
                                  },
                                  "probability": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1
                                  },
                                  "quantity": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "exclusiveMinimum": true
                                  },
                                  "bossLevel": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "exclusiveMinimum": true
                                  },
                                  "bossType": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "itemId",
                                  "probability",
                                  "quantity",
                                  "bossLevel"
                                ]
                              }
                            },
                            "floorProgression": {
                              "type": "object",
                              "properties": {
                                "difficultyMultiplier": {
                                  "type": "number",
                                  "minimum": 0,
                                  "exclusiveMinimum": true
                                },
                                "rewardMultiplier": {
                                  "type": "number",
                                  "minimum": 0,
                                  "exclusiveMinimum": true
                                },
                                "maxFloor": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "exclusiveMinimum": true
                                }
                              },
                              "required": [
                                "difficultyMultiplier",
                                "rewardMultiplier"
                              ]
                            }
                          },
                          "required": [
                            "roomRewards",
                            "bossDrops",
                            "floorProgression"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "offlineMultiplier": {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 1
                            },
                            "maxAccumulation": {
                              "type": "integer",
                              "minimum": 0,
                              "exclusiveMinimum": true
                            },
                            "tickRate": {
                              "type": "integer",
                              "minimum": 0,
                              "exclusiveMinimum": true
                            }
                          },
                          "required": [
                            "offlineMultiplier",
                            "maxAccumulation",
                            "tickRate"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "duplicateProtection": {
                              "type": "boolean"
                            },
                            "wildcardRate": {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 1
                            },
                            "packSize": {
                              "type": "integer",
                              "minimum": 0,
                              "exclusiveMinimum": true
                            }
                          },
                          "required": [
                            "duplicateProtection",
                            "wildcardRate",
                            "packSize"
                          ]
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "required": [
                    "id",
                    "teamId",
                    "name",
                    "type",
                    "config",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/templates/type/{type}": {
      "get": {
        "operationId": "templates-getByType",
        "summary": "Get Templates by Type",
        "description": "Retrieves all templates of a specific type (gacha, roguelike, idle, card_pack).",
        "tags": [
          "templates"
        ],
        "security": [
          {
            "BasicAuth": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "type",
            "schema": {
              "type": "string",
              "enum": [
                "gacha",
                "roguelike",
                "idle",
                "card_pack"
              ]
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "teamId": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "type": {
                        "type": "string",
                        "enum": [
                          "gacha",
                          "roguelike",
                          "idle",
                          "card_pack"
                        ]
                      },
                      "config": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "pityThreshold": {
                                "type": "integer",
                                "minimum": 0,
                                "exclusiveMinimum": true
                              },
                              "rateUpMultiplier": {
                                "type": "number",
                                "minimum": 0,
                                "exclusiveMinimum": true
                              },
                              "sparkCurrency": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "baseRates": {
                                "type": "object",
                                "additionalProperties": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 1
                                }
                              }
                            },
                            "required": [
                              "pityThreshold",
                              "rateUpMultiplier",
                              "sparkCurrency",
                              "baseRates"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "roomRewards": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "itemId": {
                                      "type": "string"
                                    },
                                    "probability": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 1
                                    },
                                    "quantity": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "exclusiveMinimum": true
                                    }
                                  },
                                  "required": [
                                    "itemId",
                                    "probability",
                                    "quantity"
                                  ]
                                }
                              },
                              "bossDrops": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "itemId": {
                                      "type": "string"
                                    },
                                    "probability": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 1
                                    },
                                    "quantity": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "exclusiveMinimum": true
                                    },
                                    "bossLevel": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "exclusiveMinimum": true
                                    },
                                    "bossType": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "itemId",
                                    "probability",
                                    "quantity",
                                    "bossLevel"
                                  ]
                                }
                              },
                              "floorProgression": {
                                "type": "object",
                                "properties": {
                                  "difficultyMultiplier": {
                                    "type": "number",
                                    "minimum": 0,
                                    "exclusiveMinimum": true
                                  },
                                  "rewardMultiplier": {
                                    "type": "number",
                                    "minimum": 0,
                                    "exclusiveMinimum": true
                                  },
                                  "maxFloor": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "exclusiveMinimum": true
                                  }
                                },
                                "required": [
                                  "difficultyMultiplier",
                                  "rewardMultiplier"
                                ]
                              }
                            },
                            "required": [
                              "roomRewards",
                              "bossDrops",
                              "floorProgression"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "offlineMultiplier": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 1
                              },
                              "maxAccumulation": {
                                "type": "integer",
                                "minimum": 0,
                                "exclusiveMinimum": true
                              },
                              "tickRate": {
                                "type": "integer",
                                "minimum": 0,
                                "exclusiveMinimum": true
                              }
                            },
                            "required": [
                              "offlineMultiplier",
                              "maxAccumulation",
                              "tickRate"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "duplicateProtection": {
                                "type": "boolean"
                              },
                              "wildcardRate": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 1
                              },
                              "packSize": {
                                "type": "integer",
                                "minimum": 0,
                                "exclusiveMinimum": true
                              }
                            },
                            "required": [
                              "duplicateProtection",
                              "wildcardRate",
                              "packSize"
                            ]
                          }
                        ]
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string",
                        "nullable": true
                      }
                    },
                    "required": [
                      "id",
                      "teamId",
                      "name",
                      "type",
                      "config",
                      "createdAt",
                      "updatedAt"
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/users": {
      "post": {
        "operationId": "users-create",
        "summary": "Create a user",
        "description": "Creates a new user within the specified team, associating the user with the team and enabling them to interact with its resources and systems. This endpoint can be used to add players, administrators, or other roles to a team, linking them with unique identifiers for tracking and management.",
        "tags": [
          "users"
        ],
        "security": [
          {
            "BasicAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "externalId": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 191
                    },
                    "externalId": {
                      "type": "string",
                      "nullable": true,
                      "maxLength": 191
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string",
                      "nullable": true
                    },
                    "teamId": {
                      "type": "string",
                      "maxLength": 191
                    }
                  },
                  "required": [
                    "id",
                    "externalId",
                    "createdAt",
                    "updatedAt",
                    "teamId"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "users-delete",
        "summary": "Delete a user",
        "tags": [
          "users"
        ],
        "security": [
          {
            "BasicAuth": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "users-list",
        "summary": "List Users",
        "description": "Lists all users belonging to the specified team. Users can own item instances or interact with spaces.",
        "tags": [
          "users"
        ],
        "security": [
          {
            "BasicAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 191
                      },
                      "externalId": {
                        "type": "string",
                        "nullable": true,
                        "maxLength": 191
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string",
                        "nullable": true
                      },
                      "teamId": {
                        "type": "string",
                        "maxLength": 191
                      }
                    },
                    "required": [
                      "id",
                      "externalId",
                      "createdAt",
                      "updatedAt",
                      "teamId"
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/users/{userId}/spaces": {
      "post": {
        "operationId": "userSpaces-create",
        "summary": "Create a user space",
        "description": "Creating a user space, allows the user to receive and store item instances.",
        "tags": [
          "user-spaces"
        ],
        "security": [
          {
            "BasicAuth": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "userId",
            "schema": {
              "type": "string",
              "maxLength": 191
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "externalId": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 191
                  },
                  "spaceId": {
                    "type": "string",
                    "maxLength": 191
                  }
                },
                "required": [
                  "spaceId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 191
                    },
                    "teamId": {
                      "type": "string",
                      "maxLength": 191
                    },
                    "userId": {
                      "type": "string",
                      "maxLength": 191
                    },
                    "externalId": {
                      "type": "string",
                      "nullable": true,
                      "maxLength": 191
                    },
                    "spaceId": {
                      "type": "string",
                      "maxLength": 191
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "required": [
                    "id",
                    "teamId",
                    "userId",
                    "externalId",
                    "spaceId",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "userSpaces-list",
        "summary": "List user spaces",
        "tags": [
          "user-spaces"
        ],
        "security": [
          {
            "BasicAuth": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "userId",
            "schema": {
              "type": "string",
              "maxLength": 191
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 191
                      },
                      "teamId": {
                        "type": "string",
                        "maxLength": 191
                      },
                      "userId": {
                        "type": "string",
                        "maxLength": 191
                      },
                      "externalId": {
                        "type": "string",
                        "nullable": true,
                        "maxLength": 191
                      },
                      "spaceId": {
                        "type": "string",
                        "maxLength": 191
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string",
                        "nullable": true
                      },
                      "space": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "maxLength": 191
                          },
                          "name": {
                            "type": "string",
                            "maxLength": 191
                          },
                          "cols": {
                            "type": "number"
                          },
                          "rows": {
                            "type": "number"
                          },
                          "createdAt": {
                            "type": "string"
                          },
                          "updatedAt": {
                            "type": "string",
                            "nullable": true
                          },
                          "teamId": {
                            "type": "string",
                            "maxLength": 191
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "cols",
                          "rows",
                          "createdAt",
                          "updatedAt",
                          "teamId"
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "teamId",
                      "userId",
                      "externalId",
                      "spaceId",
                      "createdAt",
                      "updatedAt",
                      "space"
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/users/{userId}/spaces/{id}": {
      "delete": {
        "operationId": "userSpaces-delete",
        "summary": "Delete a user space",
        "tags": [
          "user-spaces"
        ],
        "security": [
          {
            "BasicAuth": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "maxLength": 191
            },
            "required": true
          },
          {
            "in": "path",
            "name": "userId",
            "schema": {
              "type": "string",
              "maxLength": 191
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/item-instance-spaces": {
      "get": {
        "operationId": "itemInstanceSpaces-list",
        "summary": "List Item Instance Spaces",
        "description": "Lists all spaces where item instances are currently stored within a team. Item instance spaces map items to specific user-defined locations.",
        "tags": [
          "item-instance-spaces"
        ],
        "security": [
          {
            "BasicAuth": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "teamUserSpaceId",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "maxLength": 191
              }
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "spacePositionX": {
                        "type": "number"
                      },
                      "spacePositionY": {
                        "type": "number"
                      },
                      "itemInstanceId": {
                        "type": "string",
                        "maxLength": 191
                      },
                      "teamUserSpaceId": {
                        "type": "string",
                        "maxLength": 191
                      },
                      "itemInstance": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "maxLength": 191
                          },
                          "itemId": {
                            "type": "string",
                            "maxLength": 191
                          },
                          "teamId": {
                            "type": "string",
                            "maxLength": 191
                          },
                          "createdAt": {
                            "type": "string"
                          },
                          "updatedAt": {
                            "type": "string",
                            "nullable": true
                          },
                          "item": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "maxLength": 191
                              }
                            },
                            "required": [
                              "name"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "itemId",
                          "teamId",
                          "createdAt",
                          "updatedAt",
                          "item"
                        ]
                      }
                    },
                    "required": [
                      "spacePositionX",
                      "spacePositionY",
                      "itemInstanceId",
                      "teamUserSpaceId",
                      "itemInstance"
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "BasicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    },
    "schemas": {
      "error.BAD_REQUEST": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "The error message",
            "example": "Invalid input data"
          },
          "code": {
            "type": "string",
            "description": "The error code",
            "example": "BAD_REQUEST"
          },
          "issues": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "message"
              ]
            },
            "description": "An array of issues that were responsible for the error",
            "example": []
          }
        },
        "required": [
          "message",
          "code"
        ],
        "title": "Invalid input data error (400)",
        "description": "The error information",
        "example": {
          "code": "BAD_REQUEST",
          "message": "Invalid input data",
          "issues": []
        }
      },
      "error.UNAUTHORIZED": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "The error message",
            "example": "Authorization not provided"
          },
          "code": {
            "type": "string",
            "description": "The error code",
            "example": "UNAUTHORIZED"
          },
          "issues": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "message"
              ]
            },
            "description": "An array of issues that were responsible for the error",
            "example": []
          }
        },
        "required": [
          "message",
          "code"
        ],
        "title": "Authorization not provided error (401)",
        "description": "The error information",
        "example": {
          "code": "UNAUTHORIZED",
          "message": "Authorization not provided",
          "issues": []
        }
      },
      "error.FORBIDDEN": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "The error message",
            "example": "Insufficient access"
          },
          "code": {
            "type": "string",
            "description": "The error code",
            "example": "FORBIDDEN"
          },
          "issues": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "message"
              ]
            },
            "description": "An array of issues that were responsible for the error",
            "example": []
          }
        },
        "required": [
          "message",
          "code"
        ],
        "title": "Insufficient access error (403)",
        "description": "The error information",
        "example": {
          "code": "FORBIDDEN",
          "message": "Insufficient access",
          "issues": []
        }
      },
      "error.INTERNAL_SERVER_ERROR": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "The error message",
            "example": "Internal server error"
          },
          "code": {
            "type": "string",
            "description": "The error code",
            "example": "INTERNAL_SERVER_ERROR"
          },
          "issues": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "message"
              ]
            },
            "description": "An array of issues that were responsible for the error",
            "example": []
          }
        },
        "required": [
          "message",
          "code"
        ],
        "title": "Internal server error error (500)",
        "description": "The error information",
        "example": {
          "code": "INTERNAL_SERVER_ERROR",
          "message": "Internal server error",
          "issues": []
        }
      },
      "error.NOT_FOUND": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "The error message",
            "example": "Not found"
          },
          "code": {
            "type": "string",
            "description": "The error code",
            "example": "NOT_FOUND"
          },
          "issues": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "message"
              ]
            },
            "description": "An array of issues that were responsible for the error",
            "example": []
          }
        },
        "required": [
          "message",
          "code"
        ],
        "title": "Not found error (404)",
        "description": "The error information",
        "example": {
          "code": "NOT_FOUND",
          "message": "Not found",
          "issues": []
        }
      }
    }
  }
}