UPDATE: Project Module
All checks were successful
Build and Release / release (push) Successful in 1m15s

This commit is contained in:
2026-04-25 14:05:15 +07:00
parent 44a63f29c6
commit ac90236022
71 changed files with 5110 additions and 257 deletions

View File

@@ -1305,6 +1305,323 @@ const docTemplate = `{
}
}
},
"/projects": {
"get": {
"description": "Search and filter projects with pagination",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Projects"
],
"summary": "Search projects",
"parameters": [
{
"type": "string",
"name": "created_from",
"in": "query"
},
{
"type": "string",
"name": "created_to",
"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"
},
{
"maxLength": 200,
"type": "string",
"name": "search",
"in": "query"
},
{
"enum": [
"created_at",
"updated_at",
"title"
],
"type": "string",
"name": "sort",
"in": "query"
},
{
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "csv",
"name": "statuses",
"in": "query"
},
{
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "csv",
"name": "user_ids",
"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"
}
}
}
},
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Create a project for the current authenticated user",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Projects"
],
"summary": "Create a new project",
"parameters": [
{
"description": "Project Data",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/history-api_internal_dtos_request.CreateProjectDto"
}
}
],
"responses": {
"201": {
"description": "Created",
"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"
}
}
}
}
},
"/projects/{id}": {
"get": {
"description": "Retrieve project details by specific ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Projects"
],
"summary": "Get project by ID",
"parameters": [
{
"type": "string",
"description": "Project ID",
"name": "id",
"in": "path",
"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"
}
},
"404": {
"description": "Not Found",
"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 project properties (Title, Description, Status)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Projects"
],
"summary": "Update a project",
"parameters": [
{
"type": "string",
"description": "Project ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Project Data",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/history-api_internal_dtos_request.UpdateProjectDto"
}
}
],
"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"
}
},
"404": {
"description": "Not Found",
"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 project by ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Projects"
],
"summary": "Delete a project",
"parameters": [
{
"type": "string",
"description": "Project ID",
"name": "id",
"in": "path",
"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"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
}
}
}
}
},
"/raster-tiles/metadata": {
"get": {
"description": "Retrieve map metadata",
@@ -1871,6 +2188,60 @@ const docTemplate = `{
}
}
},
"/users/current/project": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Retrieve project list of the currently authenticated user",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Users"
],
"summary": "Get current user's projects",
"parameters": [
{
"type": "string",
"name": "cursor_id",
"in": "query"
},
{
"maximum": 100,
"minimum": 1,
"type": "integer",
"name": "limit",
"in": "query"
}
],
"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}": {
"get": {
"security": [
@@ -2031,6 +2402,62 @@ const docTemplate = `{
}
}
},
"/users/{id}/project": {
"get": {
"description": "Retrieve project list by specific user ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Users"
],
"summary": "Get user's projects by user ID",
"parameters": [
{
"type": "string",
"description": "User ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "string",
"name": "cursor_id",
"in": "query"
},
{
"maximum": 100,
"minimum": 1,
"type": "integer",
"name": "limit",
"in": "query"
}
],
"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": [
@@ -2259,6 +2686,29 @@ const docTemplate = `{
}
}
},
"history-api_internal_dtos_request.CreateProjectDto": {
"type": "object",
"required": [
"title"
],
"properties": {
"description": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"PRIVATE",
"PUBLIC",
"ARCHIVE"
]
},
"title": {
"type": "string",
"maxLength": 255
}
}
},
"history-api_internal_dtos_request.CreateTokenDto": {
"type": "object",
"required": [
@@ -2445,6 +2895,26 @@ const docTemplate = `{
}
}
},
"history-api_internal_dtos_request.UpdateProjectDto": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"PRIVATE",
"PUBLIC",
"ARCHIVE"
]
},
"title": {
"type": "string",
"maxLength": 255
}
}
},
"history-api_internal_dtos_request.UpdateVerificationStatusDto": {
"type": "object",
"required": [
@@ -2552,10 +3022,10 @@ const docTemplate = `{
4
],
"x-enum-varnames": [
"TokenPasswordReset",
"TokenEmailVerify",
"TokenMagicLink",
"TokenUpload"
"TokenTypePasswordReset",
"TokenTypeEmailVerify",
"TokenTypeMagicLink",
"TokenTypeUpload"
]
}
},