{
    "swagger": "2.0",
    "info": {
        "description": "This is a sample server for History API.",
        "title": "History API",
        "termsOfService": "http://swagger.io/terms/",
        "contact": {
            "name": "API Support",
            "url": "http://www.swagger.io/support",
            "email": "support@swagger.io"
        },
        "license": {
            "name": "Apache 2.0",
            "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
        },
        "version": "1.0"
    },
    "basePath": "/",
    "paths": {
        "/auth/forgot-password": {
            "post": {
                "description": "Initiate password recovery process for a user",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Auth"
                ],
                "summary": "Handle forgotten password",
                "parameters": [
                    {
                        "description": "Forgot Password request",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_request.ForgotPasswordDto"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    }
                }
            }
        },
        "/auth/google/callback": {
            "get": {
                "description": "Receives the auth code from Google, exchanges it for tokens, creates/logs in the user, and redirects back to the frontend with application tokens.",
                "tags": [
                    "Auth"
                ],
                "summary": "Handle Google OAuth2 callback",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Security state string",
                        "name": "state",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Authorization code from Google",
                        "name": "code",
                        "in": "query",
                        "required": true
                    }
                ],
                "responses": {
                    "302": {
                        "description": "Redirect to Frontend with JWTs",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "401": {
                        "description": "Invalid state",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    }
                }
            }
        },
        "/auth/google/login": {
            "get": {
                "description": "Generates a state string, sets it in a cookie, and redirects the user to Google's consent page.",
                "tags": [
                    "Auth"
                ],
                "summary": "Initiate Google OAuth2 login",
                "responses": {
                    "302": {
                        "description": "Redirect to Google",
                        "schema": {
                            "type": "string"
                        }
                    }
                }
            }
        },
        "/auth/logout": {
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Logout current user and revoke tokens",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Auth"
                ],
                "summary": "Logout user",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    }
                }
            }
        },
        "/auth/refresh": {
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Generate a new access token using a valid refresh token from context",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Auth"
                ],
                "summary": "Refresh session tokens",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized or expired refresh token",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    }
                }
            }
        },
        "/auth/signin": {
            "post": {
                "description": "Authenticate user credentials and return access/refresh tokens",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Auth"
                ],
                "summary": "Sign in a user",
                "parameters": [
                    {
                        "description": "Sign In credentials",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_request.SignInDto"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    },
                    "401": {
                        "description": "Invalid credentials",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    }
                }
            }
        },
        "/auth/signup": {
            "post": {
                "description": "Create a new user account in the system",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Auth"
                ],
                "summary": "Register a new user",
                "parameters": [
                    {
                        "description": "Sign Up details",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_request.SignUpDto"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    }
                }
            }
        },
        "/auth/token/create": {
            "post": {
                "description": "Request a new token for specific actions like email confirmation",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Auth"
                ],
                "summary": "Generate a new verification token",
                "parameters": [
                    {
                        "description": "Token creation request",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_request.CreateTokenDto"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    }
                }
            }
        },
        "/auth/token/verify": {
            "post": {
                "description": "Validate an OTP or email verification token",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Auth"
                ],
                "summary": "Verify a security token",
                "parameters": [
                    {
                        "description": "Token verification data",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_request.VerifyTokenDto"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    }
                }
            }
        },
        "/media": {
            "get": {
                "description": "Search media with filters, pagination",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Media"
                ],
                "summary": "Search media",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Page number",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "Items per page",
                        "name": "limit",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Search keyword",
                        "name": "keyword",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.PaginatedResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Delete multiple media files by IDs",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Media"
                ],
                "summary": "Delete media",
                "parameters": [
                    {
                        "description": "Media IDs to delete",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_request.MediaBulkDeleteDto"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    }
                }
            }
        },
        "/media/presigned": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Generate a presigned URL for direct upload to storage",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Media"
                ],
                "summary": "Generate presigned URL",
                "parameters": [
                    {
                        "type": "string",
                        "description": "File name",
                        "name": "filename",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Content type",
                        "name": "contentType",
                        "in": "query",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    }
                }
            }
        },
        "/media/presigned/complete": {
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Confirm that upload via presigned URL is completed",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Media"
                ],
                "summary": "Confirm presigned upload",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Storage key",
                        "name": "key",
                        "in": "query",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    }
                }
            }
        },
        "/media/upload": {
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Upload media file through server",
                "consumes": [
                    "multipart/form-data"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Media"
                ],
                "summary": "Upload media (server-side)",
                "parameters": [
                    {
                        "type": "file",
                        "description": "Upload file",
                        "name": "file",
                        "in": "formData",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    }
                }
            }
        },
        "/media/{id}": {
            "get": {
                "description": "Retrieve a media file by its ID",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Media"
                ],
                "summary": "Get media by ID",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Media ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Delete a media file by ID",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Media"
                ],
                "summary": "Delete media",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Media ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    }
                }
            }
        },
        "/roles": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Get a list of all roles in the system",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Roles"
                ],
                "summary": "Get all roles",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    }
                }
            }
        },
        "/roles/{id}": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Get detailed information about a specific role",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Roles"
                ],
                "summary": "Get role by ID",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Role ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    }
                }
            }
        },
        "/tiles/metadata": {
            "get": {
                "description": "Retrieve map metadata",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Tile"
                ],
                "summary": "Get tile metadata",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    }
                }
            }
        },
        "/tiles/{z}/{x}/{y}": {
            "get": {
                "description": "Fetch vector or raster map tile data by Z, X, Y coordinates",
                "produces": [
                    "application/octet-stream"
                ],
                "tags": [
                    "Tile"
                ],
                "summary": "Get a map tile",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Zoom level (0-22)",
                        "name": "z",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "X coordinate",
                        "name": "x",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "Y coordinate",
                        "name": "y",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "file"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    }
                }
            }
        },
        "/users": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Search and filter users with pagination (Admin/Mod only)",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Users"
                ],
                "summary": "Search users",
                "parameters": [
                    {
                        "enum": [
                            "local",
                            "google",
                            "facebook",
                            "github"
                        ],
                        "type": "string",
                        "name": "auth_provider",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "name": "created_from",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "name": "created_to",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "name": "is_deleted",
                        "in": "query"
                    },
                    {
                        "maximum": 100,
                        "minimum": 1,
                        "type": "integer",
                        "name": "limit",
                        "in": "query"
                    },
                    {
                        "enum": [
                            "asc",
                            "desc"
                        ],
                        "type": "string",
                        "name": "order",
                        "in": "query"
                    },
                    {
                        "minimum": 1,
                        "type": "integer",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "collectionFormat": "csv",
                        "name": "role_ids",
                        "in": "query"
                    },
                    {
                        "maxLength": 200,
                        "minLength": 2,
                        "type": "string",
                        "name": "search",
                        "in": "query"
                    },
                    {
                        "enum": [
                            "id",
                            "created_at",
                            "updated_at",
                            "email",
                            "is_deleted",
                            "auth_provider"
                        ],
                        "type": "string",
                        "name": "sort",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.PaginatedResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    }
                }
            }
        },
        "/users/current": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Retrieve the profile information of the currently authenticated user",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Users"
                ],
                "summary": "Get current user profile",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    }
                }
            }
        },
        "/users/current/media": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Retrieve media list of the currently authenticated user",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Users"
                ],
                "summary": "Get current user's media",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    }
                }
            }
        },
        "/users/{id}": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Retrieve details of a specific user (Admin/Mod only)",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Users"
                ],
                "summary": "Get user by ID",
                "parameters": [
                    {
                        "type": "string",
                        "description": "User ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    }
                }
            },
            "put": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Update the profile details of the currently authenticated user",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Users"
                ],
                "summary": "Update user profile",
                "parameters": [
                    {
                        "type": "string",
                        "description": "User ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Update Profile request",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_request.UpdateProfileDto"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Soft delete a user account (Admin/Mod only)",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Users"
                ],
                "summary": "Delete a user",
                "parameters": [
                    {
                        "type": "string",
                        "description": "User ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    }
                }
            }
        },
        "/users/{id}/media": {
            "get": {
                "description": "Retrieve media list by specific user ID",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Users"
                ],
                "summary": "Get user's media by user ID",
                "parameters": [
                    {
                        "type": "string",
                        "description": "User ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    }
                }
            }
        },
        "/users/{id}/password": {
            "patch": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Update the password for the currently authenticated user",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Users"
                ],
                "summary": "Change user password",
                "parameters": [
                    {
                        "type": "string",
                        "description": "User ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Change Password request",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_request.ChangePasswordDto"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    }
                }
            }
        },
        "/users/{id}/restore": {
            "patch": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Restore a soft-deleted user account (Admin/Mod only)",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Users"
                ],
                "summary": "Restore a deleted user",
                "parameters": [
                    {
                        "type": "string",
                        "description": "User ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    }
                }
            }
        },
        "/users/{id}/role": {
            "patch": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Update the role of a user (Admin only)",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Users"
                ],
                "summary": "Change user role",
                "parameters": [
                    {
                        "type": "string",
                        "description": "User ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Change Role request",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_request.ChangeRoleDto"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
                        }
                    }
                }
            }
        }
    },
    "definitions": {
        "history-api_internal_dtos_request.ChangePasswordDto": {
            "type": "object",
            "required": [
                "new_password",
                "old_password"
            ],
            "properties": {
                "new_password": {
                    "type": "string",
                    "maxLength": 64,
                    "minLength": 8
                },
                "old_password": {
                    "type": "string",
                    "maxLength": 64,
                    "minLength": 8
                }
            }
        },
        "history-api_internal_dtos_request.ChangeRoleDto": {
            "type": "object",
            "required": [
                "role_ids",
                "user_id"
            ],
            "properties": {
                "role_ids": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                        "type": "string"
                    }
                },
                "user_id": {
                    "type": "string"
                }
            }
        },
        "history-api_internal_dtos_request.CreateTokenDto": {
            "type": "object",
            "required": [
                "email",
                "token_type"
            ],
            "properties": {
                "email": {
                    "type": "string"
                },
                "token_type": {
                    "enum": [
                        1,
                        2,
                        3,
                        4
                    ],
                    "allOf": [
                        {
                            "$ref": "#/definitions/history-api_pkg_constants.TokenType"
                        }
                    ]
                }
            }
        },
        "history-api_internal_dtos_request.ForgotPasswordDto": {
            "type": "object",
            "required": [
                "email",
                "new_password",
                "token_id"
            ],
            "properties": {
                "email": {
                    "type": "string",
                    "maxLength": 255,
                    "minLength": 5
                },
                "new_password": {
                    "type": "string",
                    "maxLength": 64,
                    "minLength": 8
                },
                "token_id": {
                    "type": "string"
                }
            }
        },
        "history-api_internal_dtos_request.MediaBulkDeleteDto": {
            "type": "object",
            "required": [
                "media_ids"
            ],
            "properties": {
                "media_ids": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                }
            }
        },
        "history-api_internal_dtos_request.SignInDto": {
            "type": "object",
            "required": [
                "email",
                "password"
            ],
            "properties": {
                "email": {
                    "type": "string",
                    "maxLength": 255,
                    "minLength": 5
                },
                "password": {
                    "type": "string",
                    "maxLength": 64,
                    "minLength": 8
                }
            }
        },
        "history-api_internal_dtos_request.SignUpDto": {
            "type": "object",
            "required": [
                "display_name",
                "email",
                "password",
                "token_id"
            ],
            "properties": {
                "display_name": {
                    "type": "string",
                    "maxLength": 50,
                    "minLength": 2
                },
                "email": {
                    "type": "string",
                    "maxLength": 255,
                    "minLength": 5
                },
                "password": {
                    "type": "string",
                    "maxLength": 64,
                    "minLength": 8
                },
                "token_id": {
                    "type": "string"
                }
            }
        },
        "history-api_internal_dtos_request.UpdateProfileDto": {
            "type": "object",
            "properties": {
                "avatar_url": {
                    "type": "string"
                },
                "bio": {
                    "type": "string",
                    "maxLength": 255
                },
                "country_code": {
                    "type": "string"
                },
                "display_name": {
                    "type": "string",
                    "maxLength": 50,
                    "minLength": 2
                },
                "full_name": {
                    "type": "string",
                    "maxLength": 100,
                    "minLength": 2
                },
                "location": {
                    "type": "string",
                    "maxLength": 100
                },
                "phone": {
                    "type": "string",
                    "maxLength": 20,
                    "minLength": 8
                },
                "website": {
                    "type": "string"
                }
            }
        },
        "history-api_internal_dtos_request.VerifyTokenDto": {
            "type": "object",
            "required": [
                "email",
                "token",
                "token_type"
            ],
            "properties": {
                "email": {
                    "type": "string"
                },
                "token": {
                    "type": "string"
                },
                "token_type": {
                    "enum": [
                        1,
                        2,
                        3,
                        4
                    ],
                    "allOf": [
                        {
                            "$ref": "#/definitions/history-api_pkg_constants.TokenType"
                        }
                    ]
                }
            }
        },
        "history-api_internal_dtos_response.CommonResponse": {
            "type": "object",
            "properties": {
                "data": {},
                "message": {
                    "type": "string"
                },
                "status": {
                    "type": "boolean"
                }
            }
        },
        "history-api_internal_dtos_response.PaginatedResponse": {
            "type": "object",
            "properties": {
                "data": {},
                "message": {
                    "type": "string"
                },
                "pagination": {
                    "$ref": "#/definitions/history-api_internal_dtos_response.PaginationMeta"
                },
                "status": {
                    "type": "boolean"
                }
            }
        },
        "history-api_internal_dtos_response.PaginationMeta": {
            "type": "object",
            "properties": {
                "current_page": {
                    "type": "integer"
                },
                "page_size": {
                    "type": "integer"
                },
                "total_pages": {
                    "type": "integer"
                },
                "total_records": {
                    "type": "integer"
                }
            }
        },
        "history-api_pkg_constants.TokenType": {
            "type": "integer",
            "format": "int32",
            "enum": [
                1,
                2,
                3,
                4
            ],
            "x-enum-varnames": [
                "TokenPasswordReset",
                "TokenEmailVerify",
                "TokenMagicLink",
                "TokenUpload"
            ]
        }
    },
    "securityDefinitions": {
        "BearerAuth": {
            "description": "Type \"Bearer \" followed by a space and JWT token.",
            "type": "apiKey",
            "name": "Authorization",
            "in": "header"
        }
    }
}