{ "openapi": "3.0.1", "info": { "title": "API", "version": "1.0" }, "paths": { "/api/Auth/invite": { "post": { "tags": [ "Auth" ], "requestBody": { "content": { "application/json": { "schema": { "type": "string" } }, "text/json": { "schema": { "type": "string" } }, "application/*+json": { "schema": { "type": "string" } } } }, "responses": { "200": { "description": "OK" } } } }, "/api/Auth/validate": { "get": { "tags": [ "Auth" ], "parameters": [ { "name": "token", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK" } } } }, "/api/Auth/register": { "post": { "tags": [ "Auth" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RegisterRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/RegisterRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/RegisterRequest" } } } }, "responses": { "200": { "description": "OK" } } } }, "/api/Auth/login": { "post": { "tags": [ "Auth" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoginRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/LoginRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/LoginRequest" } } } }, "responses": { "200": { "description": "OK" } } } }, "/api/Auth/logout": { "post": { "tags": [ "Auth" ], "responses": { "200": { "description": "OK" } } } }, "/api/Auth/userinfo": { "get": { "tags": [ "Auth" ], "responses": { "200": { "description": "OK" } } } }, "/api/Auth/forgot-password": { "post": { "tags": [ "Auth" ], "requestBody": { "content": { "application/json": { "schema": { "type": "string" } }, "text/json": { "schema": { "type": "string" } }, "application/*+json": { "schema": { "type": "string" } } } }, "responses": { "200": { "description": "OK" } } } }, "/api/Auth/reset-password": { "post": { "tags": [ "Auth" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResetPasswordRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResetPasswordRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/ResetPasswordRequest" } } } }, "responses": { "200": { "description": "OK" } } } }, "/api/ExerciseLog": { "get": { "tags": [ "ExerciseLog" ], "responses": { "200": { "description": "OK" } } }, "post": { "tags": [ "ExerciseLog" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExerciseLog" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ExerciseLog" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/ExerciseLog" } } } }, "responses": { "200": { "description": "OK" } } }, "put": { "tags": [ "ExerciseLog" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExerciseLog" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ExerciseLog" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/ExerciseLog" } } } }, "responses": { "200": { "description": "OK" } } } }, "/api/ExerciseLog/log/{id}": { "get": { "tags": [ "ExerciseLog" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "OK" } } } }, "/api/ExerciseLog/exercise/{exerciseId}": { "get": { "tags": [ "ExerciseLog" ], "parameters": [ { "name": "exerciseId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "OK" } } } }, "/api/ExerciseLog/{id}": { "delete": { "tags": [ "ExerciseLog" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "OK" } } } }, "/api/ExerciseTemplate": { "get": { "tags": [ "ExerciseTemplate" ], "responses": { "200": { "description": "OK" } } }, "post": { "tags": [ "ExerciseTemplate" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExerciseTemplate" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ExerciseTemplate" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/ExerciseTemplate" } } } }, "responses": { "200": { "description": "OK" } } }, "put": { "tags": [ "ExerciseTemplate" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExerciseTemplate" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ExerciseTemplate" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/ExerciseTemplate" } } } }, "responses": { "200": { "description": "OK" } } } }, "/api/ExerciseTemplate/filtered/{muscle}/{type}": { "get": { "tags": [ "ExerciseTemplate" ], "parameters": [ { "name": "muscle", "in": "path", "required": true, "schema": { "$ref": "#/components/schemas/TargetMuscle" } }, { "name": "type", "in": "path", "required": true, "schema": { "$ref": "#/components/schemas/ExerciseType" } } ], "responses": { "200": { "description": "OK" } } } }, "/api/ExerciseTemplate/muscle/{muscle}": { "get": { "tags": [ "ExerciseTemplate" ], "parameters": [ { "name": "muscle", "in": "path", "required": true, "schema": { "$ref": "#/components/schemas/TargetMuscle" } } ], "responses": { "200": { "description": "OK" } } } }, "/api/ExerciseTemplate/{id}": { "delete": { "tags": [ "ExerciseTemplate" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "OK" } } } }, "/api/invite": { "post": { "tags": [ "Invite" ], "parameters": [ { "name": "email", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK" } } } }, "/api/Meal/{weekPlanId}": { "get": { "tags": [ "Meal" ], "parameters": [ { "name": "weekPlanId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "OK" } } }, "post": { "tags": [ "Meal" ], "parameters": [ { "name": "weekPlanId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Meal" } }, "text/json": { "schema": { "$ref": "#/components/schemas/Meal" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/Meal" } } } }, "responses": { "200": { "description": "OK" } } } }, "/api/Meal/item/{id}": { "get": { "tags": [ "Meal" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "OK" } } } }, "/api/Meal": { "put": { "tags": [ "Meal" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Meal" } }, "text/json": { "schema": { "$ref": "#/components/schemas/Meal" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/Meal" } } } }, "responses": { "200": { "description": "OK" } } } }, "/api/Meal/{id}": { "delete": { "tags": [ "Meal" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "OK" } } } }, "/api/Supplement/{weekPlanId}": { "get": { "tags": [ "Supplement" ], "parameters": [ { "name": "weekPlanId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "OK" } } }, "post": { "tags": [ "Supplement" ], "parameters": [ { "name": "weekPlanId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Supplement" } }, "text/json": { "schema": { "$ref": "#/components/schemas/Supplement" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/Supplement" } } } }, "responses": { "200": { "description": "OK" } } } }, "/api/Supplement/item/{id}": { "get": { "tags": [ "Supplement" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "OK" } } } }, "/api/Supplement": { "put": { "tags": [ "Supplement" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Supplement" } }, "text/json": { "schema": { "$ref": "#/components/schemas/Supplement" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/Supplement" } } } }, "responses": { "200": { "description": "OK" } } } }, "/api/Supplement/{id}": { "delete": { "tags": [ "Supplement" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "OK" } } } }, "/api/WeekPlan": { "get": { "tags": [ "WeekPlan" ], "responses": { "200": { "description": "OK" } } }, "post": { "tags": [ "WeekPlan" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WeekPlan" } }, "text/json": { "schema": { "$ref": "#/components/schemas/WeekPlan" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/WeekPlan" } } } }, "responses": { "200": { "description": "OK" } } }, "put": { "tags": [ "WeekPlan" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WeekPlan" } }, "text/json": { "schema": { "$ref": "#/components/schemas/WeekPlan" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/WeekPlan" } } } }, "responses": { "200": { "description": "OK" } } } }, "/api/WeekPlan/full": { "get": { "tags": [ "WeekPlan" ], "responses": { "200": { "description": "OK" } } } }, "/api/WeekPlan/{id}": { "get": { "tags": [ "WeekPlan" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "OK" } } }, "delete": { "tags": [ "WeekPlan" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "OK" } } } }, "/api/WorkoutDay/{weekPlanId}": { "get": { "tags": [ "WorkoutDay" ], "parameters": [ { "name": "weekPlanId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "OK" } } }, "post": { "tags": [ "WorkoutDay" ], "parameters": [ { "name": "weekPlanId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkoutDay" } }, "text/json": { "schema": { "$ref": "#/components/schemas/WorkoutDay" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/WorkoutDay" } } } }, "responses": { "200": { "description": "OK" } } } }, "/api/WorkoutDay/day/{id}": { "get": { "tags": [ "WorkoutDay" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "OK" } } } }, "/api/WorkoutDay": { "put": { "tags": [ "WorkoutDay" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkoutDay" } }, "text/json": { "schema": { "$ref": "#/components/schemas/WorkoutDay" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/WorkoutDay" } } } }, "responses": { "200": { "description": "OK" } } } }, "/api/WorkoutDay/{id}": { "delete": { "tags": [ "WorkoutDay" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "OK" } } } } }, "components": { "schemas": { "AppUser": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "userName": { "type": "string", "nullable": true }, "normalizedUserName": { "type": "string", "nullable": true }, "email": { "type": "string", "nullable": true }, "normalizedEmail": { "type": "string", "nullable": true }, "emailConfirmed": { "type": "boolean" }, "passwordHash": { "type": "string", "nullable": true }, "securityStamp": { "type": "string", "nullable": true }, "concurrencyStamp": { "type": "string", "nullable": true }, "phoneNumber": { "type": "string", "nullable": true }, "phoneNumberConfirmed": { "type": "boolean" }, "twoFactorEnabled": { "type": "boolean" }, "lockoutEnd": { "type": "string", "format": "date-time", "nullable": true }, "lockoutEnabled": { "type": "boolean" }, "accessFailedCount": { "type": "integer", "format": "int32" }, "firstName": { "type": "string", "nullable": true }, "lastName": { "type": "string", "nullable": true }, "weekPlans": { "type": "array", "items": { "$ref": "#/components/schemas/WeekPlan" }, "nullable": true } }, "additionalProperties": false }, "Exercise": { "type": "object", "properties": { "id": { "type": "integer", "format": "int32" }, "workoutDayId": { "type": "integer", "format": "int32" }, "exerciseTemplateId": { "type": "integer", "format": "int32" }, "sets": { "type": "integer", "format": "int32" }, "minReps": { "type": "integer", "format": "int32" }, "maxReps": { "type": "integer", "format": "int32" }, "rest": { "type": "string", "nullable": true }, "note": { "type": "string", "nullable": true }, "workoutDay": { "$ref": "#/components/schemas/WorkoutDay" }, "exerciseTemplate": { "$ref": "#/components/schemas/ExerciseTemplate" } }, "additionalProperties": false }, "ExerciseLog": { "type": "object", "properties": { "id": { "type": "integer", "format": "int32" }, "exerciseId": { "type": "integer", "format": "int32" }, "exercise": { "$ref": "#/components/schemas/Exercise" }, "reps": { "type": "integer", "format": "int32" }, "weight": { "type": "number", "format": "double" }, "notes": { "type": "string", "nullable": true }, "date": { "type": "string", "format": "date-time" } }, "additionalProperties": false }, "ExerciseTemplate": { "type": "object", "properties": { "id": { "type": "integer", "format": "int32" }, "name": { "type": "string", "nullable": true }, "muscle": { "$ref": "#/components/schemas/TargetMuscle" }, "defaultType": { "$ref": "#/components/schemas/ExerciseType" }, "variation": { "$ref": "#/components/schemas/ExerciseVariation" }, "description": { "type": "string", "nullable": true }, "isActive": { "type": "boolean" } }, "additionalProperties": false }, "ExerciseType": { "enum": [ 0, 1, 2 ], "type": "integer", "format": "int32" }, "ExerciseVariation": { "enum": [ 0, 1, 2, 3, 4, 5 ], "type": "integer", "format": "int32" }, "LoginRequest": { "required": [ "email", "password" ], "type": "object", "properties": { "email": { "type": "string", "nullable": true }, "password": { "type": "string", "nullable": true }, "twoFactorCode": { "type": "string", "nullable": true }, "twoFactorRecoveryCode": { "type": "string", "nullable": true } }, "additionalProperties": false }, "Meal": { "type": "object", "properties": { "id": { "type": "integer", "format": "int32" }, "nutritionPlanId": { "type": "integer", "format": "int32" }, "nutritionPlan": { "$ref": "#/components/schemas/NutritionPlan" }, "name": { "type": "string", "nullable": true }, "time": { "type": "string", "nullable": true }, "calories": { "type": "integer", "format": "int32" }, "protein": { "type": "integer", "format": "int32" }, "foodItems": { "type": "array", "items": { "type": "string" }, "nullable": true }, "tip": { "type": "string", "nullable": true } }, "additionalProperties": false }, "NutritionPlan": { "type": "object", "properties": { "id": { "type": "integer", "format": "int32" }, "weekPlanId": { "type": "integer", "format": "int32" }, "weekPlan": { "$ref": "#/components/schemas/WeekPlan" }, "totalCalories": { "type": "integer", "format": "int32" }, "totalProtein": { "type": "integer", "format": "int32" }, "totalCarbs": { "type": "integer", "format": "int32" }, "totalFat": { "type": "integer", "format": "int32" }, "meals": { "type": "array", "items": { "$ref": "#/components/schemas/Meal" }, "nullable": true } }, "additionalProperties": false }, "RegisterRequest": { "type": "object", "properties": { "token": { "type": "string", "nullable": true }, "password": { "type": "string", "nullable": true }, "firstName": { "type": "string", "nullable": true }, "lastName": { "type": "string", "nullable": true } }, "additionalProperties": false }, "ResetPasswordRequest": { "type": "object", "properties": { "email": { "type": "string", "nullable": true }, "token": { "type": "string", "nullable": true }, "newPassword": { "type": "string", "nullable": true }, "expiresAt": { "type": "string", "format": "date-time" } }, "additionalProperties": false }, "Supplement": { "type": "object", "properties": { "id": { "type": "integer", "format": "int32" }, "weekPlanId": { "type": "integer", "format": "int32" }, "weekPlan": { "$ref": "#/components/schemas/WeekPlan" }, "name": { "type": "string", "nullable": true }, "dose": { "type": "string", "nullable": true }, "description": { "type": "string", "nullable": true }, "isEssential": { "type": "boolean" } }, "additionalProperties": false }, "TargetMuscle": { "enum": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ], "type": "integer", "format": "int32" }, "TrainingSplitType": { "enum": [ 0, 1, 2, 3, 4, 5 ], "type": "integer", "format": "int32" }, "WeekPlan": { "type": "object", "properties": { "id": { "type": "integer", "format": "int32" }, "userId": { "type": "string", "format": "uuid" }, "user": { "$ref": "#/components/schemas/AppUser" }, "meals": { "type": "array", "items": { "$ref": "#/components/schemas/Meal" }, "nullable": true }, "supplements": { "type": "array", "items": { "$ref": "#/components/schemas/Supplement" }, "nullable": true }, "label": { "type": "string", "nullable": true }, "note": { "type": "string", "nullable": true }, "days": { "type": "array", "items": { "$ref": "#/components/schemas/WorkoutDay" }, "nullable": true } }, "additionalProperties": false }, "WorkoutDay": { "type": "object", "properties": { "id": { "type": "integer", "format": "int32" }, "weekPlanId": { "type": "integer", "format": "int32" }, "weekPlan": { "$ref": "#/components/schemas/WeekPlan" }, "dayNumber": { "type": "integer", "format": "int32" }, "dayName": { "$ref": "#/components/schemas/TrainingSplitType" }, "focus": { "$ref": "#/components/schemas/TargetMuscle" }, "exerciseType": { "$ref": "#/components/schemas/ExerciseType" }, "isRestDay": { "type": "boolean" }, "exercises": { "type": "array", "items": { "$ref": "#/components/schemas/Exercise" }, "nullable": true } }, "additionalProperties": false } } } }