{ "openapi": "3.0.0", "paths": { "/characters": { "get": { "operationId": "CharacterController_findAll", "parameters": [ { "name": "page", "required": true, "in": "query", "schema": { "type": "number" } }, { "name": "offset", "required": true, "in": "query", "schema": { "type": "number" } }, { "name": "name", "required": true, "in": "query", "schema": { "type": "string" } }, { "name": "sort", "required": true, "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Characters found successfully", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/IPaginatedResponse" }, { "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Character" } } } } ] } } } } }, "security": [], "summary": "Get a collection of paginated characters", "tags": [ "Character" ] } }, "/characters/{id}": { "get": { "operationId": "CharacterController_findOne", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The ID of the character to get", "schema": { "example": "507f1f77bcf86cd799439011", "type": "string" } } ], "responses": { "200": { "description": "Character found successfully", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/IResponse" }, { "properties": { "data": { "$ref": "#/components/schemas/Character" } } } ] } } } }, "400": { "description": "Error while fetching character #ID: Id is not a valid mongoose id", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Character #ID not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "410": { "description": "Character #ID has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "summary": "Get a character by ID", "tags": [ "Character" ] }, "delete": { "operationId": "CharacterController_remove", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The ID of the character to delete", "schema": { "example": "507f1f77bcf86cd799439011", "type": "string" } } ], "responses": { "200": { "description": "Character #ID deleted", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/IResponse" }, { "properties": { "data": { "$ref": "#/components/schemas/Character" } } } ] } } } }, "400": { "description": "Error while fetching character #ID: Id is not a valid mongoose id", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Character #ID not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "410": { "description": "Character #ID has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "summary": "Delete a character by ID", "tags": [ "Character" ] } }, "/metrics": { "get": { "operationId": "PrometheusController_index", "parameters": [], "responses": { "200": { "description": "" } }, "tags": [ "Prometheus" ] } }, "/characters/npcs": { "post": { "operationId": "NpcController_createNpc", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateNpcDto" } } } }, "responses": { "200": { "description": "The NPC has been successfully created.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/IResponse" }, { "properties": { "data": { "$ref": "#/components/schemas/NPC" } } } ] } } } }, "400": { "description": "Validation error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "summary": "Create a new NPC", "tags": [ "Npc" ] } }, "/characters/npcs/{id}": { "patch": { "operationId": "NpcController_update", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The ID of the NPC to update", "schema": { "example": "507f1f77bcf86cd799439011", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateNpcDto" } } } }, "responses": { "200": { "description": "Campaign updated successfully", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/IResponse" }, { "properties": { "data": { "$ref": "#/components/schemas/NPC" } } } ] } } } }, "400": { "description": "Validation error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "NPC #ID not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "410": { "description": "NPC #ID has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "summary": "Update a NPC by ID", "tags": [ "Npc" ] } }, "/characters/players": { "post": { "operationId": "PlayerController_createPlayer", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreatePlayerDto" } } } }, "responses": { "200": { "description": "The player has been successfully created.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/IResponse" }, { "properties": { "data": { "$ref": "#/components/schemas/Player" } } } ] } } } }, "400": { "description": "Validation error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "summary": "Create a new player", "tags": [ "Player" ] } }, "/characters/players/without-group": { "get": { "operationId": "PlayerController_getPlayersWithoutGroup", "parameters": [ { "name": "page", "required": true, "in": "query", "schema": { "type": "number" } }, { "name": "offset", "required": true, "in": "query", "schema": { "type": "number" } }, { "name": "sort", "required": true, "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Players found successfully", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/IPaginatedResponse" }, { "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Player" } } } } ] } } } } }, "summary": "Get a collection of paginated players", "tags": [ "Player" ] } }, "/characters/players/{id}": { "patch": { "operationId": "PlayerController_update", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The ID of the player to update", "schema": { "example": "507f1f77bcf86cd799439011", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdatePlayerDto" } } } }, "responses": { "200": { "description": "Player updated successfully", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/IResponse" }, { "properties": { "data": { "$ref": "#/components/schemas/Player" } } } ] } } } }, "400": { "description": "Validation error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Player #ID not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "410": { "description": "Player #ID has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "summary": "Update a player by ID", "tags": [ "Player" ] } }, "/groups": { "post": { "operationId": "GroupController_create", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateGroupDto" } } } }, "responses": { "200": { "description": "The group has been successfully created.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/IResponse" }, { "properties": { "data": { "$ref": "#/components/schemas/Group" } } } ] } } } }, "400": { "description": "Validation error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "summary": "Create a new group", "tags": [ "Group" ] }, "get": { "operationId": "GroupController_findAll", "parameters": [ { "name": "page", "required": true, "in": "query", "schema": { "type": "number" } }, { "name": "offset", "required": true, "in": "query", "schema": { "type": "number" } }, { "name": "label", "required": true, "in": "query", "schema": { "type": "string" } }, { "name": "sort", "required": true, "in": "query", "schema": { "type": "string" } }, { "name": "onlyWithMembers", "required": true, "in": "query", "schema": { "type": "boolean" } } ], "responses": { "200": { "description": "Groups found successfully", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/IPaginatedResponse" }, { "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Group" } } } } ] } } } } }, "security": [], "summary": "Get a collection of paginated groups", "tags": [ "Group" ] } }, "/groups/{id}/characters": { "get": { "operationId": "GroupController_findAllCharacters", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "$ref": "#/components/schemas/ObjectId" } }, { "name": "page", "required": true, "in": "query", "schema": { "type": "number" } }, { "name": "offset", "required": true, "in": "query", "schema": { "type": "number" } }, { "name": "name", "required": true, "in": "query", "schema": { "type": "string" } }, { "name": "sort", "required": true, "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Characters found successfully", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/IPaginatedResponse" }, { "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Character" } } } } ] } } } } }, "security": [], "summary": "Get a collection of paginated groups's characters", "tags": [ "Group" ] } }, "/groups/{id}": { "get": { "operationId": "GroupController_findOne", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The ID of the group to get", "schema": { "example": "507f1f77bcf86cd799439011", "type": "string" } } ], "responses": { "200": { "description": "Group found successfully", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/IResponse" }, { "properties": { "data": { "$ref": "#/components/schemas/Group" } } } ] } } } }, "400": { "description": "Error while fetching group #ID: Id is not a valid mongoose id", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Group #ID not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "410": { "description": "Group #ID has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "summary": "Get a group by ID", "tags": [ "Group" ] }, "patch": { "operationId": "GroupController_update", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The ID of the group to update", "schema": { "example": "507f1f77bcf86cd799439011", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateGroupDto" } } } }, "responses": { "200": { "description": "Group updated successfully", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/IResponse" }, { "properties": { "data": { "$ref": "#/components/schemas/Group" } } } ] } } } }, "400": { "description": "Validation error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Group #ID not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "410": { "description": "Group #ID has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "summary": "Update a group by ID", "tags": [ "Group" ] }, "delete": { "operationId": "GroupController_remove", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The ID of the group to delete", "schema": { "example": "507f1f77bcf86cd799439011", "type": "string" } } ], "responses": { "200": { "description": "Group #ID deleted", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/IResponse" }, { "properties": { "data": { "$ref": "#/components/schemas/Group" } } } ] } } } }, "400": { "description": "Error while fetching group #ID: Id is not a valid mongoose id", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Group #ID not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "410": { "description": "Group #ID has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "summary": "Delete a group by ID", "tags": [ "Group" ] } }, "/campaigns": { "post": { "operationId": "CampaignController_create", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateCampaignDto" } } } }, "responses": { "200": { "description": "The campaign has been successfully created.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/IResponse" }, { "properties": { "data": { "$ref": "#/components/schemas/Campaign" } } } ] } } } }, "400": { "description": "Validation error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "summary": "Create a new campaign", "tags": [ "Campaign" ] }, "get": { "operationId": "CampaignController_findAll", "parameters": [ { "name": "page", "required": true, "in": "query", "schema": { "type": "number" } }, { "name": "offset", "required": true, "in": "query", "schema": { "type": "number" } }, { "name": "sort", "required": true, "in": "query", "schema": { "type": "string" } }, { "name": "label", "required": true, "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Campaigns found successfully", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/IPaginatedResponse" }, { "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Campaign" } } } } ] } } } } }, "security": [], "summary": "Get a collection of paginated campaigns", "tags": [ "Campaign" ] } }, "/campaigns/{id}/groups": { "get": { "operationId": "CampaignController_findAllGroups", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "$ref": "#/components/schemas/ObjectId" } }, { "name": "page", "required": true, "in": "query", "schema": { "type": "number" } }, { "name": "offset", "required": true, "in": "query", "schema": { "type": "number" } }, { "name": "sort", "required": true, "in": "query", "schema": { "type": "string" } }, { "name": "label", "required": true, "in": "query", "schema": { "type": "string" } }, { "name": "type", "required": true, "in": "query", "schema": { "type": "string" } }, { "name": "onlyWithMembers", "required": true, "in": "query", "schema": { "type": "boolean" } } ], "responses": { "200": { "description": "Groups found successfully", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/IPaginatedResponse" }, { "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Group" } } } } ] } } } } }, "security": [], "summary": "Get a collection of paginated campaigns's groups", "tags": [ "Campaign" ] } }, "/campaigns/{id}": { "get": { "operationId": "CampaignController_findOne", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The ID of the campaign to get", "schema": { "example": "507f1f77bcf86cd799439011", "type": "string" } } ], "responses": { "200": { "description": "Campaign found successfully", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/IResponse" }, { "properties": { "data": { "$ref": "#/components/schemas/Campaign" } } } ] } } } }, "400": { "description": "Error while fetching campaign #ID: Id is not a valid mongoose id", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Campaign #ID not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "410": { "description": "Campaign #ID has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "summary": "Get a campaign by ID", "tags": [ "Campaign" ] }, "patch": { "operationId": "CampaignController_update", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The ID of the campaign to update", "schema": { "example": "507f1f77bcf86cd799439011", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateCampaignDto" } } } }, "responses": { "200": { "description": "Campaign updated successfully", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/IResponse" }, { "properties": { "data": { "$ref": "#/components/schemas/Campaign" } } } ] } } } }, "400": { "description": "Validation error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Campaign #ID not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "410": { "description": "Campaign #ID has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "summary": "Update a campaign by ID", "tags": [ "Campaign" ] }, "delete": { "operationId": "CampaignController_remove", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The ID of the campaign to delete", "schema": { "example": "507f1f77bcf86cd799439011", "type": "string" } } ], "responses": { "200": { "description": "Campaign #ID deleted", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/IResponse" }, { "properties": { "data": { "$ref": "#/components/schemas/Campaign" } } } ] } } } }, "400": { "description": "Error while fetching campaign #ID: Id is not a valid mongoose id", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Campaign #ID not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "410": { "description": "Campaign #ID has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "summary": "Delete a campaign by ID", "tags": [ "Campaign" ] } }, "/user/me": { "get": { "operationId": "UserController_findOne", "parameters": [], "responses": { "401": { "description": "User not authenticated" }, "default": { "description": "User information retrieved successfully", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/IResponse" }, { "properties": { "data": { "$ref": "#/components/schemas/UserInfoDto" } } } ] } } } } }, "summary": "Get current authenticated user information", "tags": [ "User" ] }, "put": { "operationId": "UserController_updateProfile", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateUserProfileDto" } } } }, "responses": { "200": { "description": "User profile updated successfully", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/IResponse" }, { "properties": { "data": { "$ref": "#/components/schemas/UserInfoDto" } } } ] } } } }, "400": { "description": "Invalid input data" }, "401": { "description": "User not authenticated" }, "404": { "description": "User not found in Keycloak" }, "500": { "description": "Internal server error or Keycloak communication failure" } }, "summary": "Update current authenticated user profile", "tags": [ "User" ] } }, "/user/me/password": { "put": { "operationId": "UserController_changePassword", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChangePasswordDto" } } } }, "responses": { "200": { "description": "Password changed successfully", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/IResponse" }, { "properties": { "message": { "type": "string", "example": "Password changed successfully" } } } ] } } } }, "400": { "description": "Invalid input - validation failed" }, "401": { "description": "Current password is incorrect" }, "403": { "description": "New password does not meet complexity requirements" }, "500": { "description": "Keycloak API error" } }, "summary": "Change password for current authenticated user", "tags": [ "User" ] } } }, "info": { "title": "Adventure API", "description": "Adventure API Documentation", "version": "1.0.0", "contact": {} }, "tags": [], "servers": [ { "url": "http://localhost:9000" } ], "components": { "securitySchemes": { "oauth2": { "type": "oauth2", "flows": { "authorizationCode": { "authorizationUrl": "http://localhost:8080/auth/realms/chariot/protocol/openid-connect/auth", "tokenUrl": "http://localhost:8080/auth/realms/chariot/protocol/openid-connect/token", "scopes": { "openid": "OpenID Connect" } } } } }, "schemas": { "ProblemDetailsDto": { "type": "object", "properties": { "type": { "type": "string", "example": "https://httpstatuses.io/400" }, "title": { "type": "string", "example": "Bad request" }, "status": { "type": "number", "example": 400 }, "instance": { "type": "string", "example": "/campaigns" }, "detail": { "type": "string", "example": "The 'name' field is required." } }, "required": [ "type", "title", "status", "instance" ] }, "IResponse": { "type": "object", "properties": { "message": { "type": "string", "example": "Campaign #507f1f77bcf86cd799439011 found in 5ms" }, "data": { "type": "object" } }, "required": [ "message", "data" ] }, "SchemaObjectId": { "type": "object", "properties": {} }, "Speed": { "type": "object", "properties": { "walk": { "type": "number", "example": 30 }, "climb": { "type": "number", "example": 15 }, "swim": { "type": "number", "example": 20 }, "fly": { "type": "number", "example": 60 }, "burrow": { "type": "number", "example": 10 } }, "required": [ "walk", "climb", "swim", "fly", "burrow" ] }, "AbilityScores": { "type": "object", "properties": { "strength": { "type": "number", "example": 10 }, "dexterity": { "type": "number", "example": 10 }, "constitution": { "type": "number", "example": 10 }, "intelligence": { "type": "number", "example": 10 }, "wisdom": { "type": "number", "example": 10 }, "charisma": { "type": "number", "example": 10 } }, "required": [ "strength", "dexterity", "constitution", "intelligence", "wisdom", "charisma" ] }, "SavingThrows": { "type": "object", "properties": { "strength": { "type": "number", "example": 0 }, "dexterity": { "type": "number", "example": 0 }, "constitution": { "type": "number", "example": 0 }, "intelligence": { "type": "number", "example": 0 }, "wisdom": { "type": "number", "example": 0 }, "charisma": { "type": "number", "example": 0 } }, "required": [ "strength", "dexterity", "constitution", "intelligence", "wisdom", "charisma" ] }, "Skills": { "type": "object", "properties": { "athletics": { "type": "number", "example": 0 }, "acrobatics": { "type": "number", "example": 0 }, "sleightHand": { "type": "number", "example": 0 }, "stealth": { "type": "number", "example": 0 }, "arcana": { "type": "number", "example": 0 }, "history": { "type": "number", "example": 0 }, "investigation": { "type": "number", "example": 0 }, "nature": { "type": "number", "example": 0 }, "religion": { "type": "number", "example": 0 }, "animalHandling": { "type": "number", "example": 0 }, "insight": { "type": "number", "example": 0 }, "medicine": { "type": "number", "example": 0 }, "perception": { "type": "number", "example": 0 }, "survival": { "type": "number", "example": 0 }, "deception": { "type": "number", "example": 0 }, "intimidation": { "type": "number", "example": 0 }, "performance": { "type": "number", "example": 0 }, "persuasion": { "type": "number", "example": 0 } }, "required": [ "athletics", "acrobatics", "sleightHand", "stealth", "arcana", "history", "investigation", "nature", "religion", "animalHandling", "insight", "medicine", "perception", "survival", "deception", "intimidation", "performance", "persuasion" ] }, "Sense": { "type": "object", "properties": { "name": { "type": "string", "example": "Darkvision" }, "value": { "type": "number", "example": 60 } }, "required": [ "name", "value" ] }, "Stats": { "type": "object", "properties": { "size": { "type": "string", "example": "Medium" }, "maxHitPoints": { "type": "number", "example": 100 }, "currentHitPoints": { "type": "number", "example": 100 }, "tempHitPoints": { "type": "number", "example": 0 }, "armorClass": { "type": "number", "example": 15 }, "initiative": { "type": "number", "example": 3 }, "speed": { "$ref": "#/components/schemas/Speed" }, "abilityScores": { "$ref": "#/components/schemas/AbilityScores" }, "languages": { "example": [ "Common", "Elvish" ], "type": "array", "items": { "type": "string" } }, "passivePerception": { "type": "number", "example": 10 }, "savingThrows": { "$ref": "#/components/schemas/SavingThrows" }, "skills": { "$ref": "#/components/schemas/Skills" }, "senses": { "type": "array", "items": { "$ref": "#/components/schemas/Sense" } } }, "required": [ "size", "maxHitPoints", "currentHitPoints", "tempHitPoints", "armorClass", "initiative", "speed", "abilityScores", "languages", "passivePerception", "savingThrows", "skills", "senses" ] }, "Affinities": { "type": "object", "properties": { "resistances": { "example": [ "Fire", "Water" ], "type": "array", "items": { "type": "string" } }, "immunities": { "example": [ "Ice", "Poison" ], "type": "array", "items": { "type": "string" } }, "vulnerabilities": { "example": [ "Earth", "Lightning" ], "type": "array", "items": { "type": "string" } } }, "required": [ "resistances", "immunities", "vulnerabilities" ] }, "Ability": { "type": "object", "properties": { "name": { "type": "string", "example": "Stealth" }, "description": { "type": "string", "example": "Allows the character to move unseen and unheard" } }, "required": [ "name", "description" ] }, "Map": { "type": "object", "properties": {} }, "DamageDetails": { "type": "object", "properties": { "diceCount": { "type": "number", "example": 8, "description": "Nombre de dés" }, "diceType": { "type": "string", "example": "d6", "description": "Type de dé", "enum": [ "d4", "d6", "d8", "d10", "d12", "d20", "d100" ] }, "bonus": { "type": "number", "example": 3, "description": "Bonus aux dégâts" }, "damageType": { "type": "string", "example": "Feu", "description": "Type de dégâts" } }, "required": [ "diceCount", "diceType", "bonus", "damageType" ] }, "HealingDetails": { "type": "object", "properties": { "diceCount": { "type": "number", "example": 4, "description": "Nombre de dés" }, "diceType": { "type": "string", "example": "d8", "description": "Type de dé", "enum": [ "d4", "d6", "d8", "d10", "d12", "d20", "d100" ] }, "bonus": { "type": "number", "example": 3, "description": "Bonus aux soins" } }, "required": [ "diceCount", "diceType", "bonus" ] }, "Spell": { "type": "object", "properties": { "name": { "type": "string", "example": "Fireball" }, "level": { "type": "number", "example": 3 }, "school": { "type": "string", "example": "Evocation" }, "description": { "type": "string", "example": "A bright streak flashes from your pointing finger to a point you choose within range..." }, "components": { "example": [ "V", "S", "M" ], "type": "array", "items": { "type": "string" } }, "castingTime": { "type": "string", "example": "1 action" }, "duration": { "type": "string", "example": "1 minute" }, "range": { "type": "string", "example": "60 feet" }, "effectType": { "type": "string", "example": "attack", "enum": [ "attack", "heal", "utility" ] }, "damage": { "type": "string", "example": "8d6" }, "damageDetails": { "$ref": "#/components/schemas/DamageDetails" }, "healing": { "type": "string", "example": "4d8" }, "healingDetails": { "$ref": "#/components/schemas/HealingDetails" } }, "required": [ "name", "level", "school", "description", "components", "castingTime", "duration", "range", "effectType", "damage", "damageDetails", "healing", "healingDetails" ] }, "Spellcasting": { "type": "object", "properties": { "className": { "type": "string", "example": "Wizard" }, "ability": { "type": "string", "example": "Intelligence" }, "saveDC": { "type": "number", "example": 15 }, "attackBonus": { "type": "number", "example": 7 }, "spellSlotsByLevel": { "example": { "1": { "total": 4, "used": 1 }, "2": { "total": 3, "used": 0 } }, "allOf": [ { "$ref": "#/components/schemas/Map" } ] }, "totalSlots": { "type": "number", "example": 10 }, "spells": { "type": "array", "items": { "$ref": "#/components/schemas/Spell" } } }, "required": [ "className", "ability", "saveDC", "attackBonus", "spellSlotsByLevel", "totalSlots", "spells" ] }, "Appearance": { "type": "object", "properties": { "age": { "type": "number", "example": 25 }, "height": { "type": "number", "example": 180 }, "weight": { "type": "number", "example": 75 }, "eyes": { "type": "string", "example": "Blue" }, "skin": { "type": "string", "example": "Light" }, "hair": { "type": "string", "example": "Brown" }, "description": { "type": "string", "example": "Athletic build with a friendly face." } }, "required": [ "age", "height", "weight", "eyes", "skin", "hair", "description" ] }, "Background": { "type": "object", "properties": { "personalityTraits": { "type": "string", "example": "Born in a small village, raised by farmers." }, "ideals": { "type": "string", "example": "To protect my loved ones at all costs." }, "bonds": { "type": "string", "example": "My family is everything to me." }, "flaws": { "type": "string", "example": "I have a quick temper and a tendency to act before thinking." }, "alliesAndOrgs": { "type": "string", "example": "Member of the Silver Hand organization." }, "backstory": { "type": "string", "example": "Born in a small village, I was trained as a warrior from a young age..." } }, "required": [ "personalityTraits", "ideals", "bonds", "flaws", "alliesAndOrgs", "backstory" ] }, "Treasure": { "type": "object", "properties": { "cp": { "type": "number", "example": 0 }, "sp": { "type": "number", "example": 0 }, "ep": { "type": "number", "example": 0 }, "gp": { "type": "number", "example": 0 }, "pp": { "type": "number", "example": 0 }, "treasure": { "type": "string", "example": "Some notes about the treasure." }, "equipment": { "type": "string", "example": "Some notes about the equipment." } }, "required": [ "cp", "sp", "ep", "gp", "pp", "treasure", "equipment" ] }, "Conditions": { "type": "object", "properties": { "blinded": { "type": "boolean", "example": false, "description": "Character is blinded" }, "charmed": { "type": "boolean", "example": false, "description": "Character is charmed" }, "deafened": { "type": "boolean", "example": false, "description": "Character is deafened" }, "frightened": { "type": "boolean", "example": false, "description": "Character is frightened" }, "grappled": { "type": "boolean", "example": false, "description": "Character is grappled" }, "incapacitated": { "type": "boolean", "example": false, "description": "Character is incapacitated" }, "invisible": { "type": "boolean", "example": false, "description": "Character is invisible" }, "paralyzed": { "type": "boolean", "example": false, "description": "Character is paralyzed" }, "petrified": { "type": "boolean", "example": false, "description": "Character is petrified" }, "poisoned": { "type": "boolean", "example": false, "description": "Character is poisoned" }, "prone": { "type": "boolean", "example": false, "description": "Character is prone" }, "restrained": { "type": "boolean", "example": false, "description": "Character is restrained" }, "stunned": { "type": "boolean", "example": false, "description": "Character is stunned" }, "unconscious": { "type": "boolean", "example": false, "description": "Character is unconscious" } }, "required": [ "blinded", "charmed", "deafened", "frightened", "grappled", "incapacitated", "invisible", "paralyzed", "petrified", "poisoned", "prone", "restrained", "stunned", "unconscious" ] }, "Group": { "type": "object", "properties": { "_id": { "example": "507f1f77bcf86cd799439011", "allOf": [ { "$ref": "#/components/schemas/SchemaObjectId" } ] }, "label": { "type": "string", "example": "Adventurers" }, "characters": { "example": [ "507f1f77bcf86cd799439011", "507f1f77bcf86cd799439012" ], "type": "array", "items": { "type": "string" } }, "campaigns": { "example": [ "507f1f77bcf86cd799439011", "507f1f77bcf86cd799439012" ], "type": "array", "items": { "type": "string" } }, "deletedAt": { "format": "date-time", "type": "string", "example": null } }, "required": [ "_id", "label", "characters", "campaigns", "deletedAt" ] }, "Damage": { "type": "object", "properties": { "dice": { "type": "string", "example": "1d6+2" }, "type": { "type": "string", "example": "slashing" } }, "required": [ "dice", "type" ] }, "DifficultyClass": { "type": "object", "properties": { "dcType": { "type": "string", "example": "wis", "description": "Ability score type for the saving throw" }, "dcValue": { "type": "number", "example": 18, "description": "DC value to beat" }, "successType": { "type": "string", "example": "none", "description": "Effect on successful save" } }, "required": [ "dcType", "dcValue", "successType" ] }, "Action": { "type": "object", "properties": { "name": { "type": "string", "example": "Bite" }, "type": { "type": "string", "example": "Melee Weapon Attack" }, "description": { "type": "string", "example": "The target must succeed on a DC 18 Constitution saving throw or be paralyzed for 1 minute." }, "attackBonus": { "type": "number", "example": 5 }, "damage": { "type": "array", "items": { "$ref": "#/components/schemas/Damage" } }, "range": { "type": "string", "example": "5 ft." }, "dc": { "$ref": "#/components/schemas/DifficultyClass" }, "cost": { "type": "number", "example": 2, "description": "Cost of the action (for legendary actions)" } }, "required": [ "name", "type", "description", "attackBonus", "damage", "range", "dc", "cost" ] }, "Actions": { "type": "object", "properties": { "standard": { "type": "array", "items": { "$ref": "#/components/schemas/Action" } }, "legendary": { "type": "array", "items": { "$ref": "#/components/schemas/Action" } }, "lair": { "type": "array", "items": { "$ref": "#/components/schemas/Action" } } }, "required": [ "standard", "legendary", "lair" ] }, "Challenge": { "type": "object", "properties": { "challengeRating": { "type": "number", "example": 3 }, "experiencePoints": { "type": "number", "example": 700 } }, "required": [ "challengeRating", "experiencePoints" ] }, "NPCProfile": { "type": "object", "properties": { "alignment": { "type": "string", "example": "Chaotic Good" }, "type": { "type": "string", "example": "Goblin" }, "subtype": { "type": "string", "example": "Humanoid" } }, "required": [ "alignment", "type", "subtype" ] }, "NPC": { "type": "object", "properties": { "_id": { "example": "60d21b4667d0d8992e610c85", "allOf": [ { "$ref": "#/components/schemas/SchemaObjectId" } ] }, "firstname": { "type": "string", "example": "Aragorn" }, "lastname": { "type": "string", "example": "Elessar" }, "surname": { "type": "string", "example": "Fils d'Arathorn" }, "avatar": { "type": "string", "example": "http://example.com/avatar.png" }, "stats": { "$ref": "#/components/schemas/Stats" }, "affinities": { "$ref": "#/components/schemas/Affinities" }, "abilities": { "type": "array", "items": { "$ref": "#/components/schemas/Ability" } }, "spellcasting": { "type": "array", "items": { "$ref": "#/components/schemas/Spellcasting" } }, "appearance": { "$ref": "#/components/schemas/Appearance" }, "background": { "$ref": "#/components/schemas/Background" }, "treasure": { "$ref": "#/components/schemas/Treasure" }, "conditions": { "$ref": "#/components/schemas/Conditions" }, "groups": { "type": "array", "items": { "$ref": "#/components/schemas/Group" } }, "deletedAt": { "format": "date-time", "type": "string", "example": null }, "actions": { "$ref": "#/components/schemas/Actions" }, "challenge": { "$ref": "#/components/schemas/Challenge" }, "profile": { "$ref": "#/components/schemas/NPCProfile" }, "hitPointsRoll": { "type": "string", "example": "18d8+54" } }, "required": [ "_id", "firstname", "lastname", "surname", "avatar", "stats", "affinities", "abilities", "spellcasting", "appearance", "background", "treasure", "conditions", "groups", "deletedAt", "actions", "challenge", "profile" ] }, "AbilityScoresDto": { "type": "object", "properties": { "strength": { "type": "number", "example": 16 }, "dexterity": { "type": "number", "example": 14 }, "constitution": { "type": "number", "example": 15 }, "intelligence": { "type": "number", "example": 12 }, "wisdom": { "type": "number", "example": 13 }, "charisma": { "type": "number", "example": 10 } }, "required": [ "strength", "dexterity", "constitution", "intelligence", "wisdom", "charisma" ] }, "SavingThrowsDto": { "type": "object", "properties": { "strength": { "type": "number", "example": 16 }, "dexterity": { "type": "number", "example": 14 }, "constitution": { "type": "number", "example": 15 }, "intelligence": { "type": "number", "example": 12 }, "wisdom": { "type": "number", "example": 13 }, "charisma": { "type": "number", "example": 10 } }, "required": [ "strength", "dexterity", "constitution", "intelligence", "wisdom", "charisma" ] }, "SpeedDto": { "type": "object", "properties": { "walk": { "type": "number", "example": 30 }, "climb": { "type": "number", "example": 15 }, "swim": { "type": "number", "example": 20 }, "fly": { "type": "number", "example": 60 }, "burrow": { "type": "number", "example": 10 } }, "required": [ "walk", "climb", "swim", "fly", "burrow" ] }, "SkillDto": { "type": "object", "properties": { "athletics": { "type": "number", "example": 5 }, "acrobatics": { "type": "number", "example": 3 }, "sleightHand": { "type": "number", "example": 4 }, "stealth": { "type": "number", "example": 2 }, "arcana": { "type": "number", "example": 6 }, "history": { "type": "number", "example": 1 }, "investigation": { "type": "number", "example": 2 }, "nature": { "type": "number", "example": 3 }, "religion": { "type": "number", "example": 4 }, "animalHandling": { "type": "number", "example": 5 }, "insight": { "type": "number", "example": 6 }, "medicine": { "type": "number", "example": 4 }, "perception": { "type": "number", "example": 7 }, "survival": { "type": "number", "example": 3 }, "deception": { "type": "number", "example": 2 }, "intimidation": { "type": "number", "example": 5 }, "performance": { "type": "number", "example": 4 }, "persuasion": { "type": "number", "example": 6 } }, "required": [ "athletics", "acrobatics", "sleightHand", "stealth", "arcana", "history", "investigation", "nature", "religion", "animalHandling", "insight", "medicine", "perception", "survival", "deception", "intimidation", "performance", "persuasion" ] }, "SenseDto": { "type": "object", "properties": { "name": { "type": "string", "example": "Darkvision" }, "value": { "type": "number", "example": 60 } }, "required": [ "name", "value" ] }, "StatsDto": { "type": "object", "properties": { "size": { "type": "object", "example": "Medium" }, "maxHitPoints": { "type": "number", "example": 100 }, "currentHitPoints": { "type": "number", "example": 75 }, "tempHitPoints": { "type": "number", "example": 10 }, "armorClass": { "type": "number", "example": 15 }, "initiative": { "type": "number", "example": 3 }, "passivePerception": { "type": "number", "example": 12 }, "languages": { "example": [ "Common", "Elvish" ], "type": "array", "items": { "type": "string" } }, "abilityScores": { "$ref": "#/components/schemas/AbilityScoresDto" }, "savingThrows": { "$ref": "#/components/schemas/SavingThrowsDto" }, "speed": { "$ref": "#/components/schemas/SpeedDto" }, "skills": { "$ref": "#/components/schemas/SkillDto" }, "senses": { "type": "array", "items": { "$ref": "#/components/schemas/SenseDto" } } }, "required": [ "size", "maxHitPoints", "currentHitPoints", "tempHitPoints", "armorClass", "initiative", "passivePerception", "languages", "abilityScores", "savingThrows", "speed", "skills", "senses" ] }, "AffinitiesDto": { "type": "object", "properties": { "resistances": { "example": [ "Fire", "Water" ], "type": "array", "items": { "type": "string" } }, "immunities": { "example": [ "Ice", "Poison" ], "type": "array", "items": { "type": "string" } }, "vulnerabilities": { "example": [ "Earth", "Lightning" ], "type": "array", "items": { "type": "string" } } }, "required": [ "resistances", "immunities", "vulnerabilities" ] }, "AbilityDto": { "type": "object", "properties": { "name": { "type": "string", "example": "Fireball" }, "description": { "type": "string", "example": "A powerful fire-based attack that deals area damage" } }, "required": [ "name", "description" ] }, "DamageDetailsDto": { "type": "object", "properties": { "diceCount": { "type": "number", "example": 8, "description": "Nombre de dés" }, "diceType": { "type": "string", "example": "d6", "description": "Type de dé", "enum": [ "d4", "d6", "d8", "d10", "d12", "d20", "d100" ] }, "bonus": { "type": "number", "example": 3, "description": "Bonus aux dégâts" }, "damageType": { "type": "string", "example": "Feu", "description": "Type de dégâts" } }, "required": [ "diceCount", "diceType", "bonus", "damageType" ] }, "HealingDetailsDto": { "type": "object", "properties": { "diceCount": { "type": "number", "example": 4, "description": "Nombre de dés" }, "diceType": { "type": "string", "example": "d8", "description": "Type de dé", "enum": [ "d4", "d6", "d8", "d10", "d12", "d20", "d100" ] }, "bonus": { "type": "number", "example": 3, "description": "Bonus aux soins" } }, "required": [ "diceCount", "diceType", "bonus" ] }, "SpellDto": { "type": "object", "properties": { "name": { "type": "string", "example": "Fireball" }, "level": { "type": "number", "example": 3 }, "school": { "type": "string", "example": "Evocation" }, "description": { "type": "string", "example": "A bright streak flashes from your pointing finger to a point you choose within range..." }, "components": { "example": [ "V", "S", "M" ], "type": "array", "items": { "type": "string" } }, "castingTime": { "type": "string", "example": "1 action" }, "duration": { "type": "string", "example": "Instantaneous" }, "range": { "type": "string", "example": "150 feet" }, "effectType": { "type": "string", "example": "attack", "enum": [ "attack", "heal", "utility" ] }, "damage": { "type": "string", "example": "8d6" }, "damageDetails": { "$ref": "#/components/schemas/DamageDetailsDto" }, "healing": { "type": "string", "example": "4d8" }, "healingDetails": { "$ref": "#/components/schemas/HealingDetailsDto" } }, "required": [ "name", "level", "school", "description", "components", "castingTime", "duration", "range", "effectType", "damage", "damageDetails", "healing", "healingDetails" ] }, "SpellcastingDto": { "type": "object", "properties": { "className": { "type": "string", "example": "Wizard" }, "ability": { "type": "string", "example": "Intelligence" }, "saveDC": { "type": "number", "example": 15 }, "attackBonus": { "type": "number", "example": 7 }, "spellSlotsByLevel": { "example": { "1": { "total": 4, "used": 1 }, "2": { "total": 3, "used": 0 } }, "allOf": [ { "$ref": "#/components/schemas/Map" } ] }, "totalSlots": { "type": "number", "example": 10 }, "spells": { "type": "array", "items": { "$ref": "#/components/schemas/SpellDto" } } }, "required": [ "className", "ability", "saveDC", "attackBonus", "spellSlotsByLevel", "totalSlots", "spells" ] }, "AppearanceDto": { "type": "object", "properties": { "age": { "type": "number", "example": 25 }, "height": { "type": "number", "example": 180 }, "weight": { "type": "number", "example": 75 }, "eyes": { "type": "string", "example": "Blue" }, "skin": { "type": "string", "example": "Light" }, "hair": { "type": "string", "example": "Brown" }, "description": { "type": "string", "example": "Athletic build with a friendly face." } }, "required": [ "age", "height", "weight", "eyes", "skin", "hair", "description" ] }, "BackgroundDto": { "type": "object", "properties": { "personalityTraits": { "type": "string", "example": "Brave and cunning." }, "ideals": { "type": "string", "example": "To protect my loved ones at all costs." }, "bonds": { "type": "string", "example": "My family is everything to me." }, "flaws": { "type": "string", "example": "I have a quick temper and a tendency to act before thinking." }, "alliesAndOrgs": { "type": "string", "example": "Member of the Silver Hand organization." }, "backstory": { "type": "string", "example": "Born in a small village, I was trained as a warrior from a young age..." } }, "required": [ "personalityTraits", "ideals", "bonds", "flaws", "alliesAndOrgs", "backstory" ] }, "TreasureDto": { "type": "object", "properties": { "cp": { "type": "number", "example": 150 }, "sp": { "type": "number", "example": 75 }, "ep": { "type": "number", "example": 200 }, "gp": { "type": "number", "example": 500 }, "pp": { "type": "number", "example": 20 }, "treasure": { "type": "string", "example": "Found in a hidden chest behind the waterfall." }, "equipment": { "type": "string", "example": "Sword, shield, and leather armor." } }, "required": [ "cp", "sp", "ep", "gp", "pp", "treasure", "equipment" ] }, "ConditionsDto": { "type": "object", "properties": { "blinded": { "type": "boolean", "example": false, "description": "Character is blinded" }, "charmed": { "type": "boolean", "example": false, "description": "Character is charmed" }, "deafened": { "type": "boolean", "example": false, "description": "Character is deafened" }, "frightened": { "type": "boolean", "example": false, "description": "Character is frightened" }, "grappled": { "type": "boolean", "example": false, "description": "Character is grappled" }, "incapacitated": { "type": "boolean", "example": false, "description": "Character is incapacitated" }, "invisible": { "type": "boolean", "example": false, "description": "Character is invisible" }, "paralyzed": { "type": "boolean", "example": false, "description": "Character is paralyzed" }, "petrified": { "type": "boolean", "example": false, "description": "Character is petrified" }, "poisoned": { "type": "boolean", "example": false, "description": "Character is poisoned" }, "prone": { "type": "boolean", "example": false, "description": "Character is prone" }, "restrained": { "type": "boolean", "example": false, "description": "Character is restrained" }, "stunned": { "type": "boolean", "example": false, "description": "Character is stunned" }, "unconscious": { "type": "boolean", "example": false, "description": "Character is unconscious" } } }, "DamageDto": { "type": "object", "properties": { "dice": { "type": "string", "example": "2d6+3" }, "type": { "type": "string", "example": "fire" } }, "required": [ "dice", "type" ] }, "DifficultyClassDto": { "type": "object", "properties": { "dcType": { "type": "string", "example": "wis", "description": "Ability score type for the saving throw" }, "dcValue": { "type": "number", "example": 18, "description": "DC value to beat" }, "successType": { "type": "string", "example": "none", "description": "Effect on successful save" } }, "required": [ "dcType", "dcValue", "successType" ] }, "ActionDto": { "type": "object", "properties": { "name": { "type": "string", "example": "Fireball" }, "type": { "type": "string", "example": "A ball of fire that explodes upon impact." }, "description": { "type": "string", "example": "The target must succeed on a DC 18 Constitution saving throw or be paralyzed for 1 minute." }, "attackBonus": { "type": "number", "example": 5 }, "damage": { "type": "array", "items": { "$ref": "#/components/schemas/DamageDto" } }, "range": { "type": "string", "example": "30 feet" }, "dc": { "$ref": "#/components/schemas/DifficultyClassDto" }, "cost": { "type": "number", "example": 2, "description": "Cost of the action (for legendary actions)" } }, "required": [ "name", "type", "description", "attackBonus", "damage", "range", "dc", "cost" ] }, "ActionsDto": { "type": "object", "properties": { "standard": { "type": "array", "items": { "$ref": "#/components/schemas/ActionDto" } }, "legendary": { "type": "array", "items": { "$ref": "#/components/schemas/ActionDto" } }, "lair": { "type": "array", "items": { "$ref": "#/components/schemas/ActionDto" } } }, "required": [ "standard", "legendary", "lair" ] }, "ChallengeDto": { "type": "object", "properties": { "challengeRating": { "type": "number", "example": 3 }, "experiencePoints": { "type": "number", "example": 700 } }, "required": [ "challengeRating", "experiencePoints" ] }, "NPCProfileDto": { "type": "object", "properties": { "alignment": { "type": "string", "example": "Lawful Good", "enum": [ "Lawful Good", "Neutral Good", "Chaotic Good", "Lawful Neutral", "True Neutral", "Chaotic Neutral", "Lawful Evil", "Neutral Evil", "Chaotic Evil", "Unaligned", "Any Good Alignment", "Any Evil Alignment", "Any Lawful Alignment", "Any Chaotic Alignment" ] }, "type": { "type": "string", "example": "Goblin" }, "subtype": { "type": "string", "example": "Humanoid" } }, "required": [ "alignment", "type", "subtype" ] }, "CreateNpcDto": { "type": "object", "properties": { "firstname": { "type": "string", "example": "Aragorn" }, "lastname": { "type": "string", "example": "Elessar" }, "surname": { "type": "string", "example": "Fils d'Arathorn" }, "avatar": { "type": "string", "example": "http://example.com/avatar.png" }, "groups": { "example": "60f7c2ab4f1a256e1c8b4567", "type": "array", "items": { "type": "string" } }, "stats": { "$ref": "#/components/schemas/StatsDto" }, "affinities": { "$ref": "#/components/schemas/AffinitiesDto" }, "abilities": { "type": "array", "items": { "$ref": "#/components/schemas/AbilityDto" } }, "spellcasting": { "type": "array", "items": { "$ref": "#/components/schemas/SpellcastingDto" } }, "appearance": { "$ref": "#/components/schemas/AppearanceDto" }, "background": { "$ref": "#/components/schemas/BackgroundDto" }, "treasure": { "$ref": "#/components/schemas/TreasureDto" }, "conditions": { "$ref": "#/components/schemas/ConditionsDto" }, "actions": { "$ref": "#/components/schemas/ActionsDto" }, "challenge": { "$ref": "#/components/schemas/ChallengeDto" }, "profile": { "$ref": "#/components/schemas/NPCProfileDto" }, "hitPointsRoll": { "type": "string", "example": "18d8+54" } }, "required": [ "firstname", "lastname", "surname", "avatar", "groups", "stats", "affinities", "abilities", "spellcasting", "appearance", "background", "treasure", "conditions", "actions", "challenge", "profile" ] }, "UpdateNpcDto": { "type": "object", "properties": {} }, "PaginationMeta": { "type": "object", "properties": { "page": { "type": "number", "example": 1 }, "offset": { "type": "number", "example": 10 }, "totalItems": { "type": "number", "example": 100 } }, "required": [ "page", "offset", "totalItems" ] }, "IPaginatedResponse": { "type": "object", "properties": { "message": { "type": "string", "example": "Campaign #507f1f77bcf86cd799439011 found in 5ms" }, "data": { "type": "object" }, "pagination": { "$ref": "#/components/schemas/PaginationMeta" } }, "required": [ "message", "data", "pagination" ] }, "Masteries": { "type": "object", "properties": { "athletics": { "type": "number", "example": 0 }, "acrobatics": { "type": "number", "example": 0 }, "sleightHand": { "type": "number", "example": 0 }, "stealth": { "type": "number", "example": 0 }, "arcana": { "type": "number", "example": 0 }, "history": { "type": "number", "example": 0 }, "investigation": { "type": "number", "example": 0 }, "nature": { "type": "number", "example": 2 }, "religion": { "type": "number", "example": 3 }, "animalHandling": { "type": "number", "example": 1 }, "insight": { "type": "number", "example": 0 }, "medicine": { "type": "number", "example": 0 }, "perception": { "type": "number", "example": 0 }, "survival": { "type": "number", "example": 1 }, "deception": { "type": "number", "example": 0 }, "intimidation": { "type": "number", "example": 2 }, "performance": { "type": "number", "example": 0 }, "persuasion": { "type": "number", "example": 0 } }, "required": [ "athletics", "acrobatics", "sleightHand", "stealth", "arcana", "history", "investigation", "nature", "religion", "animalHandling", "insight", "medicine", "perception", "survival", "deception", "intimidation", "performance", "persuasion" ] }, "MasteriesAbility": { "type": "object", "properties": { "strength": { "type": "boolean", "example": true }, "dexterity": { "type": "boolean", "example": true }, "constitution": { "type": "boolean", "example": true }, "intelligence": { "type": "boolean", "example": true }, "wisdom": { "type": "boolean", "example": true }, "charisma": { "type": "boolean", "example": true } }, "required": [ "strength", "dexterity", "constitution", "intelligence", "wisdom", "charisma" ] }, "PlayerStats": { "type": "object", "properties": { "size": { "type": "string", "example": "Medium" }, "maxHitPoints": { "type": "number", "example": 100 }, "currentHitPoints": { "type": "number", "example": 100 }, "tempHitPoints": { "type": "number", "example": 0 }, "armorClass": { "type": "number", "example": 15 }, "initiative": { "type": "number", "example": 3 }, "speed": { "$ref": "#/components/schemas/Speed" }, "abilityScores": { "$ref": "#/components/schemas/AbilityScores" }, "languages": { "example": [ "Common", "Elvish" ], "type": "array", "items": { "type": "string" } }, "passivePerception": { "type": "number", "example": 10 }, "savingThrows": { "$ref": "#/components/schemas/SavingThrows" }, "skills": { "$ref": "#/components/schemas/Skills" }, "senses": { "type": "array", "items": { "$ref": "#/components/schemas/Sense" } }, "proficiencyBonus": { "type": "number", "example": 0 }, "armors": { "example": [ "Leather", "Chainmail" ], "type": "array", "items": { "type": "string" } }, "tools": { "example": [ "Thieves' Tools", "Smith's Tools" ], "type": "array", "items": { "type": "string" } }, "weapons": { "example": [ "Shortsword", "Longbow" ], "type": "array", "items": { "type": "string" } }, "masteries": { "$ref": "#/components/schemas/Masteries" }, "masteriesAbility": { "$ref": "#/components/schemas/MasteriesAbility" } }, "required": [ "size", "maxHitPoints", "currentHitPoints", "tempHitPoints", "armorClass", "initiative", "speed", "abilityScores", "languages", "passivePerception", "savingThrows", "skills", "senses", "proficiencyBonus", "armors", "tools", "weapons", "masteries", "masteriesAbility" ] }, "Progression": { "type": "object", "properties": { "level": { "type": "number", "example": 1 }, "experience": { "type": "number", "example": 0 } }, "required": [ "level", "experience" ] }, "Class": { "type": "object", "properties": { "name": { "example": "Warrior", "allOf": [ { "$ref": "#/components/schemas/Class" } ] }, "subclass": { "type": "string", "example": "Berserker" }, "level": { "type": "number", "example": 1 }, "hitDice": { "type": "number", "example": 10 }, "hitDiceRemaining": { "type": "number", "example": 5 } }, "required": [ "name", "subclass", "level", "hitDice" ] }, "PlayerProfile": { "type": "object", "properties": { "alignment": { "type": "string", "example": "Chaotic Good" }, "race": { "type": "string", "example": "Elf" }, "subrace": { "type": "string", "example": "High Elf" }, "history": { "type": "string", "example": "A skilled archer from the northern forests." } }, "required": [ "alignment", "race", "subrace", "history" ] }, "DeathSaves": { "type": "object", "properties": { "successes": { "type": "number", "example": 0, "description": "Number of successful death saving throws (0-3)", "minimum": 0, "maximum": 3 }, "failures": { "type": "number", "example": 0, "description": "Number of failed death saving throws (0-3). Three failures means death.", "minimum": 0, "maximum": 3 } }, "required": [ "successes", "failures" ] }, "Player": { "type": "object", "properties": { "_id": { "example": "60d21b4667d0d8992e610c85", "allOf": [ { "$ref": "#/components/schemas/SchemaObjectId" } ] }, "firstname": { "type": "string", "example": "Aragorn" }, "lastname": { "type": "string", "example": "Elessar" }, "surname": { "type": "string", "example": "Fils d'Arathorn" }, "avatar": { "type": "string", "example": "http://example.com/avatar.png" }, "stats": { "$ref": "#/components/schemas/PlayerStats" }, "affinities": { "$ref": "#/components/schemas/Affinities" }, "abilities": { "type": "array", "items": { "$ref": "#/components/schemas/Ability" } }, "spellcasting": { "type": "array", "items": { "$ref": "#/components/schemas/Spellcasting" } }, "appearance": { "$ref": "#/components/schemas/Appearance" }, "background": { "$ref": "#/components/schemas/Background" }, "treasure": { "$ref": "#/components/schemas/Treasure" }, "conditions": { "$ref": "#/components/schemas/Conditions" }, "groups": { "type": "array", "items": { "$ref": "#/components/schemas/Group" } }, "deletedAt": { "format": "date-time", "type": "string", "example": null }, "actions": { "type": "array", "items": { "$ref": "#/components/schemas/Action" } }, "inspiration": { "type": "boolean", "example": true }, "progression": { "$ref": "#/components/schemas/Progression" }, "class": { "type": "array", "items": { "$ref": "#/components/schemas/Class" } }, "profile": { "$ref": "#/components/schemas/PlayerProfile" }, "exhaustionLevel": { "type": "number", "example": 0, "description": "Exhaustion level (0-6): 0=None, 1=Disadvantage on ability checks, 2=Speed halved, 3=Disadvantage on attack rolls and saving throws, 4=Hit point maximum halved, 5=Speed reduced to 0, 6=Death", "minimum": 0, "maximum": 6 }, "deathSaves": { "$ref": "#/components/schemas/DeathSaves" } }, "required": [ "_id", "firstname", "lastname", "surname", "avatar", "stats", "affinities", "abilities", "spellcasting", "appearance", "background", "treasure", "conditions", "groups", "deletedAt", "actions", "inspiration", "progression", "class", "profile", "exhaustionLevel", "deathSaves" ] }, "MasteryDto": { "type": "object", "properties": { "athletics": { "type": "number", "example": 3 }, "acrobatics": { "type": "number", "example": 0 }, "sleightHand": { "type": "number", "example": 1 }, "stealth": { "type": "number", "example": 0 }, "arcana": { "type": "number", "example": 1 }, "history": { "type": "number", "example": 0 }, "investigation": { "type": "number", "example": 1 }, "nature": { "type": "number", "example": 0 }, "religion": { "type": "number", "example": 3 }, "animalHandling": { "type": "number", "example": 0 }, "insight": { "type": "number", "example": 1 }, "medicine": { "type": "number", "example": 0 }, "perception": { "type": "number", "example": 2 }, "survival": { "type": "number", "example": 0 }, "deception": { "type": "number", "example": 3 }, "intimidation": { "type": "number", "example": 0 }, "performance": { "type": "number", "example": 2 }, "persuasion": { "type": "number", "example": 0 } }, "required": [ "athletics", "acrobatics", "sleightHand", "stealth", "arcana", "history", "investigation", "nature", "religion", "animalHandling", "insight", "medicine", "perception", "survival", "deception", "intimidation", "performance", "persuasion" ] }, "MasteriesAbilityDto": { "type": "object", "properties": { "strength": { "type": "boolean", "example": true }, "dexterity": { "type": "boolean", "example": false }, "constitution": { "type": "boolean", "example": true }, "intelligence": { "type": "boolean", "example": false }, "wisdom": { "type": "boolean", "example": true }, "charisma": { "type": "boolean", "example": false } }, "required": [ "strength", "dexterity", "constitution", "intelligence", "wisdom", "charisma" ] }, "PlayerStatsDto": { "type": "object", "properties": { "size": { "type": "object", "example": "Medium" }, "maxHitPoints": { "type": "number", "example": 100 }, "currentHitPoints": { "type": "number", "example": 75 }, "tempHitPoints": { "type": "number", "example": 10 }, "armorClass": { "type": "number", "example": 15 }, "initiative": { "type": "number", "example": 3 }, "passivePerception": { "type": "number", "example": 12 }, "languages": { "example": [ "Common", "Elvish" ], "type": "array", "items": { "type": "string" } }, "abilityScores": { "$ref": "#/components/schemas/AbilityScoresDto" }, "savingThrows": { "$ref": "#/components/schemas/SavingThrowsDto" }, "speed": { "$ref": "#/components/schemas/SpeedDto" }, "skills": { "$ref": "#/components/schemas/SkillDto" }, "senses": { "type": "array", "items": { "$ref": "#/components/schemas/SenseDto" } }, "proficiencyBonus": { "type": "number", "example": 2 }, "armors": { "example": [ "Leather", "Chainmail" ], "type": "array", "items": { "type": "string" } }, "tools": { "example": [ "Thieves' Tools", "Smith's Tools" ], "type": "array", "items": { "type": "string" } }, "weapons": { "example": [ "Shortsword", "Longbow" ], "type": "array", "items": { "type": "string" } }, "masteries": { "$ref": "#/components/schemas/MasteryDto" }, "masteriesAbility": { "$ref": "#/components/schemas/MasteriesAbilityDto" } }, "required": [ "size", "maxHitPoints", "currentHitPoints", "tempHitPoints", "armorClass", "initiative", "passivePerception", "languages", "abilityScores", "savingThrows", "speed", "skills", "senses", "proficiencyBonus", "armors", "tools", "weapons", "masteries", "masteriesAbility" ] }, "ProgressionDto": { "type": "object", "properties": { "level": { "type": "number", "example": 3 }, "experience": { "type": "number", "example": 4500 } }, "required": [ "level", "experience" ] }, "ClassDto": { "type": "object", "properties": { "name": { "type": "string", "example": "Fighter", "enum": [ "Artificer", "Barbarian", "Bard", "Cleric", "Druid", "Fighter", "Monk", "Paladin", "Ranger", "Rogue", "Sorcerer", "Warlock", "Wizard" ] }, "subclass": { "type": "string", "example": "Champion" }, "level": { "type": "number", "example": 5 }, "hitDice": { "type": "number", "example": 10 }, "hitDiceRemaining": { "type": "number", "example": 5 } }, "required": [ "name", "subclass", "level", "hitDice" ] }, "PlayerProfileDto": { "type": "object", "properties": { "alignment": { "type": "string", "example": "Lawful Good", "enum": [ "Lawful Good", "Neutral Good", "Chaotic Good", "Lawful Neutral", "True Neutral", "Chaotic Neutral", "Lawful Evil", "Neutral Evil", "Chaotic Evil", "Unaligned", "Any Good Alignment", "Any Evil Alignment", "Any Lawful Alignment", "Any Chaotic Alignment" ] }, "race": { "type": "string", "example": "Elf" }, "subrace": { "type": "string", "example": "High Elf" }, "history": { "type": "string", "example": "A skilled archer from the northern forests." } }, "required": [ "alignment", "race", "subrace", "history" ] }, "DeathSavesDto": { "type": "object", "properties": { "successes": { "type": "number", "example": 0, "description": "Number of successful death saving throws (0-3)", "minimum": 0, "maximum": 3 }, "failures": { "type": "number", "example": 0, "description": "Number of failed death saving throws (0-3). Three failures means death.", "minimum": 0, "maximum": 3 } } }, "CreatePlayerDto": { "type": "object", "properties": { "firstname": { "type": "string", "example": "Aragorn" }, "lastname": { "type": "string", "example": "Elessar" }, "surname": { "type": "string", "example": "Fils d'Arathorn" }, "avatar": { "type": "string", "example": "http://example.com/avatar.png" }, "groups": { "example": "60f7c2ab4f1a256e1c8b4567", "type": "array", "items": { "type": "string" } }, "stats": { "$ref": "#/components/schemas/PlayerStatsDto" }, "affinities": { "$ref": "#/components/schemas/AffinitiesDto" }, "abilities": { "type": "array", "items": { "$ref": "#/components/schemas/AbilityDto" } }, "spellcasting": { "type": "array", "items": { "$ref": "#/components/schemas/SpellcastingDto" } }, "appearance": { "$ref": "#/components/schemas/AppearanceDto" }, "background": { "$ref": "#/components/schemas/BackgroundDto" }, "treasure": { "$ref": "#/components/schemas/TreasureDto" }, "conditions": { "$ref": "#/components/schemas/ConditionsDto" }, "actions": { "type": "array", "items": { "$ref": "#/components/schemas/ActionDto" } }, "inspiration": { "type": "boolean", "example": false }, "progression": { "$ref": "#/components/schemas/ProgressionDto" }, "class": { "type": "array", "items": { "$ref": "#/components/schemas/ClassDto" } }, "profile": { "$ref": "#/components/schemas/PlayerProfileDto" }, "exhaustionLevel": { "type": "number", "example": 0, "description": "Exhaustion level (0-6): 0=None, 1=Disadvantage on ability checks, 2=Speed halved, 3=Disadvantage on attack rolls and saving throws, 4=Hit point maximum halved, 5=Speed reduced to 0, 6=Death", "minimum": 0, "maximum": 6 }, "deathSaves": { "$ref": "#/components/schemas/DeathSavesDto" } }, "required": [ "firstname", "lastname", "surname", "avatar", "groups", "stats", "affinities", "abilities", "spellcasting", "appearance", "background", "treasure", "conditions", "actions", "inspiration", "progression", "class", "profile", "deathSaves" ] }, "UpdatePlayerDto": { "type": "object", "properties": {} }, "Character": { "type": "object", "properties": { "_id": { "example": "60d21b4667d0d8992e610c85", "allOf": [ { "$ref": "#/components/schemas/SchemaObjectId" } ] }, "firstname": { "type": "string", "example": "Aragorn" }, "lastname": { "type": "string", "example": "Elessar" }, "surname": { "type": "string", "example": "Fils d'Arathorn" }, "avatar": { "type": "string", "example": "http://example.com/avatar.png" }, "stats": { "$ref": "#/components/schemas/Stats" }, "affinities": { "$ref": "#/components/schemas/Affinities" }, "abilities": { "type": "array", "items": { "$ref": "#/components/schemas/Ability" } }, "spellcasting": { "type": "array", "items": { "$ref": "#/components/schemas/Spellcasting" } }, "appearance": { "$ref": "#/components/schemas/Appearance" }, "background": { "$ref": "#/components/schemas/Background" }, "treasure": { "$ref": "#/components/schemas/Treasure" }, "conditions": { "$ref": "#/components/schemas/Conditions" }, "groups": { "type": "array", "items": { "$ref": "#/components/schemas/Group" } }, "deletedAt": { "format": "date-time", "type": "string", "example": null } }, "required": [ "_id", "firstname", "lastname", "surname", "avatar", "stats", "affinities", "abilities", "spellcasting", "appearance", "background", "treasure", "conditions", "groups", "deletedAt" ] }, "CampaignGroupDto": { "type": "object", "properties": { "idCampaign": { "type": "string", "example": "507f1f77bcf86cd799439011" }, "type": { "type": "string", "example": "active", "enum": [ "active", "archived" ] } }, "required": [ "idCampaign", "type" ] }, "CreateGroupDto": { "type": "object", "properties": { "label": { "type": "string", "example": "Adventurers" }, "characters": { "example": [ "507f1f77bcf86cd799439011", "507f1f77bcf86cd799439012" ], "type": "array", "items": { "type": "string" } }, "campaigns": { "type": "array", "items": { "$ref": "#/components/schemas/CampaignGroupDto" } } }, "required": [ "label", "characters", "campaigns" ] }, "ObjectId": { "type": "object", "properties": {} }, "UpdateGroupDto": { "type": "object", "properties": {} }, "Groups": { "type": "object", "properties": { "active": { "example": [ "507f1f77bcf86cd799439011" ], "type": "array", "items": { "type": "string" } }, "archived": { "example": [ "507f1f77bcf86cd799439013" ], "type": "array", "items": { "type": "string" } } }, "required": [ "active", "archived" ] }, "Campaign": { "type": "object", "properties": { "_id": { "example": "507f1f77bcf86cd799439011", "allOf": [ { "$ref": "#/components/schemas/SchemaObjectId" } ] }, "label": { "type": "string", "example": "Summer Campaign" }, "groups": { "$ref": "#/components/schemas/Groups" }, "deletedAt": { "format": "date-time", "type": "string", "example": null } }, "required": [ "_id", "label", "groups", "deletedAt" ] }, "CreateGroupIdsDto": { "type": "object", "properties": { "active": { "example": [ "60d21b4667d0d8992e610c85" ], "type": "array", "items": { "type": "string" } }, "archived": { "example": [], "type": "array", "items": { "type": "string" } } }, "required": [ "active", "archived" ] }, "CreateCampaignDto": { "type": "object", "properties": { "label": { "type": "string", "example": "Epic Adventure" }, "groups": { "$ref": "#/components/schemas/CreateGroupIdsDto" } }, "required": [ "label", "groups" ] }, "UpdateCampaignDto": { "type": "object", "properties": { "label": { "type": "string", "example": "Epic Adventure" } }, "required": [ "label" ] }, "HistoryDto": { "type": "object", "properties": { "date": { "format": "date-time", "type": "string", "example": "2024-01-15T10:30:00Z" }, "campaignName": { "type": "string", "example": "Summer Campaign" }, "value": { "type": "number", "example": 100 } }, "required": [ "date", "campaignName", "value" ] }, "UserInfoDto": { "type": "object", "properties": { "keycloakId": { "type": "string", "description": "Keycloak unique identifier", "example": "123e4567-e89b-12d3-a456-426614174000" }, "email": { "type": "string", "description": "User email address", "example": "user@example.com" }, "username": { "type": "string", "description": "Username", "example": "john_doe" }, "firstName": { "type": "string", "description": "User first name", "example": "John" }, "lastName": { "type": "string", "description": "User last name", "example": "Doe" }, "avatar": { "type": "string", "description": "User avatar URL", "example": "https://example.com/avatar.jpg", "pattern": "^https?://.+\\.(jpg|jpeg|png|gif|webp)$", "nullable": true }, "balance": { "type": "number", "example": 500 }, "history": { "type": "array", "items": { "$ref": "#/components/schemas/HistoryDto" } } }, "required": [ "keycloakId", "email", "username", "balance", "history" ] }, "ChangePasswordDto": { "type": "object", "properties": { "currentPassword": { "type": "string", "description": "Current password of the user", "example": "CurrentPassword123!" }, "newPassword": { "type": "string", "description": "New password (must be at least 8 characters)", "example": "NewSecurePassword456!", "minLength": 8 } }, "required": [ "currentPassword", "newPassword" ] }, "UpdateUserProfileDto": { "type": "object", "properties": { "firstName": { "type": "string", "description": "User first name", "example": "John", "minLength": 2 }, "lastName": { "type": "string", "description": "User last name", "example": "Doe", "minLength": 2 }, "email": { "type": "string", "description": "User email address", "example": "john.doe@example.com" } } }, "InvalidParamDto": { "type": "object", "properties": { "name": { "type": "string", "example": "label" }, "reason": { "type": "string", "example": "Must be at least 3 characters long" } }, "required": [ "name", "reason" ] } } } }