diff --git a/cmd/server/main.go b/cmd/server/main.go index 4c704ac73..33059f817 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -34,7 +34,9 @@ import ( // @BasePath /api/v1 -// @securityDefinitions.basic BasicAuth +// @securityDefinitions.apikey BearerAuth +// @in header +// @name Authorization func main() { cfg := config.LoadConfig(config.DefaultConfigLoaders()) log := logger.NewLogrusLogger() diff --git a/docs/docs.go b/docs/docs.go index b6ef15a53..9ac65bd73 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -1,5 +1,4 @@ -// Package docs GENERATED BY SWAG; DO NOT EDIT -// This file was generated by swaggo/swag +// Package docs Code generated by swaggo/swag. DO NOT EDIT package docs import "github.com/swaggo/swag" @@ -27,6 +26,11 @@ const docTemplate = `{ "paths": { "/assets/upload": { "post": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Upload the content", "consumes": [ "application/json" @@ -38,14 +42,8 @@ const docTemplate = `{ "Asset" ], "summary": "Upload the content", + "operationId": "upload", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "file", "description": "content upload", @@ -78,13 +76,13 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.ContentDataResponse" + "$ref": "#/definitions/ContentDataResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -103,6 +101,7 @@ const docTemplate = `{ "Auth" ], "summary": "Authorize user when login", + "operationId": "auth", "parameters": [ { "description": "Google login code", @@ -127,25 +126,25 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.AuthData" + "$ref": "#/definitions/AuthData" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -153,6 +152,11 @@ const docTemplate = `{ }, "/auth/api-key": { "post": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Create API key", "consumes": [ "application/json" @@ -164,38 +168,30 @@ const docTemplate = `{ "Auth" ], "summary": "Create API key", - "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - } - ], + "operationId": "createApiKey", "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.APIKeyResponse" + "$ref": "#/definitions/APIKeyResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -203,6 +199,11 @@ const docTemplate = `{ }, "/auth/me": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get logged-in user data", "consumes": [ "application/json" @@ -214,38 +215,30 @@ const docTemplate = `{ "Auth" ], "summary": "Get logged-in user data", - "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - } - ], + "operationId": "me", "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.AuthUserResponse" + "$ref": "#/definitions/AuthUserResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -264,20 +257,18 @@ const docTemplate = `{ "Bank" ], "summary": "Get all bank accounts", + "operationId": "listBankAccounts", "responses": { "200": { "description": "OK", "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/view.ListBankAccountResponse" - } + "$ref": "#/definitions/ListBankAccountResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -285,6 +276,11 @@ const docTemplate = `{ }, "/brainery-logs": { "post": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Create brainery logs", "consumes": [ "application/json" @@ -296,32 +292,35 @@ const docTemplate = `{ "Project" ], "summary": "Create brainery logs", + "operationId": "createBraineryLog", "parameters": [ { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true + "description": "Body", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreateBraineryLogRequest" + } } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -329,6 +328,11 @@ const docTemplate = `{ }, "/brainery-logs/metrics": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get brainery metric", "consumes": [ "application/json" @@ -340,18 +344,19 @@ const docTemplate = `{ "Project" ], "summary": "Get brainery metric", + "operationId": "getBraineryMetric", "parameters": [ { "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true + "description": "Time view", + "name": "view", + "in": "query" }, { "type": "string", - "description": "Time view", - "name": "view", + "format": "date", + "description": "Date", + "name": "date", "in": "query" } ], @@ -359,19 +364,19 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.BraineryMetric" + "$ref": "#/definitions/BraineryMetricResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -379,6 +384,11 @@ const docTemplate = `{ }, "/clients": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get all clients", "consumes": [ "application/json" @@ -390,31 +400,28 @@ const docTemplate = `{ "Public" ], "summary": "Get all clients", - "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - } - ], + "operationId": "getAllPublicClients", "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.PublicClientListResponse" + "$ref": "#/definitions/PublicClientListResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } }, "post": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Create new client", "consumes": [ "application/json" @@ -426,21 +433,15 @@ const docTemplate = `{ "Client" ], "summary": "Create new client", + "operationId": "createClient", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "description": "Body", "name": "Body", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.CreateClientInput" + "$ref": "#/definitions/CreateClientRequest" } } ], @@ -448,13 +449,13 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.CreateClientResponse" + "$ref": "#/definitions/CreateClientResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -462,6 +463,11 @@ const docTemplate = `{ }, "/clients/{id}": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get client detail by id", "consumes": [ "application/json" @@ -473,12 +479,13 @@ const docTemplate = `{ "Client" ], "summary": "Get client detail by id", + "operationId": "getClientDetail", "parameters": [ { "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", + "description": "Client ID", + "name": "id", + "in": "path", "required": true } ], @@ -486,30 +493,35 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.GetDetailClientResponse" + "$ref": "#/definitions/GetDetailClientResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } }, "put": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Update client by id", "consumes": [ "application/json" @@ -521,12 +533,13 @@ const docTemplate = `{ "Client" ], "summary": "Update client by id", + "operationId": "updateClient", "parameters": [ { "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", + "description": "Client ID", + "name": "id", + "in": "path", "required": true }, { @@ -535,7 +548,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.UpdateClientInput" + "$ref": "#/definitions/UpdateClientInput" } } ], @@ -543,25 +556,25 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -578,29 +591,39 @@ const docTemplate = `{ "Client" ], "summary": "Delete client by id", + "operationId": "deleteClient", + "parameters": [ + { + "type": "string", + "description": "Client ID", + "name": "id", + "in": "path", + "required": true + } + ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -623,25 +646,25 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -664,25 +687,25 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -690,6 +713,11 @@ const docTemplate = `{ }, "/cronjobs/audits": { "post": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Sync audit info from Notion to database", "consumes": [ "application/json" @@ -701,20 +729,12 @@ const docTemplate = `{ "Audit" ], "summary": "Sync audit info from Notion to database", - "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - } - ], + "operationId": "syncAudit", "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } } } @@ -722,6 +742,11 @@ const docTemplate = `{ }, "/cronjobs/index-engagement-messages": { "post": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Index messages of provided Discord server", "consumes": [ "application/json" @@ -733,32 +758,24 @@ const docTemplate = `{ "Engagement" ], "summary": "Index messages of provided Discord server", - "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - } - ], + "operationId": "indexEngagementMessages", "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -766,6 +783,11 @@ const docTemplate = `{ }, "/dashboards/engagement/detail": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get engagement dashboard", "consumes": [ "application/json" @@ -777,14 +799,8 @@ const docTemplate = `{ "Dashboard" ], "summary": "Get engagement dashboard", + "operationId": "getEngagementInfoDetailList", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "chapter/seniority/project", @@ -804,13 +820,13 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.GetEngagementDashboardDetailResponse" + "$ref": "#/definitions/GetEngagementDashboardDetailResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -818,6 +834,11 @@ const docTemplate = `{ }, "/dashboards/engagement/info": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get engagement dashboard", "consumes": [ "application/json" @@ -829,26 +850,18 @@ const docTemplate = `{ "Dashboard" ], "summary": "Get engagement dashboard", - "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - } - ], + "operationId": "getEngagementInfo", "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.GetEngagementDashboardResponse" + "$ref": "#/definitions/GetEngagementDashboardResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -856,6 +869,11 @@ const docTemplate = `{ }, "/dashboards/projects/action-item-squash": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get Action items squash report for dashboard", "consumes": [ "application/json" @@ -867,14 +885,8 @@ const docTemplate = `{ "Dashboard" ], "summary": "Get Action items squash report for dashboard", + "operationId": "getActionItemSquashReportList", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Project ID", @@ -886,25 +898,25 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.ActionItemSquashReportResponse" + "$ref": "#/definitions/ActionItemSquashReportResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -912,6 +924,11 @@ const docTemplate = `{ }, "/dashboards/projects/action-items": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get Action items report for dashboard", "consumes": [ "application/json" @@ -923,14 +940,8 @@ const docTemplate = `{ "Dashboard" ], "summary": "Get Action items report for dashboard", + "operationId": "getActionItemReportList", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Project ID", @@ -942,25 +953,25 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.ActionItemReportResponse" + "$ref": "#/definitions/ActionItemReportResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -968,6 +979,11 @@ const docTemplate = `{ }, "/dashboards/projects/audits": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get Audit information for dashboard", "consumes": [ "application/json" @@ -979,14 +995,8 @@ const docTemplate = `{ "Dashboard" ], "summary": "Get Audit information for dashboard", + "operationId": "getAuditList", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Project ID", @@ -998,25 +1008,25 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.AuditResponse" + "$ref": "#/definitions/AuditResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -1024,6 +1034,11 @@ const docTemplate = `{ }, "/dashboards/projects/engineering-healths": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get Engineering health information for dashboard", "consumes": [ "application/json" @@ -1035,14 +1050,8 @@ const docTemplate = `{ "Dashboard" ], "summary": "Get Engineering health information for dashboard", + "operationId": "getEngineeringHealth", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Project ID", @@ -1054,25 +1063,25 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.EngineeringHealthResponse" + "$ref": "#/definitions/EngineeringHealthResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -1080,6 +1089,11 @@ const docTemplate = `{ }, "/dashboards/projects/sizes": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get the total number of active member in each project", "consumes": [ "application/json" @@ -1091,26 +1105,18 @@ const docTemplate = `{ "Dashboard" ], "summary": "Get the total number of active member in each project", - "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - } - ], + "operationId": "getProjectSizeList", "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.ProjectSizeResponse" + "$ref": "#/definitions/ProjectSizeResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -1118,6 +1124,11 @@ const docTemplate = `{ }, "/dashboards/projects/summary": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get the summary audit info for projects", "consumes": [ "application/json" @@ -1129,38 +1140,30 @@ const docTemplate = `{ "Dashboard" ], "summary": "Get the summary audit info for projects", - "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - } - ], + "operationId": "getProjectSummary", "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.AuditSummariesResponse" + "$ref": "#/definitions/AuditSummariesResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -1168,6 +1171,11 @@ const docTemplate = `{ }, "/dashboards/projects/work-surveys": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get Work Surveys data for dashboard", "consumes": [ "application/json" @@ -1179,14 +1187,8 @@ const docTemplate = `{ "Dashboard" ], "summary": "Get Work Surveys data for dashboard", + "operationId": "getWorkSurveyList", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Project ID", @@ -1198,25 +1200,25 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.WorkSurveyResponse" + "$ref": "#/definitions/WorkSurveyResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -1224,6 +1226,11 @@ const docTemplate = `{ }, "/dashboards/resources/availabilities": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get resources availability", "consumes": [ "application/json" @@ -1235,26 +1242,18 @@ const docTemplate = `{ "Dashboard" ], "summary": "Get resources availability", - "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - } - ], + "operationId": "getResourcesAvailability", "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.ResourceAvailabilityResponse" + "$ref": "#/definitions/ResourceAvailabilityResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -1262,6 +1261,11 @@ const docTemplate = `{ }, "/dashboards/resources/utilization": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get dashboard resource utilization", "consumes": [ "application/json" @@ -1273,26 +1277,18 @@ const docTemplate = `{ "Dashboard" ], "summary": "Get dashboard resource utilization", - "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - } - ], + "operationId": "getResourceUtilizationList", "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.GetDashboardResourceUtilizationResponse" + "$ref": "#/definitions/GetDashboardResourceUtilizationResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -1300,6 +1296,11 @@ const docTemplate = `{ }, "/dashboards/resources/work-survey-summaries": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get resource work summaries for dashboard", "consumes": [ "application/json" @@ -1311,14 +1312,8 @@ const docTemplate = `{ "Dashboard" ], "summary": "Get resource work summaries for dashboard", + "operationId": "getResourceWorkSurveySummaryList", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Keyword", @@ -1342,25 +1337,25 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.WorkSurveySummaryResponse" + "$ref": "#/definitions/WorkSurveySummaryResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -1368,6 +1363,11 @@ const docTemplate = `{ }, "/dashboards/resources/work-unit-distribution": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get work unit distribution data for dashboard", "consumes": [ "application/json" @@ -1379,14 +1379,8 @@ const docTemplate = `{ "Dashboard" ], "summary": "Get work unit distribution data for dashboard", + "operationId": "getWorkUnitDistributionList", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "employee name for filter", @@ -1410,25 +1404,25 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.WorkUnitDistributionsResponse" + "$ref": "#/definitions/WorkUnitDistributionsResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -1436,6 +1430,11 @@ const docTemplate = `{ }, "/dashboards/resources/work-unit-distribution-summary": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get summary for workunit distribution dashboard", "consumes": [ "application/json" @@ -1447,26 +1446,18 @@ const docTemplate = `{ "Dashboard" ], "summary": "Get summary for workunit distribution dashboard", - "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - } - ], + "operationId": "getWorkUnitDistributionSummary", "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.SummaryWorkUnitDistributionResponse" + "$ref": "#/definitions/SummaryWorkUnitDistributionResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -1474,6 +1465,11 @@ const docTemplate = `{ }, "/employees": { "post": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Create new employee", "consumes": [ "application/json" @@ -1485,6 +1481,7 @@ const docTemplate = `{ "Employee" ], "summary": "Create new employee", + "operationId": "createEmployee", "parameters": [ { "description": "Body", @@ -1492,40 +1489,33 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.CreateEmployeeInput" + "$ref": "#/definitions/CreateEmployeeRequest" } - }, - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.EmployeeData" + "$ref": "#/definitions/EmployeeDataResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -1533,6 +1523,11 @@ const docTemplate = `{ }, "/employees/search": { "post": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get the list of employees with pagination and workingStatus", "consumes": [ "application/json" @@ -1544,21 +1539,15 @@ const docTemplate = `{ "Employee" ], "summary": "Get the list of employees", + "operationId": "getEmployeeList", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "description": "Body", "name": "Body", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.GetListEmployeeInput" + "$ref": "#/definitions/GetListEmployeeQuery" } } ], @@ -1566,25 +1555,25 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.EmployeeListDataResponse" + "$ref": "#/definitions/EmployeeListDataResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -1592,6 +1581,11 @@ const docTemplate = `{ }, "/employees/{id}": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get employee by id", "consumes": [ "application/json" @@ -1603,14 +1597,8 @@ const docTemplate = `{ "Employee" ], "summary": "Get employee by id", + "operationId": "getEmployeeDetails", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Employee ID", @@ -1623,25 +1611,25 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.EmployeeData" + "$ref": "#/definitions/EmployeeDataResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -1649,6 +1637,11 @@ const docTemplate = `{ }, "/employees/{id}/base-salary": { "put": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Update employee's base salary by employee and base salary id", "consumes": [ "application/json" @@ -1660,14 +1653,8 @@ const docTemplate = `{ "Employee" ], "summary": "Update employee's base salary by employee and base salary id", + "operationId": "updateBaseSalary", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Employee ID", @@ -1681,7 +1668,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.UpdateBaseSalaryInput" + "$ref": "#/definitions/UpdateBaseSalaryRequest" } } ], @@ -1689,25 +1676,25 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.UpdateBaseSalaryResponse" + "$ref": "#/definitions/UpdateBaseSalaryResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -1715,6 +1702,11 @@ const docTemplate = `{ }, "/employees/{id}/employee-status": { "put": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Update account status by employee id", "consumes": [ "application/json" @@ -1726,14 +1718,8 @@ const docTemplate = `{ "Employee" ], "summary": "Update account status by employee id", + "operationId": "updateEmployeeStatus", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Employee ID", @@ -1747,8 +1733,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "description": "working info", - "type": "string" + "$ref": "#/definitions/UpdateWorkingStatusRequest" } } ], @@ -1756,25 +1741,25 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.UpdateEmployeeStatusResponse" + "$ref": "#/definitions/UpdateEmployeeStatusResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -1782,6 +1767,11 @@ const docTemplate = `{ }, "/employees/{id}/general-info": { "put": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Update general info of the employee by id", "consumes": [ "application/json" @@ -1793,14 +1783,8 @@ const docTemplate = `{ "Employee" ], "summary": "Update general info of the employee by id", + "operationId": "updateGeneralInfo", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Employee ID", @@ -1814,7 +1798,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.UpdateEmployeeGeneralInfoInput" + "$ref": "#/definitions/UpdateEmployeeGeneralInfoRequest" } } ], @@ -1822,25 +1806,25 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.UpdateGeneralEmployeeResponse" + "$ref": "#/definitions/UpdateGeneralEmployeeResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -1848,6 +1832,11 @@ const docTemplate = `{ }, "/employees/{id}/personal-info": { "put": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Update personal info of the employee by id", "consumes": [ "application/json" @@ -1859,14 +1848,8 @@ const docTemplate = `{ "Employee" ], "summary": "Update personal info of the employee by id", + "operationId": "updatePersonalInfo", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Employee ID", @@ -1880,7 +1863,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.UpdatePersonalInfoInput" + "$ref": "#/definitions/UpdatePersonalInfoRequest" } } ], @@ -1888,25 +1871,25 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.UpdatePersonalEmployeeResponse" + "$ref": "#/definitions/UpdatePersonalEmployeeResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -1914,6 +1897,11 @@ const docTemplate = `{ }, "/employees/{id}/roles": { "put": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Update role by employee id", "consumes": [ "application/json" @@ -1925,14 +1913,8 @@ const docTemplate = `{ "Employee" ], "summary": "Update role by employee id", + "operationId": "updateRole", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Employee ID", @@ -1941,12 +1923,12 @@ const docTemplate = `{ "required": true }, { - "description": "Account role ID", - "name": "roleID", + "description": "body", + "name": "Body", "in": "body", "required": true, "schema": { - "type": "string" + "$ref": "#/definitions/UpdateRoleRequest" } } ], @@ -1954,25 +1936,25 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -1980,6 +1962,11 @@ const docTemplate = `{ }, "/employees/{id}/skills": { "put": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Update Skill for employee by id", "consumes": [ "application/json" @@ -1991,6 +1978,7 @@ const docTemplate = `{ "Employee" ], "summary": "Update Skill for employee by id", + "operationId": "updateSkill", "parameters": [ { "type": "string", @@ -2005,40 +1993,33 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.UpdateSkillsInput" + "$ref": "#/definitions/UpdateSkillsRequest" } - }, - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.UpdateSkillsEmployeeResponse" + "$ref": "#/definitions/UpdateSkillsEmployeeResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -2046,6 +2027,11 @@ const docTemplate = `{ }, "/employees/{id}/upload-avatar": { "post": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Upload avatar of employee by id", "consumes": [ "application/json" @@ -2057,6 +2043,7 @@ const docTemplate = `{ "Employee" ], "summary": "Upload avatar of employee by id", + "operationId": "uploadAvatar", "parameters": [ { "type": "string", @@ -2065,13 +2052,6 @@ const docTemplate = `{ "in": "path", "required": true }, - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "file", "description": "avatar upload", @@ -2084,25 +2064,25 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.EmployeeContentDataResponse" + "$ref": "#/definitions/EmployeeContentDataResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -2110,6 +2090,11 @@ const docTemplate = `{ }, "/engagements/channel/:channel-id/last-message-id": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get local last message ID of a channel", "consumes": [ "application/json" @@ -2121,14 +2106,8 @@ const docTemplate = `{ "Engagement" ], "summary": "Get local last message ID of a channel", + "operationId": "getLastMessageID", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Discord Channel ID", @@ -2141,19 +2120,19 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -2161,6 +2140,11 @@ const docTemplate = `{ }, "/engagements/rollup": { "post": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Upsert engagement rollup", "consumes": [ "application/json" @@ -2172,21 +2156,15 @@ const docTemplate = `{ "Engagement" ], "summary": "Upsert engagement rollup", + "operationId": "upsertEngagementRollup", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "description": "Body", "name": "Body", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.UpsertRollupRequest" + "$ref": "#/definitions/UpsertRollupRequest" } } ], @@ -2194,19 +2172,19 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -2214,6 +2192,11 @@ const docTemplate = `{ }, "/feedbacks": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get list feedbacks", "consumes": [ "application/json" @@ -2225,14 +2208,8 @@ const docTemplate = `{ "Feedback" ], "summary": "Get list feedbacks", + "operationId": "getFeedbackList", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Status", @@ -2250,25 +2227,31 @@ const docTemplate = `{ "description": "Size", "name": "size", "in": "query" + }, + { + "type": "string", + "description": "Sort", + "name": "sort", + "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.ListFeedbackResponse" + "$ref": "#/definitions/ListFeedbackResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -2276,6 +2259,11 @@ const docTemplate = `{ }, "/feedbacks/unreads": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get number of unread inbox for user", "consumes": [ "application/json" @@ -2287,32 +2275,24 @@ const docTemplate = `{ "Feedback" ], "summary": "Get number of unread inbox for user", - "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - } - ], + "operationId": "countUnreadFeedback", "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.UnreadFeedbackCountResponse" + "$ref": "#/definitions/UnreadFeedbackCountResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -2320,6 +2300,11 @@ const docTemplate = `{ }, "/feedbacks/{id}/topics/{topicID}": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get feedback detail for logged-in users", "consumes": [ "application/json" @@ -2331,14 +2316,8 @@ const docTemplate = `{ "Feedback" ], "summary": "Get feedback detail for logged-in users", + "operationId": "getFeedbackDetail", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Feedback Event ID", @@ -2358,25 +2337,25 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.FeedbackDetailResponse" + "$ref": "#/definitions/FeedbackDetailResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -2384,6 +2363,11 @@ const docTemplate = `{ }, "/feedbacks/{id}/topics/{topicID}/submit": { "post": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Submit the draft or done answers", "consumes": [ "application/json" @@ -2395,14 +2379,8 @@ const docTemplate = `{ "Feedback" ], "summary": "Submit the draft or done answers", + "operationId": "submitFeedback", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Feedback Event ID", @@ -2423,7 +2401,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.SubmitBody" + "$ref": "#/definitions/SubmitFeedbackRequest" } } ], @@ -2431,25 +2409,25 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.SubmitFeedbackResponse" + "$ref": "#/definitions/SubmitFeedbackResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -2457,6 +2435,11 @@ const docTemplate = `{ }, "/invite": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Submit Get invitation state based on token", "consumes": [ "application/json" @@ -2468,38 +2451,30 @@ const docTemplate = `{ "Onboarding" ], "summary": "Get invitation state based on token", - "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - } - ], + "operationId": "getInvitation", "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.EmployeeInvitationResponse" + "$ref": "#/definitions/EmployeeInvitationResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -2507,6 +2482,11 @@ const docTemplate = `{ }, "/invite/submit": { "put": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Submit Onboarding form", "consumes": [ "application/json" @@ -2518,21 +2498,15 @@ const docTemplate = `{ "Onboarding" ], "summary": "Submit onboarding form", + "operationId": "submitOnboardingForm", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "description": "Body", "name": "Body", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.SubmitOnboardingFormRequest" + "$ref": "#/definitions/SubmitOnboardingFormRequest" } } ], @@ -2540,25 +2514,25 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -2566,6 +2540,11 @@ const docTemplate = `{ }, "/invoices": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get latest invoice by project id", "consumes": [ "application/json" @@ -2577,14 +2556,8 @@ const docTemplate = `{ "Invoice" ], "summary": "Get latest invoice by project id", + "operationId": "getInvoiceList", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "projectID", @@ -2596,31 +2569,49 @@ const docTemplate = `{ "description": "status", "name": "status", "in": "query" + }, + { + "type": "integer", + "description": "page", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "size", + "name": "size", + "in": "query" + }, + { + "type": "string", + "description": "sort", + "name": "sort", + "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.InvoiceListResponse" + "$ref": "#/definitions/InvoiceListResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -2628,7 +2619,12 @@ const docTemplate = `{ }, "/invoices/send": { "post": { - "description": "Create new invoice and send to clientm", + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Create new invoice and send to client", "consumes": [ "application/json" ], @@ -2639,21 +2635,15 @@ const docTemplate = `{ "Invoice" ], "summary": "Create new invoice and send to client", + "operationId": "sendInvoice", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "description": "body", "name": "Body", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.SendInvoiceRequest" + "$ref": "#/definitions/SendInvoiceRequest" } } ], @@ -2661,25 +2651,25 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -2687,6 +2677,11 @@ const docTemplate = `{ }, "/invoices/template": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get the latest invoice by project id", "consumes": [ "application/json" @@ -2698,14 +2693,8 @@ const docTemplate = `{ "Invoice" ], "summary": "Get the latest invoice by project id", + "operationId": "getInvoiceTemplate", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "projectID", @@ -2718,25 +2707,25 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.InvoiceTemplateResponse" + "$ref": "#/definitions/InvoiceTemplateResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -2744,6 +2733,11 @@ const docTemplate = `{ }, "/invoices/{id}/status": { "put": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Update status for invoice", "consumes": [ "application/json" @@ -2755,38 +2749,29 @@ const docTemplate = `{ "Invoice" ], "summary": "Update status for invoice", - "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - } - ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -2794,6 +2779,11 @@ const docTemplate = `{ }, "/line-managers": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get the list of line managers", "consumes": [ "application/json" @@ -2805,26 +2795,18 @@ const docTemplate = `{ "Employee" ], "summary": "Get the list of line managers", - "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - } - ], + "operationId": "getLineManagerList", "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.LineManagersResponse" + "$ref": "#/definitions/LineManagersResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -2843,23 +2825,24 @@ const docTemplate = `{ "Metadata" ], "summary": "Get list values for chapters", + "operationId": "getChaptersList", "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.ChapterResponse" + "$ref": "#/definitions/ChapterResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -2878,23 +2861,24 @@ const docTemplate = `{ "Metadata" ], "summary": "Get all countries", + "operationId": "getCountriesList", "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.CountriesResponse" + "$ref": "#/definitions/CountriesResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -2913,23 +2897,24 @@ const docTemplate = `{ "Metadata" ], "summary": "Get list cities by country", + "operationId": "getCitiesList", "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.CitiesResponse" + "$ref": "#/definitions/CitiesResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -2948,23 +2933,24 @@ const docTemplate = `{ "Metadata" ], "summary": "Get list currencies", + "operationId": "getCurrenciesList", "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.GetCurrenciesResponse" + "$ref": "#/definitions/GetCurrenciesResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -2983,23 +2969,24 @@ const docTemplate = `{ "Metadata" ], "summary": "Get list values for organizations", + "operationId": "getOrganizationsList", "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.OrganizationsResponse" + "$ref": "#/definitions/OrganizationsResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -3018,28 +3005,34 @@ const docTemplate = `{ "Metadata" ], "summary": "Get list values for positions", + "operationId": "getPositionsList", "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.PositionResponse" + "$ref": "#/definitions/PositionResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } }, "post": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Create new position", "consumes": [ "application/json" @@ -3051,21 +3044,15 @@ const docTemplate = `{ "Metadata" ], "summary": "Create new position", + "operationId": "createPosition", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "description": "Body", "name": "Body", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.CreatePositionInput" + "$ref": "#/definitions/CreatePositionInput" } } ], @@ -3073,25 +3060,25 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -3099,6 +3086,11 @@ const docTemplate = `{ }, "/metadata/positions/{id}": { "put": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Update position information by ID", "consumes": [ "application/json" @@ -3110,14 +3102,8 @@ const docTemplate = `{ "Metadata" ], "summary": "Update position information by ID", + "operationId": "updatePosition", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Position ID", @@ -3131,7 +3117,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.UpdatePositionBody" + "$ref": "#/definitions/UpdatePositionBody" } } ], @@ -3139,30 +3125,35 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } }, "delete": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Delete position by ID", "consumes": [ "application/json" @@ -3174,14 +3165,8 @@ const docTemplate = `{ "Metadata" ], "summary": "Delete position by ID", + "operationId": "deletePosition", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Position ID", @@ -3194,25 +3179,25 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -3231,26 +3216,24 @@ const docTemplate = `{ "Metadata" ], "summary": "Get list values for project statuses", + "operationId": "getProjectStatusesList", "responses": { "200": { "description": "OK", "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/view.MetaData" - } + "$ref": "#/definitions/MetaDataResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -3269,23 +3252,51 @@ const docTemplate = `{ "Metadata" ], "summary": "Get list question by category and subcategory", + "operationId": "getQuestionsList", + "parameters": [ + { + "enum": [ + "feedback", + "survey" + ], + "type": "string", + "description": "Category", + "name": "category", + "in": "query", + "required": true + }, + { + "enum": [ + "peer-review", + "engagement", + "work", + "appreciation", + "comment" + ], + "type": "string", + "description": "Subcategory", + "name": "subcategory", + "in": "query", + "required": true + } + ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.GetQuestionResponse" + "$ref": "#/definitions/GetQuestionResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -3304,23 +3315,24 @@ const docTemplate = `{ "Metadata" ], "summary": "Get list roles", + "operationId": "getRolesList", "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.RolesResponse" + "$ref": "#/definitions/RolesResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -3339,23 +3351,24 @@ const docTemplate = `{ "Metadata" ], "summary": "Get list values for sentitorities", + "operationId": "getSenioritiesList", "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.SeniorityResponse" + "$ref": "#/definitions/SeniorityResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -3374,6 +3387,7 @@ const docTemplate = `{ "Metadata" ], "summary": "Get list values for stacks", + "operationId": "getStacksList", "parameters": [ { "type": "string", @@ -3398,24 +3412,29 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.StackResponse" + "$ref": "#/definitions/StackResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } }, "post": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Create new stack", "consumes": [ "application/json" @@ -3427,21 +3446,15 @@ const docTemplate = `{ "Metadata" ], "summary": "Create new stack", + "operationId": "createStack", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "description": "Body", "name": "Body", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.CreateStackInput" + "$ref": "#/definitions/CreateStackInput" } } ], @@ -3449,25 +3462,25 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -3475,6 +3488,11 @@ const docTemplate = `{ }, "/metadata/stacks/{id}": { "put": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Update stack information by ID", "consumes": [ "application/json" @@ -3486,14 +3504,8 @@ const docTemplate = `{ "Metadata" ], "summary": "Update stack information by ID", + "operationId": "updateStack", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Stack ID", @@ -3507,7 +3519,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.UpdateStackBody" + "$ref": "#/definitions/UpdateStackBody" } } ], @@ -3515,30 +3527,35 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } }, "delete": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Delete stack by ID", "consumes": [ "application/json" @@ -3550,14 +3567,8 @@ const docTemplate = `{ "Metadata" ], "summary": "Delete stack by ID", + "operationId": "deleteStack", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Stack ID", @@ -3570,25 +3581,25 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -3607,26 +3618,24 @@ const docTemplate = `{ "Metadata" ], "summary": "Get list values for working status", + "operationId": "getWorkingStatusList", "responses": { "200": { "description": "OK", "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/view.MetaData" - } + "$ref": "#/definitions/MetaDataResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -3649,13 +3658,13 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -3678,13 +3687,13 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -3707,13 +3716,13 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -3745,13 +3754,13 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -3774,13 +3783,13 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -3803,13 +3812,13 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -3832,13 +3841,13 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -3861,13 +3870,13 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -3890,13 +3899,13 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -3919,13 +3928,13 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -3948,13 +3957,13 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -3977,13 +3986,13 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -4006,13 +4015,13 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -4035,13 +4044,13 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -4049,6 +4058,11 @@ const docTemplate = `{ }, "/profile": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get profile information of employee", "consumes": [ "application/json" @@ -4060,43 +4074,40 @@ const docTemplate = `{ "Profile" ], "summary": "Get profile information of employee", - "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - } - ], + "operationId": "getPofile", "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.ProfileDataResponse" + "$ref": "#/definitions/ProfileDataResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } }, "put": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Update profile info by id", "consumes": [ "application/json" @@ -4108,14 +4119,8 @@ const docTemplate = `{ "Profile" ], "summary": "Update profile info by id", + "operationId": "updateProfileInfo", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Employee ID", @@ -4129,7 +4134,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.UpdateInfoInput" + "$ref": "#/definitions/UpdateInfoInput" } } ], @@ -4137,25 +4142,25 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.UpdateProfileInfoResponse" + "$ref": "#/definitions/UpdateProfileInfoResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -4163,6 +4168,11 @@ const docTemplate = `{ }, "/profile/upload": { "post": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Upload image by id", "consumes": [ "application/json" @@ -4174,14 +4184,8 @@ const docTemplate = `{ "Profile" ], "summary": "Upload image by id", + "operationId": "uploadImage", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "file", "description": "content upload", @@ -4194,25 +4198,25 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.EmployeeContentDataResponse" + "$ref": "#/definitions/EmployeeContentDataResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -4220,6 +4224,11 @@ const docTemplate = `{ }, "/profile/upload-avatar": { "post": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Upload avatar by id", "consumes": [ "application/json" @@ -4231,14 +4240,8 @@ const docTemplate = `{ "Profile" ], "summary": "Upload avatar by id", + "operationId": "uploadProfileAvatar", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "file", "description": "content upload", @@ -4251,25 +4254,25 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.EmployeeContentDataResponse" + "$ref": "#/definitions/EmployeeContentDataResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -4277,6 +4280,11 @@ const docTemplate = `{ }, "/project/{id}/members/{memberID}": { "put": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Unassign member in a project", "consumes": [ "application/json" @@ -4289,13 +4297,6 @@ const docTemplate = `{ ], "summary": "Unassign member in a project", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Project ID", @@ -4315,30 +4316,35 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } }, "delete": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Delete member in a project", "consumes": [ "application/json" @@ -4351,13 +4357,6 @@ const docTemplate = `{ ], "summary": "Delete member in a project", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Project ID", @@ -4377,25 +4376,25 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -4403,6 +4402,11 @@ const docTemplate = `{ }, "/project/{id}/slot/{slotID}": { "delete": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Delete slot in a project", "consumes": [ "application/json" @@ -4417,16 +4421,9 @@ const docTemplate = `{ "parameters": [ { "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, - { - "type": "string", - "description": "Project ID", - "name": "id", - "in": "path", + "description": "Project ID", + "name": "id", + "in": "path", "required": true }, { @@ -4441,25 +4438,25 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -4467,6 +4464,11 @@ const docTemplate = `{ }, "/projects": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get list of project", "consumes": [ "application/json" @@ -4479,18 +4481,12 @@ const docTemplate = `{ ], "summary": "Get list of project", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "array", "items": { "type": "string" }, + "collectionFormat": "csv", "description": "Project status", "name": "status", "in": "query" @@ -4524,24 +4520,29 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.ProjectListDataResponse" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ProjectListDataResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } }, "post": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Create new project", "consumes": [ "application/json" @@ -4554,20 +4555,13 @@ const docTemplate = `{ ], "summary": "Create new project", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "description": "body", "name": "Body", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.CreateProjectInput" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_project_request.CreateProjectInput" } } ], @@ -4575,19 +4569,19 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.CreateProjectData" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.CreateProjectData" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -4595,6 +4589,11 @@ const docTemplate = `{ }, "/projects/icy-weekly-distribution": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get Icy Weekly Distribution", "consumes": [ "application/json" @@ -4606,26 +4605,17 @@ const docTemplate = `{ "Project" ], "summary": "Get Icy Weekly Distribution", - "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - } - ], "responses": { "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -4633,6 +4623,11 @@ const docTemplate = `{ }, "/projects/{id}": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get details of a project", "consumes": [ "application/json" @@ -4645,13 +4640,6 @@ const docTemplate = `{ ], "summary": "Get details of a project", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Project ID", @@ -4664,25 +4652,25 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.ProjectDataResponse" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ProjectDataResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -4690,6 +4678,11 @@ const docTemplate = `{ }, "/projects/{id}/contact-info": { "put": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Update contact info of the project by id", "consumes": [ "application/json" @@ -4702,13 +4695,6 @@ const docTemplate = `{ ], "summary": "Update contact info of the project by id", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Project ID", @@ -4722,7 +4708,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.UpdateContactInfoInput" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_project_request.UpdateContactInfoInput" } } ], @@ -4730,25 +4716,25 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.UpdateProjectContactInfoResponse" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.UpdateProjectContactInfoResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -4756,6 +4742,11 @@ const docTemplate = `{ }, "/projects/{id}/general-info": { "put": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Update general info of the project by id", "consumes": [ "application/json" @@ -4768,13 +4759,6 @@ const docTemplate = `{ ], "summary": "Update general info of the project by id", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Project ID", @@ -4788,7 +4772,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.UpdateProjectGeneralInfoInput" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_project_request.UpdateProjectGeneralInfoInput" } } ], @@ -4796,25 +4780,25 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.UpdateProjectGeneralInfoResponse" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.UpdateProjectGeneralInfoResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -4822,6 +4806,11 @@ const docTemplate = `{ }, "/projects/{id}/members": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get list members of project", "consumes": [ "application/json" @@ -4834,13 +4823,6 @@ const docTemplate = `{ ], "summary": "Get list members of project", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Project ID", @@ -4888,30 +4870,35 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.ProjectMemberListResponse" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ProjectMemberListResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } }, "put": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Update member in an existing project", "consumes": [ "application/json" @@ -4924,13 +4911,6 @@ const docTemplate = `{ ], "summary": "Update member in an existing project", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Project ID", @@ -4944,7 +4924,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.UpdateMemberInput" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_project_request.UpdateMemberInput" } } ], @@ -4952,30 +4932,35 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.CreateMemberDataResponse" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.CreateMemberDataResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } }, "post": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Assign member in an existing project", "consumes": [ "application/json" @@ -4988,13 +4973,6 @@ const docTemplate = `{ ], "summary": "Assign member into an existing project", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Project ID", @@ -5008,7 +4986,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.AssignMemberInput" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_project_request.AssignMemberInput" } } ], @@ -5016,25 +4994,25 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.CreateMemberDataResponse" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.CreateMemberDataResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -5042,6 +5020,11 @@ const docTemplate = `{ }, "/projects/{id}/sending-survey-state": { "put": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Update allows sending survey for project by id", "consumes": [ "application/json" @@ -5054,13 +5037,6 @@ const docTemplate = `{ ], "summary": "Update allows sending survey for project by id", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Project ID", @@ -5079,25 +5055,25 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -5105,6 +5081,11 @@ const docTemplate = `{ }, "/projects/{id}/status": { "put": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Update status for project by id", "consumes": [ "application/json" @@ -5117,13 +5098,6 @@ const docTemplate = `{ ], "summary": "Update status for project by id", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Project ID", @@ -5145,25 +5119,25 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.UpdateProjectStatusResponse" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.UpdateProjectStatusResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -5171,6 +5145,11 @@ const docTemplate = `{ }, "/projects/{id}/upload-avatar": { "post": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Upload avatar of project by id", "consumes": [ "application/json" @@ -5190,13 +5169,6 @@ const docTemplate = `{ "in": "path", "required": true }, - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "file", "description": "avatar upload", @@ -5209,25 +5181,25 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.ProjectContentDataResponse" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ProjectContentDataResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -5235,6 +5207,11 @@ const docTemplate = `{ }, "/projects/{id}/work-units": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get list work units of a project", "consumes": [ "application/json" @@ -5247,49 +5224,57 @@ const docTemplate = `{ ], "summary": "Get list work units of a project", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Project ID", "name": "id", "in": "path", "required": true + }, + { + "enum": [ + "active", + "archived" + ], + "type": "string", + "description": "status", + "name": "status", + "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.ListWorkUnitResponse" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ListWorkUnitResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } }, "post": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get work unit of a project", "consumes": [ "application/json" @@ -5302,13 +5287,6 @@ const docTemplate = `{ ], "summary": "Create work unit of a project", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Project ID", @@ -5322,7 +5300,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.CreateWorkUnitBody" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_project_request.CreateWorkUnitBody" } } ], @@ -5330,25 +5308,25 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.WorkUnitResponse" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.WorkUnitResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -5356,6 +5334,11 @@ const docTemplate = `{ }, "/projects/{id}/work-units/{workUnitID}": { "put": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Update work unit info", "consumes": [ "application/json" @@ -5368,13 +5351,6 @@ const docTemplate = `{ ], "summary": "Update work unit info", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Project ID", @@ -5395,7 +5371,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.UpdateWorkUnitInput" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_project_request.UpdateWorkUnitInput" } } ], @@ -5403,25 +5379,25 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -5429,6 +5405,11 @@ const docTemplate = `{ }, "/projects/{id}/work-units/{workUnitID}/archive": { "put": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Archive an active work unit of a project", "consumes": [ "application/json" @@ -5441,13 +5422,6 @@ const docTemplate = `{ ], "summary": "Archive an active work unit of a project", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Project ID", @@ -5467,25 +5441,25 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -5493,6 +5467,11 @@ const docTemplate = `{ }, "/projects/{id}/work-units/{workUnitID}/unarchive": { "put": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Unarchive an archive work unit of a project", "consumes": [ "application/json" @@ -5505,13 +5484,6 @@ const docTemplate = `{ ], "summary": "Unarchive an archive work unit of a project", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Project ID", @@ -5531,25 +5503,25 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -5568,29 +5540,30 @@ const docTemplate = `{ "Public" ], "summary": "Get public employees list", + "operationId": "getPublicEmployeeList", "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.EmployeeLocationListResponse" + "$ref": "#/definitions/EmployeeLocationListResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -5598,6 +5571,11 @@ const docTemplate = `{ }, "/surveys": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get list event", "consumes": [ "application/json" @@ -5610,13 +5588,6 @@ const docTemplate = `{ ], "summary": "Get list event", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Event Subtype", @@ -5641,24 +5612,29 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.ListSurveyResponse" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ListSurveyResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } }, "post": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Create new survey", "consumes": [ "application/json" @@ -5677,40 +5653,33 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.CreateSurveyFeedbackInput" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_survey_request.CreateSurveyFeedbackInput" } - }, - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -5718,6 +5687,11 @@ const docTemplate = `{ }, "/surveys/{id}": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get survey detail", "consumes": [ "application/json" @@ -5730,13 +5704,6 @@ const docTemplate = `{ ], "summary": "Get survey detail", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Feedback Event ID", @@ -5773,6 +5740,7 @@ const docTemplate = `{ "items": { "type": "string" }, + "collectionFormat": "csv", "description": "Projects", "name": "projects", "in": "query" @@ -5782,30 +5750,35 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.ListSurveyDetailResponse" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ListSurveyDetailResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } }, "delete": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Delete survey by id", "consumes": [ "application/json" @@ -5818,13 +5791,6 @@ const docTemplate = `{ ], "summary": "Delete survey by id", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Feedback Event ID", @@ -5837,25 +5803,25 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -5863,6 +5829,11 @@ const docTemplate = `{ }, "/surveys/{id}/done": { "put": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Mark done feedback event", "consumes": [ "application/json" @@ -5875,13 +5846,6 @@ const docTemplate = `{ ], "summary": "Mark done feedback event", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Feedback Event ID", @@ -5894,25 +5858,25 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -5920,6 +5884,11 @@ const docTemplate = `{ }, "/surveys/{id}/send": { "post": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Send the survey", "consumes": [ "application/json" @@ -5932,13 +5901,6 @@ const docTemplate = `{ ], "summary": "Send the survey", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Feedback Event ID", @@ -5952,7 +5914,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.SendSurveyInput" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_survey_request.SendSurveyInput" } } ], @@ -5960,25 +5922,25 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -5986,6 +5948,11 @@ const docTemplate = `{ }, "/surveys/{id}/topics/{topicID}": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get detail for peer review", "consumes": [ "application/json" @@ -5998,13 +5965,6 @@ const docTemplate = `{ ], "summary": "Get detail for peer review", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Feedback Event ID", @@ -6024,30 +5984,35 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.SurveyTopicDetailResponse" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.SurveyTopicDetailResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } }, "delete": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "delete survey topic", "consumes": [ "application/json" @@ -6059,38 +6024,29 @@ const docTemplate = `{ "Survey" ], "summary": "delete survey topic", - "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - } - ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -6098,6 +6054,11 @@ const docTemplate = `{ }, "/surveys/{id}/topics/{topicID}/employees": { "put": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Update reviewers in a topic", "consumes": [ "application/json" @@ -6110,20 +6071,13 @@ const docTemplate = `{ ], "summary": "Update reviewers in a topic", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "description": "Body", "name": "Body", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.UpdateTopicReviewersBody" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_survey_request.UpdateTopicReviewersBody" } } ], @@ -6131,30 +6085,35 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } }, "delete": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Delete reviewers in a topic", "consumes": [ "application/json" @@ -6167,13 +6126,6 @@ const docTemplate = `{ ], "summary": "Delete reviewers in a topic", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Feedback Event ID", @@ -6194,7 +6146,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.DeleteTopicReviewersBody" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_survey_request.DeleteTopicReviewersBody" } } ], @@ -6202,25 +6154,25 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -6228,6 +6180,11 @@ const docTemplate = `{ }, "/surveys/{id}/topics/{topicID}/reviews/{reviewID}": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get survey review detail", "consumes": [ "application/json" @@ -6239,38 +6196,29 @@ const docTemplate = `{ "Survey" ], "summary": "Get survey review detail", - "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - } - ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.FeedbackReviewDetailResponse" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.FeedbackReviewDetailResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -6278,432 +6226,535 @@ const docTemplate = `{ } }, "definitions": { - "gorm.DeletedAt": { + "APIKeyData": { "type": "object", "properties": { - "time": { + "key": { "type": "string" - }, - "valid": { - "description": "Valid is true if Time is not NULL", - "type": "boolean" } } }, - "model.AccountingItem": { + "APIKeyResponse": { "type": "object", "properties": { - "amount": { - "type": "number" - }, - "name": { - "type": "string" + "data": { + "$ref": "#/definitions/APIKeyData" } } }, - "model.BankAccount": { + "ActionItemReportResponse": { "type": "object", "properties": { - "accountNumber": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/AuditActionItemReport" + } + } + } + }, + "ActionItemSquash": { + "type": "object", + "properties": { + "snapDate": { "type": "string" }, - "address": { - "type": "string" + "trend": { + "type": "number" }, - "bankName": { - "type": "string" + "value": { + "type": "integer" + } + } + }, + "ActionItemSquashReport": { + "type": "object", + "properties": { + "all": { + "type": "array", + "items": { + "$ref": "#/definitions/ActionItemSquash" + } }, - "createdAt": { - "type": "string" - }, - "currency": { - "$ref": "#/definitions/model.Currency" - }, - "currencyID": { - "type": "string" + "high": { + "type": "array", + "items": { + "$ref": "#/definitions/ActionItemSquash" + } }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" + "low": { + "type": "array", + "items": { + "$ref": "#/definitions/ActionItemSquash" + } }, - "id": { - "type": "string" + "medium": { + "type": "array", + "items": { + "$ref": "#/definitions/ActionItemSquash" + } + } + } + }, + "ActionItemSquashReportResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/ActionItemSquashReport" + } + } + }, + "ActionItemTrend": { + "type": "object", + "properties": { + "high": { + "type": "number" }, - "intermediaryBankAddress": { - "type": "string" + "low": { + "type": "number" }, - "intermediaryBankName": { + "medium": { + "type": "number" + } + } + }, + "Address": { + "type": "object", + "properties": { + "address": { "type": "string" }, - "name": { + "city": { "type": "string" }, - "ownerName": { + "country": { "type": "string" }, - "routingNumber": { + "lat": { "type": "string" }, - "swiftCode": { + "long": { "type": "string" + } + } + }, + "Audit": { + "type": "object", + "properties": { + "avg": { + "type": "number" }, - "uksortCode": { + "quarter": { "type": "string" }, - "updatedAt": { - "type": "string" + "trend": { + "type": "number" } } }, - "model.BaseSalary": { + "AuditActionItemReport": { "type": "object", "properties": { - "batch": { + "high": { "type": "integer" }, - "category": { - "type": "string" - }, - "company_account_amount": { + "low": { "type": "integer" }, - "contract_amount": { + "medium": { "type": "integer" }, - "createdAt": { - "type": "string" - }, - "currency": { - "$ref": "#/definitions/model.Currency" - }, - "currency_id": { - "type": "string" - }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "effective_date": { - "type": "string" - }, - "employee": { - "$ref": "#/definitions/model.Employee" - }, - "employee_id": { - "type": "string" - }, - "id": { + "quarter": { "type": "string" }, - "insurance_amount": { - "type": "integer" - }, - "personal_account_amount": { - "type": "integer" - }, - "type": { - "type": "string" + "trend": { + "$ref": "#/definitions/ActionItemTrend" + } + } + }, + "AuditData": { + "type": "object", + "properties": { + "average": { + "type": "array", + "items": { + "$ref": "#/definitions/Audit" + } }, - "updatedAt": { - "type": "string" + "groups": { + "type": "array", + "items": { + "$ref": "#/definitions/GroupAudit" + } } } }, - "model.Chapter": { + "AuditResponse": { "type": "object", "properties": { - "code": { + "data": { + "$ref": "#/definitions/AuditData" + } + } + }, + "AuditSummaries": { + "type": "object", + "properties": { + "summary": { + "type": "array", + "items": { + "$ref": "#/definitions/AuditSummary" + } + } + } + }, + "AuditSummariesResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/AuditSummaries" + } + } + }, + "AuditSummary": { + "type": "object", + "properties": { + "audit": { + "$ref": "#/definitions/AuditValue" + }, + "avatar": { "type": "string" }, - "createdAt": { + "code": { "type": "string" }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" + "health": { + "$ref": "#/definitions/AuditValue" }, "id": { "type": "string" }, - "lead_id": { - "type": "string" - }, "name": { "type": "string" }, - "updatedAt": { - "type": "string" + "newItem": { + "$ref": "#/definitions/ItemValue" + }, + "resolvedItem": { + "$ref": "#/definitions/ItemValue" + }, + "size": { + "$ref": "#/definitions/ItemValue" } } }, - "model.City": { + "AuditValue": { "type": "object", "properties": { - "lat": { - "type": "string" + "trend": { + "type": "number" }, - "long": { + "value": { + "type": "number" + } + } + }, + "AuthData": { + "type": "object", + "properties": { + "accessToken": { "type": "string" }, - "name": { - "type": "string" + "employee": { + "$ref": "#/definitions/EmployeeData" } } }, - "model.Client": { + "AuthUserResponse": { "type": "object", "properties": { - "address": { + "data": { + "$ref": "#/definitions/LoggedInUserData" + } + } + }, + "AvailableEmployee": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, - "avatar": { + "displayName": { "type": "string" }, - "city": { + "fullName": { "type": "string" }, - "companySize": { + "id": { "type": "string" }, - "contacts": { + "positions": { "type": "array", "items": { - "$ref": "#/definitions/model.ClientContact" + "$ref": "#/definitions/Position" } }, - "country": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" + "projects": { + "type": "array", + "items": { + "$ref": "#/definitions/BasicProjectInfo" + } }, - "description": { - "type": "string" + "seniority": { + "$ref": "#/definitions/Seniority" }, - "id": { - "type": "string" + "stacks": { + "type": "array", + "items": { + "$ref": "#/definitions/Stack" + } }, - "industry": { + "username": { "type": "string" - }, - "isPublic": { - "type": "boolean" - }, - "lat": { + } + } + }, + "AvailableSlot": { + "type": "object", + "properties": { + "createdAt": { "type": "string" }, - "long": { + "id": { "type": "string" }, - "name": { + "note": { "type": "string" }, - "projects": { + "positions": { "type": "array", "items": { - "$ref": "#/definitions/model.Project" + "$ref": "#/definitions/Position" } }, - "registrationNumber": { - "type": "string" - }, - "solutionType": { - "type": "string" + "project": { + "$ref": "#/definitions/BasicProjectInfo" }, - "updatedAt": { - "type": "string" + "seniority": { + "$ref": "#/definitions/Seniority" }, - "website": { + "type": { "type": "string" } } }, - "model.ClientContact": { + "BankAccount": { "type": "object", "properties": { - "clientID": { + "accountNumber": { "type": "string" }, - "createdAt": { + "address": { "type": "string" }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" + "bankName": { + "type": "string" }, - "emails": { - "type": "array", - "items": { - "type": "integer" - } + "currency": { + "$ref": "#/definitions/Currency" + }, + "currencyID": { + "type": "string" }, "id": { "type": "string" }, - "isMainContact": { - "type": "boolean" + "intermediaryBankAddress": { + "type": "string" + }, + "intermediaryBankName": { + "type": "string" }, "name": { "type": "string" }, - "role": { + "ownerName": { "type": "string" }, - "updatedAt": { + "routingNumber": { + "type": "string" + }, + "swiftCode": { + "type": "string" + }, + "ukSortCode": { "type": "string" } } }, - "model.CommissionExplain": { + "BaseSalary": { "type": "object", "properties": { - "amount": { + "batch": { + "type": "integer" + }, + "category": { + "type": "string" + }, + "company_account_amount": { "type": "integer" }, - "bucket_id": { + "contract_amount": { "type": "integer" }, - "formatted_amount": { + "currency": { + "$ref": "#/definitions/Currency" + }, + "currency_id": { "type": "string" }, - "id": { + "effective_date": { "type": "string" }, - "month": { - "type": "integer" + "employee_id": { + "type": "string" }, - "name": { + "id": { "type": "string" }, - "todo_id": { + "insurance_amount": { "type": "integer" }, - "year": { + "personal_account_amount": { "type": "integer" - } - } - }, - "model.CompanyContactInfo": { - "type": "object", - "properties": { - "address": { - "type": "string" }, - "phone": { + "type": { "type": "string" } } }, - "model.CompanyInfo": { + "BasicEmployeeInfo": { "type": "object", "properties": { - "createdAt": { + "avatar": { "type": "string" }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" + "displayName": { + "type": "string" }, - "description": { + "fullName": { "type": "string" }, "id": { "type": "string" }, - "info": { - "$ref": "#/definitions/pgtype.JSONB" - }, - "name": { + "username": { + "type": "string" + } + } + }, + "BasicEventQuestionRequest": { + "type": "object", + "required": [ + "eventQuestionID" + ], + "properties": { + "answer": { "type": "string" }, - "registrationNumber": { + "eventQuestionID": { "type": "string" }, - "updatedAt": { + "note": { "type": "string" } } }, - "model.Country": { + "BasicProjectInfo": { "type": "object", "properties": { - "cities": { - "type": "array", - "items": { - "$ref": "#/definitions/model.City" - } - }, - "code": { + "avatar": { "type": "string" }, - "createdAt": { + "code": { "type": "string" }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, "id": { "type": "string" }, "name": { "type": "string" }, - "updatedAt": { + "status": { + "type": "string" + }, + "type": { "type": "string" } } }, - "model.Currency": { + "BraineryMetricResponse": { "type": "object", "properties": { - "createdAt": { + "data": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.BraineryMetric" + } + } + }, + "Chapter": { + "type": "object", + "properties": { + "code": { "type": "string" }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, "id": { "type": "string" }, - "locale": { + "leadID": { "type": "string" }, "name": { "type": "string" - }, - "symbol": { - "type": "string" - }, - "type": { - "type": "string" - }, - "updatedAt": { - "type": "string" } } }, - "model.DiscordAccount": { + "ChapterResponse": { "type": "object", "properties": { - "createdAt": { - "type": "string" - }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "discordID": { - "type": "string" - }, - "id": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_model.Chapter" + } + } + } + }, + "CitiesResponse": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "City": { + "type": "object", + "properties": { + "lat": { "type": "string" }, - "updatedAt": { + "long": { "type": "string" }, - "username": { + "name": { "type": "string" } } }, - "model.Employee": { + "Client": { "type": "object", "properties": { "address": { @@ -6712,603 +6763,688 @@ const docTemplate = `{ "avatar": { "type": "string" }, - "base_salary": { - "$ref": "#/definitions/model.BaseSalary" - }, - "basecampAttachableSGID": { + "city": { "type": "string" }, - "basecampID": { - "description": "social services", - "type": "integer" - }, - "city": { + "companySize": { "type": "string" }, + "contacts": { + "type": "array", + "items": { + "$ref": "#/definitions/ClientContact" + } + }, "country": { "type": "string" }, "createdAt": { "type": "string" }, - "dateOfBirth": { + "description": { "type": "string" }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "discordAccount": { - "$ref": "#/definitions/model.DiscordAccount" - }, - "discordAccountID": { + "id": { "type": "string" }, - "displayName": { + "industry": { "type": "string" }, - "employeeChapters": { - "type": "array", - "items": { - "$ref": "#/definitions/model.EmployeeChapter" - } + "isPublic": { + "type": "boolean" }, - "employeeOrganizations": { - "type": "array", - "items": { - "$ref": "#/definitions/model.EmployeeOrganization" - } + "lat": { + "type": "string" }, - "employeePositions": { - "type": "array", - "items": { - "$ref": "#/definitions/model.EmployeePosition" - } + "long": { + "type": "string" }, - "employeeRoles": { - "type": "array", - "items": { - "$ref": "#/definitions/model.EmployeeRole" - } + "name": { + "type": "string" }, - "employeeStacks": { + "projects": { "type": "array", "items": { - "$ref": "#/definitions/model.EmployeeStack" + "$ref": "#/definitions/Project" } }, - "employee_salary": { - "$ref": "#/definitions/model.EmployeeSalary" + "registrationNumber": { + "type": "string" }, - "fullName": { - "description": "basic info", + "solutionType": { "type": "string" }, - "gender": { + "updatedAt": { "type": "string" }, - "heads": { + "website": { + "type": "string" + } + } + }, + "ClientContact": { + "type": "object", + "properties": { + "emails": { "type": "array", "items": { - "$ref": "#/definitions/model.ProjectHead" + "type": "string" } }, - "horoscope": { - "type": "string" - }, "id": { "type": "string" }, - "identityCardPhotoBack": { - "type": "string" - }, - "identityCardPhotoFront": { - "type": "string" + "isMainContact": { + "type": "boolean" }, - "joinedDate": { + "name": { "type": "string" }, - "lat": { + "role": { "type": "string" + } + } + }, + "ClientContactInfo": { + "type": "object", + "properties": { + "emails": { + "type": "array", + "items": { + "type": "string" + } }, - "leftDate": { + "id": { "type": "string" }, - "lineManager": { - "$ref": "#/definitions/model.Employee" + "isMainContact": { + "type": "boolean" }, - "lineManagerID": { + "name": { "type": "string" - }, - "localBankBranch": { + } + } + }, + "ClientInfo": { + "type": "object", + "properties": { + "clientAddress": { "type": "string" }, - "localBankCurrency": { + "clientCompany": { "type": "string" }, - "localBankNumber": { - "type": "string" - }, - "localBankRecipientName": { + "contacts": { + "type": "array", + "items": { + "$ref": "#/definitions/ClientContactInfo" + } + } + } + }, + "CompanyContactInfo": { + "type": "object", + "properties": { + "address": { "type": "string" }, - "localBranchName": { + "phone": { + "type": "string" + } + } + }, + "CompanyInfo": { + "type": "object", + "properties": { + "description": { "type": "string" }, - "long": { + "id": { "type": "string" }, - "mbti": { + "info": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/CompanyContactInfo" + } + }, + "name": { "type": "string" }, - "mentees": { + "registrationNumber": { + "type": "string" + } + } + }, + "ContentDataResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ContentData" + } + } + }, + "CountriesResponse": { + "type": "object", + "properties": { + "data": { "type": "array", "items": { - "$ref": "#/definitions/model.Employee" + "$ref": "#/definitions/Country" } - }, - "organizations": { + } + } + }, + "Country": { + "type": "object", + "properties": { + "cities": { "type": "array", "items": { - "$ref": "#/definitions/model.Organization" + "$ref": "#/definitions/City" } }, - "passportPhotoBack": { + "code": { "type": "string" }, - "passportPhotoFront": { + "id": { "type": "string" }, - "personalEmail": { + "name": { "type": "string" - }, - "phoneNumber": { + } + } + }, + "CreateBraineryLogRequest": { + "type": "object", + "required": [ + "discordID", + "publishedAt", + "reward", + "tags", + "title", + "url" + ], + "properties": { + "discordID": { "type": "string" }, - "placeOfResidence": { + "githubID": { "type": "string" }, - "positions": { - "type": "array", - "items": { - "$ref": "#/definitions/model.Position" - } - }, - "projectMembers": { - "type": "array", - "items": { - "$ref": "#/definitions/model.ProjectMember" - } - }, - "referredBy": { + "publishedAt": { "type": "string" }, - "referrer": { - "$ref": "#/definitions/model.Employee" + "reward": { + "type": "number" }, - "roles": { + "tags": { "type": "array", "items": { - "$ref": "#/definitions/model.Role" + "type": "string" } }, - "seniority": { - "$ref": "#/definitions/model.Seniority" + "title": { + "type": "string" }, - "seniorityID": { + "url": { + "type": "string" + } + } + }, + "CreateClientRequest": { + "type": "object", + "properties": { + "address": { "type": "string" }, - "socialAccounts": { + "contacts": { "type": "array", "items": { - "$ref": "#/definitions/model.SocialAccount" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_client_request.CreateClientContactInput" } }, - "teamEmail": { + "country": { "type": "string" }, - "updatedAt": { + "description": { "type": "string" }, - "username": { + "industry": { "type": "string" }, - "wiseAccountNumber": { + "name": { "type": "string" }, - "wiseCurrency": { + "registrationNumber": { "type": "string" }, - "wiseRecipientEmail": { - "description": "payroll info", + "website": { + "type": "string" + } + } + }, + "CreateClientResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/Client" + } + } + }, + "CreateEmployeeRequest": { + "type": "object", + "required": [ + "displayName", + "fullName", + "joinedDate", + "personalEmail", + "positions", + "roles", + "salary", + "seniorityID", + "status", + "teamEmail" + ], + "properties": { + "displayName": { "type": "string" }, - "wiseRecipientID": { + "fullName": { + "type": "string", + "maxLength": 100 + }, + "joinedDate": { "type": "string" }, - "wiseRecipientName": { + "personalEmail": { "type": "string" }, - "workUnitMembers": { + "positions": { "type": "array", "items": { - "$ref": "#/definitions/model.WorkUnitMember" + "type": "string" } }, - "workingStatus": { - "description": "working info", - "type": "string" - } - } - }, - "model.EmployeeChapter": { - "type": "object", - "properties": { - "chapter": { - "$ref": "#/definitions/model.Chapter" - }, - "chapterID": { + "referredBy": { "type": "string" }, - "createdAt": { - "type": "string" + "roles": { + "type": "array", + "items": { + "type": "string" + } }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" + "salary": { + "type": "integer" }, - "employeeID": { + "seniorityID": { "type": "string" }, - "id": { + "status": { "type": "string" }, - "updatedAt": { + "teamEmail": { "type": "string" } } }, - "model.EmployeeOrganization": { + "CreatePositionInput": { "type": "object", + "required": [ + "code", + "name" + ], "properties": { - "createdAt": { + "code": { "type": "string" }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "employeeID": { + "name": { "type": "string" - }, - "id": { + } + } + }, + "CreateStackInput": { + "type": "object", + "required": [ + "code", + "name" + ], + "properties": { + "avatar": { "type": "string" }, - "organization": { - "$ref": "#/definitions/model.Organization" - }, - "organizationID": { + "code": { "type": "string" }, - "updatedAt": { + "name": { "type": "string" } } }, - "model.EmployeePosition": { + "Currency": { "type": "object", "properties": { - "createdAt": { + "id": { "type": "string" }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "employeeID": { + "locale": { "type": "string" }, - "id": { + "name": { "type": "string" }, - "position": { - "$ref": "#/definitions/model.Position" - }, - "positionID": { + "symbol": { "type": "string" }, - "updatedAt": { + "type": { "type": "string" } } }, - "model.EmployeeRole": { + "EmployeeAddress": { "type": "object", "properties": { - "createdAt": { + "address": { "type": "string" }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "employeeID": { + "city": { "type": "string" }, - "id": { + "country": { "type": "string" }, - "role": { - "$ref": "#/definitions/model.Role" - }, - "roleID": { + "lat": { "type": "string" }, - "updatedAt": { + "long": { "type": "string" } } }, - "model.EmployeeSalary": { + "EmployeeContentData": { "type": "object", "properties": { - "actual_pay_day": { - "type": "integer" + "url": { + "type": "string" + } + } + }, + "EmployeeContentDataResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/EmployeeContentData" + } + } + }, + "EmployeeData": { + "type": "object", + "properties": { + "address": { + "type": "string" }, - "bonus_amount": { - "type": "integer" + "avatar": { + "type": "string" + }, + "baseSalary": { + "$ref": "#/definitions/BaseSalary" }, - "bonus_detail": { + "birthday": { + "type": "string" + }, + "chapters": { "type": "array", "items": { - "type": "integer" - } - }, - "commission_amount": { - "type": "integer" - }, - "commission_detail": { - "type": "array", - "items": { - "type": "integer" + "$ref": "#/definitions/Chapter" } }, - "employee_id": { + "city": { "type": "string" }, - "is_done": { - "type": "boolean" + "country": { + "type": "string" }, - "month": { - "type": "integer" + "createdAt": { + "type": "string" }, - "plan_pay_day": { - "type": "integer" + "discordID": { + "type": "string" }, - "reimbursement_amount": { - "type": "integer" + "discordName": { + "type": "string" }, - "reimbursement_detail": { - "type": "array", - "items": { - "type": "integer" - } + "displayName": { + "type": "string" }, - "total_amount": { - "type": "integer" + "fullName": { + "description": "basic info", + "type": "string" }, - "year": { - "type": "integer" - } - } - }, - "model.EmployeeStack": { - "type": "object", - "properties": { - "createdAt": { + "gender": { "type": "string" }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" + "githubID": { + "type": "string" }, - "employeeID": { + "horoscope": { "type": "string" }, "id": { "type": "string" }, - "stack": { - "$ref": "#/definitions/model.Stack" - }, - "stackID": { + "joinedDate": { "type": "string" }, - "updatedAt": { + "leftDate": { "type": "string" - } - } - }, - "model.LikertScaleCount": { - "type": "object", - "properties": { - "agree": { - "type": "integer" - }, - "disagree": { - "type": "integer" }, - "mixed": { - "type": "integer" + "lineManager": { + "$ref": "#/definitions/BasicEmployeeInfo" }, - "stronglyAgree": { - "type": "integer" + "linkedInName": { + "type": "string" }, - "stronglyDisagree": { - "type": "integer" - } - } - }, - "model.NotionTechRadar": { - "type": "object", - "properties": { - "assign": { + "mbti": { "type": "string" }, - "categories": { + "mentees": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/MenteeInfo" } }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "quadrant": { + "notionID": { "type": "string" }, - "ring": { + "notionName": { "type": "string" }, - "tags": { + "organizations": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/Organization" } - } - } - }, - "model.Organization": { - "type": "object", - "properties": { - "avatar": { - "type": "string" }, - "code": { + "personalEmail": { "type": "string" }, - "createdAt": { + "phoneNumber": { "type": "string" }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "id": { + "placeOfResidence": { "type": "string" }, - "name": { - "type": "string" + "positions": { + "type": "array", + "items": { + "$ref": "#/definitions/Position" + } }, - "updatedAt": { - "type": "string" - } - } - }, - "model.Payroll": { - "type": "object", - "properties": { - "base_salary_amount": { - "type": "integer" + "projects": { + "type": "array", + "items": { + "$ref": "#/definitions/EmployeeProjectData" + } }, - "commission_amount": { - "type": "integer" + "referredBy": { + "$ref": "#/definitions/BasicEmployeeInfo" }, - "commission_explain": { + "roles": { "type": "array", "items": { - "type": "integer" + "$ref": "#/definitions/Role" } }, - "commission_explains": { - "description": "CommissionExplains is commission explains in email template", + "seniority": { + "$ref": "#/definitions/Seniority" + }, + "stacks": { "type": "array", "items": { - "$ref": "#/definitions/model.CommissionExplain" + "$ref": "#/definitions/Stack" } }, - "contract_amount": { - "type": "integer" + "status": { + "description": "working info", + "type": "string" }, - "conversion_amount": { - "type": "integer" + "teamEmail": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "username": { + "type": "string" + }, + "wiseAccountNumber": { + "type": "string" }, - "due_date": { + "wiseCurrency": { + "type": "string" + }, + "wiseRecipientEmail": { "type": "string" }, + "wiseRecipientID": { + "type": "string" + }, + "wiseRecipientName": { + "type": "string" + } + } + }, + "EmployeeDataResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/EmployeeData" + } + } + }, + "EmployeeInvitationData": { + "type": "object", + "properties": { "employee": { - "$ref": "#/definitions/model.Employee" + "$ref": "#/definitions/InvitedEmployeeInfo" }, - "employee_id": { + "employeeID": { "type": "string" }, "id": { "type": "string" }, - "is_paid": { + "invitedBy": { + "type": "string" + }, + "isBasecampAccountCreated": { "type": "boolean" }, - "month": { - "type": "integer" + "isCompleted": { + "type": "boolean" }, - "project_bonus": { - "type": "integer" + "isDiscordRoleAssigned": { + "type": "boolean" }, - "project_bonus_explain": { - "type": "array", - "items": { - "type": "integer" - } + "isInfoUpdated": { + "type": "boolean" }, - "project_bonus_explains": { - "description": "ProjectBonusExplains is project bonus explains in email template", + "isTeamEmailCreated": { + "type": "boolean" + } + } + }, + "EmployeeInvitationResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/EmployeeInvitationData" + } + } + }, + "EmployeeListDataResponse": { + "type": "object", + "properties": { + "data": { "type": "array", "items": { - "$ref": "#/definitions/model.ProjectBonusExplain" + "$ref": "#/definitions/EmployeeData" } + } + } + }, + "EmployeeLocation": { + "type": "object", + "properties": { + "address": { + "$ref": "#/definitions/EmployeeAddress" }, - "total": { - "type": "integer" - }, - "total_allowance": { - "description": "TotalAllowance is amount of allowance in email template", - "type": "number" + "avatar": { + "type": "string" }, - "total_explain": { + "chapters": { "type": "array", "items": { - "type": "integer" + "$ref": "#/definitions/Chapter" } }, - "twAmount": { - "description": "TotalAllowance is amount of allowance in email template", - "type": "number" - }, - "twFee": { - "type": "number" + "discordID": { + "type": "string" }, - "twRate": { - "description": "TWRate is rate of allowance in email template", - "type": "number" + "displayName": { + "type": "string" }, - "user_rank_snapshot": { + "fullName": { + "type": "string" + } + } + }, + "EmployeeLocationListResponse": { + "type": "object", + "properties": { + "data": { "type": "array", "items": { - "type": "integer" + "$ref": "#/definitions/EmployeeLocation" } - }, - "year": { - "type": "integer" } } }, - "model.Position": { + "EmployeeProjectData": { "type": "object", "properties": { + "avatar": { + "type": "string" + }, "code": { "type": "string" }, - "createdAt": { + "deploymentType": { "type": "string" }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" + "endDate": { + "type": "string" }, "id": { "type": "string" @@ -7316,1226 +7452,312 @@ const docTemplate = `{ "name": { "type": "string" }, - "updatedAt": { + "positions": { + "type": "array", + "items": { + "$ref": "#/definitions/Position" + } + }, + "startDate": { "type": "string" - } + }, + "status": { + "type": "string" + } } }, - "model.Project": { + "EngagementDashboard": { "type": "object", "properties": { - "accountRating": { - "type": "integer" - }, - "allowsSendingSurvey": { - "type": "boolean" - }, - "avatar": { - "type": "string" - }, - "bankAccount": { - "$ref": "#/definitions/model.BankAccount" - }, - "bankAccountID": { - "type": "string" - }, - "client": { - "$ref": "#/definitions/model.Client" - }, - "clientEmail": { - "type": "string" - }, - "clientID": { + "content": { "type": "string" }, - "code": { + "questionID": { "type": "string" }, - "commissionConfigs": { + "stats": { "type": "array", "items": { - "$ref": "#/definitions/model.ProjectCommissionConfig" + "$ref": "#/definitions/EngagementDashboardQuestionStat" } - }, - "companyInfo": { - "$ref": "#/definitions/model.CompanyInfo" - }, - "companyInfoID": { - "type": "string" - }, - "country": { - "$ref": "#/definitions/model.Country" - }, - "countryID": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "deliveryRating": { - "type": "integer" - }, - "endDate": { - "type": "string" - }, - "function": { + } + } + }, + "EngagementDashboardDetail": { + "type": "object", + "properties": { + "questionID": { "type": "string" }, - "heads": { + "stats": { "type": "array", "items": { - "$ref": "#/definitions/model.ProjectHead" + "$ref": "#/definitions/EngagementDashboardQuestionDetailStat" } - }, - "id": { - "type": "string" - }, - "importantLevel": { + } + } + }, + "EngagementDashboardQuestionDetailStat": { + "type": "object", + "properties": { + "field": { "type": "string" }, - "leadRating": { - "type": "integer" + "point": { + "type": "number" }, - "name": { + "startDate": { "type": "string" + } + } + }, + "EngagementDashboardQuestionStat": { + "type": "object", + "properties": { + "point": { + "type": "number" }, - "organization": { - "$ref": "#/definitions/model.Organization" - }, - "organizationID": { + "startDate": { "type": "string" }, - "projectEmail": { + "title": { "type": "string" + } + } + }, + "EngineeringHealth": { + "type": "object", + "properties": { + "avg": { + "type": "number" }, - "projectMembers": { - "type": "array", - "items": { - "$ref": "#/definitions/model.ProjectMember" - } - }, - "projectNotion": { - "$ref": "#/definitions/model.ProjectNotion" + "quarter": { + "type": "string" }, - "projectStacks": { + "trend": { + "type": "number" + } + } + }, + "EngineeringHealthData": { + "type": "object", + "properties": { + "average": { "type": "array", "items": { - "$ref": "#/definitions/model.ProjectStack" + "$ref": "#/definitions/EngineeringHealth" } }, - "slots": { + "groups": { "type": "array", "items": { - "$ref": "#/definitions/model.ProjectSlot" + "$ref": "#/definitions/GroupEngineeringHealth" } - }, - "startDate": { - "type": "string" - }, - "status": { - "type": "string" - }, - "type": { - "type": "string" - }, - "updatedAt": { - "type": "string" } } }, - "model.ProjectBonusExplain": { + "EngineeringHealthResponse": { "type": "object", "properties": { - "amount": { - "type": "integer" - }, - "bucket_id": { - "type": "integer" - }, - "description": { - "type": "string" - }, - "formatted_amount": { - "type": "string" - }, - "month": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "todo_id": { - "type": "integer" - }, - "year": { - "type": "integer" + "data": { + "$ref": "#/definitions/EngineeringHealthData" } } }, - "model.ProjectCommissionConfig": { + "EngineeringHealthTrend": { "type": "object", "properties": { - "commissionRate": { + "collaboration": { "type": "number" }, - "createdAt": { - "type": "string" - }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "id": { - "type": "string" + "delivery": { + "type": "number" }, - "position": { - "type": "string" + "feedback": { + "type": "number" }, - "projectID": { + "quality": { + "type": "number" + } + } + }, + "ErrorResponse": { + "type": "object", + "properties": { + "error": { "type": "string" }, - "updatedAt": { - "type": "string" + "errors": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ApiError" + } } } }, - "model.ProjectHead": { + "EventReviewerStatus": { + "type": "string", + "enum": [ + "none", + "new", + "draft", + "done" + ], + "x-enum-varnames": [ + "EventReviewerStatusNone", + "EventReviewerStatusNew", + "EventReviewerStatusDraft", + "EventReviewerStatusDone" + ] + }, + "Feedback": { "type": "object", "properties": { - "commissionRate": { - "type": "number" + "author": { + "$ref": "#/definitions/BasicEmployeeInfo" }, - "createdAt": { + "employeeID": { "type": "string" }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "employee": { - "$ref": "#/definitions/model.Employee" + "eventID": { + "type": "string" }, - "employeeID": { + "eventReviewerID": { "type": "string" }, - "endDate": { + "isRead": { + "type": "boolean" + }, + "lastUpdated": { "type": "string" }, - "id": { + "projectID": { "type": "string" }, - "position": { + "status": { "type": "string" }, - "project": { - "$ref": "#/definitions/model.Project" + "subtype": { + "type": "string" }, - "projectID": { + "title": { "type": "string" }, - "startDate": { + "topicID": { "type": "string" }, - "updatedAt": { + "type": { "type": "string" } } }, - "model.ProjectMember": { + "FeedbackDetail": { "type": "object", "properties": { - "createdAt": { - "type": "string" - }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "deploymentType": { - "type": "string" - }, - "discount": { - "type": "number" - }, - "employee": { - "$ref": "#/definitions/model.Employee" + "answers": { + "type": "array", + "items": { + "$ref": "#/definitions/QuestionAnswer" + } }, "employeeID": { "type": "string" }, - "endDate": { + "eventID": { "type": "string" }, - "head": { - "$ref": "#/definitions/model.ProjectHead" + "project": { + "$ref": "#/definitions/BasicProjectInfo" }, - "id": { + "relationship": { "type": "string" }, - "isLead": { - "type": "boolean" + "reviewer": { + "$ref": "#/definitions/BasicEmployeeInfo" }, - "note": { + "status": { "type": "string" }, - "positions": { - "type": "array", - "items": { - "$ref": "#/definitions/model.Position" - } - }, - "project": { - "$ref": "#/definitions/model.Project" - }, - "projectID": { + "title": { "type": "string" }, - "projectMemberPositions": { - "type": "array", - "items": { - "$ref": "#/definitions/model.ProjectMemberPosition" - } - }, - "projectSlotID": { - "type": "string" - }, - "rate": { - "type": "number" - }, - "seniority": { - "$ref": "#/definitions/model.Seniority" - }, - "seniorityID": { - "type": "string" - }, - "startDate": { - "type": "string" - }, - "status": { - "type": "string" - }, - "updatedAt": { - "type": "string" - }, - "upsellCommissionRate": { - "type": "number" - }, - "upsellPerson": { - "$ref": "#/definitions/model.Employee" - }, - "upsellPersonID": { - "type": "string" - } - } - }, - "model.ProjectMemberPosition": { - "type": "object", - "properties": { - "createdAt": { - "type": "string" - }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "id": { - "type": "string" - }, - "position": { - "$ref": "#/definitions/model.Position" - }, - "positionID": { - "type": "string" - }, - "projectMemberID": { - "type": "string" - }, - "updatedAt": { - "type": "string" - } - } - }, - "model.ProjectNotion": { - "type": "object", - "properties": { - "auditNotionID": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "id": { - "type": "string" - }, - "project": { - "$ref": "#/definitions/model.Project" - }, - "projectID": { - "type": "string" - }, - "updatedAt": { - "type": "string" - } - } - }, - "model.ProjectSize": { - "type": "object", - "properties": { - "avatar": { - "type": "string" - }, - "code": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "size": { - "type": "integer" - } - } - }, - "model.ProjectSlot": { - "type": "object", - "properties": { - "createdAt": { - "type": "string" - }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "deploymentType": { - "type": "string" - }, - "discount": { - "type": "number" - }, - "id": { - "type": "string" - }, - "note": { - "type": "string" - }, - "project": { - "$ref": "#/definitions/model.Project" - }, - "projectID": { - "type": "string" - }, - "projectMember": { - "$ref": "#/definitions/model.ProjectMember" - }, - "projectSlotPositions": { - "type": "array", - "items": { - "$ref": "#/definitions/model.ProjectSlotPosition" - } - }, - "rate": { - "type": "number" - }, - "seniority": { - "$ref": "#/definitions/model.Seniority" - }, - "seniorityID": { - "type": "string" - }, - "status": { - "type": "string" - }, - "updatedAt": { - "type": "string" - }, - "upsellPerson": { - "$ref": "#/definitions/model.Employee" - }, - "upsellPersonID": { - "type": "string" - } - } - }, - "model.ProjectSlotPosition": { - "type": "object", - "properties": { - "createdAt": { - "type": "string" - }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "id": { - "type": "string" - }, - "position": { - "$ref": "#/definitions/model.Position" - }, - "positionID": { - "type": "string" - }, - "projectSlotID": { - "type": "string" - }, - "updatedAt": { - "type": "string" - } - } - }, - "model.ProjectStack": { - "type": "object", - "properties": { - "createdAt": { - "type": "string" - }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "id": { - "type": "string" - }, - "projectID": { - "type": "string" - }, - "stack": { - "$ref": "#/definitions/model.Stack" - }, - "stackID": { - "type": "string" - }, - "updatedAt": { - "type": "string" - } - } - }, - "model.ResourceUtilization": { - "type": "object", - "properties": { - "available": { - "type": "integer" - }, - "date": { - "type": "string" - }, - "internal": { - "type": "integer" - }, - "staffed": { - "type": "integer" - } - } - }, - "model.Role": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "color": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "id": { - "type": "string" - }, - "isShow": { - "type": "boolean" - }, - "level": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "updatedAt": { - "type": "string" - } - } - }, - "model.Seniority": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "id": { - "type": "string" - }, - "level": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "updatedAt": { - "type": "string" - } - } - }, - "model.SocialAccount": { - "type": "object", - "properties": { - "accountID": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "email": { - "type": "string" - }, - "employeeID": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "updatedAt": { - "type": "string" - } - } - }, - "model.Stack": { - "type": "object", - "properties": { - "avatar": { - "type": "string" - }, - "code": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "updatedAt": { - "type": "string" - } - } - }, - "model.Valuation": { - "type": "object", - "properties": { - "accountReceivable": { - "description": "money that company will receive in the future", - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/model.AccountingItem" - } - }, - "total": { - "type": "number" - } - } - }, - "assets": { - "description": "valuation info", - "type": "number" - }, - "currency": { - "type": "string" - }, - "income": { - "description": "Total paid invoice, investment \u0026 bank interest", - "type": "object", - "properties": { - "detail": { - "type": "object", - "properties": { - "consultantService": { - "type": "number" - }, - "interest": { - "type": "number" - }, - "investment": { - "type": "number" - } - } - }, - "total": { - "type": "number" - } - } - }, - "liabilities": { - "description": "money that company will pay in the future", - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/model.AccountingItem" - } - }, - "total": { - "type": "number" - } - } - }, - "outcome": { - "description": "Sum of Expenses and payroll", - "type": "object", - "properties": { - "detail": { - "type": "object", - "properties": { - "expense": { - "type": "number" - }, - "investment": { - "type": "number" - }, - "payroll": { - "type": "number" - } - } - }, - "total": { - "type": "number" - } - } - }, - "rate": { - "type": "number" - }, - "year": { - "description": "basic info", - "type": "string" - } - } - }, - "model.WorkUnit": { - "type": "object", - "properties": { - "createdAt": { - "type": "string" - }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "project": { - "$ref": "#/definitions/model.Project" - }, - "projectID": { - "type": "string" - }, - "sourceMetadata": { - "type": "array", - "items": { - "type": "integer" - } - }, - "sourceURL": { - "type": "string" - }, - "status": { - "type": "string" - }, - "type": { - "type": "string" - }, - "updatedAt": { - "type": "string" - }, - "workUnitMembers": { - "type": "array", - "items": { - "$ref": "#/definitions/model.WorkUnitMember" - } - }, - "workUnitStacks": { - "type": "array", - "items": { - "$ref": "#/definitions/model.WorkUnitStack" - } - } - } - }, - "model.WorkUnitMember": { - "type": "object", - "properties": { - "createdAt": { - "type": "string" - }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "employee": { - "$ref": "#/definitions/model.Employee" - }, - "employeeID": { - "type": "string" - }, - "endDate": { - "type": "string" - }, - "id": { - "type": "string" - }, - "projectID": { - "type": "string" - }, - "startDate": { - "type": "string" - }, - "status": { - "type": "string" - }, - "updatedAt": { - "type": "string" - }, - "workUnit": { - "$ref": "#/definitions/model.WorkUnit" - }, - "workUnitID": { - "type": "string" - } - } - }, - "model.WorkUnitStack": { - "type": "object", - "properties": { - "createdAt": { - "type": "string" - }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "id": { - "type": "string" - }, - "stack": { - "$ref": "#/definitions/model.Stack" - }, - "stackID": { - "type": "string" - }, - "updatedAt": { - "type": "string" - }, - "workUnitID": { - "type": "string" - } - } - }, - "pgtype.JSONB": { - "type": "object", - "properties": { - "bytes": { - "type": "array", - "items": { - "type": "integer" - } - }, - "status": { - "type": "integer" - } - } - }, - "request.AssignMemberInput": { - "type": "object", - "required": [ - "deploymentType", - "positions", - "rate", - "seniorityID", - "status" - ], - "properties": { - "deploymentType": { - "type": "string" - }, - "discount": { - "type": "number" - }, - "employeeID": { - "type": "string" - }, - "endDate": { - "type": "string" - }, - "isLead": { - "type": "boolean" - }, - "leadCommissionRate": { - "type": "number" - }, - "note": { - "type": "string" - }, - "positions": { - "type": "array", - "items": { - "type": "string" - } - }, - "rate": { - "type": "number" - }, - "seniorityID": { - "type": "string" - }, - "startDate": { - "type": "string" - }, - "status": { - "type": "string" - }, - "upsellCommissionRate": { - "type": "number" - }, - "upsellPersonID": { - "type": "string" - } - } - }, - "request.BasicEventQuestionInput": { - "type": "object", - "required": [ - "eventQuestionID" - ], - "properties": { - "answer": { - "type": "string" - }, - "eventQuestionID": { - "type": "string" - }, - "note": { - "type": "string" - } - } - }, - "request.CreateClientContactInput": { - "type": "object", - "properties": { - "emails": { - "type": "array", - "items": { - "type": "string" - } - }, - "isMainContact": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "role": { - "type": "string" - } - } - }, - "request.CreateClientInput": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "contacts": { - "type": "array", - "items": { - "$ref": "#/definitions/request.CreateClientContactInput" - } - }, - "country": { - "type": "string" - }, - "description": { - "type": "string" - }, - "industry": { - "type": "string" - }, - "name": { - "type": "string" - }, - "registrationNumber": { - "type": "string" - }, - "website": { - "type": "string" - } - } - }, - "request.CreateEmployeeInput": { - "type": "object", - "required": [ - "displayName", - "fullName", - "joinedDate", - "personalEmail", - "positions", - "roles", - "salary", - "seniorityID", - "status", - "teamEmail" - ], - "properties": { - "displayName": { - "type": "string" - }, - "fullName": { - "type": "string", - "maxLength": 100 - }, - "joinedDate": { - "type": "string" - }, - "personalEmail": { - "type": "string" - }, - "positions": { - "type": "array", - "items": { - "type": "string" - } - }, - "referredBy": { - "type": "string" - }, - "roles": { - "type": "array", - "items": { - "type": "string" - } - }, - "salary": { - "type": "integer" - }, - "seniorityID": { - "type": "string" - }, - "status": { - "type": "string" - }, - "teamEmail": { + "topicID": { "type": "string" } } }, - "request.CreatePositionInput": { + "FeedbackDetailResponse": { "type": "object", - "required": [ - "code", - "name" - ], "properties": { - "code": { - "type": "string" - }, - "name": { - "type": "string" + "data": { + "$ref": "#/definitions/FeedbackDetail" } } }, - "request.CreateProjectInput": { + "GetCurrenciesResponse": { "type": "object", - "required": [ - "countryID", - "function", - "name", - "status" - ], "properties": { - "accountManagers": { - "type": "array", - "items": { - "$ref": "#/definitions/request.ProjectHeadInput" - } - }, - "auditNotionID": { - "type": "string" - }, - "bankAccountID": { - "type": "string" - }, - "clientEmail": { - "type": "array", - "items": { - "type": "string" - } - }, - "clientID": { - "type": "string" - }, - "code": { - "type": "string" - }, - "countryID": { - "type": "string" - }, - "deliveryManagers": { - "type": "array", - "items": { - "$ref": "#/definitions/request.ProjectHeadInput" - } - }, - "function": { - "type": "string" - }, - "members": { - "type": "array", - "items": { - "$ref": "#/definitions/request.AssignMemberInput" - } - }, - "name": { - "type": "string" - }, - "organizationID": { - "type": "string" - }, - "projectEmail": { - "type": "string" - }, - "salePersons": { + "data": { "type": "array", "items": { - "$ref": "#/definitions/request.ProjectHeadInput" + "$ref": "#/definitions/Currency" } - }, - "startDate": { - "type": "string" - }, - "status": { - "type": "string" - }, - "type": { - "type": "string" } } }, - "request.CreateStackInput": { + "GetDashboardResourceUtilizationResponse": { "type": "object", - "required": [ - "code", - "name" - ], "properties": { - "avatar": { - "type": "string" - }, - "code": { - "type": "string" - }, - "name": { - "type": "string" + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/ResourceUtilization" + } } } }, - "request.CreateSurveyFeedbackInput": { + "GetDetailClientResponse": { "type": "object", - "required": [ - "type" - ], "properties": { - "fromDate": { - "type": "string" - }, - "quarter": { - "type": "string" - }, - "toDate": { - "type": "string" - }, - "type": { - "type": "string" - }, - "year": { - "type": "integer" + "data": { + "$ref": "#/definitions/Client" } } }, - "request.CreateWorkUnitBody": { + "GetEngagementDashboardDetailResponse": { "type": "object", - "required": [ - "name", - "stacks", - "status", - "type" - ], "properties": { - "members": { + "data": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/EngagementDashboardDetail" } - }, - "name": { - "type": "string" - }, - "stacks": { + } + } + }, + "GetEngagementDashboardResponse": { + "type": "object", + "properties": { + "data": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/EngagementDashboard" } - }, - "status": { - "type": "string" - }, - "type": { - "type": "string" - }, - "url": { - "type": "string" } } }, - "request.DeleteTopicReviewersBody": { + "GetListClientResponse": { "type": "object", "properties": { - "reviewerIDs": { + "data": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/Client" } } } }, - "request.GetListEmployeeInput": { + "GetListEmployeeQuery": { "type": "object", "properties": { "chapters": { @@ -8602,49 +7824,120 @@ const docTemplate = `{ } } }, - "request.InvoiceItem": { + "GetQuestionResponse": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/pkg_view.Question" + } + } + } + }, + "GroupAudit": { + "type": "object", + "properties": { + "backend": { + "type": "number" + }, + "blockchain": { + "type": "number" + }, + "frontend": { + "type": "number" + }, + "mobile": { + "type": "number" + }, + "process": { + "type": "number" + }, + "quarter": { + "type": "string" + }, + "system": { + "type": "number" + }, + "trend": { + "$ref": "#/definitions/GroupAuditTrend" + } + } + }, + "GroupAuditTrend": { + "type": "object", + "properties": { + "backend": { + "type": "number" + }, + "blockchain": { + "type": "number" + }, + "frontend": { + "type": "number" + }, + "mobile": { + "type": "number" + }, + "process": { + "type": "number" + }, + "system": { + "type": "number" + } + } + }, + "GroupEngineeringHealth": { + "type": "object", + "properties": { + "collaboration": { + "type": "number" + }, + "delivery": { + "type": "number" + }, + "feedback": { + "type": "number" + }, + "quality": { + "type": "number" + }, + "quarter": { + "type": "string" + }, + "trend": { + "$ref": "#/definitions/EngineeringHealthTrend" + } + } + }, + "InvitedEmployeeInfo": { "type": "object", "properties": { - "cost": { - "type": "number" + "avatar": { + "type": "string" }, - "description": { + "displayName": { "type": "string" }, - "discount": { - "type": "number" + "fullName": { + "type": "string" }, - "isExternal": { - "type": "boolean" + "id": { + "type": "string" }, - "quantity": { - "type": "number" + "personalEmail": { + "type": "string" }, - "unitCost": { - "type": "number" - } - } - }, - "request.ProjectHeadInput": { - "type": "object", - "properties": { - "commissionRate": { - "type": "number" + "teamEmail": { + "type": "string" }, - "employeeID": { + "username": { "type": "string" } } }, - "request.SendInvoiceRequest": { + "Invoice": { "type": "object", - "required": [ - "bankID", - "dueDate", - "email", - "invoiceDate", - "projectID" - ], "properties": { "bankID": { "type": "string" @@ -8655,1444 +7948,1421 @@ const docTemplate = `{ "type": "string" } }, + "conversionAmount": { + "type": "number" + }, + "conversionRate": { + "type": "number" + }, "description": { "type": "string" }, "discount": { - "type": "number", - "minimum": 0 + "type": "number" }, - "dueDate": { + "dueAt": { "type": "string" }, "email": { "type": "string" }, - "invoiceDate": { + "errorInvoiceID": { "type": "string" }, - "invoiceMonth": { - "type": "integer", - "maximum": 11, - "minimum": 0 + "failedAt": { + "type": "string" }, - "invoiceYear": { - "type": "integer", - "minimum": 0 + "invoiceFileURL": { + "type": "string" }, - "isDraft": { - "type": "boolean" + "invoicedAt": { + "type": "string" }, "lineItems": { "type": "array", "items": { - "$ref": "#/definitions/request.InvoiceItem" + "$ref": "#/definitions/InvoiceItem" } }, + "month": { + "type": "integer" + }, "note": { "type": "string" }, "number": { "type": "string" }, + "paidAt": { + "type": "string" + }, "projectID": { "type": "string" }, - "sentByID": { + "scheduledDate": { "type": "string" }, - "subtotal": { - "type": "number", - "minimum": 0 + "sentBy": { + "type": "string" + }, + "status": { + "type": "string" + }, + "subTotal": { + "type": "number" }, "tax": { - "type": "number", - "minimum": 0 + "type": "number" + }, + "threadID": { + "type": "string" }, "total": { - "type": "number", - "minimum": 0 + "type": "number" + }, + "year": { + "type": "integer" } } }, - "request.SendSurveyInput": { + "InvoiceData": { "type": "object", - "required": [ - "type" - ], "properties": { - "topicIDs": { - "type": "array", - "items": { - "type": "string" - } + "bankAccount": { + "$ref": "#/definitions/BankAccount" }, - "type": { + "bankID": { "type": "string" - } - } - }, - "request.SubmitBody": { - "type": "object", - "required": [ - "answers", - "status" - ], - "properties": { - "answers": { + }, + "cc": { "type": "array", "items": { - "$ref": "#/definitions/request.BasicEventQuestionInput" + "type": "string" } }, - "status": { - "type": "string" - } - } - }, - "request.SubmitOnboardingFormRequest": { - "type": "object", - "required": [ - "address", - "city", - "country", - "dateOfBirth", - "discordName", - "gender", - "horoscope", - "localBankBranch", - "localBankCurrency", - "localBankNumber", - "localBankRecipientName", - "localBranchName", - "mbti", - "phoneNumber", - "placeOfResidence" - ], - "properties": { - "address": { - "type": "string" - }, - "avatar": { - "type": "string" - }, - "city": { - "type": "string" + "client": { + "$ref": "#/definitions/ClientInfo" }, - "country": { - "type": "string" + "companyInfo": { + "$ref": "#/definitions/CompanyInfo" }, - "dateOfBirth": { - "type": "string" + "conversionAmount": { + "type": "number" }, - "discordName": { - "type": "string" + "conversionRate": { + "type": "number" }, - "gender": { + "description": { "type": "string" }, - "githubID": { - "type": "string" + "discount": { + "type": "number" }, - "horoscope": { + "dueAt": { "type": "string" }, - "identityCardPhotoBack": { + "email": { "type": "string" }, - "identityCardPhotoFront": { + "errorInvoiceID": { "type": "string" }, - "lat": { + "failedAt": { "type": "string" }, - "linkedInName": { + "invoiceFileURL": { "type": "string" }, - "localBankBranch": { + "invoicedAt": { "type": "string" }, - "localBankCurrency": { - "type": "string" + "lineItems": { + "type": "array", + "items": { + "$ref": "#/definitions/InvoiceItem" + } }, - "localBankNumber": { - "type": "string" + "month": { + "type": "integer" }, - "localBankRecipientName": { + "note": { "type": "string" }, - "localBranchName": { + "number": { "type": "string" }, - "long": { + "paidAt": { "type": "string" }, - "mbti": { + "projectID": { "type": "string" }, - "notionName": { + "projectName": { "type": "string" }, - "passportPhotoBack": { + "scheduledDate": { "type": "string" }, - "passportPhotoFront": { + "sentBy": { "type": "string" }, - "phoneNumber": { - "type": "string", - "maxLength": 18, - "minLength": 8 - }, - "placeOfResidence": { + "status": { "type": "string" - } - } - }, - "request.UpdateBaseSalaryInput": { - "type": "object", - "required": [ - "batch", - "currencyCode" - ], - "properties": { - "batch": { - "type": "integer" }, - "companyAccountAmount": { - "type": "integer", - "minimum": 0 + "subTotal": { + "type": "number" }, - "contractAmount": { - "type": "integer", - "minimum": 0 + "tax": { + "type": "number" }, - "currencyCode": { + "threadID": { "type": "string" }, - "effectiveDate": { - "type": "string" + "total": { + "type": "number" }, - "personalAccountAmount": { - "type": "integer", - "minimum": 0 + "year": { + "type": "integer" } } }, - "request.UpdateClientContactInput": { + "InvoiceItem": { "type": "object", "properties": { - "emails": { - "type": "array", - "items": { - "type": "string" - } + "cost": { + "type": "number" + }, + "description": { + "type": "string" }, - "isMainContact": { + "discount": { + "type": "number" + }, + "isExternal": { "type": "boolean" }, - "name": { - "type": "string" + "quantity": { + "type": "number" }, - "role": { - "type": "string" + "unitCost": { + "type": "number" } } }, - "request.UpdateClientInput": { + "InvoiceListResponse": { "type": "object", "properties": { - "address": { - "type": "string" - }, - "contacts": { + "data": { "type": "array", "items": { - "$ref": "#/definitions/request.UpdateClientContactInput" + "$ref": "#/definitions/InvoiceData" } }, - "country": { - "type": "string" - }, - "description": { - "type": "string" - }, - "industry": { - "type": "string" + "page": { + "type": "integer" }, - "name": { - "type": "string" + "size": { + "type": "integer" }, - "registrationNumber": { + "sort": { "type": "string" }, - "website": { - "type": "string" + "total": { + "type": "integer" } } }, - "request.UpdateContactInfoInput": { + "InvoiceTemplateResponse": { "type": "object", "properties": { - "accountManagers": { - "type": "array", - "items": { - "$ref": "#/definitions/request.ProjectHeadInput" - } + "data": { + "$ref": "#/definitions/ProjectInvoiceTemplate" + } + } + }, + "ItemValue": { + "type": "object", + "properties": { + "trend": { + "type": "number" }, - "clientEmail": { + "value": { + "type": "integer" + } + } + }, + "LineManagersResponse": { + "type": "object", + "properties": { + "data": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/BasicEmployeeInfo" } - }, - "deliveryManagers": { + } + } + }, + "ListBankAccountResponse": { + "type": "object", + "properties": { + "data": { "type": "array", "items": { - "$ref": "#/definitions/request.ProjectHeadInput" + "$ref": "#/definitions/BankAccount" } - }, - "projectEmail": { - "type": "string" - }, - "salePersons": { + } + } + }, + "ListFeedbackResponse": { + "type": "object", + "properties": { + "data": { "type": "array", "items": { - "$ref": "#/definitions/request.ProjectHeadInput" + "$ref": "#/definitions/Feedback" } } } }, - "request.UpdateEmployeeGeneralInfoInput": { + "LoggedInUserData": { "type": "object", - "required": [ - "email", - "fullName", - "phone" - ], "properties": { - "discordID": { - "type": "string" - }, - "discordName": { + "avatar": { "type": "string" }, "displayName": { "type": "string" }, - "email": { - "type": "string" - }, "fullName": { - "type": "string", - "maxLength": 99 - }, - "githubID": { - "type": "string" - }, - "joinedDate": { - "type": "string" - }, - "leftDate": { - "type": "string" - }, - "lineManagerID": { - "type": "string" - }, - "linkedInName": { - "type": "string" - }, - "notionEmail": { - "type": "string" - }, - "notionID": { "type": "string" }, - "notionName": { + "id": { "type": "string" }, - "organizationIDs": { + "permissions": { "type": "array", "items": { "type": "string" } }, - "phone": { - "type": "string", - "maxLength": 18, - "minLength": 9 - }, - "referredBy": { - "type": "string" - }, - "wiseAccountNumber": { - "type": "string" - }, - "wiseCurrency": { - "type": "string" - }, - "wiseRecipientEmail": { - "type": "string" - }, - "wiseRecipientID": { + "role": { "type": "string" }, - "wiseRecipientName": { + "teamEmail": { "type": "string" } } }, - "request.UpdateInfoInput": { + "MenteeInfo": { "type": "object", - "required": [ - "city", - "country", - "personalEmail", - "phoneNumber", - "placeOfResidence" - ], "properties": { - "address": { + "avatar": { "type": "string" }, - "city": { + "displayName": { "type": "string" }, - "country": { + "fullName": { "type": "string" }, - "discordName": { + "id": { "type": "string" }, - "githubID": { - "type": "string" + "positions": { + "type": "array", + "items": { + "$ref": "#/definitions/Position" + } }, - "lat": { - "type": "string" + "seniority": { + "$ref": "#/definitions/Seniority" }, - "linkedInName": { + "username": { "type": "string" - }, - "long": { + } + } + }, + "MessageResponse": { + "type": "object", + "properties": { + "message": { "type": "string" - }, - "notionEmail": { + } + } + }, + "MetaData": { + "type": "object", + "properties": { + "code": { "type": "string" }, - "notionID": { + "id": { "type": "string" }, - "notionName": { + "name": { "type": "string" - }, - "personalEmail": { + } + } + }, + "MetaDataResponse": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/MetaData" + } + } + } + }, + "Organization": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, - "phoneNumber": { - "type": "string", - "maxLength": 18, - "minLength": 8 - }, - "placeOfResidence": { + "code": { "type": "string" }, - "wiseAccountNumber": { + "id": { "type": "string" }, - "wiseCurrency": { + "name": { "type": "string" - }, - "wiseRecipientEmail": { + } + } + }, + "OrganizationsResponse": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_model.Organization" + } + } + } + }, + "Position": { + "type": "object", + "properties": { + "code": { "type": "string" }, - "wiseRecipientID": { + "id": { "type": "string" }, - "wiseRecipientName": { + "name": { "type": "string" } } }, - "request.UpdateMemberInput": { + "PositionResponse": { "type": "object", - "required": [ - "deploymentType", - "positions", - "projectSlotID", - "rate", - "seniorityID", - "status" - ], "properties": { - "deploymentType": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_model.Position" + } + } + } + }, + "ProfileData": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "avatar": { + "type": "string" + }, + "birthday": { "type": "string" }, - "discount": { - "type": "number" + "city": { + "type": "string" }, - "employeeID": { + "country": { "type": "string" }, - "endDate": { + "discordID": { "type": "string" }, - "isLead": { - "type": "boolean" + "discordName": { + "type": "string" }, - "leadCommissionRate": { - "type": "number" + "displayName": { + "type": "string" }, - "note": { + "fullName": { "type": "string" }, - "positions": { - "type": "array", - "items": { - "type": "string" - } + "gender": { + "type": "string" }, - "projectMemberID": { + "githubID": { "type": "string" }, - "projectSlotID": { + "id": { "type": "string" }, - "rate": { - "type": "number" + "linkedInName": { + "type": "string" }, - "seniorityID": { + "notionEmail": { "type": "string" }, - "startDate": { + "notionID": { "type": "string" }, - "status": { + "notionName": { "type": "string" }, - "upsellCommissionRate": { - "type": "number" + "personalEmail": { + "type": "string" }, - "upsellPersonID": { + "phoneNumber": { "type": "string" - } - } - }, - "request.UpdatePersonalInfoInput": { - "type": "object", - "required": [ - "address", - "city", - "country", - "dob", - "gender", - "personalEmail" - ], - "properties": { - "address": { - "type": "string", - "maxLength": 200 }, - "city": { + "placeOfResidence": { "type": "string" }, - "country": { + "roles": { + "type": "array", + "items": { + "$ref": "#/definitions/Role" + } + }, + "teamEmail": { "type": "string" }, - "dob": { + "username": { "type": "string" }, - "gender": { + "wiseAccountNumber": { "type": "string" }, - "personalEmail": { + "wiseCurrency": { "type": "string" }, - "placeOfResidence": { + "wiseRecipientEmail": { + "type": "string" + }, + "wiseRecipientID": { + "type": "string" + }, + "wiseRecipientName": { "type": "string" } } }, - "request.UpdatePositionBody": { + "ProfileDataResponse": { "type": "object", "properties": { - "code": { - "type": "string" - }, - "name": { - "type": "string" + "data": { + "$ref": "#/definitions/ProfileData" } } }, - "request.UpdateProjectGeneralInfoInput": { + "Project": { "type": "object", - "required": [ - "accountRating", - "countryID", - "deliveryRating", - "function", - "importantLevel", - "leadRating", - "name" - ], "properties": { "accountRating": { - "type": "integer", - "maximum": 5, - "minimum": 1 + "type": "integer" }, - "auditNotionID": { + "allowsSendingSurvey": { + "type": "boolean" + }, + "avatar": { "type": "string" }, + "bankAccount": { + "$ref": "#/definitions/BankAccount" + }, "bankAccountID": { "type": "string" }, + "client": { + "$ref": "#/definitions/Client" + }, + "clientEmail": { + "type": "string" + }, "clientID": { "type": "string" }, + "code": { + "type": "string" + }, + "commissionConfigs": { + "type": "array", + "items": { + "$ref": "#/definitions/ProjectCommissionConfig" + } + }, + "companyInfo": { + "$ref": "#/definitions/CompanyInfo" + }, + "companyInfoID": { + "type": "string" + }, + "country": { + "$ref": "#/definitions/Country" + }, "countryID": { "type": "string" }, + "createdAt": { + "type": "string" + }, "deliveryRating": { - "type": "integer", - "maximum": 5, - "minimum": 1 + "type": "integer" + }, + "end_date": { + "type": "string" }, "function": { "type": "string" }, + "heads": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ProjectHead" + } + }, + "id": { + "type": "string" + }, "importantLevel": { "type": "string" }, "leadRating": { - "type": "integer", - "maximum": 5, - "minimum": 1 + "type": "integer" }, "name": { "type": "string" }, + "organization": { + "$ref": "#/definitions/Organization" + }, "organizationID": { "type": "string" }, - "stacks": { - "type": "array", - "items": { - "type": "string" - } - }, - "startDate": { + "projectEmail": { "type": "string" - } - } - }, - "request.UpdateSkillsInput": { - "type": "object", - "required": [ - "chapters", - "positions", - "seniority", - "stacks" - ], - "properties": { - "chapters": { + }, + "projectInfo": { + "$ref": "#/definitions/ProjectInfo" + }, + "projectMembers": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/ProjectMember" } }, - "leadingChapters": { + "projectNotion": { + "$ref": "#/definitions/ProjectNotion" + }, + "projectStacks": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/Stack" } }, - "positions": { + "slots": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/ProjectSlot" } }, - "seniority": { + "startDate": { "type": "string" }, - "stacks": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "request.UpdateStackBody": { - "type": "object", - "properties": { - "avatar": { + "status": { "type": "string" }, - "code": { + "type": { "type": "string" }, - "name": { + "updatedAt": { "type": "string" } } }, - "request.UpdateTopicReviewersBody": { + "ProjectCommissionConfig": { "type": "object", "properties": { - "reviewerIDs": { - "type": "array", - "items": { - "type": "string" - } + "commissionRate": { + "type": "number" + }, + "createdAt": { + "type": "string" + }, + "id": { + "type": "string" + }, + "position": { + "type": "string" + }, + "projectID": { + "type": "string" + }, + "updatedAt": { + "type": "string" } } }, - "request.UpdateWorkUnitBody": { + "ProjectInfo": { "type": "object", - "required": [ - "name", - "stacks", - "type" - ], "properties": { - "members": { - "type": "array", - "items": { - "type": "string" - } + "basecampBucketID": { + "type": "integer" + }, + "basecampCampfireID": { + "type": "integer" + }, + "basecampMessageBoardID": { + "type": "integer" + }, + "basecampScheduleID": { + "type": "integer" + }, + "basecampSentryID": { + "type": "integer" + }, + "basecampTodolistID": { + "type": "integer" + }, + "createdAt": { + "type": "string" + }, + "gitlabID": { + "type": "integer" + }, + "id": { + "type": "string" }, - "name": { - "type": "string", - "maxLength": 100 + "project": { + "$ref": "#/definitions/Project" }, - "stacks": { + "projectID": { + "type": "string" + }, + "repositories": { "type": "array", "items": { - "type": "string" + "type": "integer" } }, - "type": { - "type": "string" - }, - "url": { + "updatedAt": { "type": "string" } } }, - "request.UpdateWorkUnitInput": { + "ProjectInvoiceTemplate": { "type": "object", "properties": { - "body": { - "$ref": "#/definitions/request.UpdateWorkUnitBody" + "bankAccount": { + "$ref": "#/definitions/BankAccount" }, - "projectID": { + "client": { + "$ref": "#/definitions/ClientInfo" + }, + "companyInfo": { + "$ref": "#/definitions/CompanyInfo" + }, + "id": { "type": "string" }, - "workUnitID": { + "invoiceNumber": { + "type": "string" + }, + "lastInvoice": { + "$ref": "#/definitions/Invoice" + }, + "name": { "type": "string" } } }, - "request.UpsertRollupRequest": { + "ProjectMember": { "type": "object", - "required": [ - "channelID", - "discordUserID", - "lastMessageID" - ], "properties": { - "categoryID": { + "avatar": { "type": "string" }, - "channelID": { - "type": "string" + "currency": { + "$ref": "#/definitions/Currency" }, - "discordUserID": { + "deploymentType": { "type": "string" }, - "lastMessageID": { + "discount": { + "type": "number" + }, + "displayName": { "type": "string" }, - "messageCount": { - "type": "integer" + "employeeID": { + "type": "string" }, - "reactionCount": { - "type": "integer" - } - } - }, - "view.APIKeyData": { - "type": "object", - "properties": { - "key": { + "endDate": { "type": "string" - } - } - }, - "view.APIKeyResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/definitions/view.APIKeyData" - } - } - }, - "view.ActionItemReportResponse": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/definitions/view.AuditActionItemReport" - } - } - } - }, - "view.ActionItemSquash": { - "type": "object", - "properties": { - "snapDate": { + }, + "fullName": { "type": "string" }, - "trend": { + "isLead": { + "type": "boolean" + }, + "leadCommissionRate": { "type": "number" }, - "value": { - "type": "integer" - } - } - }, - "view.ActionItemSquashReport": { - "type": "object", - "properties": { - "all": { - "type": "array", - "items": { - "$ref": "#/definitions/view.ActionItemSquash" - } + "note": { + "type": "string" }, - "high": { + "positions": { "type": "array", "items": { - "$ref": "#/definitions/view.ActionItemSquash" + "$ref": "#/definitions/Position" } }, - "low": { - "type": "array", - "items": { - "$ref": "#/definitions/view.ActionItemSquash" - } + "projectMemberID": { + "type": "string" }, - "medium": { - "type": "array", - "items": { - "$ref": "#/definitions/view.ActionItemSquash" - } - } - } - }, - "view.ActionItemSquashReportResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/definitions/view.ActionItemSquashReport" - } - } - }, - "view.ActionItemTrend": { - "type": "object", - "properties": { - "high": { - "type": "number" + "projectSlotID": { + "type": "string" }, - "low": { + "rate": { "type": "number" }, - "medium": { + "seniority": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_model.Seniority" + }, + "startDate": { + "type": "string" + }, + "status": { + "type": "string" + }, + "upsellCommissionRate": { "type": "number" + }, + "upsellPerson": { + "$ref": "#/definitions/BasicEmployeeInfo" + }, + "username": { + "type": "string" } } }, - "view.Address": { + "ProjectNotion": { "type": "object", "properties": { - "address": { + "auditNotionID": { "type": "string" }, - "city": { + "createdAt": { "type": "string" }, - "country": { + "id": { "type": "string" }, - "lat": { + "project": { + "$ref": "#/definitions/Project" + }, + "projectID": { "type": "string" }, - "long": { + "updatedAt": { "type": "string" } } }, - "view.ApiError": { - "description": "validation error details", + "ProjectSizeResponse": { "type": "object", "properties": { - "enums": { - "description": "available options incase of field's payload is enums", + "data": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_model.ProjectSize" } - }, - "field": { - "description": "the field cause the error", - "type": "string" - }, - "msg": { - "description": "error message", - "type": "string" } } }, - "view.Audit": { + "ProjectSlot": { "type": "object", "properties": { - "avg": { - "type": "number" + "createdAt": { + "type": "string" }, - "quarter": { + "deploymentType": { "type": "string" }, - "trend": { + "discount": { "type": "number" - } - } - }, - "view.AuditActionItemReport": { - "type": "object", - "properties": { - "high": { - "type": "integer" }, - "low": { - "type": "integer" + "id": { + "type": "string" }, - "medium": { - "type": "integer" + "note": { + "type": "string" }, - "quarter": { + "project": { + "$ref": "#/definitions/Project" + }, + "projectID": { "type": "string" }, - "trend": { - "$ref": "#/definitions/view.ActionItemTrend" - } - } - }, - "view.AuditData": { - "type": "object", - "properties": { - "average": { - "type": "array", - "items": { - "$ref": "#/definitions/view.Audit" - } + "projectMember": { + "$ref": "#/definitions/ProjectMember" }, - "groups": { + "projectSlotPositions": { "type": "array", "items": { - "$ref": "#/definitions/view.GroupAudit" + "$ref": "#/definitions/Position" } + }, + "rate": { + "type": "number" + }, + "seniority": { + "$ref": "#/definitions/Seniority" + }, + "seniorityID": { + "type": "string" + }, + "status": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "upsellPerson": { + "$ref": "#/definitions/EmployeeData" + }, + "upsellPersonID": { + "type": "string" } } }, - "view.AuditResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/definitions/view.AuditData" - } - } - }, - "view.AuditSummaries": { + "PublicClient": { "type": "object", "properties": { - "summary": { + "address": { + "$ref": "#/definitions/Address" + }, + "avatar": { + "type": "string" + }, + "companySize": { + "type": "string" + }, + "id": { + "type": "string" + }, + "industry": { + "type": "string" + }, + "name": { + "type": "string" + }, + "solutionType": { + "type": "string" + }, + "stacks": { "type": "array", "items": { - "$ref": "#/definitions/view.AuditSummary" + "type": "string" } } } }, - "view.AuditSummariesResponse": { + "PublicClientListResponse": { "type": "object", "properties": { "data": { - "$ref": "#/definitions/view.AuditSummaries" + "type": "array", + "items": { + "$ref": "#/definitions/PublicClient" + } } } }, - "view.AuditSummary": { + "QuestionAnswer": { "type": "object", "properties": { - "audit": { - "$ref": "#/definitions/view.AuditValue" - }, - "avatar": { + "answer": { "type": "string" }, - "code": { + "content": { "type": "string" }, - "health": { - "$ref": "#/definitions/view.AuditValue" + "domain": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_model.QuestionDomain" }, - "id": { + "eventQuestionID": { "type": "string" }, - "name": { + "note": { "type": "string" }, - "newItem": { - "$ref": "#/definitions/view.ItemValue" - }, - "resolvedItem": { - "$ref": "#/definitions/view.ItemValue" - }, - "size": { - "$ref": "#/definitions/view.ItemValue" - } - } - }, - "view.AuditValue": { - "type": "object", - "properties": { - "trend": { - "type": "number" + "order": { + "type": "integer" }, - "value": { - "type": "number" + "type": { + "type": "string" } } }, - "view.AuthData": { + "ResourceAvailability": { "type": "object", "properties": { - "accessToken": { - "type": "string" + "employees": { + "type": "array", + "items": { + "$ref": "#/definitions/AvailableEmployee" + } }, - "employee": { - "$ref": "#/definitions/view.EmployeeData" + "slots": { + "type": "array", + "items": { + "$ref": "#/definitions/AvailableSlot" + } } } }, - "view.AuthUserResponse": { + "ResourceAvailabilityResponse": { "type": "object", "properties": { "data": { - "$ref": "#/definitions/view.LoggedInUserData" + "$ref": "#/definitions/ResourceAvailability" } } }, - "view.AvailableEmployee": { + "ResourceUtilization": { "type": "object", "properties": { - "avatar": { - "type": "string" - }, - "displayName": { - "type": "string" - }, - "fullName": { - "type": "string" + "available": { + "type": "integer" }, - "id": { + "date": { "type": "string" }, - "positions": { - "type": "array", - "items": { - "$ref": "#/definitions/view.Position" - } - }, - "projects": { - "type": "array", - "items": { - "$ref": "#/definitions/view.BasicProjectInfo" - } - }, - "seniority": { - "$ref": "#/definitions/view.Seniority" - }, - "stacks": { - "type": "array", - "items": { - "$ref": "#/definitions/view.Stack" - } + "internal": { + "type": "integer" }, - "username": { - "type": "string" + "staffed": { + "type": "integer" } } }, - "view.AvailableSlot": { + "Role": { "type": "object", "properties": { - "createdAt": { + "code": { "type": "string" }, "id": { "type": "string" }, - "note": { + "name": { "type": "string" - }, - "positions": { + } + } + }, + "RolesResponse": { + "type": "object", + "properties": { + "data": { "type": "array", "items": { - "$ref": "#/definitions/view.Position" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_model.Role" } - }, - "project": { - "$ref": "#/definitions/view.BasicProjectInfo" - }, - "seniority": { - "$ref": "#/definitions/view.Seniority" - }, - "type": { - "type": "string" } } }, - "view.BankAccount": { + "SendInvoiceRequest": { "type": "object", + "required": [ + "bankID", + "dueDate", + "email", + "invoiceDate", + "projectID" + ], "properties": { - "accountNumber": { + "bankID": { "type": "string" }, - "address": { - "type": "string" + "cc": { + "type": "array", + "items": { + "type": "string" + } }, - "bankName": { + "description": { "type": "string" }, - "currency": { - "$ref": "#/definitions/view.Currency" + "discount": { + "type": "number", + "minimum": 0 }, - "currencyID": { + "dueDate": { "type": "string" }, - "id": { + "email": { "type": "string" }, - "intermediaryBankAddress": { + "invoiceDate": { "type": "string" }, - "intermediaryBankName": { - "type": "string" + "invoiceMonth": { + "type": "integer", + "maximum": 11, + "minimum": 0 }, - "name": { - "type": "string" + "invoiceYear": { + "type": "integer", + "minimum": 0 }, - "ownerName": { - "type": "string" + "isDraft": { + "type": "boolean" }, - "routingNumber": { + "lineItems": { + "type": "array", + "items": { + "$ref": "#/definitions/InvoiceItem" + } + }, + "note": { "type": "string" }, - "swiftCode": { + "number": { "type": "string" }, - "ukSortCode": { + "projectID": { "type": "string" + }, + "subtotal": { + "type": "number", + "minimum": 0 + }, + "tax": { + "type": "number", + "minimum": 0 + }, + "total": { + "type": "number", + "minimum": 0 } } }, - "view.BaseSalary": { + "Seniority": { "type": "object", "properties": { - "batch": { - "type": "integer" - }, - "category": { - "type": "string" - }, - "company_account_amount": { - "type": "integer" - }, - "contract_amount": { - "type": "integer" - }, - "currency": { - "$ref": "#/definitions/view.Currency" - }, - "currency_id": { - "type": "string" - }, - "effective_date": { - "type": "string" - }, - "employee_id": { + "code": { "type": "string" }, "id": { "type": "string" }, - "insurance_amount": { - "type": "integer" - }, - "personal_account_amount": { - "type": "integer" - }, - "type": { + "name": { "type": "string" } } }, - "view.BasicBankAccountInfo": { + "SeniorityResponse": { "type": "object", "properties": { - "accountNumber": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_model.Seniority" + } + } + } + }, + "Stack": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, - "bankName": { + "code": { "type": "string" }, "id": { "type": "string" }, - "ownerName": { + "name": { "type": "string" } } }, - "view.BasicClientInfo": { + "StackResponse": { "type": "object", "properties": { - "description": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "registrationNumber": { - "type": "string" + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_model.Stack" + } } } }, - "view.BasicCompanyInfo": { + "SubmitFeedback": { "type": "object", "properties": { - "description": { + "answers": { + "type": "array", + "items": { + "$ref": "#/definitions/QuestionAnswer" + } + }, + "employeeID": { "type": "string" }, - "id": { + "eventID": { "type": "string" }, - "name": { + "reviewer": { + "$ref": "#/definitions/BasicEmployeeInfo" + }, + "status": { "type": "string" }, - "registrationNumber": { + "title": { "type": "string" + }, + "topicID": { + "type": "string" + } + } + }, + "SubmitFeedbackRequest": { + "type": "object", + "required": [ + "answers", + "status" + ], + "properties": { + "answers": { + "type": "array", + "items": { + "$ref": "#/definitions/BasicEventQuestionRequest" + } + }, + "status": { + "$ref": "#/definitions/EventReviewerStatus" } } }, - "view.BasicCountryInfo": { + "SubmitFeedbackResponse": { "type": "object", "properties": { - "code": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" + "data": { + "$ref": "#/definitions/SubmitFeedback" } } }, - "view.BasicEmployeeInfo": { + "SubmitOnboardingFormRequest": { "type": "object", + "required": [ + "address", + "city", + "country", + "dateOfBirth", + "discordName", + "gender", + "horoscope", + "localBankBranch", + "localBankCurrency", + "localBankNumber", + "localBankRecipientName", + "localBranchName", + "mbti", + "phoneNumber", + "placeOfResidence" + ], "properties": { + "address": { + "type": "string" + }, "avatar": { "type": "string" }, - "displayName": { + "city": { "type": "string" }, - "fullName": { + "country": { "type": "string" }, - "id": { + "dateOfBirth": { "type": "string" }, - "username": { + "discordName": { "type": "string" - } - } - }, - "view.BasicMember": { - "type": "object", - "properties": { - "avatar": { + }, + "gender": { "type": "string" }, - "displayName": { + "githubID": { "type": "string" }, - "employeeID": { + "horoscope": { "type": "string" }, - "fullName": { + "identityCardPhotoBack": { "type": "string" }, - "username": { + "identityCardPhotoFront": { "type": "string" - } - } - }, - "view.BasicProjectHeadInfo": { - "type": "object", - "properties": { - "avatar": { + }, + "lat": { "type": "string" }, - "commissionRate": { - "type": "number" + "linkedInName": { + "type": "string" }, - "displayName": { + "localBankBranch": { "type": "string" }, - "employeeID": { + "localBankCurrency": { "type": "string" }, - "fullName": { + "localBankNumber": { "type": "string" }, - "position": { + "localBankRecipientName": { "type": "string" }, - "username": { + "localBranchName": { "type": "string" - } - } - }, - "view.BasicProjectInfo": { - "type": "object", - "properties": { - "avatar": { + }, + "long": { "type": "string" }, - "code": { + "mbti": { "type": "string" }, - "id": { + "notionName": { "type": "string" }, - "name": { + "passportPhotoBack": { "type": "string" }, - "status": { + "passportPhotoFront": { "type": "string" }, - "type": { + "phoneNumber": { + "type": "string", + "maxLength": 18, + "minLength": 8 + }, + "placeOfResidence": { "type": "string" } } }, - "view.BraineryMetric": { + "SummaryWorkUnitDistributionData": { "type": "object", "properties": { - "contributors": { - "type": "array", - "items": { - "$ref": "#/definitions/view.Post" - } - }, - "latestPosts": { - "type": "array", - "items": { - "$ref": "#/definitions/view.Post" - } + "development": { + "type": "number" }, - "newContributors": { - "type": "array", - "items": { - "$ref": "#/definitions/view.Post" - } + "learning": { + "type": "number" }, - "tags": { - "type": "array", - "items": { - "type": "string" - } + "management": { + "type": "number" }, - "topContributors": { - "type": "array", - "items": { - "$ref": "#/definitions/view.TopContributor" - } + "training": { + "type": "number" } } }, - "view.Chapter": { + "SummaryWorkUnitDistributionResponse": { "type": "object", "properties": { - "code": { - "type": "string" - }, - "id": { - "type": "string" + "data": { + "$ref": "#/definitions/SummaryWorkUnitDistributionData" + } + } + }, + "Trend": { + "type": "object", + "properties": { + "deadline": { + "type": "number" }, - "leadID": { - "type": "string" + "learning": { + "type": "number" }, - "name": { - "type": "string" + "workload": { + "type": "number" } } }, - "view.ChapterResponse": { + "UnreadFeedbackCountData": { "type": "object", "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/definitions/model.Chapter" - } + "count": { + "type": "integer" + }, + "reviewerID": { + "type": "string" } } }, - "view.CitiesResponse": { + "UnreadFeedbackCountResponse": { "type": "object", "properties": { "data": { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/definitions/UnreadFeedbackCountData" } } }, - "view.City": { + "UpdateBaseSalaryRequest": { "type": "object", + "required": [ + "batch", + "currencyCode" + ], "properties": { - "lat": { - "type": "string" + "batch": { + "type": "integer" }, - "long": { + "companyAccountAmount": { + "type": "integer", + "minimum": 0 + }, + "contractAmount": { + "type": "integer", + "minimum": 0 + }, + "currencyCode": { "type": "string" }, - "name": { + "effectiveDate": { "type": "string" + }, + "personalAccountAmount": { + "type": "integer", + "minimum": 0 + } + } + }, + "UpdateBaseSalaryResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/BaseSalary" } } }, - "view.Client": { + "UpdateClientInput": { "type": "object", "properties": { "address": { @@ -10101,7 +9371,7 @@ const docTemplate = `{ "contacts": { "type": "array", "items": { - "$ref": "#/definitions/view.ClientContact" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_client_request.UpdateClientContactInput" } }, "country": { @@ -10110,9 +9380,6 @@ const docTemplate = `{ "description": { "type": "string" }, - "id": { - "type": "string" - }, "industry": { "type": "string" }, @@ -10127,333 +9394,289 @@ const docTemplate = `{ } } }, - "view.ClientContact": { + "UpdateEmployeeGeneralInfoRequest": { "type": "object", + "required": [ + "email", + "fullName", + "phone" + ], "properties": { - "emails": { - "type": "array", - "items": { - "type": "string" - } + "discordID": { + "type": "string" }, - "id": { + "discordName": { "type": "string" }, - "isMainContact": { - "type": "boolean" + "displayName": { + "type": "string" }, - "name": { + "email": { "type": "string" }, - "role": { + "fullName": { + "type": "string", + "maxLength": 99 + }, + "githubID": { "type": "string" - } - } - }, - "view.ClientContactInfo": { - "type": "object", - "properties": { - "emails": { - "type": "array", - "items": { - "type": "string" - } }, - "id": { + "joinedDate": { "type": "string" }, - "isMainContact": { - "type": "boolean" + "leftDate": { + "type": "string" }, - "name": { + "lineManagerID": { "type": "string" - } - } - }, - "view.ClientInfo": { - "type": "object", - "properties": { - "clientAddress": { + }, + "linkedInName": { "type": "string" }, - "clientCompany": { + "notionEmail": { + "type": "string" + }, + "notionID": { + "type": "string" + }, + "notionName": { "type": "string" }, - "contacts": { + "organizationIDs": { "type": "array", "items": { - "$ref": "#/definitions/view.ClientContactInfo" + "type": "string" } - } - } - }, - "view.CompanyInfo": { - "type": "object", - "properties": { - "description": { + }, + "phone": { + "type": "string", + "maxLength": 18, + "minLength": 9 + }, + "referredBy": { "type": "string" }, - "id": { + "wiseAccountNumber": { "type": "string" }, - "info": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/model.CompanyContactInfo" - } + "wiseCurrency": { + "type": "string" }, - "name": { + "wiseRecipientEmail": { "type": "string" }, - "registrationNumber": { + "wiseRecipientID": { "type": "string" - } - } - }, - "view.ContentData": { - "type": "object", - "properties": { - "url": { + }, + "wiseRecipientName": { "type": "string" } } }, - "view.ContentDataResponse": { + "UpdateEmployeeStatusResponse": { "type": "object", "properties": { "data": { - "$ref": "#/definitions/view.ContentData" + "$ref": "#/definitions/EmployeeData" } } }, - "view.CountriesResponse": { + "UpdateGeneralEmployeeResponse": { "type": "object", "properties": { "data": { - "type": "array", - "items": { - "$ref": "#/definitions/view.Country" - } + "$ref": "#/definitions/UpdateGeneralInfoEmployeeData" } } }, - "view.Country": { + "UpdateGeneralInfoEmployeeData": { "type": "object", "properties": { - "cities": { - "type": "array", - "items": { - "$ref": "#/definitions/view.City" - } - }, - "code": { + "createdAt": { "type": "string" }, - "id": { + "discordID": { "type": "string" }, - "name": { - "type": "string" - } - } - }, - "view.CreateClientResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/definitions/model.Client" - } - } - }, - "view.CreateMemberData": { - "type": "object", - "properties": { - "avatar": { + "discordName": { "type": "string" }, - "deploymentType": { + "displayName": { "type": "string" }, - "discount": { - "type": "number" + "fullName": { + "description": "basic info", + "type": "string" }, - "displayName": { + "githubID": { "type": "string" }, - "employeeID": { + "id": { "type": "string" }, - "fullName": { + "lineManager": { + "$ref": "#/definitions/BasicEmployeeInfo" + }, + "linkedInName": { "type": "string" }, - "isLead": { - "type": "boolean" + "notionEmail": { + "type": "string" }, - "leadCommissionRate": { - "type": "number" + "notionID": { + "type": "string" }, - "note": { + "notionName": { "type": "string" }, - "positions": { + "organizations": { "type": "array", "items": { - "$ref": "#/definitions/view.Position" + "$ref": "#/definitions/Organization" } }, - "projectMemberID": { - "type": "string" - }, - "projectSlotID": { + "phoneNumber": { "type": "string" }, - "rate": { - "type": "number" - }, - "seniority": { - "$ref": "#/definitions/model.Seniority" + "referredBy": { + "$ref": "#/definitions/BasicEmployeeInfo" }, - "status": { + "teamEmail": { "type": "string" }, - "upsellCommissionRate": { - "type": "number" - }, - "upsellPerson": { - "$ref": "#/definitions/view.BasicEmployeeInfo" - }, - "username": { + "updatedAt": { "type": "string" } } }, - "view.CreateMemberDataResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/definitions/view.CreateMemberData" - } - } - }, - "view.CreateProjectData": { + "UpdateInfoInput": { "type": "object", + "required": [ + "city", + "country", + "personalEmail", + "phoneNumber", + "placeOfResidence" + ], "properties": { - "accountManagers": { - "type": "array", - "items": { - "$ref": "#/definitions/view.ProjectHead" - } - }, - "bankAccount": { - "$ref": "#/definitions/view.BasicBankAccountInfo" + "address": { + "type": "string" }, - "client": { - "$ref": "#/definitions/view.Client" + "city": { + "type": "string" }, - "clientEmail": { - "type": "array", - "items": { - "type": "string" - } + "country": { + "type": "string" }, - "code": { + "discordName": { "type": "string" }, - "country": { - "$ref": "#/definitions/view.BasicCountryInfo" + "githubID": { + "type": "string" }, - "createdAt": { + "lat": { "type": "string" }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" + "linkedInName": { + "type": "string" }, - "deliveryManagers": { - "type": "array", - "items": { - "$ref": "#/definitions/view.ProjectHead" - } + "long": { + "type": "string" }, - "function": { + "notionEmail": { "type": "string" }, - "id": { + "notionID": { "type": "string" }, - "members": { - "type": "array", - "items": { - "$ref": "#/definitions/view.CreateMemberData" - } + "notionName": { + "type": "string" }, - "name": { + "personalEmail": { "type": "string" }, - "organization": { - "$ref": "#/definitions/view.Organization" + "phoneNumber": { + "type": "string", + "maxLength": 18, + "minLength": 8 }, - "projectEmail": { + "placeOfResidence": { "type": "string" }, - "salePersons": { - "type": "array", - "items": { - "$ref": "#/definitions/view.ProjectHead" - } + "wiseAccountNumber": { + "type": "string" }, - "startDate": { + "wiseCurrency": { "type": "string" }, - "status": { + "wiseRecipientEmail": { "type": "string" }, - "type": { + "wiseRecipientID": { "type": "string" }, - "updatedAt": { + "wiseRecipientName": { "type": "string" } } }, - "view.Currency": { + "UpdatePersonalEmployeeData": { "type": "object", "properties": { - "id": { + "address": { "type": "string" }, - "locale": { + "birthday": { "type": "string" }, - "name": { + "city": { "type": "string" }, - "symbol": { + "country": { "type": "string" }, - "type": { + "createdAt": { + "type": "string" + }, + "gender": { + "type": "string" + }, + "id": { + "type": "string" + }, + "personalEmail": { + "type": "string" + }, + "placeOfResidence": { + "type": "string" + }, + "updatedAt": { "type": "string" } } }, - "view.Domain": { + "UpdatePersonalEmployeeResponse": { "type": "object", "properties": { - "average": { - "type": "number" - }, - "count": { - "$ref": "#/definitions/model.LikertScaleCount" - }, - "name": { - "type": "string" + "data": { + "$ref": "#/definitions/UpdatePersonalEmployeeData" } } }, - "view.EmployeeAddress": { + "UpdatePersonalInfoRequest": { "type": "object", + "required": [ + "address", + "city", + "country", + "dob", + "gender", + "personalEmail" + ], "properties": { "address": { - "type": "string" + "type": "string", + "maxLength": 200 }, "city": { "type": "string" @@ -10461,1125 +9684,1437 @@ const docTemplate = `{ "country": { "type": "string" }, - "lat": { + "dob": { "type": "string" }, - "long": { + "gender": { "type": "string" - } - } - }, - "view.EmployeeContentData": { - "type": "object", - "properties": { - "url": { + }, + "personalEmail": { + "type": "string" + }, + "placeOfResidence": { "type": "string" } } }, - "view.EmployeeContentDataResponse": { + "UpdatePositionBody": { "type": "object", "properties": { - "data": { - "$ref": "#/definitions/view.EmployeeContentData" + "code": { + "type": "string" + }, + "name": { + "type": "string" } } }, - "view.EmployeeData": { + "UpdateProfileInfoData": { "type": "object", "properties": { "address": { "type": "string" }, - "avatar": { + "city": { "type": "string" }, - "baseSalary": { - "$ref": "#/definitions/view.BaseSalary" - }, - "birthday": { + "country": { "type": "string" }, - "chapters": { - "type": "array", - "items": { - "$ref": "#/definitions/view.Chapter" - } + "createdAt": { + "type": "string" }, - "city": { + "discordID": { "type": "string" }, - "country": { + "discordName": { "type": "string" }, - "createdAt": { + "githubID": { "type": "string" }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" + "id": { + "type": "string" }, - "discordID": { + "linkedInName": { "type": "string" }, - "discordName": { + "notionEmail": { "type": "string" }, - "displayName": { + "notionID": { "type": "string" }, - "fullName": { - "description": "basic info", + "notionName": { "type": "string" }, - "gender": { + "phoneNumber": { "type": "string" }, - "githubID": { + "placeOfResidence": { "type": "string" }, - "horoscope": { + "teamEmail": { + "description": "basic info", "type": "string" }, - "id": { + "updatedAt": { "type": "string" }, - "joinedDate": { + "username": { "type": "string" }, - "leftDate": { + "wiseAccountNumber": { "type": "string" }, - "lineManager": { - "$ref": "#/definitions/view.BasicEmployeeInfo" + "wiseCurrency": { + "type": "string" }, - "linkedInName": { + "wiseRecipientEmail": { "type": "string" }, - "mbti": { + "wiseRecipientID": { "type": "string" }, - "mentees": { + "wiseRecipientName": { + "type": "string" + } + } + }, + "UpdateProfileInfoResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/UpdateProfileInfoData" + } + } + }, + "UpdateRoleRequest": { + "type": "object", + "required": [ + "roles" + ], + "properties": { + "roles": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "UpdateSkillEmployeeData": { + "type": "object", + "properties": { + "chapters": { "type": "array", "items": { - "$ref": "#/definitions/view.MenteeInfo" + "$ref": "#/definitions/Chapter" } }, - "notionID": { + "createdAt": { "type": "string" }, - "notionName": { + "id": { "type": "string" }, - "organizations": { + "positions": { "type": "array", "items": { - "$ref": "#/definitions/view.Organization" + "$ref": "#/definitions/Position" } }, - "personalEmail": { - "type": "string" + "seniority": { + "$ref": "#/definitions/Seniority" }, - "phoneNumber": { - "type": "string" + "stacks": { + "type": "array", + "items": { + "$ref": "#/definitions/Stack" + } }, - "placeOfResidence": { + "updatedAt": { "type": "string" - }, - "positions": { + } + } + }, + "UpdateSkillsEmployeeResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/UpdateSkillEmployeeData" + } + } + }, + "UpdateSkillsRequest": { + "type": "object", + "required": [ + "chapters", + "positions", + "seniority", + "stacks" + ], + "properties": { + "chapters": { "type": "array", "items": { - "$ref": "#/definitions/view.Position" + "type": "string" } }, - "projects": { + "leadingChapters": { "type": "array", "items": { - "$ref": "#/definitions/view.EmployeeProjectData" + "type": "string" } }, - "referredBy": { - "$ref": "#/definitions/view.BasicEmployeeInfo" - }, - "roles": { + "positions": { "type": "array", "items": { - "$ref": "#/definitions/view.Role" + "type": "string" } }, "seniority": { - "$ref": "#/definitions/model.Seniority" + "type": "string" }, "stacks": { "type": "array", "items": { - "$ref": "#/definitions/view.Stack" + "type": "string" } - }, - "status": { - "description": "working info", + } + } + }, + "UpdateStackBody": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, - "teamEmail": { + "code": { "type": "string" }, - "updatedAt": { + "name": { "type": "string" - }, - "username": { + } + } + }, + "UpdateWorkingStatusRequest": { + "type": "object", + "properties": { + "employeeStatus": { "type": "string" - }, - "wiseAccountNumber": { + } + } + }, + "UpsertRollupRequest": { + "type": "object", + "required": [ + "channelID", + "discordUserID", + "lastMessageID" + ], + "properties": { + "categoryID": { "type": "string" }, - "wiseCurrency": { + "channelID": { "type": "string" }, - "wiseRecipientEmail": { + "discordUserID": { "type": "string" }, - "wiseRecipientID": { + "lastMessageID": { "type": "string" }, - "wiseRecipientName": { - "type": "string" + "messageCount": { + "type": "integer" + }, + "reactionCount": { + "type": "integer" } } }, - "view.EmployeeInvitationData": { + "WorkSurvey": { "type": "object", "properties": { - "employee": { - "$ref": "#/definitions/view.InvitedEmployeeInfo" - }, - "employeeID": { - "type": "string" - }, - "id": { - "type": "string" + "deadline": { + "type": "number" }, - "invitedBy": { + "endDate": { "type": "string" }, - "isBasecampAccountCreated": { - "type": "boolean" - }, - "isCompleted": { - "type": "boolean" - }, - "isDiscordRoleAssigned": { - "type": "boolean" + "learning": { + "type": "number" }, - "isInfoUpdated": { - "type": "boolean" + "trend": { + "$ref": "#/definitions/Trend" }, - "isTeamEmailCreated": { - "type": "boolean" + "workload": { + "type": "number" } } }, - "view.EmployeeInvitationResponse": { + "WorkSurveyResponse": { "type": "object", "properties": { "data": { - "$ref": "#/definitions/view.EmployeeInvitationData" + "$ref": "#/definitions/WorkSurveysData" } } }, - "view.EmployeeListDataResponse": { + "WorkSurveySummary": { "type": "object", "properties": { "data": { "type": "array", "items": { - "$ref": "#/definitions/view.EmployeeData" + "$ref": "#/definitions/WorkSurveySummaryEmployee" } + }, + "dates": { + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "type": "string" } } }, - "view.EmployeeLocation": { + "WorkSurveySummaryAnswer": { "type": "object", "properties": { - "address": { - "$ref": "#/definitions/view.EmployeeAddress" - }, - "avatar": { + "answer": { "type": "string" }, - "chapters": { + "project": { + "$ref": "#/definitions/BasicProjectInfo" + } + } + }, + "WorkSurveySummaryEmployee": { + "type": "object", + "properties": { + "listAnswers": { "type": "array", "items": { - "$ref": "#/definitions/view.Chapter" + "$ref": "#/definitions/WorkSurveySummaryListAnswer" } }, - "discordID": { - "type": "string" - }, - "displayName": { - "type": "string" + "reviewer": { + "$ref": "#/definitions/BasicEmployeeInfo" + } + } + }, + "WorkSurveySummaryListAnswer": { + "type": "object", + "properties": { + "answers": { + "type": "array", + "items": { + "$ref": "#/definitions/WorkSurveySummaryAnswer" + } }, - "fullName": { + "date": { "type": "string" } } }, - "view.EmployeeLocationListResponse": { + "WorkSurveySummaryResponse": { "type": "object", "properties": { "data": { "type": "array", "items": { - "$ref": "#/definitions/view.EmployeeLocation" + "$ref": "#/definitions/WorkSurveySummary" } } } }, - "view.EmployeeProjectData": { + "WorkSurveysData": { "type": "object", - "properties": { - "avatar": { - "type": "string" - }, - "code": { - "type": "string" - }, - "deploymentType": { - "type": "string" - }, - "endDate": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" + "properties": { + "project": { + "$ref": "#/definitions/BasicProjectInfo" }, - "positions": { + "workSurveys": { "type": "array", "items": { - "$ref": "#/definitions/view.Position" + "$ref": "#/definitions/WorkSurvey" } - }, - "startDate": { - "type": "string" - }, - "status": { - "type": "string" } } }, - "view.EngagementDashboard": { + "WorkUnitDistribution": { "type": "object", "properties": { - "content": { - "type": "string" + "development": { + "$ref": "#/definitions/WorkUnitDistributionDevelopment" }, - "questionID": { - "type": "string" + "employee": { + "$ref": "#/definitions/BasicEmployeeInfo" }, - "stats": { - "type": "array", - "items": { - "$ref": "#/definitions/view.EngagementDashboardQuestionStat" - } + "learning": { + "$ref": "#/definitions/WorkUnitDistributionLearning" + }, + "management": { + "$ref": "#/definitions/WorkUnitDistributionManagement" + }, + "training": { + "$ref": "#/definitions/WorkUnitDistributionTraining" } } }, - "view.EngagementDashboardDetail": { + "WorkUnitDistributionData": { "type": "object", "properties": { - "questionID": { - "type": "string" - }, - "stats": { + "workUnitDistributions": { "type": "array", "items": { - "$ref": "#/definitions/view.EngagementDashboardQuestionDetailStat" + "$ref": "#/definitions/WorkUnitDistribution" } } } }, - "view.EngagementDashboardQuestionDetailStat": { + "WorkUnitDistributionDevelopment": { "type": "object", "properties": { - "field": { - "type": "string" - }, - "point": { - "type": "number" + "total": { + "type": "integer" }, - "startDate": { - "type": "string" + "workUnits": { + "type": "array", + "items": { + "$ref": "#/definitions/WorkUnitDistributionWU" + } } } }, - "view.EngagementDashboardQuestionStat": { + "WorkUnitDistributionLearning": { "type": "object", "properties": { - "point": { - "type": "number" - }, - "startDate": { - "type": "string" + "total": { + "type": "integer" }, - "title": { - "type": "string" + "workUnits": { + "type": "array", + "items": { + "$ref": "#/definitions/WorkUnitDistributionWU" + } } } }, - "view.EngineeringHealth": { + "WorkUnitDistributionManagement": { "type": "object", "properties": { - "avg": { - "type": "number" + "projectHeads": { + "type": "array", + "items": { + "$ref": "#/definitions/WorkUnitDistributionWUProjectHead" + } }, - "quarter": { - "type": "string" + "total": { + "type": "integer" }, - "trend": { - "type": "number" + "workUnits": { + "type": "array", + "items": { + "$ref": "#/definitions/WorkUnitDistributionWU" + } } } }, - "view.EngineeringHealthData": { + "WorkUnitDistributionTraining": { "type": "object", "properties": { - "average": { + "mentees": { "type": "array", "items": { - "$ref": "#/definitions/view.EngineeringHealth" + "$ref": "#/definitions/BasicEmployeeInfo" } }, - "groups": { + "total": { + "type": "integer" + }, + "workUnits": { "type": "array", "items": { - "$ref": "#/definitions/view.GroupEngineeringHealth" + "$ref": "#/definitions/WorkUnitDistributionWU" } } } }, - "view.EngineeringHealthResponse": { + "WorkUnitDistributionWU": { "type": "object", "properties": { - "data": { - "$ref": "#/definitions/view.EngineeringHealthData" + "project": { + "$ref": "#/definitions/BasicProjectInfo" + }, + "workUnitName": { + "type": "string" } } }, - "view.EngineeringHealthTrend": { + "WorkUnitDistributionWUProjectHead": { "type": "object", "properties": { - "collaboration": { - "type": "number" - }, - "delivery": { - "type": "number" - }, - "feedback": { - "type": "number" + "position": { + "type": "string" }, - "quality": { - "type": "number" + "project": { + "$ref": "#/definitions/BasicProjectInfo" } } }, - "view.ErrorResponse": { + "WorkUnitDistributionsResponse": { "type": "object", "properties": { - "error": { - "type": "string" - }, - "errors": { + "data": { + "$ref": "#/definitions/WorkUnitDistributionData" + } + } + }, + "github_com_dwarvesf_fortress-api_pkg_handler_client_request.CreateClientContactInput": { + "type": "object", + "properties": { + "emails": { "type": "array", "items": { - "$ref": "#/definitions/view.ApiError" + "type": "string" } + }, + "isMainContact": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "role": { + "type": "string" } } }, - "view.FeedBackReviewDetail": { + "github_com_dwarvesf_fortress-api_pkg_handler_client_request.UpdateClientContactInput": { "type": "object", "properties": { - "employee": { - "$ref": "#/definitions/view.BasicEmployeeInfo" - }, - "project": { - "$ref": "#/definitions/view.BasicProjectInfo" - }, - "questions": { + "emails": { "type": "array", "items": { - "$ref": "#/definitions/view.QuestionAnswer" + "type": "string" } }, - "relationship": { - "type": "string" + "isMainContact": { + "type": "boolean" }, - "reviewer": { - "$ref": "#/definitions/view.BasicEmployeeInfo" + "name": { + "type": "string" }, - "topicName": { + "role": { "type": "string" } } }, - "view.Feedback": { + "github_com_dwarvesf_fortress-api_pkg_handler_project_request.AssignMemberInput": { "type": "object", + "required": [ + "deploymentType", + "positions", + "rate", + "seniorityID", + "status" + ], "properties": { - "author": { - "$ref": "#/definitions/view.BasicEmployeeInfo" - }, - "employeeID": { + "deploymentType": { "type": "string" }, - "eventID": { + "discount": { + "type": "number" + }, + "employeeID": { "type": "string" }, - "eventReviewerID": { + "endDate": { "type": "string" }, - "isRead": { + "isLead": { "type": "boolean" }, - "lastUpdated": { - "type": "string" + "leadCommissionRate": { + "type": "number" }, - "projectID": { + "note": { "type": "string" }, - "status": { - "type": "string" + "positions": { + "type": "array", + "items": { + "type": "string" + } }, - "subtype": { + "rate": { + "type": "number" + }, + "seniorityID": { "type": "string" }, - "title": { + "startDate": { "type": "string" }, - "topicID": { + "status": { "type": "string" }, - "type": { + "upsellCommissionRate": { + "type": "number" + }, + "upsellPersonID": { "type": "string" } } }, - "view.FeedbackCount": { + "github_com_dwarvesf_fortress-api_pkg_handler_project_request.CreateProjectInput": { "type": "object", + "required": [ + "countryID", + "function", + "name", + "status" + ], "properties": { - "done": { - "type": "integer" + "accountManagers": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_project_request.ProjectHeadInput" + } }, - "sent": { - "type": "integer" + "auditNotionID": { + "type": "string" }, - "total": { - "type": "integer" - } - } - }, - "view.FeedbackDetail": { - "type": "object", - "properties": { - "answers": { + "bankAccountID": { + "type": "string" + }, + "clientEmail": { "type": "array", "items": { - "$ref": "#/definitions/view.QuestionAnswer" + "type": "string" } }, - "employeeID": { + "clientID": { "type": "string" }, - "eventID": { + "code": { "type": "string" }, - "project": { - "$ref": "#/definitions/view.BasicProjectInfo" + "countryID": { + "type": "string" }, - "relationship": { + "deliveryManagers": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_project_request.ProjectHeadInput" + } + }, + "function": { "type": "string" }, - "reviewer": { - "$ref": "#/definitions/view.BasicEmployeeInfo" + "members": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_project_request.AssignMemberInput" + } }, - "status": { + "name": { "type": "string" }, - "title": { + "organizationID": { "type": "string" }, - "topicID": { + "projectEmail": { + "type": "string" + }, + "salePersons": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_project_request.ProjectHeadInput" + } + }, + "startDate": { + "type": "string" + }, + "status": { + "type": "string" + }, + "type": { "type": "string" } } }, - "view.FeedbackDetailResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/definitions/view.FeedbackDetail" - } - } - }, - "view.FeedbackReviewDetailResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/definitions/view.FeedBackReviewDetail" - } - } - }, - "view.GetCurrenciesResponse": { + "github_com_dwarvesf_fortress-api_pkg_handler_project_request.CreateWorkUnitBody": { "type": "object", + "required": [ + "name", + "stacks", + "status", + "type" + ], "properties": { - "data": { + "members": { "type": "array", "items": { - "$ref": "#/definitions/view.Currency" + "type": "string" } - } - } - }, - "view.GetDashboardResourceUtilizationResponse": { - "type": "object", - "properties": { - "data": { + }, + "name": { + "type": "string" + }, + "stacks": { "type": "array", "items": { - "$ref": "#/definitions/model.ResourceUtilization" + "type": "string" } + }, + "status": { + "type": "string" + }, + "type": { + "type": "string" + }, + "url": { + "type": "string" } } }, - "view.GetDetailClientResponse": { + "github_com_dwarvesf_fortress-api_pkg_handler_project_request.ProjectHeadInput": { "type": "object", "properties": { - "data": { - "$ref": "#/definitions/model.Client" + "commissionRate": { + "type": "number" + }, + "employeeID": { + "type": "string" } } }, - "view.GetEngagementDashboardDetailResponse": { + "github_com_dwarvesf_fortress-api_pkg_handler_project_request.UpdateContactInfoInput": { "type": "object", "properties": { - "data": { + "accountManagers": { "type": "array", "items": { - "$ref": "#/definitions/view.EngagementDashboardDetail" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_project_request.ProjectHeadInput" } - } - } - }, - "view.GetEngagementDashboardResponse": { - "type": "object", - "properties": { - "data": { + }, + "clientEmail": { "type": "array", "items": { - "$ref": "#/definitions/view.EngagementDashboard" + "type": "string" } - } - } - }, - "view.GetListClientResponse": { - "type": "object", - "properties": { - "data": { + }, + "deliveryManagers": { "type": "array", "items": { - "$ref": "#/definitions/model.Client" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_project_request.ProjectHeadInput" } - } - } - }, - "view.GetQuestionResponse": { - "type": "object", - "properties": { - "data": { + }, + "projectEmail": { + "type": "string" + }, + "salePersons": { "type": "array", "items": { - "$ref": "#/definitions/view.Question" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_project_request.ProjectHeadInput" } } } }, - "view.GroupAudit": { + "github_com_dwarvesf_fortress-api_pkg_handler_project_request.UpdateMemberInput": { "type": "object", + "required": [ + "deploymentType", + "positions", + "projectSlotID", + "rate", + "seniorityID", + "status" + ], "properties": { - "backend": { - "type": "number" + "deploymentType": { + "type": "string" }, - "blockchain": { + "discount": { "type": "number" }, - "frontend": { - "type": "number" + "employeeID": { + "type": "string" }, - "mobile": { - "type": "number" + "endDate": { + "type": "string" }, - "process": { + "isLead": { + "type": "boolean" + }, + "leadCommissionRate": { "type": "number" }, - "quarter": { + "note": { "type": "string" }, - "system": { - "type": "number" + "positions": { + "type": "array", + "items": { + "type": "string" + } }, - "trend": { - "$ref": "#/definitions/view.GroupAuditTrend" - } - } - }, - "view.GroupAuditTrend": { - "type": "object", - "properties": { - "backend": { - "type": "number" + "projectMemberID": { + "type": "string" }, - "blockchain": { - "type": "number" + "projectSlotID": { + "type": "string" }, - "frontend": { + "rate": { "type": "number" }, - "mobile": { - "type": "number" + "seniorityID": { + "type": "string" }, - "process": { - "type": "number" + "startDate": { + "type": "string" }, - "system": { + "status": { + "type": "string" + }, + "upsellCommissionRate": { "type": "number" + }, + "upsellPersonID": { + "type": "string" } } }, - "view.GroupEngineeringHealth": { + "github_com_dwarvesf_fortress-api_pkg_handler_project_request.UpdateProjectGeneralInfoInput": { "type": "object", + "required": [ + "accountRating", + "countryID", + "deliveryRating", + "function", + "importantLevel", + "leadRating", + "name" + ], "properties": { - "collaboration": { - "type": "number" - }, - "delivery": { - "type": "number" - }, - "feedback": { - "type": "number" + "accountRating": { + "type": "integer", + "maximum": 5, + "minimum": 1 }, - "quality": { - "type": "number" + "auditNotionID": { + "type": "string" }, - "quarter": { + "bankAccountID": { "type": "string" }, - "trend": { - "$ref": "#/definitions/view.EngineeringHealthTrend" - } - } - }, - "view.InvitedEmployeeInfo": { - "type": "object", - "properties": { - "avatar": { + "clientID": { "type": "string" }, - "displayName": { + "countryID": { "type": "string" }, - "fullName": { + "deliveryRating": { + "type": "integer", + "maximum": 5, + "minimum": 1 + }, + "function": { "type": "string" }, - "id": { + "importantLevel": { "type": "string" }, - "personalEmail": { + "leadRating": { + "type": "integer", + "maximum": 5, + "minimum": 1 + }, + "name": { "type": "string" }, - "teamEmail": { + "organizationID": { "type": "string" }, - "username": { + "stacks": { + "type": "array", + "items": { + "type": "string" + } + }, + "startDate": { "type": "string" } } }, - "view.Invoice": { + "github_com_dwarvesf_fortress-api_pkg_handler_project_request.UpdateWorkUnitBody": { "type": "object", + "required": [ + "name", + "stacks", + "type" + ], "properties": { - "bankID": { - "type": "string" - }, - "cc": { + "members": { "type": "array", "items": { "type": "string" } }, - "conversionAmount": { - "type": "number" - }, - "conversionRate": { - "type": "number" - }, - "description": { - "type": "string" - }, - "discount": { - "type": "number" - }, - "dueAt": { - "type": "string" - }, - "email": { - "type": "string" - }, - "errorInvoiceID": { - "type": "string" - }, - "failedAt": { - "type": "string" - }, - "invoiceFileURL": { - "type": "string" - }, - "invoicedAt": { - "type": "string" + "name": { + "type": "string", + "maxLength": 100 }, - "lineItems": { + "stacks": { "type": "array", "items": { - "$ref": "#/definitions/view.InvoiceItem" + "type": "string" } }, - "month": { - "type": "integer" - }, - "note": { - "type": "string" - }, - "number": { - "type": "string" - }, - "paidAt": { + "type": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_model.WorkUnitType" + }, + "url": { "type": "string" + } + } + }, + "github_com_dwarvesf_fortress-api_pkg_handler_project_request.UpdateWorkUnitInput": { + "type": "object", + "properties": { + "body": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_project_request.UpdateWorkUnitBody" }, "projectID": { "type": "string" }, - "scheduledDate": { + "workUnitID": { "type": "string" - }, - "sentBy": { + } + } + }, + "github_com_dwarvesf_fortress-api_pkg_handler_survey_request.CreateSurveyFeedbackInput": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "fromDate": { "type": "string" }, - "status": { + "quarter": { "type": "string" }, - "subTotal": { - "type": "number" - }, - "tax": { - "type": "number" - }, - "threadID": { + "toDate": { "type": "string" }, - "total": { - "type": "number" + "type": { + "type": "string" }, "year": { "type": "integer" } } }, - "view.InvoiceData": { + "github_com_dwarvesf_fortress-api_pkg_handler_survey_request.DeleteTopicReviewersBody": { "type": "object", "properties": { - "bankAccount": { - "$ref": "#/definitions/view.BankAccount" + "reviewerIDs": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "github_com_dwarvesf_fortress-api_pkg_handler_survey_request.SendSurveyInput": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "topicIDs": { + "type": "array", + "items": { + "type": "string" + } }, - "bankID": { + "type": { "type": "string" - }, - "cc": { + } + } + }, + "github_com_dwarvesf_fortress-api_pkg_handler_survey_request.UpdateTopicReviewersBody": { + "type": "object", + "properties": { + "reviewerIDs": { "type": "array", "items": { "type": "string" } - }, - "client": { - "$ref": "#/definitions/view.ClientInfo" - }, - "companyInfo": { - "$ref": "#/definitions/view.CompanyInfo" - }, - "conversionAmount": { + } + } + }, + "github_com_dwarvesf_fortress-api_pkg_model.AccountingItem": { + "type": "object", + "properties": { + "amount": { "type": "number" }, - "conversionRate": { - "type": "number" + "name": { + "type": "string" + } + } + }, + "github_com_dwarvesf_fortress-api_pkg_model.Chapter": { + "type": "object", + "properties": { + "code": { + "type": "string" }, - "description": { + "createdAt": { "type": "string" }, - "discount": { - "type": "number" + "deletedAt": { + "$ref": "#/definitions/gorm.DeletedAt" }, - "dueAt": { + "id": { "type": "string" }, - "email": { + "lead_id": { "type": "string" }, - "errorInvoiceID": { + "name": { "type": "string" }, - "failedAt": { + "updatedAt": { "type": "string" + } + } + }, + "github_com_dwarvesf_fortress-api_pkg_model.HeadPosition": { + "type": "string", + "enum": [ + "technical-lead", + "delivery-manager", + "account-manager", + "sale-person" + ], + "x-enum-varnames": [ + "HeadPositionTechnicalLead", + "HeadPositionDeliveryManager", + "HeadPositionAccountManager", + "HeadPositionSalePerson" + ] + }, + "github_com_dwarvesf_fortress-api_pkg_model.LikertScaleCount": { + "type": "object", + "properties": { + "agree": { + "type": "integer" }, - "invoiceFileURL": { - "type": "string" + "disagree": { + "type": "integer" }, - "invoicedAt": { + "mixed": { + "type": "integer" + }, + "stronglyAgree": { + "type": "integer" + }, + "stronglyDisagree": { + "type": "integer" + } + } + }, + "github_com_dwarvesf_fortress-api_pkg_model.NotionTechRadar": { + "type": "object", + "properties": { + "assign": { "type": "string" }, - "lineItems": { + "categories": { "type": "array", "items": { - "$ref": "#/definitions/view.InvoiceItem" + "type": "string" } }, - "month": { - "type": "integer" - }, - "note": { - "type": "string" - }, - "number": { + "id": { "type": "string" }, - "paidAt": { + "name": { "type": "string" }, - "projectID": { + "quadrant": { "type": "string" }, - "projectName": { + "ring": { "type": "string" }, - "scheduledDate": { + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "github_com_dwarvesf_fortress-api_pkg_model.Organization": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, - "sentBy": { + "code": { "type": "string" }, - "status": { + "createdAt": { "type": "string" }, - "subTotal": { - "type": "number" - }, - "tax": { - "type": "number" + "deletedAt": { + "$ref": "#/definitions/gorm.DeletedAt" }, - "threadID": { + "id": { "type": "string" }, - "total": { - "type": "number" + "name": { + "type": "string" }, - "year": { - "type": "integer" + "updatedAt": { + "type": "string" } } }, - "view.InvoiceItem": { + "github_com_dwarvesf_fortress-api_pkg_model.Position": { "type": "object", "properties": { - "cost": { - "type": "number" + "code": { + "type": "string" }, - "description": { + "createdAt": { "type": "string" }, - "discount": { - "type": "number" + "deletedAt": { + "$ref": "#/definitions/gorm.DeletedAt" }, - "isExternal": { - "type": "boolean" + "id": { + "type": "string" }, - "quantity": { - "type": "number" + "name": { + "type": "string" }, - "unitCost": { - "type": "number" - } - } - }, - "view.InvoiceListResponse": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/definitions/view.InvoiceData" - } + "updatedAt": { + "type": "string" } } }, - "view.InvoiceTemplateResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/definitions/view.ProjectInvoiceTemplate" - } - } + "github_com_dwarvesf_fortress-api_pkg_model.ProjectFunction": { + "type": "string", + "enum": [ + "development", + "learning", + "training", + "management" + ], + "x-enum-varnames": [ + "ProjectFunctionDevelopment", + "ProjectFunctionLearning", + "ProjectFunctionTraining", + "ProjectFunctionManagement" + ] }, - "view.ItemValue": { + "github_com_dwarvesf_fortress-api_pkg_model.ProjectSize": { "type": "object", "properties": { - "trend": { - "type": "number" + "avatar": { + "type": "string" }, - "value": { - "type": "integer" - } - } - }, - "view.LineManagersResponse": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/definitions/view.BasicEmployeeInfo" - } - } - } - }, - "view.ListBankAccountResponse": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/definitions/view.BankAccount" - } - } - } - }, - "view.ListFeedbackResponse": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/definitions/view.Feedback" - } + "code": { + "type": "string" + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "size": { + "type": "integer" } } }, - "view.ListSurveyDetailResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/definitions/view.SurveyDetail" - } - } + "github_com_dwarvesf_fortress-api_pkg_model.QuestionDomain": { + "type": "string", + "enum": [ + "engagement", + "workload", + "deadline", + "learning" + ], + "x-enum-varnames": [ + "QuestionDomainEngagement", + "QuestionDomainWorkload", + "QuestionDomainDeadline", + "QuestionDomainLearning" + ] + }, + "github_com_dwarvesf_fortress-api_pkg_model.Relationship": { + "type": "string", + "enum": [ + "peer", + "line-manager", + "chapter-lead", + "self" + ], + "x-enum-varnames": [ + "RelationshipPeer", + "RelationshipLineManager", + "RelationshipChapterLead", + "RelationshipSelf" + ] }, - "view.ListSurveyResponse": { + "github_com_dwarvesf_fortress-api_pkg_model.Role": { "type": "object", "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/definitions/view.Survey" - } + "code": { + "type": "string" + }, + "color": { + "type": "string" + }, + "createdAt": { + "type": "string" + }, + "deletedAt": { + "$ref": "#/definitions/gorm.DeletedAt" + }, + "id": { + "type": "string" + }, + "isShow": { + "type": "boolean" + }, + "level": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "updatedAt": { + "type": "string" } } }, - "view.ListWorkUnitResponse": { + "github_com_dwarvesf_fortress-api_pkg_model.Seniority": { "type": "object", "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/definitions/view.WorkUnit" - } + "code": { + "type": "string" + }, + "createdAt": { + "type": "string" + }, + "deletedAt": { + "$ref": "#/definitions/gorm.DeletedAt" + }, + "id": { + "type": "string" + }, + "level": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "updatedAt": { + "type": "string" } } }, - "view.LoggedInUserData": { + "github_com_dwarvesf_fortress-api_pkg_model.Stack": { "type": "object", "properties": { "avatar": { "type": "string" }, - "displayName": { + "code": { "type": "string" }, - "fullName": { + "createdAt": { "type": "string" }, + "deletedAt": { + "$ref": "#/definitions/gorm.DeletedAt" + }, "id": { "type": "string" }, - "permissions": { - "type": "array", - "items": { - "type": "string" - } - }, - "role": { + "name": { "type": "string" }, - "teamEmail": { + "updatedAt": { "type": "string" } } }, - "view.MenteeInfo": { + "github_com_dwarvesf_fortress-api_pkg_model.Valuation": { "type": "object", "properties": { - "avatar": { - "type": "string" + "accountReceivable": { + "description": "money that company will receive in the future", + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_model.AccountingItem" + } + }, + "total": { + "type": "number" + } + } }, - "displayName": { - "type": "string" + "assets": { + "description": "valuation info", + "type": "number" }, - "fullName": { + "currency": { "type": "string" }, - "id": { - "type": "string" + "income": { + "description": "Total paid invoice, investment \u0026 bank interest", + "type": "object", + "properties": { + "detail": { + "type": "object", + "properties": { + "consultantService": { + "type": "number" + }, + "interest": { + "type": "number" + }, + "investment": { + "type": "number" + } + } + }, + "total": { + "type": "number" + } + } }, - "positions": { + "liabilities": { + "description": "money that company will pay in the future", + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_model.AccountingItem" + } + }, + "total": { + "type": "number" + } + } + }, + "outcome": { + "description": "Sum of Expenses and payroll", + "type": "object", + "properties": { + "detail": { + "type": "object", + "properties": { + "expense": { + "type": "number" + }, + "investment": { + "type": "number" + }, + "payroll": { + "type": "number" + } + } + }, + "total": { + "type": "number" + } + } + }, + "rate": { + "type": "number" + }, + "year": { + "description": "basic info", + "type": "string" + } + } + }, + "github_com_dwarvesf_fortress-api_pkg_model.WorkUnitType": { + "type": "string", + "enum": [ + "development", + "management", + "training", + "learning" + ], + "x-enum-varnames": [ + "WorkUnitTypeDevelopment", + "WorkUnitTypeManagement", + "WorkUnitTypeTraining", + "WorkUnitTypeLearning" + ] + }, + "github_com_dwarvesf_fortress-api_pkg_view.ApiError": { + "description": "validation error details", + "type": "object", + "properties": { + "enums": { + "description": "available options incase of field's payload is enums", "type": "array", "items": { - "$ref": "#/definitions/model.Position" + "type": "string" } }, - "seniority": { - "$ref": "#/definitions/model.Seniority" + "field": { + "description": "the field cause the error", + "type": "string" }, - "username": { + "msg": { + "description": "error message", "type": "string" } } }, - "view.MessageResponse": { + "github_com_dwarvesf_fortress-api_pkg_view.BasicBankAccountInfo": { "type": "object", "properties": { - "message": { + "accountNumber": { + "type": "string" + }, + "bankName": { + "type": "string" + }, + "id": { + "type": "string" + }, + "ownerName": { "type": "string" } } }, - "view.MetaData": { + "github_com_dwarvesf_fortress-api_pkg_view.BasicClientInfo": { "type": "object", "properties": { - "code": { + "description": { "type": "string" }, "id": { @@ -11587,16 +11122,16 @@ const docTemplate = `{ }, "name": { "type": "string" + }, + "registrationNumber": { + "type": "string" } } }, - "view.Organization": { + "github_com_dwarvesf_fortress-api_pkg_view.BasicCompanyInfo": { "type": "object", "properties": { - "avatar": { - "type": "string" - }, - "code": { + "description": { "type": "string" }, "id": { @@ -11604,224 +11139,199 @@ const docTemplate = `{ }, "name": { "type": "string" + }, + "registrationNumber": { + "type": "string" } } }, - "view.OrganizationsResponse": { + "github_com_dwarvesf_fortress-api_pkg_view.BasicCountryInfo": { "type": "object", "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/definitions/model.Organization" - } + "code": { + "type": "string" + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" } } }, - "view.PeerReviewer": { + "github_com_dwarvesf_fortress-api_pkg_view.BasicMember": { "type": "object", "properties": { - "eventReviewerID": { + "avatar": { "type": "string" }, - "isForcedDone": { - "type": "boolean" + "displayName": { + "type": "string" }, - "relationship": { + "employeeID": { "type": "string" }, - "reviewer": { - "$ref": "#/definitions/view.BasicEmployeeInfo" + "fullName": { + "type": "string" }, - "status": { + "username": { "type": "string" } } }, - "view.Position": { + "github_com_dwarvesf_fortress-api_pkg_view.BasicProjectHeadInfo": { "type": "object", "properties": { - "code": { + "avatar": { "type": "string" }, - "id": { + "commissionRate": { + "type": "number" + }, + "displayName": { "type": "string" }, - "name": { + "employeeID": { + "type": "string" + }, + "fullName": { + "type": "string" + }, + "position": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_model.HeadPosition" + }, + "username": { "type": "string" } } }, - "view.PositionResponse": { + "github_com_dwarvesf_fortress-api_pkg_view.BraineryMetric": { "type": "object", "properties": { - "data": { + "contributors": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.Post" + } + }, + "latestPosts": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.Post" + } + }, + "newContributors": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.Post" + } + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "topContributors": { "type": "array", "items": { - "$ref": "#/definitions/model.Position" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.TopContributor" } } } }, - "view.Post": { + "github_com_dwarvesf_fortress-api_pkg_view.ContentData": { "type": "object", "properties": { - "discordID": { - "type": "string" - }, - "publishedAt": { - "type": "string" - }, - "reward": { - "type": "number" - }, - "title": { - "type": "string" - }, "url": { "type": "string" } } }, - "view.ProfileData": { + "github_com_dwarvesf_fortress-api_pkg_view.CreateMemberData": { "type": "object", "properties": { - "address": { - "type": "string" - }, "avatar": { "type": "string" }, - "birthday": { - "type": "string" - }, - "city": { - "type": "string" - }, - "country": { - "type": "string" - }, - "discordID": { + "deploymentType": { "type": "string" }, - "discordName": { - "type": "string" + "discount": { + "type": "number" }, "displayName": { "type": "string" }, - "fullName": { - "type": "string" - }, - "gender": { - "type": "string" - }, - "githubID": { - "type": "string" - }, - "id": { - "type": "string" - }, - "linkedInName": { - "type": "string" - }, - "notionEmail": { - "type": "string" - }, - "notionID": { + "employeeID": { "type": "string" }, - "notionName": { + "fullName": { "type": "string" }, - "personalEmail": { - "type": "string" + "isLead": { + "type": "boolean" }, - "phoneNumber": { - "type": "string" + "leadCommissionRate": { + "type": "number" }, - "placeOfResidence": { + "note": { "type": "string" }, - "roles": { + "positions": { "type": "array", "items": { - "$ref": "#/definitions/view.Role" + "$ref": "#/definitions/Position" } }, - "teamEmail": { + "projectMemberID": { "type": "string" }, - "username": { + "projectSlotID": { "type": "string" }, - "wiseAccountNumber": { - "type": "string" + "rate": { + "type": "number" }, - "wiseCurrency": { - "type": "string" + "seniority": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_model.Seniority" }, - "wiseRecipientEmail": { + "status": { "type": "string" }, - "wiseRecipientID": { - "type": "string" + "upsellCommissionRate": { + "type": "number" }, - "wiseRecipientName": { - "type": "string" - } - } - }, - "view.ProfileDataResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/definitions/view.ProfileData" - } - } - }, - "view.ProjectContentData": { - "type": "object", - "properties": { - "url": { + "upsellPerson": { + "$ref": "#/definitions/BasicEmployeeInfo" + }, + "username": { "type": "string" } } }, - "view.ProjectContentDataResponse": { + "github_com_dwarvesf_fortress-api_pkg_view.CreateMemberDataResponse": { "type": "object", "properties": { "data": { - "$ref": "#/definitions/view.ProjectContentData" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.CreateMemberData" } } }, - "view.ProjectData": { + "github_com_dwarvesf_fortress-api_pkg_view.CreateProjectData": { "type": "object", "properties": { "accountManagers": { "type": "array", "items": { - "$ref": "#/definitions/view.ProjectHead" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ProjectHead" } }, - "accountRating": { - "type": "integer" - }, - "allowsSendingSurvey": { - "type": "boolean" - }, - "auditNotionID": { - "type": "string" - }, - "avatar": { - "type": "string" - }, "bankAccount": { - "$ref": "#/definitions/view.BasicBankAccountInfo" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.BasicBankAccountInfo" }, "client": { - "$ref": "#/definitions/view.BasicClientInfo" + "$ref": "#/definitions/Client" }, "clientEmail": { "type": "array", @@ -11832,62 +11342,38 @@ const docTemplate = `{ "code": { "type": "string" }, - "companyInfo": { - "$ref": "#/definitions/view.BasicCompanyInfo" - }, "country": { - "$ref": "#/definitions/view.BasicCountryInfo" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.BasicCountryInfo" }, "createdAt": { "type": "string" }, - "currency": { - "$ref": "#/definitions/view.Currency" - }, "deletedAt": { "$ref": "#/definitions/gorm.DeletedAt" }, "deliveryManagers": { "type": "array", "items": { - "$ref": "#/definitions/view.ProjectHead" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ProjectHead" } }, - "deliveryRating": { - "type": "integer" - }, - "endDate": { - "type": "string" - }, "function": { "type": "string" }, "id": { "type": "string" }, - "importantLevel": { - "type": "string" - }, - "industry": { - "type": "string" - }, - "leadRating": { - "type": "integer" - }, "members": { "type": "array", "items": { - "$ref": "#/definitions/view.ProjectMember" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.CreateMemberData" } }, - "monthlyChargeRate": { - "type": "number" - }, "name": { "type": "string" }, "organization": { - "$ref": "#/definitions/view.Organization" + "$ref": "#/definitions/Organization" }, "projectEmail": { "type": "string" @@ -11895,13 +11381,7 @@ const docTemplate = `{ "salePersons": { "type": "array", "items": { - "$ref": "#/definitions/view.ProjectHead" - } - }, - "stacks": { - "type": "array", - "items": { - "$ref": "#/definitions/view.Stack" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ProjectHead" } }, "startDate": { @@ -11910,12 +11390,6 @@ const docTemplate = `{ "status": { "type": "string" }, - "technicalLeads": { - "type": "array", - "items": { - "$ref": "#/definitions/view.ProjectHead" - } - }, "type": { "type": "string" }, @@ -11924,437 +11398,348 @@ const docTemplate = `{ } } }, - "view.ProjectDataResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/definitions/view.ProjectData" - } - } - }, - "view.ProjectHead": { - "type": "object", - "properties": { - "avatar": { - "type": "string" - }, - "commissionRate": { - "type": "number" - }, - "displayName": { - "type": "string" - }, - "employeeID": { - "type": "string" - }, - "finalCommissionRate": { - "type": "number" - }, - "fullName": { - "type": "string" - }, - "username": { - "type": "string" - } - } - }, - "view.ProjectInvoiceTemplate": { - "type": "object", - "properties": { - "bankAccount": { - "$ref": "#/definitions/view.BankAccount" - }, - "client": { - "$ref": "#/definitions/view.ClientInfo" - }, - "companyInfo": { - "$ref": "#/definitions/view.CompanyInfo" - }, - "id": { - "type": "string" - }, - "invoiceNumber": { - "type": "string" - }, - "lastInvoice": { - "$ref": "#/definitions/view.Invoice" - }, - "name": { - "type": "string" - } - } - }, - "view.ProjectListDataResponse": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/definitions/view.ProjectData" - } - } - } - }, - "view.ProjectMember": { - "type": "object", - "properties": { - "avatar": { - "type": "string" - }, - "currency": { - "$ref": "#/definitions/view.Currency" - }, - "deploymentType": { - "type": "string" - }, - "discount": { - "type": "number" - }, - "displayName": { - "type": "string" - }, - "employeeID": { - "type": "string" - }, - "endDate": { - "type": "string" - }, - "fullName": { - "type": "string" - }, - "isLead": { - "type": "boolean" - }, - "leadCommissionRate": { + "github_com_dwarvesf_fortress-api_pkg_view.Domain": { + "type": "object", + "properties": { + "average": { "type": "number" }, - "note": { + "count": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_model.LikertScaleCount" + }, + "name": { "type": "string" + } + } + }, + "github_com_dwarvesf_fortress-api_pkg_view.FeedBackReviewDetail": { + "type": "object", + "properties": { + "employee": { + "$ref": "#/definitions/BasicEmployeeInfo" }, - "positions": { + "project": { + "$ref": "#/definitions/BasicProjectInfo" + }, + "questions": { "type": "array", "items": { - "$ref": "#/definitions/view.Position" + "$ref": "#/definitions/QuestionAnswer" } }, - "projectMemberID": { - "type": "string" - }, - "projectSlotID": { + "relationship": { "type": "string" }, - "rate": { - "type": "number" - }, - "seniority": { - "$ref": "#/definitions/model.Seniority" - }, - "startDate": { - "type": "string" + "reviewer": { + "$ref": "#/definitions/BasicEmployeeInfo" }, - "status": { + "topicName": { "type": "string" + } + } + }, + "github_com_dwarvesf_fortress-api_pkg_view.FeedbackCount": { + "type": "object", + "properties": { + "done": { + "type": "integer" }, - "upsellCommissionRate": { - "type": "number" - }, - "upsellPerson": { - "$ref": "#/definitions/view.BasicEmployeeInfo" + "sent": { + "type": "integer" }, - "username": { - "type": "string" + "total": { + "type": "integer" } } }, - "view.ProjectMemberListResponse": { + "github_com_dwarvesf_fortress-api_pkg_view.FeedbackReviewDetailResponse": { "type": "object", "properties": { "data": { - "type": "array", - "items": { - "$ref": "#/definitions/view.ProjectMember" - } + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.FeedBackReviewDetail" } } }, - "view.ProjectSizeResponse": { + "github_com_dwarvesf_fortress-api_pkg_view.ListSurveyDetailResponse": { "type": "object", "properties": { "data": { - "type": "array", - "items": { - "$ref": "#/definitions/model.ProjectSize" - } + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.SurveyDetail" } } }, - "view.PublicClient": { + "github_com_dwarvesf_fortress-api_pkg_view.ListSurveyResponse": { "type": "object", "properties": { - "address": { - "$ref": "#/definitions/view.Address" - }, - "avatar": { - "type": "string" - }, - "companySize": { - "type": "string" - }, - "id": { - "type": "string" - }, - "industry": { - "type": "string" - }, - "name": { - "type": "string" - }, - "solutionType": { - "type": "string" - }, - "stacks": { + "data": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.Survey" } } } }, - "view.PublicClientListResponse": { + "github_com_dwarvesf_fortress-api_pkg_view.ListWorkUnitResponse": { "type": "object", "properties": { "data": { "type": "array", "items": { - "$ref": "#/definitions/view.PublicClient" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.WorkUnit" } } } }, - "view.Question": { + "github_com_dwarvesf_fortress-api_pkg_view.PeerReviewer": { "type": "object", "properties": { - "category": { - "type": "string" - }, - "content": { + "eventReviewerID": { "type": "string" }, - "id": { - "type": "string" + "isForcedDone": { + "type": "boolean" }, - "order": { - "type": "integer" + "relationship": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_model.Relationship" }, - "subcategory": { - "type": "string" + "reviewer": { + "$ref": "#/definitions/BasicEmployeeInfo" }, - "type": { - "type": "string" + "status": { + "$ref": "#/definitions/EventReviewerStatus" } } }, - "view.QuestionAnswer": { + "github_com_dwarvesf_fortress-api_pkg_view.Post": { "type": "object", "properties": { - "answer": { - "type": "string" - }, - "content": { + "discordID": { "type": "string" }, - "domain": { + "publishedAt": { "type": "string" }, - "eventQuestionID": { - "type": "string" + "reward": { + "type": "number" }, - "note": { + "title": { "type": "string" }, - "order": { - "type": "integer" - }, - "type": { + "url": { "type": "string" } } }, - "view.ResourceAvailability": { + "github_com_dwarvesf_fortress-api_pkg_view.ProjectContentData": { "type": "object", "properties": { - "employees": { - "type": "array", - "items": { - "$ref": "#/definitions/view.AvailableEmployee" - } - }, - "slots": { - "type": "array", - "items": { - "$ref": "#/definitions/view.AvailableSlot" - } + "url": { + "type": "string" } } }, - "view.ResourceAvailabilityResponse": { + "github_com_dwarvesf_fortress-api_pkg_view.ProjectContentDataResponse": { "type": "object", "properties": { "data": { - "$ref": "#/definitions/view.ResourceAvailability" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ProjectContentData" } } }, - "view.Role": { + "github_com_dwarvesf_fortress-api_pkg_view.ProjectData": { "type": "object", "properties": { - "code": { - "type": "string" + "accountManagers": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ProjectHead" + } }, - "id": { + "accountRating": { + "type": "integer" + }, + "allowsSendingSurvey": { + "type": "boolean" + }, + "auditNotionID": { "type": "string" }, - "name": { + "avatar": { "type": "string" - } - } - }, - "view.RolesResponse": { - "type": "object", - "properties": { - "data": { + }, + "bankAccount": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.BasicBankAccountInfo" + }, + "client": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.BasicClientInfo" + }, + "clientEmail": { "type": "array", "items": { - "$ref": "#/definitions/model.Role" + "type": "string" } - } - } - }, - "view.Seniority": { - "type": "object", - "properties": { + }, "code": { "type": "string" }, + "companyInfo": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.BasicCompanyInfo" + }, + "country": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.BasicCountryInfo" + }, + "createdAt": { + "type": "string" + }, + "currency": { + "$ref": "#/definitions/Currency" + }, + "deletedAt": { + "$ref": "#/definitions/gorm.DeletedAt" + }, + "deliveryManagers": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ProjectHead" + } + }, + "deliveryRating": { + "type": "integer" + }, + "endDate": { + "type": "string" + }, + "function": { + "type": "string" + }, "id": { "type": "string" }, + "importantLevel": { + "type": "string" + }, + "industry": { + "type": "string" + }, + "leadRating": { + "type": "integer" + }, + "members": { + "type": "array", + "items": { + "$ref": "#/definitions/ProjectMember" + } + }, + "monthlyChargeRate": { + "type": "number" + }, "name": { "type": "string" - } - } - }, - "view.SeniorityResponse": { - "type": "object", - "properties": { - "data": { + }, + "organization": { + "$ref": "#/definitions/Organization" + }, + "projectEmail": { + "type": "string" + }, + "salePersons": { "type": "array", "items": { - "$ref": "#/definitions/model.Seniority" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ProjectHead" } - } - } - }, - "view.Stack": { - "type": "object", - "properties": { - "avatar": { + }, + "stacks": { + "type": "array", + "items": { + "$ref": "#/definitions/Stack" + } + }, + "startDate": { "type": "string" }, - "code": { + "status": { "type": "string" }, - "id": { + "technicalLeads": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ProjectHead" + } + }, + "type": { "type": "string" }, - "name": { + "updatedAt": { "type": "string" } } }, - "view.StackResponse": { + "github_com_dwarvesf_fortress-api_pkg_view.ProjectDataResponse": { "type": "object", "properties": { "data": { - "type": "array", - "items": { - "$ref": "#/definitions/model.Stack" - } + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ProjectData" } } }, - "view.SubmitFeedback": { + "github_com_dwarvesf_fortress-api_pkg_view.ProjectHead": { "type": "object", "properties": { - "answers": { - "type": "array", - "items": { - "$ref": "#/definitions/view.QuestionAnswer" - } - }, - "employeeID": { + "avatar": { "type": "string" }, - "eventID": { - "type": "string" + "commissionRate": { + "type": "number" }, - "reviewer": { - "$ref": "#/definitions/view.BasicEmployeeInfo" + "displayName": { + "type": "string" }, - "status": { + "employeeID": { "type": "string" }, - "title": { + "finalCommissionRate": { + "type": "number" + }, + "fullName": { "type": "string" }, - "topicID": { + "username": { "type": "string" } } }, - "view.SubmitFeedbackResponse": { + "github_com_dwarvesf_fortress-api_pkg_view.ProjectListDataResponse": { "type": "object", "properties": { "data": { - "$ref": "#/definitions/view.SubmitFeedback" - } - } - }, - "view.SummaryWorkUnitDistributionData": { - "type": "object", - "properties": { - "development": { - "type": "number" - }, - "learning": { - "type": "number" - }, - "management": { - "type": "number" - }, - "training": { - "type": "number" + "type": "array", + "items": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ProjectData" + } } } }, - "view.SummaryWorkUnitDistributionResponse": { + "github_com_dwarvesf_fortress-api_pkg_view.ProjectMemberListResponse": { "type": "object", "properties": { "data": { - "$ref": "#/definitions/view.SummaryWorkUnitDistributionData" + "type": "array", + "items": { + "$ref": "#/definitions/ProjectMember" + } } } }, - "view.Survey": { + "github_com_dwarvesf_fortress-api_pkg_view.Survey": { "type": "object", "properties": { "count": { - "$ref": "#/definitions/view.FeedbackCount" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.FeedbackCount" }, "domains": { "type": "array", "items": { - "$ref": "#/definitions/view.Domain" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.Domain" } }, "endDate": { @@ -12380,11 +11765,11 @@ const docTemplate = `{ } } }, - "view.SurveyDetail": { + "github_com_dwarvesf_fortress-api_pkg_view.SurveyDetail": { "type": "object", "properties": { "author": { - "$ref": "#/definitions/view.BasicEmployeeInfo" + "$ref": "#/definitions/BasicEmployeeInfo" }, "endDate": { "type": "string" @@ -12407,7 +11792,7 @@ const docTemplate = `{ "topics": { "type": "array", "items": { - "$ref": "#/definitions/view.Topic" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.Topic" } }, "type": { @@ -12415,16 +11800,16 @@ const docTemplate = `{ } } }, - "view.SurveyTopicDetail": { + "github_com_dwarvesf_fortress-api_pkg_view.SurveyTopicDetail": { "type": "object", "properties": { "employee": { - "$ref": "#/definitions/view.BasicEmployeeInfo" + "$ref": "#/definitions/BasicEmployeeInfo" }, "participants": { "type": "array", "items": { - "$ref": "#/definitions/view.PeerReviewer" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.PeerReviewer" } }, "title": { @@ -12435,15 +11820,15 @@ const docTemplate = `{ } } }, - "view.SurveyTopicDetailResponse": { + "github_com_dwarvesf_fortress-api_pkg_view.SurveyTopicDetailResponse": { "type": "object", "properties": { "data": { - "$ref": "#/definitions/view.SurveyTopicDetail" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.SurveyTopicDetail" } } }, - "view.TopContributor": { + "github_com_dwarvesf_fortress-api_pkg_view.TopContributor": { "type": "object", "properties": { "count": { @@ -12457,23 +11842,23 @@ const docTemplate = `{ } } }, - "view.Topic": { + "github_com_dwarvesf_fortress-api_pkg_view.Topic": { "type": "object", "properties": { "comments": { "type": "integer" }, "count": { - "$ref": "#/definitions/view.FeedbackCount" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.FeedbackCount" }, "domains": { "type": "array", "items": { - "$ref": "#/definitions/view.Domain" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.Domain" } }, "employee": { - "$ref": "#/definitions/view.BasicEmployeeInfo" + "$ref": "#/definitions/BasicEmployeeInfo" }, "eventID": { "type": "string" @@ -12487,279 +11872,30 @@ const docTemplate = `{ "participants": { "type": "array", "items": { - "$ref": "#/definitions/view.BasicEmployeeInfo" - } - }, - "project": { - "$ref": "#/definitions/view.BasicProjectInfo" - }, - "reviewID": { - "type": "string" - }, - "status": { - "type": "string" - }, - "subtype": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - } - } - }, - "view.Trend": { - "type": "object", - "properties": { - "deadline": { - "type": "number" - }, - "learning": { - "type": "number" - }, - "workload": { - "type": "number" - } - } - }, - "view.UnreadFeedbackCountData": { - "type": "object", - "properties": { - "count": { - "type": "integer" - }, - "reviewerID": { - "type": "string" - } - } - }, - "view.UnreadFeedbackCountResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/definitions/view.UnreadFeedbackCountData" - } - } - }, - "view.UpdateBaseSalaryResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/definitions/view.BaseSalary" - } - } - }, - "view.UpdateEmployeeStatusResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/definitions/view.EmployeeData" - } - } - }, - "view.UpdateGeneralEmployeeResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/definitions/view.UpdateGeneralInfoEmployeeData" - } - } - }, - "view.UpdateGeneralInfoEmployeeData": { - "type": "object", - "properties": { - "createdAt": { - "type": "string" - }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "discordID": { - "type": "string" - }, - "discordName": { - "type": "string" - }, - "displayName": { - "type": "string" - }, - "fullName": { - "description": "basic info", - "type": "string" - }, - "githubID": { - "type": "string" - }, - "id": { - "type": "string" - }, - "lineManager": { - "$ref": "#/definitions/view.BasicEmployeeInfo" - }, - "linkedInName": { - "type": "string" - }, - "notionEmail": { - "type": "string" - }, - "notionID": { - "type": "string" - }, - "notionName": { - "type": "string" - }, - "organizations": { - "type": "array", - "items": { - "$ref": "#/definitions/view.Organization" + "$ref": "#/definitions/BasicEmployeeInfo" } }, - "phoneNumber": { - "type": "string" - }, - "referredBy": { - "$ref": "#/definitions/view.BasicEmployeeInfo" - }, - "teamEmail": { - "type": "string" - }, - "updatedAt": { - "type": "string" - } - } - }, - "view.UpdatePersonalEmployeeData": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "birthday": { - "type": "string" - }, - "city": { - "type": "string" - }, - "country": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "gender": { - "type": "string" - }, - "id": { - "type": "string" - }, - "personalEmail": { - "type": "string" - }, - "placeOfResidence": { - "type": "string" - }, - "updatedAt": { - "type": "string" - } - } - }, - "view.UpdatePersonalEmployeeResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/definitions/view.UpdatePersonalEmployeeData" - } - } - }, - "view.UpdateProfileInfoData": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "city": { - "type": "string" - }, - "country": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "discordID": { - "type": "string" - }, - "discordName": { - "type": "string" - }, - "githubID": { - "type": "string" - }, - "id": { - "type": "string" - }, - "linkedInName": { - "type": "string" - }, - "notionEmail": { - "type": "string" - }, - "notionID": { - "type": "string" - }, - "notionName": { - "type": "string" - }, - "phoneNumber": { - "type": "string" - }, - "placeOfResidence": { - "type": "string" - }, - "teamEmail": { - "description": "basic info", - "type": "string" - }, - "updatedAt": { - "type": "string" - }, - "username": { - "type": "string" + "project": { + "$ref": "#/definitions/BasicProjectInfo" }, - "wiseAccountNumber": { + "reviewID": { "type": "string" }, - "wiseCurrency": { + "status": { "type": "string" }, - "wiseRecipientEmail": { + "subtype": { "type": "string" }, - "wiseRecipientID": { + "title": { "type": "string" }, - "wiseRecipientName": { + "type": { "type": "string" } } }, - "view.UpdateProfileInfoResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/definitions/view.UpdateProfileInfoData" - } - } - }, - "view.UpdateProjectContactInfo": { + "github_com_dwarvesf_fortress-api_pkg_view.UpdateProjectContactInfo": { "type": "object", "properties": { "clientEmail": { @@ -12774,47 +11910,47 @@ const docTemplate = `{ "projectHead": { "type": "array", "items": { - "$ref": "#/definitions/view.BasicProjectHeadInfo" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.BasicProjectHeadInfo" } } } }, - "view.UpdateProjectContactInfoResponse": { + "github_com_dwarvesf_fortress-api_pkg_view.UpdateProjectContactInfoResponse": { "type": "object", "properties": { "data": { - "$ref": "#/definitions/view.UpdateProjectContactInfo" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.UpdateProjectContactInfo" } } }, - "view.UpdateProjectGeneralInfo": { + "github_com_dwarvesf_fortress-api_pkg_view.UpdateProjectGeneralInfo": { "type": "object", "properties": { "auditNotionID": { "type": "string" }, "bankAccount": { - "$ref": "#/definitions/view.BasicBankAccountInfo" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.BasicBankAccountInfo" }, "client": { - "$ref": "#/definitions/view.Client" + "$ref": "#/definitions/Client" }, "country": { - "$ref": "#/definitions/view.BasicCountryInfo" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.BasicCountryInfo" }, "function": { - "type": "string" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_model.ProjectFunction" }, "name": { "type": "string" }, "organization": { - "$ref": "#/definitions/view.Organization" + "$ref": "#/definitions/Organization" }, "stacks": { "type": "array", "items": { - "$ref": "#/definitions/model.Stack" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_model.Stack" } }, "startDate": { @@ -12822,69 +11958,23 @@ const docTemplate = `{ } } }, - "view.UpdateProjectGeneralInfoResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/definitions/view.UpdateProjectGeneralInfo" - } - } - }, - "view.UpdateProjectStatusResponse": { + "github_com_dwarvesf_fortress-api_pkg_view.UpdateProjectGeneralInfoResponse": { "type": "object", "properties": { "data": { - "$ref": "#/definitions/view.UpdatedProject" - } - } - }, - "view.UpdateSkillEmployeeData": { - "type": "object", - "properties": { - "chapters": { - "type": "array", - "items": { - "$ref": "#/definitions/model.Chapter" - } - }, - "createdAt": { - "type": "string" - }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "id": { - "type": "string" - }, - "positions": { - "type": "array", - "items": { - "$ref": "#/definitions/model.Position" - } - }, - "seniority": { - "$ref": "#/definitions/model.Seniority" - }, - "stacks": { - "type": "array", - "items": { - "$ref": "#/definitions/model.Stack" - } - }, - "updatedAt": { - "type": "string" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.UpdateProjectGeneralInfo" } } }, - "view.UpdateSkillsEmployeeResponse": { + "github_com_dwarvesf_fortress-api_pkg_view.UpdateProjectStatusResponse": { "type": "object", "properties": { "data": { - "$ref": "#/definitions/view.UpdateSkillEmployeeData" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.UpdatedProject" } } }, - "view.UpdatedProject": { + "github_com_dwarvesf_fortress-api_pkg_view.UpdatedProject": { "type": "object", "properties": { "createdAt": { @@ -12916,119 +12006,7 @@ const docTemplate = `{ } } }, - "view.WorkSurvey": { - "type": "object", - "properties": { - "deadline": { - "type": "number" - }, - "endDate": { - "type": "string" - }, - "learning": { - "type": "number" - }, - "trend": { - "$ref": "#/definitions/view.Trend" - }, - "workload": { - "type": "number" - } - } - }, - "view.WorkSurveyResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/definitions/view.WorkSurveysData" - } - } - }, - "view.WorkSurveySummary": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/definitions/view.WorkSurveySummaryEmployee" - } - }, - "dates": { - "type": "array", - "items": { - "type": "string" - } - }, - "type": { - "type": "string" - } - } - }, - "view.WorkSurveySummaryAnswer": { - "type": "object", - "properties": { - "answer": { - "type": "string" - }, - "project": { - "$ref": "#/definitions/view.BasicProjectInfo" - } - } - }, - "view.WorkSurveySummaryEmployee": { - "type": "object", - "properties": { - "listAnswers": { - "type": "array", - "items": { - "$ref": "#/definitions/view.WorkSurveySummaryListAnswer" - } - }, - "reviewer": { - "$ref": "#/definitions/view.BasicEmployeeInfo" - } - } - }, - "view.WorkSurveySummaryListAnswer": { - "type": "object", - "properties": { - "answers": { - "type": "array", - "items": { - "$ref": "#/definitions/view.WorkSurveySummaryAnswer" - } - }, - "date": { - "type": "string" - } - } - }, - "view.WorkSurveySummaryResponse": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/definitions/view.WorkSurveySummary" - } - } - } - }, - "view.WorkSurveysData": { - "type": "object", - "properties": { - "project": { - "$ref": "#/definitions/view.BasicProjectInfo" - }, - "workSurveys": { - "type": "array", - "items": { - "$ref": "#/definitions/view.WorkSurvey" - } - } - } - }, - "view.WorkUnit": { + "github_com_dwarvesf_fortress-api_pkg_view.WorkUnit": { "type": "object", "properties": { "code": { @@ -13040,7 +12018,7 @@ const docTemplate = `{ "members": { "type": "array", "items": { - "$ref": "#/definitions/view.BasicMember" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.BasicMember" } }, "name": { @@ -13052,7 +12030,7 @@ const docTemplate = `{ "stacks": { "type": "array", "items": { - "$ref": "#/definitions/view.Stack" + "$ref": "#/definitions/Stack" } }, "status": { @@ -13066,147 +12044,55 @@ const docTemplate = `{ } } }, - "view.WorkUnitDistribution": { - "type": "object", - "properties": { - "development": { - "$ref": "#/definitions/view.WorkUnitDistributionDevelopment" - }, - "employee": { - "$ref": "#/definitions/view.BasicEmployeeInfo" - }, - "learning": { - "$ref": "#/definitions/view.WorkUnitDistributionLearning" - }, - "management": { - "$ref": "#/definitions/view.WorkUnitDistributionManagement" - }, - "training": { - "$ref": "#/definitions/view.WorkUnitDistributionTraining" - } - } - }, - "view.WorkUnitDistributionData": { - "type": "object", - "properties": { - "workUnitDistributions": { - "type": "array", - "items": { - "$ref": "#/definitions/view.WorkUnitDistribution" - } - } - } - }, - "view.WorkUnitDistributionDevelopment": { + "github_com_dwarvesf_fortress-api_pkg_view.WorkUnitResponse": { "type": "object", "properties": { - "total": { - "type": "integer" - }, - "workUnits": { - "type": "array", - "items": { - "$ref": "#/definitions/view.WorkUnitDistributionWU" - } + "data": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.WorkUnit" } } }, - "view.WorkUnitDistributionLearning": { + "gorm.DeletedAt": { "type": "object", "properties": { - "total": { - "type": "integer" + "time": { + "type": "string" }, - "workUnits": { - "type": "array", - "items": { - "$ref": "#/definitions/view.WorkUnitDistributionWU" - } + "valid": { + "description": "Valid is true if Time is not NULL", + "type": "boolean" } } }, - "view.WorkUnitDistributionManagement": { + "pkg_view.Question": { "type": "object", "properties": { - "projectHeads": { - "type": "array", - "items": { - "$ref": "#/definitions/view.WorkUnitDistributionWUProjectHead" - } + "category": { + "type": "string" }, - "total": { - "type": "integer" + "content": { + "type": "string" }, - "workUnits": { - "type": "array", - "items": { - "$ref": "#/definitions/view.WorkUnitDistributionWU" - } - } - } - }, - "view.WorkUnitDistributionTraining": { - "type": "object", - "properties": { - "mentees": { - "type": "array", - "items": { - "$ref": "#/definitions/view.BasicEmployeeInfo" - } + "id": { + "type": "string" }, - "total": { + "order": { "type": "integer" }, - "workUnits": { - "type": "array", - "items": { - "$ref": "#/definitions/view.WorkUnitDistributionWU" - } - } - } - }, - "view.WorkUnitDistributionWU": { - "type": "object", - "properties": { - "project": { - "$ref": "#/definitions/view.BasicProjectInfo" - }, - "workUnitName": { - "type": "string" - } - } - }, - "view.WorkUnitDistributionWUProjectHead": { - "type": "object", - "properties": { - "position": { + "subcategory": { "type": "string" }, - "project": { - "$ref": "#/definitions/view.BasicProjectInfo" - } - } - }, - "view.WorkUnitDistributionsResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/definitions/view.WorkUnitDistributionData" - } - } - }, - "view.WorkUnitResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/definitions/view.WorkUnit" + "type": { + "type": "string" } } } }, "securityDefinitions": { - "BasicAuth": { - "type": "basic" + "BearerAuth": { + "type": "apiKey", + "name": "Authorization", + "in": "header" } } }` @@ -13221,6 +12107,8 @@ var SwaggerInfo = &swag.Spec{ Description: "This is api document for fortress project.", InfoInstanceName: "swagger", SwaggerTemplate: docTemplate, + LeftDelim: "{{", + RightDelim: "}}", } func init() { diff --git a/docs/swagger.json b/docs/swagger.json index 316caea7f..1dda8bc64 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -19,6 +19,11 @@ "paths": { "/assets/upload": { "post": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Upload the content", "consumes": [ "application/json" @@ -30,14 +35,8 @@ "Asset" ], "summary": "Upload the content", + "operationId": "upload", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "file", "description": "content upload", @@ -70,13 +69,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.ContentDataResponse" + "$ref": "#/definitions/ContentDataResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -95,6 +94,7 @@ "Auth" ], "summary": "Authorize user when login", + "operationId": "auth", "parameters": [ { "description": "Google login code", @@ -119,25 +119,25 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.AuthData" + "$ref": "#/definitions/AuthData" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -145,6 +145,11 @@ }, "/auth/api-key": { "post": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Create API key", "consumes": [ "application/json" @@ -156,38 +161,30 @@ "Auth" ], "summary": "Create API key", - "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - } - ], + "operationId": "createApiKey", "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.APIKeyResponse" + "$ref": "#/definitions/APIKeyResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -195,6 +192,11 @@ }, "/auth/me": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get logged-in user data", "consumes": [ "application/json" @@ -206,38 +208,30 @@ "Auth" ], "summary": "Get logged-in user data", - "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - } - ], + "operationId": "me", "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.AuthUserResponse" + "$ref": "#/definitions/AuthUserResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -256,20 +250,18 @@ "Bank" ], "summary": "Get all bank accounts", + "operationId": "listBankAccounts", "responses": { "200": { "description": "OK", "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/view.ListBankAccountResponse" - } + "$ref": "#/definitions/ListBankAccountResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -277,6 +269,11 @@ }, "/brainery-logs": { "post": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Create brainery logs", "consumes": [ "application/json" @@ -288,32 +285,35 @@ "Project" ], "summary": "Create brainery logs", + "operationId": "createBraineryLog", "parameters": [ { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true + "description": "Body", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreateBraineryLogRequest" + } } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -321,6 +321,11 @@ }, "/brainery-logs/metrics": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get brainery metric", "consumes": [ "application/json" @@ -332,18 +337,19 @@ "Project" ], "summary": "Get brainery metric", + "operationId": "getBraineryMetric", "parameters": [ { "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true + "description": "Time view", + "name": "view", + "in": "query" }, { "type": "string", - "description": "Time view", - "name": "view", + "format": "date", + "description": "Date", + "name": "date", "in": "query" } ], @@ -351,19 +357,19 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.BraineryMetric" + "$ref": "#/definitions/BraineryMetricResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -371,6 +377,11 @@ }, "/clients": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get all clients", "consumes": [ "application/json" @@ -382,31 +393,28 @@ "Public" ], "summary": "Get all clients", - "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - } - ], + "operationId": "getAllPublicClients", "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.PublicClientListResponse" + "$ref": "#/definitions/PublicClientListResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } }, "post": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Create new client", "consumes": [ "application/json" @@ -418,21 +426,15 @@ "Client" ], "summary": "Create new client", + "operationId": "createClient", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "description": "Body", "name": "Body", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.CreateClientInput" + "$ref": "#/definitions/CreateClientRequest" } } ], @@ -440,13 +442,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.CreateClientResponse" + "$ref": "#/definitions/CreateClientResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -454,6 +456,11 @@ }, "/clients/{id}": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get client detail by id", "consumes": [ "application/json" @@ -465,12 +472,13 @@ "Client" ], "summary": "Get client detail by id", + "operationId": "getClientDetail", "parameters": [ { "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", + "description": "Client ID", + "name": "id", + "in": "path", "required": true } ], @@ -478,30 +486,35 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.GetDetailClientResponse" + "$ref": "#/definitions/GetDetailClientResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } }, "put": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Update client by id", "consumes": [ "application/json" @@ -513,12 +526,13 @@ "Client" ], "summary": "Update client by id", + "operationId": "updateClient", "parameters": [ { "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", + "description": "Client ID", + "name": "id", + "in": "path", "required": true }, { @@ -527,7 +541,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.UpdateClientInput" + "$ref": "#/definitions/UpdateClientInput" } } ], @@ -535,25 +549,25 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -570,29 +584,39 @@ "Client" ], "summary": "Delete client by id", + "operationId": "deleteClient", + "parameters": [ + { + "type": "string", + "description": "Client ID", + "name": "id", + "in": "path", + "required": true + } + ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -615,25 +639,25 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -656,25 +680,25 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -682,6 +706,11 @@ }, "/cronjobs/audits": { "post": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Sync audit info from Notion to database", "consumes": [ "application/json" @@ -693,20 +722,12 @@ "Audit" ], "summary": "Sync audit info from Notion to database", - "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - } - ], + "operationId": "syncAudit", "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } } } @@ -714,6 +735,11 @@ }, "/cronjobs/index-engagement-messages": { "post": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Index messages of provided Discord server", "consumes": [ "application/json" @@ -725,32 +751,24 @@ "Engagement" ], "summary": "Index messages of provided Discord server", - "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - } - ], + "operationId": "indexEngagementMessages", "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -758,6 +776,11 @@ }, "/dashboards/engagement/detail": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get engagement dashboard", "consumes": [ "application/json" @@ -769,14 +792,8 @@ "Dashboard" ], "summary": "Get engagement dashboard", + "operationId": "getEngagementInfoDetailList", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "chapter/seniority/project", @@ -796,13 +813,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.GetEngagementDashboardDetailResponse" + "$ref": "#/definitions/GetEngagementDashboardDetailResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -810,6 +827,11 @@ }, "/dashboards/engagement/info": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get engagement dashboard", "consumes": [ "application/json" @@ -821,26 +843,18 @@ "Dashboard" ], "summary": "Get engagement dashboard", - "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - } - ], + "operationId": "getEngagementInfo", "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.GetEngagementDashboardResponse" + "$ref": "#/definitions/GetEngagementDashboardResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -848,6 +862,11 @@ }, "/dashboards/projects/action-item-squash": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get Action items squash report for dashboard", "consumes": [ "application/json" @@ -859,14 +878,8 @@ "Dashboard" ], "summary": "Get Action items squash report for dashboard", + "operationId": "getActionItemSquashReportList", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Project ID", @@ -878,25 +891,25 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.ActionItemSquashReportResponse" + "$ref": "#/definitions/ActionItemSquashReportResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -904,6 +917,11 @@ }, "/dashboards/projects/action-items": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get Action items report for dashboard", "consumes": [ "application/json" @@ -915,14 +933,8 @@ "Dashboard" ], "summary": "Get Action items report for dashboard", + "operationId": "getActionItemReportList", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Project ID", @@ -934,25 +946,25 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.ActionItemReportResponse" + "$ref": "#/definitions/ActionItemReportResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -960,6 +972,11 @@ }, "/dashboards/projects/audits": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get Audit information for dashboard", "consumes": [ "application/json" @@ -971,14 +988,8 @@ "Dashboard" ], "summary": "Get Audit information for dashboard", + "operationId": "getAuditList", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Project ID", @@ -990,25 +1001,25 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.AuditResponse" + "$ref": "#/definitions/AuditResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -1016,6 +1027,11 @@ }, "/dashboards/projects/engineering-healths": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get Engineering health information for dashboard", "consumes": [ "application/json" @@ -1027,14 +1043,8 @@ "Dashboard" ], "summary": "Get Engineering health information for dashboard", + "operationId": "getEngineeringHealth", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Project ID", @@ -1046,25 +1056,25 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.EngineeringHealthResponse" + "$ref": "#/definitions/EngineeringHealthResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -1072,6 +1082,11 @@ }, "/dashboards/projects/sizes": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get the total number of active member in each project", "consumes": [ "application/json" @@ -1083,26 +1098,18 @@ "Dashboard" ], "summary": "Get the total number of active member in each project", - "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - } - ], + "operationId": "getProjectSizeList", "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.ProjectSizeResponse" + "$ref": "#/definitions/ProjectSizeResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -1110,6 +1117,11 @@ }, "/dashboards/projects/summary": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get the summary audit info for projects", "consumes": [ "application/json" @@ -1121,38 +1133,30 @@ "Dashboard" ], "summary": "Get the summary audit info for projects", - "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - } - ], + "operationId": "getProjectSummary", "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.AuditSummariesResponse" + "$ref": "#/definitions/AuditSummariesResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -1160,6 +1164,11 @@ }, "/dashboards/projects/work-surveys": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get Work Surveys data for dashboard", "consumes": [ "application/json" @@ -1171,14 +1180,8 @@ "Dashboard" ], "summary": "Get Work Surveys data for dashboard", + "operationId": "getWorkSurveyList", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Project ID", @@ -1190,25 +1193,25 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.WorkSurveyResponse" + "$ref": "#/definitions/WorkSurveyResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -1216,6 +1219,11 @@ }, "/dashboards/resources/availabilities": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get resources availability", "consumes": [ "application/json" @@ -1227,26 +1235,18 @@ "Dashboard" ], "summary": "Get resources availability", - "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - } - ], + "operationId": "getResourcesAvailability", "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.ResourceAvailabilityResponse" + "$ref": "#/definitions/ResourceAvailabilityResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -1254,6 +1254,11 @@ }, "/dashboards/resources/utilization": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get dashboard resource utilization", "consumes": [ "application/json" @@ -1265,26 +1270,18 @@ "Dashboard" ], "summary": "Get dashboard resource utilization", - "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - } - ], + "operationId": "getResourceUtilizationList", "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.GetDashboardResourceUtilizationResponse" + "$ref": "#/definitions/GetDashboardResourceUtilizationResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -1292,6 +1289,11 @@ }, "/dashboards/resources/work-survey-summaries": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get resource work summaries for dashboard", "consumes": [ "application/json" @@ -1303,14 +1305,8 @@ "Dashboard" ], "summary": "Get resource work summaries for dashboard", + "operationId": "getResourceWorkSurveySummaryList", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Keyword", @@ -1334,25 +1330,25 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.WorkSurveySummaryResponse" + "$ref": "#/definitions/WorkSurveySummaryResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -1360,6 +1356,11 @@ }, "/dashboards/resources/work-unit-distribution": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get work unit distribution data for dashboard", "consumes": [ "application/json" @@ -1371,14 +1372,8 @@ "Dashboard" ], "summary": "Get work unit distribution data for dashboard", + "operationId": "getWorkUnitDistributionList", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "employee name for filter", @@ -1402,25 +1397,25 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.WorkUnitDistributionsResponse" + "$ref": "#/definitions/WorkUnitDistributionsResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -1428,6 +1423,11 @@ }, "/dashboards/resources/work-unit-distribution-summary": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get summary for workunit distribution dashboard", "consumes": [ "application/json" @@ -1439,26 +1439,18 @@ "Dashboard" ], "summary": "Get summary for workunit distribution dashboard", - "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - } - ], + "operationId": "getWorkUnitDistributionSummary", "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.SummaryWorkUnitDistributionResponse" + "$ref": "#/definitions/SummaryWorkUnitDistributionResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -1466,6 +1458,11 @@ }, "/employees": { "post": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Create new employee", "consumes": [ "application/json" @@ -1477,6 +1474,7 @@ "Employee" ], "summary": "Create new employee", + "operationId": "createEmployee", "parameters": [ { "description": "Body", @@ -1484,40 +1482,33 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.CreateEmployeeInput" + "$ref": "#/definitions/CreateEmployeeRequest" } - }, - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.EmployeeData" + "$ref": "#/definitions/EmployeeDataResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -1525,6 +1516,11 @@ }, "/employees/search": { "post": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get the list of employees with pagination and workingStatus", "consumes": [ "application/json" @@ -1536,21 +1532,15 @@ "Employee" ], "summary": "Get the list of employees", + "operationId": "getEmployeeList", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "description": "Body", "name": "Body", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.GetListEmployeeInput" + "$ref": "#/definitions/GetListEmployeeQuery" } } ], @@ -1558,25 +1548,25 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.EmployeeListDataResponse" + "$ref": "#/definitions/EmployeeListDataResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -1584,6 +1574,11 @@ }, "/employees/{id}": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get employee by id", "consumes": [ "application/json" @@ -1595,14 +1590,8 @@ "Employee" ], "summary": "Get employee by id", + "operationId": "getEmployeeDetails", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Employee ID", @@ -1615,25 +1604,25 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.EmployeeData" + "$ref": "#/definitions/EmployeeDataResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -1641,6 +1630,11 @@ }, "/employees/{id}/base-salary": { "put": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Update employee's base salary by employee and base salary id", "consumes": [ "application/json" @@ -1652,14 +1646,8 @@ "Employee" ], "summary": "Update employee's base salary by employee and base salary id", + "operationId": "updateBaseSalary", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Employee ID", @@ -1673,7 +1661,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.UpdateBaseSalaryInput" + "$ref": "#/definitions/UpdateBaseSalaryRequest" } } ], @@ -1681,25 +1669,25 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.UpdateBaseSalaryResponse" + "$ref": "#/definitions/UpdateBaseSalaryResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -1707,6 +1695,11 @@ }, "/employees/{id}/employee-status": { "put": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Update account status by employee id", "consumes": [ "application/json" @@ -1718,14 +1711,8 @@ "Employee" ], "summary": "Update account status by employee id", + "operationId": "updateEmployeeStatus", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Employee ID", @@ -1739,8 +1726,7 @@ "in": "body", "required": true, "schema": { - "description": "working info", - "type": "string" + "$ref": "#/definitions/UpdateWorkingStatusRequest" } } ], @@ -1748,25 +1734,25 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.UpdateEmployeeStatusResponse" + "$ref": "#/definitions/UpdateEmployeeStatusResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -1774,6 +1760,11 @@ }, "/employees/{id}/general-info": { "put": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Update general info of the employee by id", "consumes": [ "application/json" @@ -1785,14 +1776,8 @@ "Employee" ], "summary": "Update general info of the employee by id", + "operationId": "updateGeneralInfo", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Employee ID", @@ -1806,7 +1791,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.UpdateEmployeeGeneralInfoInput" + "$ref": "#/definitions/UpdateEmployeeGeneralInfoRequest" } } ], @@ -1814,25 +1799,25 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.UpdateGeneralEmployeeResponse" + "$ref": "#/definitions/UpdateGeneralEmployeeResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -1840,6 +1825,11 @@ }, "/employees/{id}/personal-info": { "put": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Update personal info of the employee by id", "consumes": [ "application/json" @@ -1851,14 +1841,8 @@ "Employee" ], "summary": "Update personal info of the employee by id", + "operationId": "updatePersonalInfo", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Employee ID", @@ -1872,7 +1856,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.UpdatePersonalInfoInput" + "$ref": "#/definitions/UpdatePersonalInfoRequest" } } ], @@ -1880,25 +1864,25 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.UpdatePersonalEmployeeResponse" + "$ref": "#/definitions/UpdatePersonalEmployeeResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -1906,6 +1890,11 @@ }, "/employees/{id}/roles": { "put": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Update role by employee id", "consumes": [ "application/json" @@ -1917,14 +1906,8 @@ "Employee" ], "summary": "Update role by employee id", + "operationId": "updateRole", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Employee ID", @@ -1933,12 +1916,12 @@ "required": true }, { - "description": "Account role ID", - "name": "roleID", + "description": "body", + "name": "Body", "in": "body", "required": true, "schema": { - "type": "string" + "$ref": "#/definitions/UpdateRoleRequest" } } ], @@ -1946,25 +1929,25 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -1972,6 +1955,11 @@ }, "/employees/{id}/skills": { "put": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Update Skill for employee by id", "consumes": [ "application/json" @@ -1983,6 +1971,7 @@ "Employee" ], "summary": "Update Skill for employee by id", + "operationId": "updateSkill", "parameters": [ { "type": "string", @@ -1997,40 +1986,33 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.UpdateSkillsInput" + "$ref": "#/definitions/UpdateSkillsRequest" } - }, - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.UpdateSkillsEmployeeResponse" + "$ref": "#/definitions/UpdateSkillsEmployeeResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -2038,6 +2020,11 @@ }, "/employees/{id}/upload-avatar": { "post": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Upload avatar of employee by id", "consumes": [ "application/json" @@ -2049,6 +2036,7 @@ "Employee" ], "summary": "Upload avatar of employee by id", + "operationId": "uploadAvatar", "parameters": [ { "type": "string", @@ -2057,13 +2045,6 @@ "in": "path", "required": true }, - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "file", "description": "avatar upload", @@ -2076,25 +2057,25 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.EmployeeContentDataResponse" + "$ref": "#/definitions/EmployeeContentDataResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -2102,6 +2083,11 @@ }, "/engagements/channel/:channel-id/last-message-id": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get local last message ID of a channel", "consumes": [ "application/json" @@ -2113,14 +2099,8 @@ "Engagement" ], "summary": "Get local last message ID of a channel", + "operationId": "getLastMessageID", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Discord Channel ID", @@ -2133,19 +2113,19 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -2153,6 +2133,11 @@ }, "/engagements/rollup": { "post": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Upsert engagement rollup", "consumes": [ "application/json" @@ -2164,21 +2149,15 @@ "Engagement" ], "summary": "Upsert engagement rollup", + "operationId": "upsertEngagementRollup", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "description": "Body", "name": "Body", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.UpsertRollupRequest" + "$ref": "#/definitions/UpsertRollupRequest" } } ], @@ -2186,19 +2165,19 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -2206,6 +2185,11 @@ }, "/feedbacks": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get list feedbacks", "consumes": [ "application/json" @@ -2217,14 +2201,8 @@ "Feedback" ], "summary": "Get list feedbacks", + "operationId": "getFeedbackList", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Status", @@ -2242,25 +2220,31 @@ "description": "Size", "name": "size", "in": "query" + }, + { + "type": "string", + "description": "Sort", + "name": "sort", + "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.ListFeedbackResponse" + "$ref": "#/definitions/ListFeedbackResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -2268,6 +2252,11 @@ }, "/feedbacks/unreads": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get number of unread inbox for user", "consumes": [ "application/json" @@ -2279,32 +2268,24 @@ "Feedback" ], "summary": "Get number of unread inbox for user", - "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - } - ], + "operationId": "countUnreadFeedback", "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.UnreadFeedbackCountResponse" + "$ref": "#/definitions/UnreadFeedbackCountResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -2312,6 +2293,11 @@ }, "/feedbacks/{id}/topics/{topicID}": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get feedback detail for logged-in users", "consumes": [ "application/json" @@ -2323,14 +2309,8 @@ "Feedback" ], "summary": "Get feedback detail for logged-in users", + "operationId": "getFeedbackDetail", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Feedback Event ID", @@ -2350,25 +2330,25 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.FeedbackDetailResponse" + "$ref": "#/definitions/FeedbackDetailResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -2376,6 +2356,11 @@ }, "/feedbacks/{id}/topics/{topicID}/submit": { "post": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Submit the draft or done answers", "consumes": [ "application/json" @@ -2387,14 +2372,8 @@ "Feedback" ], "summary": "Submit the draft or done answers", + "operationId": "submitFeedback", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Feedback Event ID", @@ -2415,7 +2394,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.SubmitBody" + "$ref": "#/definitions/SubmitFeedbackRequest" } } ], @@ -2423,25 +2402,25 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.SubmitFeedbackResponse" + "$ref": "#/definitions/SubmitFeedbackResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -2449,6 +2428,11 @@ }, "/invite": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Submit Get invitation state based on token", "consumes": [ "application/json" @@ -2460,38 +2444,30 @@ "Onboarding" ], "summary": "Get invitation state based on token", - "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - } - ], + "operationId": "getInvitation", "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.EmployeeInvitationResponse" + "$ref": "#/definitions/EmployeeInvitationResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -2499,6 +2475,11 @@ }, "/invite/submit": { "put": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Submit Onboarding form", "consumes": [ "application/json" @@ -2510,21 +2491,15 @@ "Onboarding" ], "summary": "Submit onboarding form", + "operationId": "submitOnboardingForm", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "description": "Body", "name": "Body", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.SubmitOnboardingFormRequest" + "$ref": "#/definitions/SubmitOnboardingFormRequest" } } ], @@ -2532,25 +2507,25 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -2558,6 +2533,11 @@ }, "/invoices": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get latest invoice by project id", "consumes": [ "application/json" @@ -2569,14 +2549,8 @@ "Invoice" ], "summary": "Get latest invoice by project id", + "operationId": "getInvoiceList", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "projectID", @@ -2588,31 +2562,49 @@ "description": "status", "name": "status", "in": "query" + }, + { + "type": "integer", + "description": "page", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "size", + "name": "size", + "in": "query" + }, + { + "type": "string", + "description": "sort", + "name": "sort", + "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.InvoiceListResponse" + "$ref": "#/definitions/InvoiceListResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -2620,7 +2612,12 @@ }, "/invoices/send": { "post": { - "description": "Create new invoice and send to clientm", + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Create new invoice and send to client", "consumes": [ "application/json" ], @@ -2631,21 +2628,15 @@ "Invoice" ], "summary": "Create new invoice and send to client", + "operationId": "sendInvoice", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "description": "body", "name": "Body", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.SendInvoiceRequest" + "$ref": "#/definitions/SendInvoiceRequest" } } ], @@ -2653,25 +2644,25 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -2679,6 +2670,11 @@ }, "/invoices/template": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get the latest invoice by project id", "consumes": [ "application/json" @@ -2690,14 +2686,8 @@ "Invoice" ], "summary": "Get the latest invoice by project id", + "operationId": "getInvoiceTemplate", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "projectID", @@ -2710,25 +2700,25 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.InvoiceTemplateResponse" + "$ref": "#/definitions/InvoiceTemplateResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -2736,6 +2726,11 @@ }, "/invoices/{id}/status": { "put": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Update status for invoice", "consumes": [ "application/json" @@ -2747,38 +2742,29 @@ "Invoice" ], "summary": "Update status for invoice", - "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - } - ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -2786,6 +2772,11 @@ }, "/line-managers": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get the list of line managers", "consumes": [ "application/json" @@ -2797,26 +2788,18 @@ "Employee" ], "summary": "Get the list of line managers", - "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - } - ], + "operationId": "getLineManagerList", "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.LineManagersResponse" + "$ref": "#/definitions/LineManagersResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -2835,23 +2818,24 @@ "Metadata" ], "summary": "Get list values for chapters", + "operationId": "getChaptersList", "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.ChapterResponse" + "$ref": "#/definitions/ChapterResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -2870,23 +2854,24 @@ "Metadata" ], "summary": "Get all countries", + "operationId": "getCountriesList", "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.CountriesResponse" + "$ref": "#/definitions/CountriesResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -2905,23 +2890,24 @@ "Metadata" ], "summary": "Get list cities by country", + "operationId": "getCitiesList", "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.CitiesResponse" + "$ref": "#/definitions/CitiesResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -2940,23 +2926,24 @@ "Metadata" ], "summary": "Get list currencies", + "operationId": "getCurrenciesList", "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.GetCurrenciesResponse" + "$ref": "#/definitions/GetCurrenciesResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -2975,23 +2962,24 @@ "Metadata" ], "summary": "Get list values for organizations", + "operationId": "getOrganizationsList", "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.OrganizationsResponse" + "$ref": "#/definitions/OrganizationsResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -3010,28 +2998,34 @@ "Metadata" ], "summary": "Get list values for positions", + "operationId": "getPositionsList", "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.PositionResponse" + "$ref": "#/definitions/PositionResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } }, "post": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Create new position", "consumes": [ "application/json" @@ -3043,21 +3037,15 @@ "Metadata" ], "summary": "Create new position", + "operationId": "createPosition", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "description": "Body", "name": "Body", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.CreatePositionInput" + "$ref": "#/definitions/CreatePositionInput" } } ], @@ -3065,25 +3053,25 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -3091,6 +3079,11 @@ }, "/metadata/positions/{id}": { "put": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Update position information by ID", "consumes": [ "application/json" @@ -3102,14 +3095,8 @@ "Metadata" ], "summary": "Update position information by ID", + "operationId": "updatePosition", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Position ID", @@ -3123,7 +3110,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.UpdatePositionBody" + "$ref": "#/definitions/UpdatePositionBody" } } ], @@ -3131,30 +3118,35 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } }, "delete": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Delete position by ID", "consumes": [ "application/json" @@ -3166,14 +3158,8 @@ "Metadata" ], "summary": "Delete position by ID", + "operationId": "deletePosition", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Position ID", @@ -3186,25 +3172,25 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -3223,26 +3209,24 @@ "Metadata" ], "summary": "Get list values for project statuses", + "operationId": "getProjectStatusesList", "responses": { "200": { "description": "OK", "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/view.MetaData" - } + "$ref": "#/definitions/MetaDataResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -3261,23 +3245,51 @@ "Metadata" ], "summary": "Get list question by category and subcategory", + "operationId": "getQuestionsList", + "parameters": [ + { + "enum": [ + "feedback", + "survey" + ], + "type": "string", + "description": "Category", + "name": "category", + "in": "query", + "required": true + }, + { + "enum": [ + "peer-review", + "engagement", + "work", + "appreciation", + "comment" + ], + "type": "string", + "description": "Subcategory", + "name": "subcategory", + "in": "query", + "required": true + } + ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.GetQuestionResponse" + "$ref": "#/definitions/GetQuestionResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -3296,23 +3308,24 @@ "Metadata" ], "summary": "Get list roles", + "operationId": "getRolesList", "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.RolesResponse" + "$ref": "#/definitions/RolesResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -3331,23 +3344,24 @@ "Metadata" ], "summary": "Get list values for sentitorities", + "operationId": "getSenioritiesList", "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.SeniorityResponse" + "$ref": "#/definitions/SeniorityResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -3366,6 +3380,7 @@ "Metadata" ], "summary": "Get list values for stacks", + "operationId": "getStacksList", "parameters": [ { "type": "string", @@ -3390,24 +3405,29 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.StackResponse" + "$ref": "#/definitions/StackResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } }, "post": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Create new stack", "consumes": [ "application/json" @@ -3419,21 +3439,15 @@ "Metadata" ], "summary": "Create new stack", + "operationId": "createStack", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "description": "Body", "name": "Body", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.CreateStackInput" + "$ref": "#/definitions/CreateStackInput" } } ], @@ -3441,25 +3455,25 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -3467,6 +3481,11 @@ }, "/metadata/stacks/{id}": { "put": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Update stack information by ID", "consumes": [ "application/json" @@ -3478,14 +3497,8 @@ "Metadata" ], "summary": "Update stack information by ID", + "operationId": "updateStack", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Stack ID", @@ -3499,7 +3512,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.UpdateStackBody" + "$ref": "#/definitions/UpdateStackBody" } } ], @@ -3507,30 +3520,35 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } }, "delete": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Delete stack by ID", "consumes": [ "application/json" @@ -3542,14 +3560,8 @@ "Metadata" ], "summary": "Delete stack by ID", + "operationId": "deleteStack", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Stack ID", @@ -3562,25 +3574,25 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -3599,26 +3611,24 @@ "Metadata" ], "summary": "Get list values for working status", + "operationId": "getWorkingStatusList", "responses": { "200": { "description": "OK", "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/view.MetaData" - } + "$ref": "#/definitions/MetaDataResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -3641,13 +3651,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -3670,13 +3680,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -3699,13 +3709,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -3737,13 +3747,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -3766,13 +3776,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -3795,13 +3805,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -3824,13 +3834,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -3853,13 +3863,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -3882,13 +3892,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -3911,13 +3921,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -3940,13 +3950,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -3969,13 +3979,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -3998,13 +4008,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -4027,13 +4037,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -4041,6 +4051,11 @@ }, "/profile": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get profile information of employee", "consumes": [ "application/json" @@ -4052,43 +4067,40 @@ "Profile" ], "summary": "Get profile information of employee", - "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - } - ], + "operationId": "getPofile", "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.ProfileDataResponse" + "$ref": "#/definitions/ProfileDataResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } }, "put": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Update profile info by id", "consumes": [ "application/json" @@ -4100,14 +4112,8 @@ "Profile" ], "summary": "Update profile info by id", + "operationId": "updateProfileInfo", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Employee ID", @@ -4121,7 +4127,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.UpdateInfoInput" + "$ref": "#/definitions/UpdateInfoInput" } } ], @@ -4129,25 +4135,25 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.UpdateProfileInfoResponse" + "$ref": "#/definitions/UpdateProfileInfoResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -4155,6 +4161,11 @@ }, "/profile/upload": { "post": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Upload image by id", "consumes": [ "application/json" @@ -4166,14 +4177,8 @@ "Profile" ], "summary": "Upload image by id", + "operationId": "uploadImage", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "file", "description": "content upload", @@ -4186,25 +4191,25 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.EmployeeContentDataResponse" + "$ref": "#/definitions/EmployeeContentDataResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -4212,6 +4217,11 @@ }, "/profile/upload-avatar": { "post": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Upload avatar by id", "consumes": [ "application/json" @@ -4223,14 +4233,8 @@ "Profile" ], "summary": "Upload avatar by id", + "operationId": "uploadProfileAvatar", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "file", "description": "content upload", @@ -4243,25 +4247,25 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.EmployeeContentDataResponse" + "$ref": "#/definitions/EmployeeContentDataResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -4269,6 +4273,11 @@ }, "/project/{id}/members/{memberID}": { "put": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Unassign member in a project", "consumes": [ "application/json" @@ -4281,13 +4290,6 @@ ], "summary": "Unassign member in a project", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Project ID", @@ -4307,30 +4309,35 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } }, "delete": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Delete member in a project", "consumes": [ "application/json" @@ -4343,13 +4350,6 @@ ], "summary": "Delete member in a project", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Project ID", @@ -4369,25 +4369,25 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -4395,6 +4395,11 @@ }, "/project/{id}/slot/{slotID}": { "delete": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Delete slot in a project", "consumes": [ "application/json" @@ -4409,16 +4414,9 @@ "parameters": [ { "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, - { - "type": "string", - "description": "Project ID", - "name": "id", - "in": "path", + "description": "Project ID", + "name": "id", + "in": "path", "required": true }, { @@ -4433,25 +4431,25 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -4459,6 +4457,11 @@ }, "/projects": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get list of project", "consumes": [ "application/json" @@ -4471,18 +4474,12 @@ ], "summary": "Get list of project", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "array", "items": { "type": "string" }, + "collectionFormat": "csv", "description": "Project status", "name": "status", "in": "query" @@ -4516,24 +4513,29 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.ProjectListDataResponse" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ProjectListDataResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } }, "post": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Create new project", "consumes": [ "application/json" @@ -4546,20 +4548,13 @@ ], "summary": "Create new project", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "description": "body", "name": "Body", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.CreateProjectInput" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_project_request.CreateProjectInput" } } ], @@ -4567,19 +4562,19 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.CreateProjectData" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.CreateProjectData" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -4587,6 +4582,11 @@ }, "/projects/icy-weekly-distribution": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get Icy Weekly Distribution", "consumes": [ "application/json" @@ -4598,26 +4598,17 @@ "Project" ], "summary": "Get Icy Weekly Distribution", - "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - } - ], "responses": { "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -4625,6 +4616,11 @@ }, "/projects/{id}": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get details of a project", "consumes": [ "application/json" @@ -4637,13 +4633,6 @@ ], "summary": "Get details of a project", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Project ID", @@ -4656,25 +4645,25 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.ProjectDataResponse" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ProjectDataResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -4682,6 +4671,11 @@ }, "/projects/{id}/contact-info": { "put": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Update contact info of the project by id", "consumes": [ "application/json" @@ -4694,13 +4688,6 @@ ], "summary": "Update contact info of the project by id", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Project ID", @@ -4714,7 +4701,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.UpdateContactInfoInput" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_project_request.UpdateContactInfoInput" } } ], @@ -4722,25 +4709,25 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.UpdateProjectContactInfoResponse" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.UpdateProjectContactInfoResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -4748,6 +4735,11 @@ }, "/projects/{id}/general-info": { "put": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Update general info of the project by id", "consumes": [ "application/json" @@ -4760,13 +4752,6 @@ ], "summary": "Update general info of the project by id", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Project ID", @@ -4780,7 +4765,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.UpdateProjectGeneralInfoInput" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_project_request.UpdateProjectGeneralInfoInput" } } ], @@ -4788,25 +4773,25 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.UpdateProjectGeneralInfoResponse" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.UpdateProjectGeneralInfoResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -4814,6 +4799,11 @@ }, "/projects/{id}/members": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get list members of project", "consumes": [ "application/json" @@ -4826,13 +4816,6 @@ ], "summary": "Get list members of project", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Project ID", @@ -4880,30 +4863,35 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.ProjectMemberListResponse" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ProjectMemberListResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } }, "put": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Update member in an existing project", "consumes": [ "application/json" @@ -4916,13 +4904,6 @@ ], "summary": "Update member in an existing project", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Project ID", @@ -4936,7 +4917,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.UpdateMemberInput" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_project_request.UpdateMemberInput" } } ], @@ -4944,30 +4925,35 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.CreateMemberDataResponse" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.CreateMemberDataResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } }, "post": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Assign member in an existing project", "consumes": [ "application/json" @@ -4980,13 +4966,6 @@ ], "summary": "Assign member into an existing project", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Project ID", @@ -5000,7 +4979,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.AssignMemberInput" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_project_request.AssignMemberInput" } } ], @@ -5008,25 +4987,25 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.CreateMemberDataResponse" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.CreateMemberDataResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -5034,6 +5013,11 @@ }, "/projects/{id}/sending-survey-state": { "put": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Update allows sending survey for project by id", "consumes": [ "application/json" @@ -5046,13 +5030,6 @@ ], "summary": "Update allows sending survey for project by id", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Project ID", @@ -5071,25 +5048,25 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -5097,6 +5074,11 @@ }, "/projects/{id}/status": { "put": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Update status for project by id", "consumes": [ "application/json" @@ -5109,13 +5091,6 @@ ], "summary": "Update status for project by id", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Project ID", @@ -5137,25 +5112,25 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.UpdateProjectStatusResponse" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.UpdateProjectStatusResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -5163,6 +5138,11 @@ }, "/projects/{id}/upload-avatar": { "post": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Upload avatar of project by id", "consumes": [ "application/json" @@ -5182,13 +5162,6 @@ "in": "path", "required": true }, - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "file", "description": "avatar upload", @@ -5201,25 +5174,25 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.ProjectContentDataResponse" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ProjectContentDataResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -5227,6 +5200,11 @@ }, "/projects/{id}/work-units": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get list work units of a project", "consumes": [ "application/json" @@ -5239,49 +5217,57 @@ ], "summary": "Get list work units of a project", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Project ID", "name": "id", "in": "path", "required": true + }, + { + "enum": [ + "active", + "archived" + ], + "type": "string", + "description": "status", + "name": "status", + "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.ListWorkUnitResponse" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ListWorkUnitResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } }, "post": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get work unit of a project", "consumes": [ "application/json" @@ -5294,13 +5280,6 @@ ], "summary": "Create work unit of a project", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Project ID", @@ -5314,7 +5293,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.CreateWorkUnitBody" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_project_request.CreateWorkUnitBody" } } ], @@ -5322,25 +5301,25 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.WorkUnitResponse" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.WorkUnitResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -5348,6 +5327,11 @@ }, "/projects/{id}/work-units/{workUnitID}": { "put": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Update work unit info", "consumes": [ "application/json" @@ -5360,13 +5344,6 @@ ], "summary": "Update work unit info", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Project ID", @@ -5387,7 +5364,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.UpdateWorkUnitInput" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_project_request.UpdateWorkUnitInput" } } ], @@ -5395,25 +5372,25 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -5421,6 +5398,11 @@ }, "/projects/{id}/work-units/{workUnitID}/archive": { "put": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Archive an active work unit of a project", "consumes": [ "application/json" @@ -5433,13 +5415,6 @@ ], "summary": "Archive an active work unit of a project", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Project ID", @@ -5459,25 +5434,25 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -5485,6 +5460,11 @@ }, "/projects/{id}/work-units/{workUnitID}/unarchive": { "put": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Unarchive an archive work unit of a project", "consumes": [ "application/json" @@ -5497,13 +5477,6 @@ ], "summary": "Unarchive an archive work unit of a project", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Project ID", @@ -5523,25 +5496,25 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -5560,29 +5533,30 @@ "Public" ], "summary": "Get public employees list", + "operationId": "getPublicEmployeeList", "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.EmployeeLocationListResponse" + "$ref": "#/definitions/EmployeeLocationListResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -5590,6 +5564,11 @@ }, "/surveys": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get list event", "consumes": [ "application/json" @@ -5602,13 +5581,6 @@ ], "summary": "Get list event", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Event Subtype", @@ -5633,24 +5605,29 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.ListSurveyResponse" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ListSurveyResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } }, "post": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Create new survey", "consumes": [ "application/json" @@ -5669,40 +5646,33 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.CreateSurveyFeedbackInput" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_survey_request.CreateSurveyFeedbackInput" } - }, - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -5710,6 +5680,11 @@ }, "/surveys/{id}": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get survey detail", "consumes": [ "application/json" @@ -5722,13 +5697,6 @@ ], "summary": "Get survey detail", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Feedback Event ID", @@ -5765,6 +5733,7 @@ "items": { "type": "string" }, + "collectionFormat": "csv", "description": "Projects", "name": "projects", "in": "query" @@ -5774,30 +5743,35 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.ListSurveyDetailResponse" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ListSurveyDetailResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } }, "delete": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Delete survey by id", "consumes": [ "application/json" @@ -5810,13 +5784,6 @@ ], "summary": "Delete survey by id", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Feedback Event ID", @@ -5829,25 +5796,25 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -5855,6 +5822,11 @@ }, "/surveys/{id}/done": { "put": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Mark done feedback event", "consumes": [ "application/json" @@ -5867,13 +5839,6 @@ ], "summary": "Mark done feedback event", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Feedback Event ID", @@ -5886,25 +5851,25 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -5912,6 +5877,11 @@ }, "/surveys/{id}/send": { "post": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Send the survey", "consumes": [ "application/json" @@ -5924,13 +5894,6 @@ ], "summary": "Send the survey", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Feedback Event ID", @@ -5944,7 +5907,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.SendSurveyInput" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_survey_request.SendSurveyInput" } } ], @@ -5952,25 +5915,25 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -5978,6 +5941,11 @@ }, "/surveys/{id}/topics/{topicID}": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get detail for peer review", "consumes": [ "application/json" @@ -5990,13 +5958,6 @@ ], "summary": "Get detail for peer review", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Feedback Event ID", @@ -6016,30 +5977,35 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.SurveyTopicDetailResponse" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.SurveyTopicDetailResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } }, "delete": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "delete survey topic", "consumes": [ "application/json" @@ -6051,38 +6017,29 @@ "Survey" ], "summary": "delete survey topic", - "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - } - ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -6090,6 +6047,11 @@ }, "/surveys/{id}/topics/{topicID}/employees": { "put": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Update reviewers in a topic", "consumes": [ "application/json" @@ -6102,20 +6064,13 @@ ], "summary": "Update reviewers in a topic", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "description": "Body", "name": "Body", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.UpdateTopicReviewersBody" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_survey_request.UpdateTopicReviewersBody" } } ], @@ -6123,30 +6078,35 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } }, "delete": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Delete reviewers in a topic", "consumes": [ "application/json" @@ -6159,13 +6119,6 @@ ], "summary": "Delete reviewers in a topic", "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - }, { "type": "string", "description": "Feedback Event ID", @@ -6186,7 +6139,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.DeleteTopicReviewersBody" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_survey_request.DeleteTopicReviewersBody" } } ], @@ -6194,25 +6147,25 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.MessageResponse" + "$ref": "#/definitions/MessageResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -6220,6 +6173,11 @@ }, "/surveys/{id}/topics/{topicID}/reviews/{reviewID}": { "get": { + "security": [ + { + "BearerAuth": [] + } + ], "description": "Get survey review detail", "consumes": [ "application/json" @@ -6231,38 +6189,29 @@ "Survey" ], "summary": "Get survey review detail", - "parameters": [ - { - "type": "string", - "description": "jwt token", - "name": "Authorization", - "in": "header", - "required": true - } - ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/view.FeedbackReviewDetailResponse" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.FeedbackReviewDetailResponse" } }, "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/view.ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -6270,432 +6219,535 @@ } }, "definitions": { - "gorm.DeletedAt": { + "APIKeyData": { "type": "object", "properties": { - "time": { + "key": { "type": "string" - }, - "valid": { - "description": "Valid is true if Time is not NULL", - "type": "boolean" } } }, - "model.AccountingItem": { + "APIKeyResponse": { "type": "object", "properties": { - "amount": { - "type": "number" - }, - "name": { - "type": "string" + "data": { + "$ref": "#/definitions/APIKeyData" } } }, - "model.BankAccount": { + "ActionItemReportResponse": { "type": "object", "properties": { - "accountNumber": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/AuditActionItemReport" + } + } + } + }, + "ActionItemSquash": { + "type": "object", + "properties": { + "snapDate": { "type": "string" }, - "address": { - "type": "string" + "trend": { + "type": "number" }, - "bankName": { - "type": "string" + "value": { + "type": "integer" + } + } + }, + "ActionItemSquashReport": { + "type": "object", + "properties": { + "all": { + "type": "array", + "items": { + "$ref": "#/definitions/ActionItemSquash" + } }, - "createdAt": { - "type": "string" - }, - "currency": { - "$ref": "#/definitions/model.Currency" - }, - "currencyID": { - "type": "string" + "high": { + "type": "array", + "items": { + "$ref": "#/definitions/ActionItemSquash" + } }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" + "low": { + "type": "array", + "items": { + "$ref": "#/definitions/ActionItemSquash" + } }, - "id": { - "type": "string" + "medium": { + "type": "array", + "items": { + "$ref": "#/definitions/ActionItemSquash" + } + } + } + }, + "ActionItemSquashReportResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/ActionItemSquashReport" + } + } + }, + "ActionItemTrend": { + "type": "object", + "properties": { + "high": { + "type": "number" }, - "intermediaryBankAddress": { - "type": "string" + "low": { + "type": "number" }, - "intermediaryBankName": { + "medium": { + "type": "number" + } + } + }, + "Address": { + "type": "object", + "properties": { + "address": { "type": "string" }, - "name": { + "city": { "type": "string" }, - "ownerName": { + "country": { "type": "string" }, - "routingNumber": { + "lat": { "type": "string" }, - "swiftCode": { + "long": { "type": "string" + } + } + }, + "Audit": { + "type": "object", + "properties": { + "avg": { + "type": "number" }, - "uksortCode": { + "quarter": { "type": "string" }, - "updatedAt": { - "type": "string" + "trend": { + "type": "number" } } }, - "model.BaseSalary": { + "AuditActionItemReport": { "type": "object", "properties": { - "batch": { + "high": { "type": "integer" }, - "category": { - "type": "string" - }, - "company_account_amount": { + "low": { "type": "integer" }, - "contract_amount": { + "medium": { "type": "integer" }, - "createdAt": { - "type": "string" - }, - "currency": { - "$ref": "#/definitions/model.Currency" - }, - "currency_id": { - "type": "string" - }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "effective_date": { - "type": "string" - }, - "employee": { - "$ref": "#/definitions/model.Employee" - }, - "employee_id": { - "type": "string" - }, - "id": { + "quarter": { "type": "string" }, - "insurance_amount": { - "type": "integer" - }, - "personal_account_amount": { - "type": "integer" - }, - "type": { - "type": "string" + "trend": { + "$ref": "#/definitions/ActionItemTrend" + } + } + }, + "AuditData": { + "type": "object", + "properties": { + "average": { + "type": "array", + "items": { + "$ref": "#/definitions/Audit" + } }, - "updatedAt": { - "type": "string" + "groups": { + "type": "array", + "items": { + "$ref": "#/definitions/GroupAudit" + } } } }, - "model.Chapter": { + "AuditResponse": { "type": "object", "properties": { - "code": { + "data": { + "$ref": "#/definitions/AuditData" + } + } + }, + "AuditSummaries": { + "type": "object", + "properties": { + "summary": { + "type": "array", + "items": { + "$ref": "#/definitions/AuditSummary" + } + } + } + }, + "AuditSummariesResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/AuditSummaries" + } + } + }, + "AuditSummary": { + "type": "object", + "properties": { + "audit": { + "$ref": "#/definitions/AuditValue" + }, + "avatar": { "type": "string" }, - "createdAt": { + "code": { "type": "string" }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" + "health": { + "$ref": "#/definitions/AuditValue" }, "id": { "type": "string" }, - "lead_id": { - "type": "string" - }, "name": { "type": "string" }, - "updatedAt": { - "type": "string" + "newItem": { + "$ref": "#/definitions/ItemValue" + }, + "resolvedItem": { + "$ref": "#/definitions/ItemValue" + }, + "size": { + "$ref": "#/definitions/ItemValue" } } }, - "model.City": { + "AuditValue": { "type": "object", "properties": { - "lat": { - "type": "string" + "trend": { + "type": "number" }, - "long": { + "value": { + "type": "number" + } + } + }, + "AuthData": { + "type": "object", + "properties": { + "accessToken": { "type": "string" }, - "name": { - "type": "string" + "employee": { + "$ref": "#/definitions/EmployeeData" } } }, - "model.Client": { + "AuthUserResponse": { "type": "object", "properties": { - "address": { + "data": { + "$ref": "#/definitions/LoggedInUserData" + } + } + }, + "AvailableEmployee": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, - "avatar": { + "displayName": { "type": "string" }, - "city": { + "fullName": { "type": "string" }, - "companySize": { + "id": { "type": "string" }, - "contacts": { + "positions": { "type": "array", "items": { - "$ref": "#/definitions/model.ClientContact" + "$ref": "#/definitions/Position" } }, - "country": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" + "projects": { + "type": "array", + "items": { + "$ref": "#/definitions/BasicProjectInfo" + } }, - "description": { - "type": "string" + "seniority": { + "$ref": "#/definitions/Seniority" }, - "id": { - "type": "string" + "stacks": { + "type": "array", + "items": { + "$ref": "#/definitions/Stack" + } }, - "industry": { + "username": { "type": "string" - }, - "isPublic": { - "type": "boolean" - }, - "lat": { + } + } + }, + "AvailableSlot": { + "type": "object", + "properties": { + "createdAt": { "type": "string" }, - "long": { + "id": { "type": "string" }, - "name": { + "note": { "type": "string" }, - "projects": { + "positions": { "type": "array", "items": { - "$ref": "#/definitions/model.Project" + "$ref": "#/definitions/Position" } }, - "registrationNumber": { - "type": "string" - }, - "solutionType": { - "type": "string" + "project": { + "$ref": "#/definitions/BasicProjectInfo" }, - "updatedAt": { - "type": "string" + "seniority": { + "$ref": "#/definitions/Seniority" }, - "website": { + "type": { "type": "string" } } }, - "model.ClientContact": { + "BankAccount": { "type": "object", "properties": { - "clientID": { + "accountNumber": { "type": "string" }, - "createdAt": { + "address": { "type": "string" }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" + "bankName": { + "type": "string" }, - "emails": { - "type": "array", - "items": { - "type": "integer" - } + "currency": { + "$ref": "#/definitions/Currency" + }, + "currencyID": { + "type": "string" }, "id": { "type": "string" }, - "isMainContact": { - "type": "boolean" + "intermediaryBankAddress": { + "type": "string" + }, + "intermediaryBankName": { + "type": "string" }, "name": { "type": "string" }, - "role": { + "ownerName": { "type": "string" }, - "updatedAt": { + "routingNumber": { + "type": "string" + }, + "swiftCode": { + "type": "string" + }, + "ukSortCode": { "type": "string" } } }, - "model.CommissionExplain": { + "BaseSalary": { "type": "object", "properties": { - "amount": { + "batch": { + "type": "integer" + }, + "category": { + "type": "string" + }, + "company_account_amount": { "type": "integer" }, - "bucket_id": { + "contract_amount": { "type": "integer" }, - "formatted_amount": { + "currency": { + "$ref": "#/definitions/Currency" + }, + "currency_id": { "type": "string" }, - "id": { + "effective_date": { "type": "string" }, - "month": { - "type": "integer" + "employee_id": { + "type": "string" }, - "name": { + "id": { "type": "string" }, - "todo_id": { + "insurance_amount": { "type": "integer" }, - "year": { + "personal_account_amount": { "type": "integer" - } - } - }, - "model.CompanyContactInfo": { - "type": "object", - "properties": { - "address": { - "type": "string" }, - "phone": { + "type": { "type": "string" } } }, - "model.CompanyInfo": { + "BasicEmployeeInfo": { "type": "object", "properties": { - "createdAt": { + "avatar": { "type": "string" }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" + "displayName": { + "type": "string" }, - "description": { + "fullName": { "type": "string" }, "id": { "type": "string" }, - "info": { - "$ref": "#/definitions/pgtype.JSONB" - }, - "name": { + "username": { + "type": "string" + } + } + }, + "BasicEventQuestionRequest": { + "type": "object", + "required": [ + "eventQuestionID" + ], + "properties": { + "answer": { "type": "string" }, - "registrationNumber": { + "eventQuestionID": { "type": "string" }, - "updatedAt": { + "note": { "type": "string" } } }, - "model.Country": { + "BasicProjectInfo": { "type": "object", "properties": { - "cities": { - "type": "array", - "items": { - "$ref": "#/definitions/model.City" - } - }, - "code": { + "avatar": { "type": "string" }, - "createdAt": { + "code": { "type": "string" }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, "id": { "type": "string" }, "name": { "type": "string" }, - "updatedAt": { + "status": { + "type": "string" + }, + "type": { "type": "string" } } }, - "model.Currency": { + "BraineryMetricResponse": { "type": "object", "properties": { - "createdAt": { + "data": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.BraineryMetric" + } + } + }, + "Chapter": { + "type": "object", + "properties": { + "code": { "type": "string" }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, "id": { "type": "string" }, - "locale": { + "leadID": { "type": "string" }, "name": { "type": "string" - }, - "symbol": { - "type": "string" - }, - "type": { - "type": "string" - }, - "updatedAt": { - "type": "string" } } }, - "model.DiscordAccount": { + "ChapterResponse": { "type": "object", "properties": { - "createdAt": { - "type": "string" - }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "discordID": { - "type": "string" - }, - "id": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_model.Chapter" + } + } + } + }, + "CitiesResponse": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "City": { + "type": "object", + "properties": { + "lat": { "type": "string" }, - "updatedAt": { + "long": { "type": "string" }, - "username": { + "name": { "type": "string" } } }, - "model.Employee": { + "Client": { "type": "object", "properties": { "address": { @@ -6704,603 +6756,688 @@ "avatar": { "type": "string" }, - "base_salary": { - "$ref": "#/definitions/model.BaseSalary" - }, - "basecampAttachableSGID": { + "city": { "type": "string" }, - "basecampID": { - "description": "social services", - "type": "integer" - }, - "city": { + "companySize": { "type": "string" }, + "contacts": { + "type": "array", + "items": { + "$ref": "#/definitions/ClientContact" + } + }, "country": { "type": "string" }, "createdAt": { "type": "string" }, - "dateOfBirth": { + "description": { "type": "string" }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "discordAccount": { - "$ref": "#/definitions/model.DiscordAccount" - }, - "discordAccountID": { + "id": { "type": "string" }, - "displayName": { + "industry": { "type": "string" }, - "employeeChapters": { - "type": "array", - "items": { - "$ref": "#/definitions/model.EmployeeChapter" - } + "isPublic": { + "type": "boolean" }, - "employeeOrganizations": { - "type": "array", - "items": { - "$ref": "#/definitions/model.EmployeeOrganization" - } + "lat": { + "type": "string" }, - "employeePositions": { - "type": "array", - "items": { - "$ref": "#/definitions/model.EmployeePosition" - } + "long": { + "type": "string" }, - "employeeRoles": { - "type": "array", - "items": { - "$ref": "#/definitions/model.EmployeeRole" - } + "name": { + "type": "string" }, - "employeeStacks": { + "projects": { "type": "array", "items": { - "$ref": "#/definitions/model.EmployeeStack" + "$ref": "#/definitions/Project" } }, - "employee_salary": { - "$ref": "#/definitions/model.EmployeeSalary" + "registrationNumber": { + "type": "string" }, - "fullName": { - "description": "basic info", + "solutionType": { "type": "string" }, - "gender": { + "updatedAt": { "type": "string" }, - "heads": { + "website": { + "type": "string" + } + } + }, + "ClientContact": { + "type": "object", + "properties": { + "emails": { "type": "array", "items": { - "$ref": "#/definitions/model.ProjectHead" + "type": "string" } }, - "horoscope": { - "type": "string" - }, "id": { "type": "string" }, - "identityCardPhotoBack": { - "type": "string" - }, - "identityCardPhotoFront": { - "type": "string" + "isMainContact": { + "type": "boolean" }, - "joinedDate": { + "name": { "type": "string" }, - "lat": { + "role": { "type": "string" + } + } + }, + "ClientContactInfo": { + "type": "object", + "properties": { + "emails": { + "type": "array", + "items": { + "type": "string" + } }, - "leftDate": { + "id": { "type": "string" }, - "lineManager": { - "$ref": "#/definitions/model.Employee" + "isMainContact": { + "type": "boolean" }, - "lineManagerID": { + "name": { "type": "string" - }, - "localBankBranch": { + } + } + }, + "ClientInfo": { + "type": "object", + "properties": { + "clientAddress": { "type": "string" }, - "localBankCurrency": { + "clientCompany": { "type": "string" }, - "localBankNumber": { - "type": "string" - }, - "localBankRecipientName": { + "contacts": { + "type": "array", + "items": { + "$ref": "#/definitions/ClientContactInfo" + } + } + } + }, + "CompanyContactInfo": { + "type": "object", + "properties": { + "address": { "type": "string" }, - "localBranchName": { + "phone": { + "type": "string" + } + } + }, + "CompanyInfo": { + "type": "object", + "properties": { + "description": { "type": "string" }, - "long": { + "id": { "type": "string" }, - "mbti": { + "info": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/CompanyContactInfo" + } + }, + "name": { "type": "string" }, - "mentees": { + "registrationNumber": { + "type": "string" + } + } + }, + "ContentDataResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ContentData" + } + } + }, + "CountriesResponse": { + "type": "object", + "properties": { + "data": { "type": "array", "items": { - "$ref": "#/definitions/model.Employee" + "$ref": "#/definitions/Country" } - }, - "organizations": { + } + } + }, + "Country": { + "type": "object", + "properties": { + "cities": { "type": "array", "items": { - "$ref": "#/definitions/model.Organization" + "$ref": "#/definitions/City" } }, - "passportPhotoBack": { + "code": { "type": "string" }, - "passportPhotoFront": { + "id": { "type": "string" }, - "personalEmail": { + "name": { "type": "string" - }, - "phoneNumber": { + } + } + }, + "CreateBraineryLogRequest": { + "type": "object", + "required": [ + "discordID", + "publishedAt", + "reward", + "tags", + "title", + "url" + ], + "properties": { + "discordID": { "type": "string" }, - "placeOfResidence": { + "githubID": { "type": "string" }, - "positions": { - "type": "array", - "items": { - "$ref": "#/definitions/model.Position" - } - }, - "projectMembers": { - "type": "array", - "items": { - "$ref": "#/definitions/model.ProjectMember" - } - }, - "referredBy": { + "publishedAt": { "type": "string" }, - "referrer": { - "$ref": "#/definitions/model.Employee" + "reward": { + "type": "number" }, - "roles": { + "tags": { "type": "array", "items": { - "$ref": "#/definitions/model.Role" + "type": "string" } }, - "seniority": { - "$ref": "#/definitions/model.Seniority" + "title": { + "type": "string" }, - "seniorityID": { + "url": { + "type": "string" + } + } + }, + "CreateClientRequest": { + "type": "object", + "properties": { + "address": { "type": "string" }, - "socialAccounts": { + "contacts": { "type": "array", "items": { - "$ref": "#/definitions/model.SocialAccount" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_client_request.CreateClientContactInput" } }, - "teamEmail": { + "country": { "type": "string" }, - "updatedAt": { + "description": { "type": "string" }, - "username": { + "industry": { "type": "string" }, - "wiseAccountNumber": { + "name": { "type": "string" }, - "wiseCurrency": { + "registrationNumber": { "type": "string" }, - "wiseRecipientEmail": { - "description": "payroll info", + "website": { + "type": "string" + } + } + }, + "CreateClientResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/Client" + } + } + }, + "CreateEmployeeRequest": { + "type": "object", + "required": [ + "displayName", + "fullName", + "joinedDate", + "personalEmail", + "positions", + "roles", + "salary", + "seniorityID", + "status", + "teamEmail" + ], + "properties": { + "displayName": { "type": "string" }, - "wiseRecipientID": { + "fullName": { + "type": "string", + "maxLength": 100 + }, + "joinedDate": { "type": "string" }, - "wiseRecipientName": { + "personalEmail": { "type": "string" }, - "workUnitMembers": { + "positions": { "type": "array", "items": { - "$ref": "#/definitions/model.WorkUnitMember" + "type": "string" } }, - "workingStatus": { - "description": "working info", - "type": "string" - } - } - }, - "model.EmployeeChapter": { - "type": "object", - "properties": { - "chapter": { - "$ref": "#/definitions/model.Chapter" - }, - "chapterID": { + "referredBy": { "type": "string" }, - "createdAt": { - "type": "string" + "roles": { + "type": "array", + "items": { + "type": "string" + } }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" + "salary": { + "type": "integer" }, - "employeeID": { + "seniorityID": { "type": "string" }, - "id": { + "status": { "type": "string" }, - "updatedAt": { + "teamEmail": { "type": "string" } } }, - "model.EmployeeOrganization": { + "CreatePositionInput": { "type": "object", + "required": [ + "code", + "name" + ], "properties": { - "createdAt": { + "code": { "type": "string" }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "employeeID": { + "name": { "type": "string" - }, - "id": { + } + } + }, + "CreateStackInput": { + "type": "object", + "required": [ + "code", + "name" + ], + "properties": { + "avatar": { "type": "string" }, - "organization": { - "$ref": "#/definitions/model.Organization" - }, - "organizationID": { + "code": { "type": "string" }, - "updatedAt": { + "name": { "type": "string" } } }, - "model.EmployeePosition": { + "Currency": { "type": "object", "properties": { - "createdAt": { + "id": { "type": "string" }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "employeeID": { + "locale": { "type": "string" }, - "id": { + "name": { "type": "string" }, - "position": { - "$ref": "#/definitions/model.Position" - }, - "positionID": { + "symbol": { "type": "string" }, - "updatedAt": { + "type": { "type": "string" } } }, - "model.EmployeeRole": { + "EmployeeAddress": { "type": "object", "properties": { - "createdAt": { + "address": { "type": "string" }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "employeeID": { + "city": { "type": "string" }, - "id": { + "country": { "type": "string" }, - "role": { - "$ref": "#/definitions/model.Role" - }, - "roleID": { + "lat": { "type": "string" }, - "updatedAt": { + "long": { "type": "string" } } }, - "model.EmployeeSalary": { + "EmployeeContentData": { "type": "object", "properties": { - "actual_pay_day": { - "type": "integer" + "url": { + "type": "string" + } + } + }, + "EmployeeContentDataResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/EmployeeContentData" + } + } + }, + "EmployeeData": { + "type": "object", + "properties": { + "address": { + "type": "string" }, - "bonus_amount": { - "type": "integer" + "avatar": { + "type": "string" + }, + "baseSalary": { + "$ref": "#/definitions/BaseSalary" }, - "bonus_detail": { + "birthday": { + "type": "string" + }, + "chapters": { "type": "array", "items": { - "type": "integer" - } - }, - "commission_amount": { - "type": "integer" - }, - "commission_detail": { - "type": "array", - "items": { - "type": "integer" + "$ref": "#/definitions/Chapter" } }, - "employee_id": { + "city": { "type": "string" }, - "is_done": { - "type": "boolean" + "country": { + "type": "string" }, - "month": { - "type": "integer" + "createdAt": { + "type": "string" }, - "plan_pay_day": { - "type": "integer" + "discordID": { + "type": "string" }, - "reimbursement_amount": { - "type": "integer" + "discordName": { + "type": "string" }, - "reimbursement_detail": { - "type": "array", - "items": { - "type": "integer" - } + "displayName": { + "type": "string" }, - "total_amount": { - "type": "integer" + "fullName": { + "description": "basic info", + "type": "string" }, - "year": { - "type": "integer" - } - } - }, - "model.EmployeeStack": { - "type": "object", - "properties": { - "createdAt": { + "gender": { "type": "string" }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" + "githubID": { + "type": "string" }, - "employeeID": { + "horoscope": { "type": "string" }, "id": { "type": "string" }, - "stack": { - "$ref": "#/definitions/model.Stack" - }, - "stackID": { + "joinedDate": { "type": "string" }, - "updatedAt": { + "leftDate": { "type": "string" - } - } - }, - "model.LikertScaleCount": { - "type": "object", - "properties": { - "agree": { - "type": "integer" - }, - "disagree": { - "type": "integer" }, - "mixed": { - "type": "integer" + "lineManager": { + "$ref": "#/definitions/BasicEmployeeInfo" }, - "stronglyAgree": { - "type": "integer" + "linkedInName": { + "type": "string" }, - "stronglyDisagree": { - "type": "integer" - } - } - }, - "model.NotionTechRadar": { - "type": "object", - "properties": { - "assign": { + "mbti": { "type": "string" }, - "categories": { + "mentees": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/MenteeInfo" } }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "quadrant": { + "notionID": { "type": "string" }, - "ring": { + "notionName": { "type": "string" }, - "tags": { + "organizations": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/Organization" } - } - } - }, - "model.Organization": { - "type": "object", - "properties": { - "avatar": { - "type": "string" }, - "code": { + "personalEmail": { "type": "string" }, - "createdAt": { + "phoneNumber": { "type": "string" }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "id": { + "placeOfResidence": { "type": "string" }, - "name": { - "type": "string" + "positions": { + "type": "array", + "items": { + "$ref": "#/definitions/Position" + } }, - "updatedAt": { - "type": "string" - } - } - }, - "model.Payroll": { - "type": "object", - "properties": { - "base_salary_amount": { - "type": "integer" + "projects": { + "type": "array", + "items": { + "$ref": "#/definitions/EmployeeProjectData" + } }, - "commission_amount": { - "type": "integer" + "referredBy": { + "$ref": "#/definitions/BasicEmployeeInfo" }, - "commission_explain": { + "roles": { "type": "array", "items": { - "type": "integer" + "$ref": "#/definitions/Role" } }, - "commission_explains": { - "description": "CommissionExplains is commission explains in email template", + "seniority": { + "$ref": "#/definitions/Seniority" + }, + "stacks": { "type": "array", "items": { - "$ref": "#/definitions/model.CommissionExplain" + "$ref": "#/definitions/Stack" } }, - "contract_amount": { - "type": "integer" + "status": { + "description": "working info", + "type": "string" }, - "conversion_amount": { - "type": "integer" + "teamEmail": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "username": { + "type": "string" + }, + "wiseAccountNumber": { + "type": "string" }, - "due_date": { + "wiseCurrency": { + "type": "string" + }, + "wiseRecipientEmail": { "type": "string" }, + "wiseRecipientID": { + "type": "string" + }, + "wiseRecipientName": { + "type": "string" + } + } + }, + "EmployeeDataResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/EmployeeData" + } + } + }, + "EmployeeInvitationData": { + "type": "object", + "properties": { "employee": { - "$ref": "#/definitions/model.Employee" + "$ref": "#/definitions/InvitedEmployeeInfo" }, - "employee_id": { + "employeeID": { "type": "string" }, "id": { "type": "string" }, - "is_paid": { + "invitedBy": { + "type": "string" + }, + "isBasecampAccountCreated": { "type": "boolean" }, - "month": { - "type": "integer" + "isCompleted": { + "type": "boolean" }, - "project_bonus": { - "type": "integer" + "isDiscordRoleAssigned": { + "type": "boolean" }, - "project_bonus_explain": { - "type": "array", - "items": { - "type": "integer" - } + "isInfoUpdated": { + "type": "boolean" }, - "project_bonus_explains": { - "description": "ProjectBonusExplains is project bonus explains in email template", + "isTeamEmailCreated": { + "type": "boolean" + } + } + }, + "EmployeeInvitationResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/EmployeeInvitationData" + } + } + }, + "EmployeeListDataResponse": { + "type": "object", + "properties": { + "data": { "type": "array", "items": { - "$ref": "#/definitions/model.ProjectBonusExplain" + "$ref": "#/definitions/EmployeeData" } + } + } + }, + "EmployeeLocation": { + "type": "object", + "properties": { + "address": { + "$ref": "#/definitions/EmployeeAddress" }, - "total": { - "type": "integer" - }, - "total_allowance": { - "description": "TotalAllowance is amount of allowance in email template", - "type": "number" + "avatar": { + "type": "string" }, - "total_explain": { + "chapters": { "type": "array", "items": { - "type": "integer" + "$ref": "#/definitions/Chapter" } }, - "twAmount": { - "description": "TotalAllowance is amount of allowance in email template", - "type": "number" - }, - "twFee": { - "type": "number" + "discordID": { + "type": "string" }, - "twRate": { - "description": "TWRate is rate of allowance in email template", - "type": "number" + "displayName": { + "type": "string" }, - "user_rank_snapshot": { + "fullName": { + "type": "string" + } + } + }, + "EmployeeLocationListResponse": { + "type": "object", + "properties": { + "data": { "type": "array", "items": { - "type": "integer" + "$ref": "#/definitions/EmployeeLocation" } - }, - "year": { - "type": "integer" } } }, - "model.Position": { + "EmployeeProjectData": { "type": "object", "properties": { + "avatar": { + "type": "string" + }, "code": { "type": "string" }, - "createdAt": { + "deploymentType": { "type": "string" }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" + "endDate": { + "type": "string" }, "id": { "type": "string" @@ -7308,1226 +7445,312 @@ "name": { "type": "string" }, - "updatedAt": { + "positions": { + "type": "array", + "items": { + "$ref": "#/definitions/Position" + } + }, + "startDate": { "type": "string" - } + }, + "status": { + "type": "string" + } } }, - "model.Project": { + "EngagementDashboard": { "type": "object", "properties": { - "accountRating": { - "type": "integer" - }, - "allowsSendingSurvey": { - "type": "boolean" - }, - "avatar": { - "type": "string" - }, - "bankAccount": { - "$ref": "#/definitions/model.BankAccount" - }, - "bankAccountID": { - "type": "string" - }, - "client": { - "$ref": "#/definitions/model.Client" - }, - "clientEmail": { - "type": "string" - }, - "clientID": { + "content": { "type": "string" }, - "code": { + "questionID": { "type": "string" }, - "commissionConfigs": { + "stats": { "type": "array", "items": { - "$ref": "#/definitions/model.ProjectCommissionConfig" + "$ref": "#/definitions/EngagementDashboardQuestionStat" } - }, - "companyInfo": { - "$ref": "#/definitions/model.CompanyInfo" - }, - "companyInfoID": { - "type": "string" - }, - "country": { - "$ref": "#/definitions/model.Country" - }, - "countryID": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "deliveryRating": { - "type": "integer" - }, - "endDate": { - "type": "string" - }, - "function": { + } + } + }, + "EngagementDashboardDetail": { + "type": "object", + "properties": { + "questionID": { "type": "string" }, - "heads": { + "stats": { "type": "array", "items": { - "$ref": "#/definitions/model.ProjectHead" + "$ref": "#/definitions/EngagementDashboardQuestionDetailStat" } - }, - "id": { - "type": "string" - }, - "importantLevel": { + } + } + }, + "EngagementDashboardQuestionDetailStat": { + "type": "object", + "properties": { + "field": { "type": "string" }, - "leadRating": { - "type": "integer" + "point": { + "type": "number" }, - "name": { + "startDate": { "type": "string" + } + } + }, + "EngagementDashboardQuestionStat": { + "type": "object", + "properties": { + "point": { + "type": "number" }, - "organization": { - "$ref": "#/definitions/model.Organization" - }, - "organizationID": { + "startDate": { "type": "string" }, - "projectEmail": { + "title": { "type": "string" + } + } + }, + "EngineeringHealth": { + "type": "object", + "properties": { + "avg": { + "type": "number" }, - "projectMembers": { - "type": "array", - "items": { - "$ref": "#/definitions/model.ProjectMember" - } - }, - "projectNotion": { - "$ref": "#/definitions/model.ProjectNotion" + "quarter": { + "type": "string" }, - "projectStacks": { + "trend": { + "type": "number" + } + } + }, + "EngineeringHealthData": { + "type": "object", + "properties": { + "average": { "type": "array", "items": { - "$ref": "#/definitions/model.ProjectStack" + "$ref": "#/definitions/EngineeringHealth" } }, - "slots": { + "groups": { "type": "array", "items": { - "$ref": "#/definitions/model.ProjectSlot" + "$ref": "#/definitions/GroupEngineeringHealth" } - }, - "startDate": { - "type": "string" - }, - "status": { - "type": "string" - }, - "type": { - "type": "string" - }, - "updatedAt": { - "type": "string" } } }, - "model.ProjectBonusExplain": { + "EngineeringHealthResponse": { "type": "object", "properties": { - "amount": { - "type": "integer" - }, - "bucket_id": { - "type": "integer" - }, - "description": { - "type": "string" - }, - "formatted_amount": { - "type": "string" - }, - "month": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "todo_id": { - "type": "integer" - }, - "year": { - "type": "integer" + "data": { + "$ref": "#/definitions/EngineeringHealthData" } } }, - "model.ProjectCommissionConfig": { + "EngineeringHealthTrend": { "type": "object", "properties": { - "commissionRate": { + "collaboration": { "type": "number" }, - "createdAt": { - "type": "string" - }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "id": { - "type": "string" + "delivery": { + "type": "number" }, - "position": { - "type": "string" + "feedback": { + "type": "number" }, - "projectID": { + "quality": { + "type": "number" + } + } + }, + "ErrorResponse": { + "type": "object", + "properties": { + "error": { "type": "string" }, - "updatedAt": { - "type": "string" + "errors": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ApiError" + } } } }, - "model.ProjectHead": { + "EventReviewerStatus": { + "type": "string", + "enum": [ + "none", + "new", + "draft", + "done" + ], + "x-enum-varnames": [ + "EventReviewerStatusNone", + "EventReviewerStatusNew", + "EventReviewerStatusDraft", + "EventReviewerStatusDone" + ] + }, + "Feedback": { "type": "object", "properties": { - "commissionRate": { - "type": "number" + "author": { + "$ref": "#/definitions/BasicEmployeeInfo" }, - "createdAt": { + "employeeID": { "type": "string" }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "employee": { - "$ref": "#/definitions/model.Employee" + "eventID": { + "type": "string" }, - "employeeID": { + "eventReviewerID": { "type": "string" }, - "endDate": { + "isRead": { + "type": "boolean" + }, + "lastUpdated": { "type": "string" }, - "id": { + "projectID": { "type": "string" }, - "position": { + "status": { "type": "string" }, - "project": { - "$ref": "#/definitions/model.Project" + "subtype": { + "type": "string" }, - "projectID": { + "title": { "type": "string" }, - "startDate": { + "topicID": { "type": "string" }, - "updatedAt": { + "type": { "type": "string" } } }, - "model.ProjectMember": { + "FeedbackDetail": { "type": "object", "properties": { - "createdAt": { - "type": "string" - }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "deploymentType": { - "type": "string" - }, - "discount": { - "type": "number" - }, - "employee": { - "$ref": "#/definitions/model.Employee" + "answers": { + "type": "array", + "items": { + "$ref": "#/definitions/QuestionAnswer" + } }, "employeeID": { "type": "string" }, - "endDate": { + "eventID": { "type": "string" }, - "head": { - "$ref": "#/definitions/model.ProjectHead" + "project": { + "$ref": "#/definitions/BasicProjectInfo" }, - "id": { + "relationship": { "type": "string" }, - "isLead": { - "type": "boolean" + "reviewer": { + "$ref": "#/definitions/BasicEmployeeInfo" }, - "note": { + "status": { "type": "string" }, - "positions": { - "type": "array", - "items": { - "$ref": "#/definitions/model.Position" - } - }, - "project": { - "$ref": "#/definitions/model.Project" - }, - "projectID": { + "title": { "type": "string" }, - "projectMemberPositions": { - "type": "array", - "items": { - "$ref": "#/definitions/model.ProjectMemberPosition" - } - }, - "projectSlotID": { - "type": "string" - }, - "rate": { - "type": "number" - }, - "seniority": { - "$ref": "#/definitions/model.Seniority" - }, - "seniorityID": { - "type": "string" - }, - "startDate": { - "type": "string" - }, - "status": { - "type": "string" - }, - "updatedAt": { - "type": "string" - }, - "upsellCommissionRate": { - "type": "number" - }, - "upsellPerson": { - "$ref": "#/definitions/model.Employee" - }, - "upsellPersonID": { - "type": "string" - } - } - }, - "model.ProjectMemberPosition": { - "type": "object", - "properties": { - "createdAt": { - "type": "string" - }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "id": { - "type": "string" - }, - "position": { - "$ref": "#/definitions/model.Position" - }, - "positionID": { - "type": "string" - }, - "projectMemberID": { - "type": "string" - }, - "updatedAt": { - "type": "string" - } - } - }, - "model.ProjectNotion": { - "type": "object", - "properties": { - "auditNotionID": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "id": { - "type": "string" - }, - "project": { - "$ref": "#/definitions/model.Project" - }, - "projectID": { - "type": "string" - }, - "updatedAt": { - "type": "string" - } - } - }, - "model.ProjectSize": { - "type": "object", - "properties": { - "avatar": { - "type": "string" - }, - "code": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "size": { - "type": "integer" - } - } - }, - "model.ProjectSlot": { - "type": "object", - "properties": { - "createdAt": { - "type": "string" - }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "deploymentType": { - "type": "string" - }, - "discount": { - "type": "number" - }, - "id": { - "type": "string" - }, - "note": { - "type": "string" - }, - "project": { - "$ref": "#/definitions/model.Project" - }, - "projectID": { - "type": "string" - }, - "projectMember": { - "$ref": "#/definitions/model.ProjectMember" - }, - "projectSlotPositions": { - "type": "array", - "items": { - "$ref": "#/definitions/model.ProjectSlotPosition" - } - }, - "rate": { - "type": "number" - }, - "seniority": { - "$ref": "#/definitions/model.Seniority" - }, - "seniorityID": { - "type": "string" - }, - "status": { - "type": "string" - }, - "updatedAt": { - "type": "string" - }, - "upsellPerson": { - "$ref": "#/definitions/model.Employee" - }, - "upsellPersonID": { - "type": "string" - } - } - }, - "model.ProjectSlotPosition": { - "type": "object", - "properties": { - "createdAt": { - "type": "string" - }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "id": { - "type": "string" - }, - "position": { - "$ref": "#/definitions/model.Position" - }, - "positionID": { - "type": "string" - }, - "projectSlotID": { - "type": "string" - }, - "updatedAt": { - "type": "string" - } - } - }, - "model.ProjectStack": { - "type": "object", - "properties": { - "createdAt": { - "type": "string" - }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "id": { - "type": "string" - }, - "projectID": { - "type": "string" - }, - "stack": { - "$ref": "#/definitions/model.Stack" - }, - "stackID": { - "type": "string" - }, - "updatedAt": { - "type": "string" - } - } - }, - "model.ResourceUtilization": { - "type": "object", - "properties": { - "available": { - "type": "integer" - }, - "date": { - "type": "string" - }, - "internal": { - "type": "integer" - }, - "staffed": { - "type": "integer" - } - } - }, - "model.Role": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "color": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "id": { - "type": "string" - }, - "isShow": { - "type": "boolean" - }, - "level": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "updatedAt": { - "type": "string" - } - } - }, - "model.Seniority": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "id": { - "type": "string" - }, - "level": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "updatedAt": { - "type": "string" - } - } - }, - "model.SocialAccount": { - "type": "object", - "properties": { - "accountID": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "email": { - "type": "string" - }, - "employeeID": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "updatedAt": { - "type": "string" - } - } - }, - "model.Stack": { - "type": "object", - "properties": { - "avatar": { - "type": "string" - }, - "code": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "updatedAt": { - "type": "string" - } - } - }, - "model.Valuation": { - "type": "object", - "properties": { - "accountReceivable": { - "description": "money that company will receive in the future", - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/model.AccountingItem" - } - }, - "total": { - "type": "number" - } - } - }, - "assets": { - "description": "valuation info", - "type": "number" - }, - "currency": { - "type": "string" - }, - "income": { - "description": "Total paid invoice, investment \u0026 bank interest", - "type": "object", - "properties": { - "detail": { - "type": "object", - "properties": { - "consultantService": { - "type": "number" - }, - "interest": { - "type": "number" - }, - "investment": { - "type": "number" - } - } - }, - "total": { - "type": "number" - } - } - }, - "liabilities": { - "description": "money that company will pay in the future", - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/model.AccountingItem" - } - }, - "total": { - "type": "number" - } - } - }, - "outcome": { - "description": "Sum of Expenses and payroll", - "type": "object", - "properties": { - "detail": { - "type": "object", - "properties": { - "expense": { - "type": "number" - }, - "investment": { - "type": "number" - }, - "payroll": { - "type": "number" - } - } - }, - "total": { - "type": "number" - } - } - }, - "rate": { - "type": "number" - }, - "year": { - "description": "basic info", - "type": "string" - } - } - }, - "model.WorkUnit": { - "type": "object", - "properties": { - "createdAt": { - "type": "string" - }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "project": { - "$ref": "#/definitions/model.Project" - }, - "projectID": { - "type": "string" - }, - "sourceMetadata": { - "type": "array", - "items": { - "type": "integer" - } - }, - "sourceURL": { - "type": "string" - }, - "status": { - "type": "string" - }, - "type": { - "type": "string" - }, - "updatedAt": { - "type": "string" - }, - "workUnitMembers": { - "type": "array", - "items": { - "$ref": "#/definitions/model.WorkUnitMember" - } - }, - "workUnitStacks": { - "type": "array", - "items": { - "$ref": "#/definitions/model.WorkUnitStack" - } - } - } - }, - "model.WorkUnitMember": { - "type": "object", - "properties": { - "createdAt": { - "type": "string" - }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "employee": { - "$ref": "#/definitions/model.Employee" - }, - "employeeID": { - "type": "string" - }, - "endDate": { - "type": "string" - }, - "id": { - "type": "string" - }, - "projectID": { - "type": "string" - }, - "startDate": { - "type": "string" - }, - "status": { - "type": "string" - }, - "updatedAt": { - "type": "string" - }, - "workUnit": { - "$ref": "#/definitions/model.WorkUnit" - }, - "workUnitID": { - "type": "string" - } - } - }, - "model.WorkUnitStack": { - "type": "object", - "properties": { - "createdAt": { - "type": "string" - }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "id": { - "type": "string" - }, - "stack": { - "$ref": "#/definitions/model.Stack" - }, - "stackID": { - "type": "string" - }, - "updatedAt": { - "type": "string" - }, - "workUnitID": { - "type": "string" - } - } - }, - "pgtype.JSONB": { - "type": "object", - "properties": { - "bytes": { - "type": "array", - "items": { - "type": "integer" - } - }, - "status": { - "type": "integer" - } - } - }, - "request.AssignMemberInput": { - "type": "object", - "required": [ - "deploymentType", - "positions", - "rate", - "seniorityID", - "status" - ], - "properties": { - "deploymentType": { - "type": "string" - }, - "discount": { - "type": "number" - }, - "employeeID": { - "type": "string" - }, - "endDate": { - "type": "string" - }, - "isLead": { - "type": "boolean" - }, - "leadCommissionRate": { - "type": "number" - }, - "note": { - "type": "string" - }, - "positions": { - "type": "array", - "items": { - "type": "string" - } - }, - "rate": { - "type": "number" - }, - "seniorityID": { - "type": "string" - }, - "startDate": { - "type": "string" - }, - "status": { - "type": "string" - }, - "upsellCommissionRate": { - "type": "number" - }, - "upsellPersonID": { - "type": "string" - } - } - }, - "request.BasicEventQuestionInput": { - "type": "object", - "required": [ - "eventQuestionID" - ], - "properties": { - "answer": { - "type": "string" - }, - "eventQuestionID": { - "type": "string" - }, - "note": { - "type": "string" - } - } - }, - "request.CreateClientContactInput": { - "type": "object", - "properties": { - "emails": { - "type": "array", - "items": { - "type": "string" - } - }, - "isMainContact": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "role": { - "type": "string" - } - } - }, - "request.CreateClientInput": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "contacts": { - "type": "array", - "items": { - "$ref": "#/definitions/request.CreateClientContactInput" - } - }, - "country": { - "type": "string" - }, - "description": { - "type": "string" - }, - "industry": { - "type": "string" - }, - "name": { - "type": "string" - }, - "registrationNumber": { - "type": "string" - }, - "website": { - "type": "string" - } - } - }, - "request.CreateEmployeeInput": { - "type": "object", - "required": [ - "displayName", - "fullName", - "joinedDate", - "personalEmail", - "positions", - "roles", - "salary", - "seniorityID", - "status", - "teamEmail" - ], - "properties": { - "displayName": { - "type": "string" - }, - "fullName": { - "type": "string", - "maxLength": 100 - }, - "joinedDate": { - "type": "string" - }, - "personalEmail": { - "type": "string" - }, - "positions": { - "type": "array", - "items": { - "type": "string" - } - }, - "referredBy": { - "type": "string" - }, - "roles": { - "type": "array", - "items": { - "type": "string" - } - }, - "salary": { - "type": "integer" - }, - "seniorityID": { - "type": "string" - }, - "status": { - "type": "string" - }, - "teamEmail": { + "topicID": { "type": "string" } } }, - "request.CreatePositionInput": { + "FeedbackDetailResponse": { "type": "object", - "required": [ - "code", - "name" - ], "properties": { - "code": { - "type": "string" - }, - "name": { - "type": "string" + "data": { + "$ref": "#/definitions/FeedbackDetail" } } }, - "request.CreateProjectInput": { + "GetCurrenciesResponse": { "type": "object", - "required": [ - "countryID", - "function", - "name", - "status" - ], "properties": { - "accountManagers": { - "type": "array", - "items": { - "$ref": "#/definitions/request.ProjectHeadInput" - } - }, - "auditNotionID": { - "type": "string" - }, - "bankAccountID": { - "type": "string" - }, - "clientEmail": { - "type": "array", - "items": { - "type": "string" - } - }, - "clientID": { - "type": "string" - }, - "code": { - "type": "string" - }, - "countryID": { - "type": "string" - }, - "deliveryManagers": { - "type": "array", - "items": { - "$ref": "#/definitions/request.ProjectHeadInput" - } - }, - "function": { - "type": "string" - }, - "members": { - "type": "array", - "items": { - "$ref": "#/definitions/request.AssignMemberInput" - } - }, - "name": { - "type": "string" - }, - "organizationID": { - "type": "string" - }, - "projectEmail": { - "type": "string" - }, - "salePersons": { + "data": { "type": "array", "items": { - "$ref": "#/definitions/request.ProjectHeadInput" + "$ref": "#/definitions/Currency" } - }, - "startDate": { - "type": "string" - }, - "status": { - "type": "string" - }, - "type": { - "type": "string" } } }, - "request.CreateStackInput": { + "GetDashboardResourceUtilizationResponse": { "type": "object", - "required": [ - "code", - "name" - ], "properties": { - "avatar": { - "type": "string" - }, - "code": { - "type": "string" - }, - "name": { - "type": "string" + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/ResourceUtilization" + } } } }, - "request.CreateSurveyFeedbackInput": { + "GetDetailClientResponse": { "type": "object", - "required": [ - "type" - ], "properties": { - "fromDate": { - "type": "string" - }, - "quarter": { - "type": "string" - }, - "toDate": { - "type": "string" - }, - "type": { - "type": "string" - }, - "year": { - "type": "integer" + "data": { + "$ref": "#/definitions/Client" } } }, - "request.CreateWorkUnitBody": { + "GetEngagementDashboardDetailResponse": { "type": "object", - "required": [ - "name", - "stacks", - "status", - "type" - ], "properties": { - "members": { + "data": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/EngagementDashboardDetail" } - }, - "name": { - "type": "string" - }, - "stacks": { + } + } + }, + "GetEngagementDashboardResponse": { + "type": "object", + "properties": { + "data": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/EngagementDashboard" } - }, - "status": { - "type": "string" - }, - "type": { - "type": "string" - }, - "url": { - "type": "string" } } }, - "request.DeleteTopicReviewersBody": { + "GetListClientResponse": { "type": "object", "properties": { - "reviewerIDs": { + "data": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/Client" } } } }, - "request.GetListEmployeeInput": { + "GetListEmployeeQuery": { "type": "object", "properties": { "chapters": { @@ -8594,49 +7817,120 @@ } } }, - "request.InvoiceItem": { + "GetQuestionResponse": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/pkg_view.Question" + } + } + } + }, + "GroupAudit": { + "type": "object", + "properties": { + "backend": { + "type": "number" + }, + "blockchain": { + "type": "number" + }, + "frontend": { + "type": "number" + }, + "mobile": { + "type": "number" + }, + "process": { + "type": "number" + }, + "quarter": { + "type": "string" + }, + "system": { + "type": "number" + }, + "trend": { + "$ref": "#/definitions/GroupAuditTrend" + } + } + }, + "GroupAuditTrend": { + "type": "object", + "properties": { + "backend": { + "type": "number" + }, + "blockchain": { + "type": "number" + }, + "frontend": { + "type": "number" + }, + "mobile": { + "type": "number" + }, + "process": { + "type": "number" + }, + "system": { + "type": "number" + } + } + }, + "GroupEngineeringHealth": { + "type": "object", + "properties": { + "collaboration": { + "type": "number" + }, + "delivery": { + "type": "number" + }, + "feedback": { + "type": "number" + }, + "quality": { + "type": "number" + }, + "quarter": { + "type": "string" + }, + "trend": { + "$ref": "#/definitions/EngineeringHealthTrend" + } + } + }, + "InvitedEmployeeInfo": { "type": "object", "properties": { - "cost": { - "type": "number" + "avatar": { + "type": "string" }, - "description": { + "displayName": { "type": "string" }, - "discount": { - "type": "number" + "fullName": { + "type": "string" }, - "isExternal": { - "type": "boolean" + "id": { + "type": "string" }, - "quantity": { - "type": "number" + "personalEmail": { + "type": "string" }, - "unitCost": { - "type": "number" - } - } - }, - "request.ProjectHeadInput": { - "type": "object", - "properties": { - "commissionRate": { - "type": "number" + "teamEmail": { + "type": "string" }, - "employeeID": { + "username": { "type": "string" } } }, - "request.SendInvoiceRequest": { + "Invoice": { "type": "object", - "required": [ - "bankID", - "dueDate", - "email", - "invoiceDate", - "projectID" - ], "properties": { "bankID": { "type": "string" @@ -8647,1444 +7941,1421 @@ "type": "string" } }, + "conversionAmount": { + "type": "number" + }, + "conversionRate": { + "type": "number" + }, "description": { "type": "string" }, "discount": { - "type": "number", - "minimum": 0 + "type": "number" }, - "dueDate": { + "dueAt": { "type": "string" }, "email": { "type": "string" }, - "invoiceDate": { + "errorInvoiceID": { "type": "string" }, - "invoiceMonth": { - "type": "integer", - "maximum": 11, - "minimum": 0 + "failedAt": { + "type": "string" }, - "invoiceYear": { - "type": "integer", - "minimum": 0 + "invoiceFileURL": { + "type": "string" }, - "isDraft": { - "type": "boolean" + "invoicedAt": { + "type": "string" }, "lineItems": { "type": "array", "items": { - "$ref": "#/definitions/request.InvoiceItem" + "$ref": "#/definitions/InvoiceItem" } }, + "month": { + "type": "integer" + }, "note": { "type": "string" }, "number": { "type": "string" }, + "paidAt": { + "type": "string" + }, "projectID": { "type": "string" }, - "sentByID": { + "scheduledDate": { "type": "string" }, - "subtotal": { - "type": "number", - "minimum": 0 + "sentBy": { + "type": "string" + }, + "status": { + "type": "string" + }, + "subTotal": { + "type": "number" }, "tax": { - "type": "number", - "minimum": 0 + "type": "number" + }, + "threadID": { + "type": "string" }, "total": { - "type": "number", - "minimum": 0 + "type": "number" + }, + "year": { + "type": "integer" } } }, - "request.SendSurveyInput": { + "InvoiceData": { "type": "object", - "required": [ - "type" - ], "properties": { - "topicIDs": { - "type": "array", - "items": { - "type": "string" - } + "bankAccount": { + "$ref": "#/definitions/BankAccount" }, - "type": { + "bankID": { "type": "string" - } - } - }, - "request.SubmitBody": { - "type": "object", - "required": [ - "answers", - "status" - ], - "properties": { - "answers": { + }, + "cc": { "type": "array", "items": { - "$ref": "#/definitions/request.BasicEventQuestionInput" + "type": "string" } }, - "status": { - "type": "string" - } - } - }, - "request.SubmitOnboardingFormRequest": { - "type": "object", - "required": [ - "address", - "city", - "country", - "dateOfBirth", - "discordName", - "gender", - "horoscope", - "localBankBranch", - "localBankCurrency", - "localBankNumber", - "localBankRecipientName", - "localBranchName", - "mbti", - "phoneNumber", - "placeOfResidence" - ], - "properties": { - "address": { - "type": "string" - }, - "avatar": { - "type": "string" - }, - "city": { - "type": "string" + "client": { + "$ref": "#/definitions/ClientInfo" }, - "country": { - "type": "string" + "companyInfo": { + "$ref": "#/definitions/CompanyInfo" }, - "dateOfBirth": { - "type": "string" + "conversionAmount": { + "type": "number" }, - "discordName": { - "type": "string" + "conversionRate": { + "type": "number" }, - "gender": { + "description": { "type": "string" }, - "githubID": { - "type": "string" + "discount": { + "type": "number" }, - "horoscope": { + "dueAt": { "type": "string" }, - "identityCardPhotoBack": { + "email": { "type": "string" }, - "identityCardPhotoFront": { + "errorInvoiceID": { "type": "string" }, - "lat": { + "failedAt": { "type": "string" }, - "linkedInName": { + "invoiceFileURL": { "type": "string" }, - "localBankBranch": { + "invoicedAt": { "type": "string" }, - "localBankCurrency": { - "type": "string" + "lineItems": { + "type": "array", + "items": { + "$ref": "#/definitions/InvoiceItem" + } }, - "localBankNumber": { - "type": "string" + "month": { + "type": "integer" }, - "localBankRecipientName": { + "note": { "type": "string" }, - "localBranchName": { + "number": { "type": "string" }, - "long": { + "paidAt": { "type": "string" }, - "mbti": { + "projectID": { "type": "string" }, - "notionName": { + "projectName": { "type": "string" }, - "passportPhotoBack": { + "scheduledDate": { "type": "string" }, - "passportPhotoFront": { + "sentBy": { "type": "string" }, - "phoneNumber": { - "type": "string", - "maxLength": 18, - "minLength": 8 - }, - "placeOfResidence": { + "status": { "type": "string" - } - } - }, - "request.UpdateBaseSalaryInput": { - "type": "object", - "required": [ - "batch", - "currencyCode" - ], - "properties": { - "batch": { - "type": "integer" }, - "companyAccountAmount": { - "type": "integer", - "minimum": 0 + "subTotal": { + "type": "number" }, - "contractAmount": { - "type": "integer", - "minimum": 0 + "tax": { + "type": "number" }, - "currencyCode": { + "threadID": { "type": "string" }, - "effectiveDate": { - "type": "string" + "total": { + "type": "number" }, - "personalAccountAmount": { - "type": "integer", - "minimum": 0 + "year": { + "type": "integer" } } }, - "request.UpdateClientContactInput": { + "InvoiceItem": { "type": "object", "properties": { - "emails": { - "type": "array", - "items": { - "type": "string" - } + "cost": { + "type": "number" + }, + "description": { + "type": "string" }, - "isMainContact": { + "discount": { + "type": "number" + }, + "isExternal": { "type": "boolean" }, - "name": { - "type": "string" + "quantity": { + "type": "number" }, - "role": { - "type": "string" + "unitCost": { + "type": "number" } } }, - "request.UpdateClientInput": { + "InvoiceListResponse": { "type": "object", "properties": { - "address": { - "type": "string" - }, - "contacts": { + "data": { "type": "array", "items": { - "$ref": "#/definitions/request.UpdateClientContactInput" + "$ref": "#/definitions/InvoiceData" } }, - "country": { - "type": "string" - }, - "description": { - "type": "string" - }, - "industry": { - "type": "string" + "page": { + "type": "integer" }, - "name": { - "type": "string" + "size": { + "type": "integer" }, - "registrationNumber": { + "sort": { "type": "string" }, - "website": { - "type": "string" + "total": { + "type": "integer" } } }, - "request.UpdateContactInfoInput": { + "InvoiceTemplateResponse": { "type": "object", "properties": { - "accountManagers": { - "type": "array", - "items": { - "$ref": "#/definitions/request.ProjectHeadInput" - } + "data": { + "$ref": "#/definitions/ProjectInvoiceTemplate" + } + } + }, + "ItemValue": { + "type": "object", + "properties": { + "trend": { + "type": "number" }, - "clientEmail": { + "value": { + "type": "integer" + } + } + }, + "LineManagersResponse": { + "type": "object", + "properties": { + "data": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/BasicEmployeeInfo" } - }, - "deliveryManagers": { + } + } + }, + "ListBankAccountResponse": { + "type": "object", + "properties": { + "data": { "type": "array", "items": { - "$ref": "#/definitions/request.ProjectHeadInput" + "$ref": "#/definitions/BankAccount" } - }, - "projectEmail": { - "type": "string" - }, - "salePersons": { + } + } + }, + "ListFeedbackResponse": { + "type": "object", + "properties": { + "data": { "type": "array", "items": { - "$ref": "#/definitions/request.ProjectHeadInput" + "$ref": "#/definitions/Feedback" } } } }, - "request.UpdateEmployeeGeneralInfoInput": { + "LoggedInUserData": { "type": "object", - "required": [ - "email", - "fullName", - "phone" - ], "properties": { - "discordID": { - "type": "string" - }, - "discordName": { + "avatar": { "type": "string" }, "displayName": { "type": "string" }, - "email": { - "type": "string" - }, "fullName": { - "type": "string", - "maxLength": 99 - }, - "githubID": { - "type": "string" - }, - "joinedDate": { - "type": "string" - }, - "leftDate": { - "type": "string" - }, - "lineManagerID": { - "type": "string" - }, - "linkedInName": { - "type": "string" - }, - "notionEmail": { - "type": "string" - }, - "notionID": { "type": "string" }, - "notionName": { + "id": { "type": "string" }, - "organizationIDs": { + "permissions": { "type": "array", "items": { "type": "string" } }, - "phone": { - "type": "string", - "maxLength": 18, - "minLength": 9 - }, - "referredBy": { - "type": "string" - }, - "wiseAccountNumber": { - "type": "string" - }, - "wiseCurrency": { - "type": "string" - }, - "wiseRecipientEmail": { - "type": "string" - }, - "wiseRecipientID": { + "role": { "type": "string" }, - "wiseRecipientName": { + "teamEmail": { "type": "string" } } }, - "request.UpdateInfoInput": { + "MenteeInfo": { "type": "object", - "required": [ - "city", - "country", - "personalEmail", - "phoneNumber", - "placeOfResidence" - ], "properties": { - "address": { + "avatar": { "type": "string" }, - "city": { + "displayName": { "type": "string" }, - "country": { + "fullName": { "type": "string" }, - "discordName": { + "id": { "type": "string" }, - "githubID": { - "type": "string" + "positions": { + "type": "array", + "items": { + "$ref": "#/definitions/Position" + } }, - "lat": { - "type": "string" + "seniority": { + "$ref": "#/definitions/Seniority" }, - "linkedInName": { + "username": { "type": "string" - }, - "long": { + } + } + }, + "MessageResponse": { + "type": "object", + "properties": { + "message": { "type": "string" - }, - "notionEmail": { + } + } + }, + "MetaData": { + "type": "object", + "properties": { + "code": { "type": "string" }, - "notionID": { + "id": { "type": "string" }, - "notionName": { + "name": { "type": "string" - }, - "personalEmail": { + } + } + }, + "MetaDataResponse": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/MetaData" + } + } + } + }, + "Organization": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, - "phoneNumber": { - "type": "string", - "maxLength": 18, - "minLength": 8 - }, - "placeOfResidence": { + "code": { "type": "string" }, - "wiseAccountNumber": { + "id": { "type": "string" }, - "wiseCurrency": { + "name": { "type": "string" - }, - "wiseRecipientEmail": { + } + } + }, + "OrganizationsResponse": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_model.Organization" + } + } + } + }, + "Position": { + "type": "object", + "properties": { + "code": { "type": "string" }, - "wiseRecipientID": { + "id": { "type": "string" }, - "wiseRecipientName": { + "name": { "type": "string" } } }, - "request.UpdateMemberInput": { + "PositionResponse": { "type": "object", - "required": [ - "deploymentType", - "positions", - "projectSlotID", - "rate", - "seniorityID", - "status" - ], "properties": { - "deploymentType": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_model.Position" + } + } + } + }, + "ProfileData": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "avatar": { + "type": "string" + }, + "birthday": { "type": "string" }, - "discount": { - "type": "number" + "city": { + "type": "string" }, - "employeeID": { + "country": { "type": "string" }, - "endDate": { + "discordID": { "type": "string" }, - "isLead": { - "type": "boolean" + "discordName": { + "type": "string" }, - "leadCommissionRate": { - "type": "number" + "displayName": { + "type": "string" }, - "note": { + "fullName": { "type": "string" }, - "positions": { - "type": "array", - "items": { - "type": "string" - } + "gender": { + "type": "string" }, - "projectMemberID": { + "githubID": { "type": "string" }, - "projectSlotID": { + "id": { "type": "string" }, - "rate": { - "type": "number" + "linkedInName": { + "type": "string" }, - "seniorityID": { + "notionEmail": { "type": "string" }, - "startDate": { + "notionID": { "type": "string" }, - "status": { + "notionName": { "type": "string" }, - "upsellCommissionRate": { - "type": "number" + "personalEmail": { + "type": "string" }, - "upsellPersonID": { + "phoneNumber": { "type": "string" - } - } - }, - "request.UpdatePersonalInfoInput": { - "type": "object", - "required": [ - "address", - "city", - "country", - "dob", - "gender", - "personalEmail" - ], - "properties": { - "address": { - "type": "string", - "maxLength": 200 }, - "city": { + "placeOfResidence": { "type": "string" }, - "country": { + "roles": { + "type": "array", + "items": { + "$ref": "#/definitions/Role" + } + }, + "teamEmail": { "type": "string" }, - "dob": { + "username": { "type": "string" }, - "gender": { + "wiseAccountNumber": { "type": "string" }, - "personalEmail": { + "wiseCurrency": { "type": "string" }, - "placeOfResidence": { + "wiseRecipientEmail": { + "type": "string" + }, + "wiseRecipientID": { + "type": "string" + }, + "wiseRecipientName": { "type": "string" } } }, - "request.UpdatePositionBody": { + "ProfileDataResponse": { "type": "object", "properties": { - "code": { - "type": "string" - }, - "name": { - "type": "string" + "data": { + "$ref": "#/definitions/ProfileData" } } }, - "request.UpdateProjectGeneralInfoInput": { + "Project": { "type": "object", - "required": [ - "accountRating", - "countryID", - "deliveryRating", - "function", - "importantLevel", - "leadRating", - "name" - ], "properties": { "accountRating": { - "type": "integer", - "maximum": 5, - "minimum": 1 + "type": "integer" }, - "auditNotionID": { + "allowsSendingSurvey": { + "type": "boolean" + }, + "avatar": { "type": "string" }, + "bankAccount": { + "$ref": "#/definitions/BankAccount" + }, "bankAccountID": { "type": "string" }, + "client": { + "$ref": "#/definitions/Client" + }, + "clientEmail": { + "type": "string" + }, "clientID": { "type": "string" }, + "code": { + "type": "string" + }, + "commissionConfigs": { + "type": "array", + "items": { + "$ref": "#/definitions/ProjectCommissionConfig" + } + }, + "companyInfo": { + "$ref": "#/definitions/CompanyInfo" + }, + "companyInfoID": { + "type": "string" + }, + "country": { + "$ref": "#/definitions/Country" + }, "countryID": { "type": "string" }, + "createdAt": { + "type": "string" + }, "deliveryRating": { - "type": "integer", - "maximum": 5, - "minimum": 1 + "type": "integer" + }, + "end_date": { + "type": "string" }, "function": { "type": "string" }, + "heads": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ProjectHead" + } + }, + "id": { + "type": "string" + }, "importantLevel": { "type": "string" }, "leadRating": { - "type": "integer", - "maximum": 5, - "minimum": 1 + "type": "integer" }, "name": { "type": "string" }, + "organization": { + "$ref": "#/definitions/Organization" + }, "organizationID": { "type": "string" }, - "stacks": { - "type": "array", - "items": { - "type": "string" - } - }, - "startDate": { + "projectEmail": { "type": "string" - } - } - }, - "request.UpdateSkillsInput": { - "type": "object", - "required": [ - "chapters", - "positions", - "seniority", - "stacks" - ], - "properties": { - "chapters": { + }, + "projectInfo": { + "$ref": "#/definitions/ProjectInfo" + }, + "projectMembers": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/ProjectMember" } }, - "leadingChapters": { + "projectNotion": { + "$ref": "#/definitions/ProjectNotion" + }, + "projectStacks": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/Stack" } }, - "positions": { + "slots": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/ProjectSlot" } }, - "seniority": { + "startDate": { "type": "string" }, - "stacks": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "request.UpdateStackBody": { - "type": "object", - "properties": { - "avatar": { + "status": { "type": "string" }, - "code": { + "type": { "type": "string" }, - "name": { + "updatedAt": { "type": "string" } } }, - "request.UpdateTopicReviewersBody": { + "ProjectCommissionConfig": { "type": "object", "properties": { - "reviewerIDs": { - "type": "array", - "items": { - "type": "string" - } + "commissionRate": { + "type": "number" + }, + "createdAt": { + "type": "string" + }, + "id": { + "type": "string" + }, + "position": { + "type": "string" + }, + "projectID": { + "type": "string" + }, + "updatedAt": { + "type": "string" } } }, - "request.UpdateWorkUnitBody": { + "ProjectInfo": { "type": "object", - "required": [ - "name", - "stacks", - "type" - ], "properties": { - "members": { - "type": "array", - "items": { - "type": "string" - } + "basecampBucketID": { + "type": "integer" + }, + "basecampCampfireID": { + "type": "integer" + }, + "basecampMessageBoardID": { + "type": "integer" + }, + "basecampScheduleID": { + "type": "integer" + }, + "basecampSentryID": { + "type": "integer" + }, + "basecampTodolistID": { + "type": "integer" + }, + "createdAt": { + "type": "string" + }, + "gitlabID": { + "type": "integer" + }, + "id": { + "type": "string" }, - "name": { - "type": "string", - "maxLength": 100 + "project": { + "$ref": "#/definitions/Project" }, - "stacks": { + "projectID": { + "type": "string" + }, + "repositories": { "type": "array", "items": { - "type": "string" + "type": "integer" } }, - "type": { - "type": "string" - }, - "url": { + "updatedAt": { "type": "string" } } }, - "request.UpdateWorkUnitInput": { + "ProjectInvoiceTemplate": { "type": "object", "properties": { - "body": { - "$ref": "#/definitions/request.UpdateWorkUnitBody" + "bankAccount": { + "$ref": "#/definitions/BankAccount" }, - "projectID": { + "client": { + "$ref": "#/definitions/ClientInfo" + }, + "companyInfo": { + "$ref": "#/definitions/CompanyInfo" + }, + "id": { "type": "string" }, - "workUnitID": { + "invoiceNumber": { + "type": "string" + }, + "lastInvoice": { + "$ref": "#/definitions/Invoice" + }, + "name": { "type": "string" } } }, - "request.UpsertRollupRequest": { + "ProjectMember": { "type": "object", - "required": [ - "channelID", - "discordUserID", - "lastMessageID" - ], "properties": { - "categoryID": { + "avatar": { "type": "string" }, - "channelID": { - "type": "string" + "currency": { + "$ref": "#/definitions/Currency" }, - "discordUserID": { + "deploymentType": { "type": "string" }, - "lastMessageID": { + "discount": { + "type": "number" + }, + "displayName": { "type": "string" }, - "messageCount": { - "type": "integer" + "employeeID": { + "type": "string" }, - "reactionCount": { - "type": "integer" - } - } - }, - "view.APIKeyData": { - "type": "object", - "properties": { - "key": { + "endDate": { "type": "string" - } - } - }, - "view.APIKeyResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/definitions/view.APIKeyData" - } - } - }, - "view.ActionItemReportResponse": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/definitions/view.AuditActionItemReport" - } - } - } - }, - "view.ActionItemSquash": { - "type": "object", - "properties": { - "snapDate": { + }, + "fullName": { "type": "string" }, - "trend": { + "isLead": { + "type": "boolean" + }, + "leadCommissionRate": { "type": "number" }, - "value": { - "type": "integer" - } - } - }, - "view.ActionItemSquashReport": { - "type": "object", - "properties": { - "all": { - "type": "array", - "items": { - "$ref": "#/definitions/view.ActionItemSquash" - } + "note": { + "type": "string" }, - "high": { + "positions": { "type": "array", "items": { - "$ref": "#/definitions/view.ActionItemSquash" + "$ref": "#/definitions/Position" } }, - "low": { - "type": "array", - "items": { - "$ref": "#/definitions/view.ActionItemSquash" - } + "projectMemberID": { + "type": "string" }, - "medium": { - "type": "array", - "items": { - "$ref": "#/definitions/view.ActionItemSquash" - } - } - } - }, - "view.ActionItemSquashReportResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/definitions/view.ActionItemSquashReport" - } - } - }, - "view.ActionItemTrend": { - "type": "object", - "properties": { - "high": { - "type": "number" + "projectSlotID": { + "type": "string" }, - "low": { + "rate": { "type": "number" }, - "medium": { + "seniority": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_model.Seniority" + }, + "startDate": { + "type": "string" + }, + "status": { + "type": "string" + }, + "upsellCommissionRate": { "type": "number" + }, + "upsellPerson": { + "$ref": "#/definitions/BasicEmployeeInfo" + }, + "username": { + "type": "string" } } }, - "view.Address": { + "ProjectNotion": { "type": "object", "properties": { - "address": { + "auditNotionID": { "type": "string" }, - "city": { + "createdAt": { "type": "string" }, - "country": { + "id": { "type": "string" }, - "lat": { + "project": { + "$ref": "#/definitions/Project" + }, + "projectID": { "type": "string" }, - "long": { + "updatedAt": { "type": "string" } } }, - "view.ApiError": { - "description": "validation error details", + "ProjectSizeResponse": { "type": "object", "properties": { - "enums": { - "description": "available options incase of field's payload is enums", + "data": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_model.ProjectSize" } - }, - "field": { - "description": "the field cause the error", - "type": "string" - }, - "msg": { - "description": "error message", - "type": "string" } } }, - "view.Audit": { + "ProjectSlot": { "type": "object", "properties": { - "avg": { - "type": "number" + "createdAt": { + "type": "string" }, - "quarter": { + "deploymentType": { "type": "string" }, - "trend": { + "discount": { "type": "number" - } - } - }, - "view.AuditActionItemReport": { - "type": "object", - "properties": { - "high": { - "type": "integer" }, - "low": { - "type": "integer" + "id": { + "type": "string" }, - "medium": { - "type": "integer" + "note": { + "type": "string" }, - "quarter": { + "project": { + "$ref": "#/definitions/Project" + }, + "projectID": { "type": "string" }, - "trend": { - "$ref": "#/definitions/view.ActionItemTrend" - } - } - }, - "view.AuditData": { - "type": "object", - "properties": { - "average": { - "type": "array", - "items": { - "$ref": "#/definitions/view.Audit" - } + "projectMember": { + "$ref": "#/definitions/ProjectMember" }, - "groups": { + "projectSlotPositions": { "type": "array", "items": { - "$ref": "#/definitions/view.GroupAudit" + "$ref": "#/definitions/Position" } + }, + "rate": { + "type": "number" + }, + "seniority": { + "$ref": "#/definitions/Seniority" + }, + "seniorityID": { + "type": "string" + }, + "status": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "upsellPerson": { + "$ref": "#/definitions/EmployeeData" + }, + "upsellPersonID": { + "type": "string" } } }, - "view.AuditResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/definitions/view.AuditData" - } - } - }, - "view.AuditSummaries": { + "PublicClient": { "type": "object", "properties": { - "summary": { + "address": { + "$ref": "#/definitions/Address" + }, + "avatar": { + "type": "string" + }, + "companySize": { + "type": "string" + }, + "id": { + "type": "string" + }, + "industry": { + "type": "string" + }, + "name": { + "type": "string" + }, + "solutionType": { + "type": "string" + }, + "stacks": { "type": "array", "items": { - "$ref": "#/definitions/view.AuditSummary" + "type": "string" } } } }, - "view.AuditSummariesResponse": { + "PublicClientListResponse": { "type": "object", "properties": { "data": { - "$ref": "#/definitions/view.AuditSummaries" + "type": "array", + "items": { + "$ref": "#/definitions/PublicClient" + } } } }, - "view.AuditSummary": { + "QuestionAnswer": { "type": "object", "properties": { - "audit": { - "$ref": "#/definitions/view.AuditValue" - }, - "avatar": { + "answer": { "type": "string" }, - "code": { + "content": { "type": "string" }, - "health": { - "$ref": "#/definitions/view.AuditValue" + "domain": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_model.QuestionDomain" }, - "id": { + "eventQuestionID": { "type": "string" }, - "name": { + "note": { "type": "string" }, - "newItem": { - "$ref": "#/definitions/view.ItemValue" - }, - "resolvedItem": { - "$ref": "#/definitions/view.ItemValue" - }, - "size": { - "$ref": "#/definitions/view.ItemValue" - } - } - }, - "view.AuditValue": { - "type": "object", - "properties": { - "trend": { - "type": "number" + "order": { + "type": "integer" }, - "value": { - "type": "number" + "type": { + "type": "string" } } }, - "view.AuthData": { + "ResourceAvailability": { "type": "object", "properties": { - "accessToken": { - "type": "string" + "employees": { + "type": "array", + "items": { + "$ref": "#/definitions/AvailableEmployee" + } }, - "employee": { - "$ref": "#/definitions/view.EmployeeData" + "slots": { + "type": "array", + "items": { + "$ref": "#/definitions/AvailableSlot" + } } } }, - "view.AuthUserResponse": { + "ResourceAvailabilityResponse": { "type": "object", "properties": { "data": { - "$ref": "#/definitions/view.LoggedInUserData" + "$ref": "#/definitions/ResourceAvailability" } } }, - "view.AvailableEmployee": { + "ResourceUtilization": { "type": "object", "properties": { - "avatar": { - "type": "string" - }, - "displayName": { - "type": "string" - }, - "fullName": { - "type": "string" + "available": { + "type": "integer" }, - "id": { + "date": { "type": "string" }, - "positions": { - "type": "array", - "items": { - "$ref": "#/definitions/view.Position" - } - }, - "projects": { - "type": "array", - "items": { - "$ref": "#/definitions/view.BasicProjectInfo" - } - }, - "seniority": { - "$ref": "#/definitions/view.Seniority" - }, - "stacks": { - "type": "array", - "items": { - "$ref": "#/definitions/view.Stack" - } + "internal": { + "type": "integer" }, - "username": { - "type": "string" + "staffed": { + "type": "integer" } } }, - "view.AvailableSlot": { + "Role": { "type": "object", "properties": { - "createdAt": { + "code": { "type": "string" }, "id": { "type": "string" }, - "note": { + "name": { "type": "string" - }, - "positions": { + } + } + }, + "RolesResponse": { + "type": "object", + "properties": { + "data": { "type": "array", "items": { - "$ref": "#/definitions/view.Position" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_model.Role" } - }, - "project": { - "$ref": "#/definitions/view.BasicProjectInfo" - }, - "seniority": { - "$ref": "#/definitions/view.Seniority" - }, - "type": { - "type": "string" } } }, - "view.BankAccount": { + "SendInvoiceRequest": { "type": "object", + "required": [ + "bankID", + "dueDate", + "email", + "invoiceDate", + "projectID" + ], "properties": { - "accountNumber": { + "bankID": { "type": "string" }, - "address": { - "type": "string" + "cc": { + "type": "array", + "items": { + "type": "string" + } }, - "bankName": { + "description": { "type": "string" }, - "currency": { - "$ref": "#/definitions/view.Currency" + "discount": { + "type": "number", + "minimum": 0 }, - "currencyID": { + "dueDate": { "type": "string" }, - "id": { + "email": { "type": "string" }, - "intermediaryBankAddress": { + "invoiceDate": { "type": "string" }, - "intermediaryBankName": { - "type": "string" + "invoiceMonth": { + "type": "integer", + "maximum": 11, + "minimum": 0 }, - "name": { - "type": "string" + "invoiceYear": { + "type": "integer", + "minimum": 0 }, - "ownerName": { - "type": "string" + "isDraft": { + "type": "boolean" }, - "routingNumber": { + "lineItems": { + "type": "array", + "items": { + "$ref": "#/definitions/InvoiceItem" + } + }, + "note": { "type": "string" }, - "swiftCode": { + "number": { "type": "string" }, - "ukSortCode": { + "projectID": { "type": "string" + }, + "subtotal": { + "type": "number", + "minimum": 0 + }, + "tax": { + "type": "number", + "minimum": 0 + }, + "total": { + "type": "number", + "minimum": 0 } } }, - "view.BaseSalary": { + "Seniority": { "type": "object", "properties": { - "batch": { - "type": "integer" - }, - "category": { - "type": "string" - }, - "company_account_amount": { - "type": "integer" - }, - "contract_amount": { - "type": "integer" - }, - "currency": { - "$ref": "#/definitions/view.Currency" - }, - "currency_id": { - "type": "string" - }, - "effective_date": { - "type": "string" - }, - "employee_id": { + "code": { "type": "string" }, "id": { "type": "string" }, - "insurance_amount": { - "type": "integer" - }, - "personal_account_amount": { - "type": "integer" - }, - "type": { + "name": { "type": "string" } } }, - "view.BasicBankAccountInfo": { + "SeniorityResponse": { "type": "object", "properties": { - "accountNumber": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_model.Seniority" + } + } + } + }, + "Stack": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, - "bankName": { + "code": { "type": "string" }, "id": { "type": "string" }, - "ownerName": { + "name": { "type": "string" } } }, - "view.BasicClientInfo": { + "StackResponse": { "type": "object", "properties": { - "description": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "registrationNumber": { - "type": "string" + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_model.Stack" + } } } }, - "view.BasicCompanyInfo": { + "SubmitFeedback": { "type": "object", "properties": { - "description": { + "answers": { + "type": "array", + "items": { + "$ref": "#/definitions/QuestionAnswer" + } + }, + "employeeID": { "type": "string" }, - "id": { + "eventID": { "type": "string" }, - "name": { + "reviewer": { + "$ref": "#/definitions/BasicEmployeeInfo" + }, + "status": { "type": "string" }, - "registrationNumber": { + "title": { "type": "string" + }, + "topicID": { + "type": "string" + } + } + }, + "SubmitFeedbackRequest": { + "type": "object", + "required": [ + "answers", + "status" + ], + "properties": { + "answers": { + "type": "array", + "items": { + "$ref": "#/definitions/BasicEventQuestionRequest" + } + }, + "status": { + "$ref": "#/definitions/EventReviewerStatus" } } }, - "view.BasicCountryInfo": { + "SubmitFeedbackResponse": { "type": "object", "properties": { - "code": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" + "data": { + "$ref": "#/definitions/SubmitFeedback" } } }, - "view.BasicEmployeeInfo": { + "SubmitOnboardingFormRequest": { "type": "object", + "required": [ + "address", + "city", + "country", + "dateOfBirth", + "discordName", + "gender", + "horoscope", + "localBankBranch", + "localBankCurrency", + "localBankNumber", + "localBankRecipientName", + "localBranchName", + "mbti", + "phoneNumber", + "placeOfResidence" + ], "properties": { + "address": { + "type": "string" + }, "avatar": { "type": "string" }, - "displayName": { + "city": { "type": "string" }, - "fullName": { + "country": { "type": "string" }, - "id": { + "dateOfBirth": { "type": "string" }, - "username": { + "discordName": { "type": "string" - } - } - }, - "view.BasicMember": { - "type": "object", - "properties": { - "avatar": { + }, + "gender": { "type": "string" }, - "displayName": { + "githubID": { "type": "string" }, - "employeeID": { + "horoscope": { "type": "string" }, - "fullName": { + "identityCardPhotoBack": { "type": "string" }, - "username": { + "identityCardPhotoFront": { "type": "string" - } - } - }, - "view.BasicProjectHeadInfo": { - "type": "object", - "properties": { - "avatar": { + }, + "lat": { "type": "string" }, - "commissionRate": { - "type": "number" + "linkedInName": { + "type": "string" }, - "displayName": { + "localBankBranch": { "type": "string" }, - "employeeID": { + "localBankCurrency": { "type": "string" }, - "fullName": { + "localBankNumber": { "type": "string" }, - "position": { + "localBankRecipientName": { "type": "string" }, - "username": { + "localBranchName": { "type": "string" - } - } - }, - "view.BasicProjectInfo": { - "type": "object", - "properties": { - "avatar": { + }, + "long": { "type": "string" }, - "code": { + "mbti": { "type": "string" }, - "id": { + "notionName": { "type": "string" }, - "name": { + "passportPhotoBack": { "type": "string" }, - "status": { + "passportPhotoFront": { "type": "string" }, - "type": { + "phoneNumber": { + "type": "string", + "maxLength": 18, + "minLength": 8 + }, + "placeOfResidence": { "type": "string" } } }, - "view.BraineryMetric": { + "SummaryWorkUnitDistributionData": { "type": "object", "properties": { - "contributors": { - "type": "array", - "items": { - "$ref": "#/definitions/view.Post" - } - }, - "latestPosts": { - "type": "array", - "items": { - "$ref": "#/definitions/view.Post" - } + "development": { + "type": "number" }, - "newContributors": { - "type": "array", - "items": { - "$ref": "#/definitions/view.Post" - } + "learning": { + "type": "number" }, - "tags": { - "type": "array", - "items": { - "type": "string" - } + "management": { + "type": "number" }, - "topContributors": { - "type": "array", - "items": { - "$ref": "#/definitions/view.TopContributor" - } + "training": { + "type": "number" } } }, - "view.Chapter": { + "SummaryWorkUnitDistributionResponse": { "type": "object", "properties": { - "code": { - "type": "string" - }, - "id": { - "type": "string" + "data": { + "$ref": "#/definitions/SummaryWorkUnitDistributionData" + } + } + }, + "Trend": { + "type": "object", + "properties": { + "deadline": { + "type": "number" }, - "leadID": { - "type": "string" + "learning": { + "type": "number" }, - "name": { - "type": "string" + "workload": { + "type": "number" } } }, - "view.ChapterResponse": { + "UnreadFeedbackCountData": { "type": "object", "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/definitions/model.Chapter" - } + "count": { + "type": "integer" + }, + "reviewerID": { + "type": "string" } } }, - "view.CitiesResponse": { + "UnreadFeedbackCountResponse": { "type": "object", "properties": { "data": { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/definitions/UnreadFeedbackCountData" } } }, - "view.City": { + "UpdateBaseSalaryRequest": { "type": "object", + "required": [ + "batch", + "currencyCode" + ], "properties": { - "lat": { - "type": "string" + "batch": { + "type": "integer" }, - "long": { + "companyAccountAmount": { + "type": "integer", + "minimum": 0 + }, + "contractAmount": { + "type": "integer", + "minimum": 0 + }, + "currencyCode": { "type": "string" }, - "name": { + "effectiveDate": { "type": "string" + }, + "personalAccountAmount": { + "type": "integer", + "minimum": 0 + } + } + }, + "UpdateBaseSalaryResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/BaseSalary" } } }, - "view.Client": { + "UpdateClientInput": { "type": "object", "properties": { "address": { @@ -10093,7 +9364,7 @@ "contacts": { "type": "array", "items": { - "$ref": "#/definitions/view.ClientContact" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_client_request.UpdateClientContactInput" } }, "country": { @@ -10102,9 +9373,6 @@ "description": { "type": "string" }, - "id": { - "type": "string" - }, "industry": { "type": "string" }, @@ -10119,333 +9387,289 @@ } } }, - "view.ClientContact": { + "UpdateEmployeeGeneralInfoRequest": { "type": "object", + "required": [ + "email", + "fullName", + "phone" + ], "properties": { - "emails": { - "type": "array", - "items": { - "type": "string" - } + "discordID": { + "type": "string" }, - "id": { + "discordName": { "type": "string" }, - "isMainContact": { - "type": "boolean" + "displayName": { + "type": "string" }, - "name": { + "email": { "type": "string" }, - "role": { + "fullName": { + "type": "string", + "maxLength": 99 + }, + "githubID": { "type": "string" - } - } - }, - "view.ClientContactInfo": { - "type": "object", - "properties": { - "emails": { - "type": "array", - "items": { - "type": "string" - } }, - "id": { + "joinedDate": { "type": "string" }, - "isMainContact": { - "type": "boolean" + "leftDate": { + "type": "string" }, - "name": { + "lineManagerID": { "type": "string" - } - } - }, - "view.ClientInfo": { - "type": "object", - "properties": { - "clientAddress": { + }, + "linkedInName": { "type": "string" }, - "clientCompany": { + "notionEmail": { + "type": "string" + }, + "notionID": { + "type": "string" + }, + "notionName": { "type": "string" }, - "contacts": { + "organizationIDs": { "type": "array", "items": { - "$ref": "#/definitions/view.ClientContactInfo" + "type": "string" } - } - } - }, - "view.CompanyInfo": { - "type": "object", - "properties": { - "description": { + }, + "phone": { + "type": "string", + "maxLength": 18, + "minLength": 9 + }, + "referredBy": { "type": "string" }, - "id": { + "wiseAccountNumber": { "type": "string" }, - "info": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/model.CompanyContactInfo" - } + "wiseCurrency": { + "type": "string" }, - "name": { + "wiseRecipientEmail": { "type": "string" }, - "registrationNumber": { + "wiseRecipientID": { "type": "string" - } - } - }, - "view.ContentData": { - "type": "object", - "properties": { - "url": { + }, + "wiseRecipientName": { "type": "string" } } }, - "view.ContentDataResponse": { + "UpdateEmployeeStatusResponse": { "type": "object", "properties": { "data": { - "$ref": "#/definitions/view.ContentData" + "$ref": "#/definitions/EmployeeData" } } }, - "view.CountriesResponse": { + "UpdateGeneralEmployeeResponse": { "type": "object", "properties": { "data": { - "type": "array", - "items": { - "$ref": "#/definitions/view.Country" - } + "$ref": "#/definitions/UpdateGeneralInfoEmployeeData" } } }, - "view.Country": { + "UpdateGeneralInfoEmployeeData": { "type": "object", "properties": { - "cities": { - "type": "array", - "items": { - "$ref": "#/definitions/view.City" - } - }, - "code": { + "createdAt": { "type": "string" }, - "id": { + "discordID": { "type": "string" }, - "name": { - "type": "string" - } - } - }, - "view.CreateClientResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/definitions/model.Client" - } - } - }, - "view.CreateMemberData": { - "type": "object", - "properties": { - "avatar": { + "discordName": { "type": "string" }, - "deploymentType": { + "displayName": { "type": "string" }, - "discount": { - "type": "number" + "fullName": { + "description": "basic info", + "type": "string" }, - "displayName": { + "githubID": { "type": "string" }, - "employeeID": { + "id": { "type": "string" }, - "fullName": { + "lineManager": { + "$ref": "#/definitions/BasicEmployeeInfo" + }, + "linkedInName": { "type": "string" }, - "isLead": { - "type": "boolean" + "notionEmail": { + "type": "string" }, - "leadCommissionRate": { - "type": "number" + "notionID": { + "type": "string" }, - "note": { + "notionName": { "type": "string" }, - "positions": { + "organizations": { "type": "array", "items": { - "$ref": "#/definitions/view.Position" + "$ref": "#/definitions/Organization" } }, - "projectMemberID": { - "type": "string" - }, - "projectSlotID": { + "phoneNumber": { "type": "string" }, - "rate": { - "type": "number" - }, - "seniority": { - "$ref": "#/definitions/model.Seniority" + "referredBy": { + "$ref": "#/definitions/BasicEmployeeInfo" }, - "status": { + "teamEmail": { "type": "string" }, - "upsellCommissionRate": { - "type": "number" - }, - "upsellPerson": { - "$ref": "#/definitions/view.BasicEmployeeInfo" - }, - "username": { + "updatedAt": { "type": "string" } } }, - "view.CreateMemberDataResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/definitions/view.CreateMemberData" - } - } - }, - "view.CreateProjectData": { + "UpdateInfoInput": { "type": "object", + "required": [ + "city", + "country", + "personalEmail", + "phoneNumber", + "placeOfResidence" + ], "properties": { - "accountManagers": { - "type": "array", - "items": { - "$ref": "#/definitions/view.ProjectHead" - } - }, - "bankAccount": { - "$ref": "#/definitions/view.BasicBankAccountInfo" + "address": { + "type": "string" }, - "client": { - "$ref": "#/definitions/view.Client" + "city": { + "type": "string" }, - "clientEmail": { - "type": "array", - "items": { - "type": "string" - } + "country": { + "type": "string" }, - "code": { + "discordName": { "type": "string" }, - "country": { - "$ref": "#/definitions/view.BasicCountryInfo" + "githubID": { + "type": "string" }, - "createdAt": { + "lat": { "type": "string" }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" + "linkedInName": { + "type": "string" }, - "deliveryManagers": { - "type": "array", - "items": { - "$ref": "#/definitions/view.ProjectHead" - } + "long": { + "type": "string" }, - "function": { + "notionEmail": { "type": "string" }, - "id": { + "notionID": { "type": "string" }, - "members": { - "type": "array", - "items": { - "$ref": "#/definitions/view.CreateMemberData" - } + "notionName": { + "type": "string" }, - "name": { + "personalEmail": { "type": "string" }, - "organization": { - "$ref": "#/definitions/view.Organization" + "phoneNumber": { + "type": "string", + "maxLength": 18, + "minLength": 8 }, - "projectEmail": { + "placeOfResidence": { "type": "string" }, - "salePersons": { - "type": "array", - "items": { - "$ref": "#/definitions/view.ProjectHead" - } + "wiseAccountNumber": { + "type": "string" }, - "startDate": { + "wiseCurrency": { "type": "string" }, - "status": { + "wiseRecipientEmail": { "type": "string" }, - "type": { + "wiseRecipientID": { "type": "string" }, - "updatedAt": { + "wiseRecipientName": { "type": "string" } } }, - "view.Currency": { + "UpdatePersonalEmployeeData": { "type": "object", "properties": { - "id": { + "address": { "type": "string" }, - "locale": { + "birthday": { "type": "string" }, - "name": { + "city": { "type": "string" }, - "symbol": { + "country": { "type": "string" }, - "type": { + "createdAt": { + "type": "string" + }, + "gender": { + "type": "string" + }, + "id": { + "type": "string" + }, + "personalEmail": { + "type": "string" + }, + "placeOfResidence": { + "type": "string" + }, + "updatedAt": { "type": "string" } } }, - "view.Domain": { + "UpdatePersonalEmployeeResponse": { "type": "object", "properties": { - "average": { - "type": "number" - }, - "count": { - "$ref": "#/definitions/model.LikertScaleCount" - }, - "name": { - "type": "string" + "data": { + "$ref": "#/definitions/UpdatePersonalEmployeeData" } } }, - "view.EmployeeAddress": { + "UpdatePersonalInfoRequest": { "type": "object", + "required": [ + "address", + "city", + "country", + "dob", + "gender", + "personalEmail" + ], "properties": { "address": { - "type": "string" + "type": "string", + "maxLength": 200 }, "city": { "type": "string" @@ -10453,1125 +9677,1437 @@ "country": { "type": "string" }, - "lat": { + "dob": { "type": "string" }, - "long": { + "gender": { "type": "string" - } - } - }, - "view.EmployeeContentData": { - "type": "object", - "properties": { - "url": { + }, + "personalEmail": { + "type": "string" + }, + "placeOfResidence": { "type": "string" } } }, - "view.EmployeeContentDataResponse": { + "UpdatePositionBody": { "type": "object", "properties": { - "data": { - "$ref": "#/definitions/view.EmployeeContentData" + "code": { + "type": "string" + }, + "name": { + "type": "string" } } }, - "view.EmployeeData": { + "UpdateProfileInfoData": { "type": "object", "properties": { "address": { "type": "string" }, - "avatar": { + "city": { "type": "string" }, - "baseSalary": { - "$ref": "#/definitions/view.BaseSalary" - }, - "birthday": { + "country": { "type": "string" }, - "chapters": { - "type": "array", - "items": { - "$ref": "#/definitions/view.Chapter" - } + "createdAt": { + "type": "string" }, - "city": { + "discordID": { "type": "string" }, - "country": { + "discordName": { "type": "string" }, - "createdAt": { + "githubID": { "type": "string" }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" + "id": { + "type": "string" }, - "discordID": { + "linkedInName": { "type": "string" }, - "discordName": { + "notionEmail": { "type": "string" }, - "displayName": { + "notionID": { "type": "string" }, - "fullName": { - "description": "basic info", + "notionName": { "type": "string" }, - "gender": { + "phoneNumber": { "type": "string" }, - "githubID": { + "placeOfResidence": { "type": "string" }, - "horoscope": { + "teamEmail": { + "description": "basic info", "type": "string" }, - "id": { + "updatedAt": { "type": "string" }, - "joinedDate": { + "username": { "type": "string" }, - "leftDate": { + "wiseAccountNumber": { "type": "string" }, - "lineManager": { - "$ref": "#/definitions/view.BasicEmployeeInfo" + "wiseCurrency": { + "type": "string" }, - "linkedInName": { + "wiseRecipientEmail": { "type": "string" }, - "mbti": { + "wiseRecipientID": { "type": "string" }, - "mentees": { + "wiseRecipientName": { + "type": "string" + } + } + }, + "UpdateProfileInfoResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/UpdateProfileInfoData" + } + } + }, + "UpdateRoleRequest": { + "type": "object", + "required": [ + "roles" + ], + "properties": { + "roles": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "UpdateSkillEmployeeData": { + "type": "object", + "properties": { + "chapters": { "type": "array", "items": { - "$ref": "#/definitions/view.MenteeInfo" + "$ref": "#/definitions/Chapter" } }, - "notionID": { + "createdAt": { "type": "string" }, - "notionName": { + "id": { "type": "string" }, - "organizations": { + "positions": { "type": "array", "items": { - "$ref": "#/definitions/view.Organization" + "$ref": "#/definitions/Position" } }, - "personalEmail": { - "type": "string" + "seniority": { + "$ref": "#/definitions/Seniority" }, - "phoneNumber": { - "type": "string" + "stacks": { + "type": "array", + "items": { + "$ref": "#/definitions/Stack" + } }, - "placeOfResidence": { + "updatedAt": { "type": "string" - }, - "positions": { + } + } + }, + "UpdateSkillsEmployeeResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/UpdateSkillEmployeeData" + } + } + }, + "UpdateSkillsRequest": { + "type": "object", + "required": [ + "chapters", + "positions", + "seniority", + "stacks" + ], + "properties": { + "chapters": { "type": "array", "items": { - "$ref": "#/definitions/view.Position" + "type": "string" } }, - "projects": { + "leadingChapters": { "type": "array", "items": { - "$ref": "#/definitions/view.EmployeeProjectData" + "type": "string" } }, - "referredBy": { - "$ref": "#/definitions/view.BasicEmployeeInfo" - }, - "roles": { + "positions": { "type": "array", "items": { - "$ref": "#/definitions/view.Role" + "type": "string" } }, "seniority": { - "$ref": "#/definitions/model.Seniority" + "type": "string" }, "stacks": { "type": "array", "items": { - "$ref": "#/definitions/view.Stack" + "type": "string" } - }, - "status": { - "description": "working info", + } + } + }, + "UpdateStackBody": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, - "teamEmail": { + "code": { "type": "string" }, - "updatedAt": { + "name": { "type": "string" - }, - "username": { + } + } + }, + "UpdateWorkingStatusRequest": { + "type": "object", + "properties": { + "employeeStatus": { "type": "string" - }, - "wiseAccountNumber": { + } + } + }, + "UpsertRollupRequest": { + "type": "object", + "required": [ + "channelID", + "discordUserID", + "lastMessageID" + ], + "properties": { + "categoryID": { "type": "string" }, - "wiseCurrency": { + "channelID": { "type": "string" }, - "wiseRecipientEmail": { + "discordUserID": { "type": "string" }, - "wiseRecipientID": { + "lastMessageID": { "type": "string" }, - "wiseRecipientName": { - "type": "string" + "messageCount": { + "type": "integer" + }, + "reactionCount": { + "type": "integer" } } }, - "view.EmployeeInvitationData": { + "WorkSurvey": { "type": "object", "properties": { - "employee": { - "$ref": "#/definitions/view.InvitedEmployeeInfo" - }, - "employeeID": { - "type": "string" - }, - "id": { - "type": "string" + "deadline": { + "type": "number" }, - "invitedBy": { + "endDate": { "type": "string" }, - "isBasecampAccountCreated": { - "type": "boolean" - }, - "isCompleted": { - "type": "boolean" - }, - "isDiscordRoleAssigned": { - "type": "boolean" + "learning": { + "type": "number" }, - "isInfoUpdated": { - "type": "boolean" + "trend": { + "$ref": "#/definitions/Trend" }, - "isTeamEmailCreated": { - "type": "boolean" + "workload": { + "type": "number" } } }, - "view.EmployeeInvitationResponse": { + "WorkSurveyResponse": { "type": "object", "properties": { "data": { - "$ref": "#/definitions/view.EmployeeInvitationData" + "$ref": "#/definitions/WorkSurveysData" } } }, - "view.EmployeeListDataResponse": { + "WorkSurveySummary": { "type": "object", "properties": { "data": { "type": "array", "items": { - "$ref": "#/definitions/view.EmployeeData" + "$ref": "#/definitions/WorkSurveySummaryEmployee" } + }, + "dates": { + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "type": "string" } } }, - "view.EmployeeLocation": { + "WorkSurveySummaryAnswer": { "type": "object", "properties": { - "address": { - "$ref": "#/definitions/view.EmployeeAddress" - }, - "avatar": { + "answer": { "type": "string" }, - "chapters": { + "project": { + "$ref": "#/definitions/BasicProjectInfo" + } + } + }, + "WorkSurveySummaryEmployee": { + "type": "object", + "properties": { + "listAnswers": { "type": "array", "items": { - "$ref": "#/definitions/view.Chapter" + "$ref": "#/definitions/WorkSurveySummaryListAnswer" } }, - "discordID": { - "type": "string" - }, - "displayName": { - "type": "string" + "reviewer": { + "$ref": "#/definitions/BasicEmployeeInfo" + } + } + }, + "WorkSurveySummaryListAnswer": { + "type": "object", + "properties": { + "answers": { + "type": "array", + "items": { + "$ref": "#/definitions/WorkSurveySummaryAnswer" + } }, - "fullName": { + "date": { "type": "string" } } }, - "view.EmployeeLocationListResponse": { + "WorkSurveySummaryResponse": { "type": "object", "properties": { "data": { "type": "array", "items": { - "$ref": "#/definitions/view.EmployeeLocation" + "$ref": "#/definitions/WorkSurveySummary" } } } }, - "view.EmployeeProjectData": { + "WorkSurveysData": { "type": "object", - "properties": { - "avatar": { - "type": "string" - }, - "code": { - "type": "string" - }, - "deploymentType": { - "type": "string" - }, - "endDate": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" + "properties": { + "project": { + "$ref": "#/definitions/BasicProjectInfo" }, - "positions": { + "workSurveys": { "type": "array", "items": { - "$ref": "#/definitions/view.Position" + "$ref": "#/definitions/WorkSurvey" } - }, - "startDate": { - "type": "string" - }, - "status": { - "type": "string" } } }, - "view.EngagementDashboard": { + "WorkUnitDistribution": { "type": "object", "properties": { - "content": { - "type": "string" + "development": { + "$ref": "#/definitions/WorkUnitDistributionDevelopment" }, - "questionID": { - "type": "string" + "employee": { + "$ref": "#/definitions/BasicEmployeeInfo" }, - "stats": { - "type": "array", - "items": { - "$ref": "#/definitions/view.EngagementDashboardQuestionStat" - } + "learning": { + "$ref": "#/definitions/WorkUnitDistributionLearning" + }, + "management": { + "$ref": "#/definitions/WorkUnitDistributionManagement" + }, + "training": { + "$ref": "#/definitions/WorkUnitDistributionTraining" } } }, - "view.EngagementDashboardDetail": { + "WorkUnitDistributionData": { "type": "object", "properties": { - "questionID": { - "type": "string" - }, - "stats": { + "workUnitDistributions": { "type": "array", "items": { - "$ref": "#/definitions/view.EngagementDashboardQuestionDetailStat" + "$ref": "#/definitions/WorkUnitDistribution" } } } }, - "view.EngagementDashboardQuestionDetailStat": { + "WorkUnitDistributionDevelopment": { "type": "object", "properties": { - "field": { - "type": "string" - }, - "point": { - "type": "number" + "total": { + "type": "integer" }, - "startDate": { - "type": "string" + "workUnits": { + "type": "array", + "items": { + "$ref": "#/definitions/WorkUnitDistributionWU" + } } } }, - "view.EngagementDashboardQuestionStat": { + "WorkUnitDistributionLearning": { "type": "object", "properties": { - "point": { - "type": "number" - }, - "startDate": { - "type": "string" + "total": { + "type": "integer" }, - "title": { - "type": "string" + "workUnits": { + "type": "array", + "items": { + "$ref": "#/definitions/WorkUnitDistributionWU" + } } } }, - "view.EngineeringHealth": { + "WorkUnitDistributionManagement": { "type": "object", "properties": { - "avg": { - "type": "number" + "projectHeads": { + "type": "array", + "items": { + "$ref": "#/definitions/WorkUnitDistributionWUProjectHead" + } }, - "quarter": { - "type": "string" + "total": { + "type": "integer" }, - "trend": { - "type": "number" + "workUnits": { + "type": "array", + "items": { + "$ref": "#/definitions/WorkUnitDistributionWU" + } } } }, - "view.EngineeringHealthData": { + "WorkUnitDistributionTraining": { "type": "object", "properties": { - "average": { + "mentees": { "type": "array", "items": { - "$ref": "#/definitions/view.EngineeringHealth" + "$ref": "#/definitions/BasicEmployeeInfo" } }, - "groups": { + "total": { + "type": "integer" + }, + "workUnits": { "type": "array", "items": { - "$ref": "#/definitions/view.GroupEngineeringHealth" + "$ref": "#/definitions/WorkUnitDistributionWU" } } } }, - "view.EngineeringHealthResponse": { + "WorkUnitDistributionWU": { "type": "object", "properties": { - "data": { - "$ref": "#/definitions/view.EngineeringHealthData" + "project": { + "$ref": "#/definitions/BasicProjectInfo" + }, + "workUnitName": { + "type": "string" } } }, - "view.EngineeringHealthTrend": { + "WorkUnitDistributionWUProjectHead": { "type": "object", "properties": { - "collaboration": { - "type": "number" - }, - "delivery": { - "type": "number" - }, - "feedback": { - "type": "number" + "position": { + "type": "string" }, - "quality": { - "type": "number" + "project": { + "$ref": "#/definitions/BasicProjectInfo" } } }, - "view.ErrorResponse": { + "WorkUnitDistributionsResponse": { "type": "object", "properties": { - "error": { - "type": "string" - }, - "errors": { + "data": { + "$ref": "#/definitions/WorkUnitDistributionData" + } + } + }, + "github_com_dwarvesf_fortress-api_pkg_handler_client_request.CreateClientContactInput": { + "type": "object", + "properties": { + "emails": { "type": "array", "items": { - "$ref": "#/definitions/view.ApiError" + "type": "string" } + }, + "isMainContact": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "role": { + "type": "string" } } }, - "view.FeedBackReviewDetail": { + "github_com_dwarvesf_fortress-api_pkg_handler_client_request.UpdateClientContactInput": { "type": "object", "properties": { - "employee": { - "$ref": "#/definitions/view.BasicEmployeeInfo" - }, - "project": { - "$ref": "#/definitions/view.BasicProjectInfo" - }, - "questions": { + "emails": { "type": "array", "items": { - "$ref": "#/definitions/view.QuestionAnswer" + "type": "string" } }, - "relationship": { - "type": "string" + "isMainContact": { + "type": "boolean" }, - "reviewer": { - "$ref": "#/definitions/view.BasicEmployeeInfo" + "name": { + "type": "string" }, - "topicName": { + "role": { "type": "string" } } }, - "view.Feedback": { + "github_com_dwarvesf_fortress-api_pkg_handler_project_request.AssignMemberInput": { "type": "object", + "required": [ + "deploymentType", + "positions", + "rate", + "seniorityID", + "status" + ], "properties": { - "author": { - "$ref": "#/definitions/view.BasicEmployeeInfo" - }, - "employeeID": { + "deploymentType": { "type": "string" }, - "eventID": { + "discount": { + "type": "number" + }, + "employeeID": { "type": "string" }, - "eventReviewerID": { + "endDate": { "type": "string" }, - "isRead": { + "isLead": { "type": "boolean" }, - "lastUpdated": { - "type": "string" + "leadCommissionRate": { + "type": "number" }, - "projectID": { + "note": { "type": "string" }, - "status": { - "type": "string" + "positions": { + "type": "array", + "items": { + "type": "string" + } }, - "subtype": { + "rate": { + "type": "number" + }, + "seniorityID": { "type": "string" }, - "title": { + "startDate": { "type": "string" }, - "topicID": { + "status": { "type": "string" }, - "type": { + "upsellCommissionRate": { + "type": "number" + }, + "upsellPersonID": { "type": "string" } } }, - "view.FeedbackCount": { + "github_com_dwarvesf_fortress-api_pkg_handler_project_request.CreateProjectInput": { "type": "object", + "required": [ + "countryID", + "function", + "name", + "status" + ], "properties": { - "done": { - "type": "integer" + "accountManagers": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_project_request.ProjectHeadInput" + } }, - "sent": { - "type": "integer" + "auditNotionID": { + "type": "string" }, - "total": { - "type": "integer" - } - } - }, - "view.FeedbackDetail": { - "type": "object", - "properties": { - "answers": { + "bankAccountID": { + "type": "string" + }, + "clientEmail": { "type": "array", "items": { - "$ref": "#/definitions/view.QuestionAnswer" + "type": "string" } }, - "employeeID": { + "clientID": { "type": "string" }, - "eventID": { + "code": { "type": "string" }, - "project": { - "$ref": "#/definitions/view.BasicProjectInfo" + "countryID": { + "type": "string" }, - "relationship": { + "deliveryManagers": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_project_request.ProjectHeadInput" + } + }, + "function": { "type": "string" }, - "reviewer": { - "$ref": "#/definitions/view.BasicEmployeeInfo" + "members": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_project_request.AssignMemberInput" + } }, - "status": { + "name": { "type": "string" }, - "title": { + "organizationID": { "type": "string" }, - "topicID": { + "projectEmail": { + "type": "string" + }, + "salePersons": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_project_request.ProjectHeadInput" + } + }, + "startDate": { + "type": "string" + }, + "status": { + "type": "string" + }, + "type": { "type": "string" } } }, - "view.FeedbackDetailResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/definitions/view.FeedbackDetail" - } - } - }, - "view.FeedbackReviewDetailResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/definitions/view.FeedBackReviewDetail" - } - } - }, - "view.GetCurrenciesResponse": { + "github_com_dwarvesf_fortress-api_pkg_handler_project_request.CreateWorkUnitBody": { "type": "object", + "required": [ + "name", + "stacks", + "status", + "type" + ], "properties": { - "data": { + "members": { "type": "array", "items": { - "$ref": "#/definitions/view.Currency" + "type": "string" } - } - } - }, - "view.GetDashboardResourceUtilizationResponse": { - "type": "object", - "properties": { - "data": { + }, + "name": { + "type": "string" + }, + "stacks": { "type": "array", "items": { - "$ref": "#/definitions/model.ResourceUtilization" + "type": "string" } + }, + "status": { + "type": "string" + }, + "type": { + "type": "string" + }, + "url": { + "type": "string" } } }, - "view.GetDetailClientResponse": { + "github_com_dwarvesf_fortress-api_pkg_handler_project_request.ProjectHeadInput": { "type": "object", "properties": { - "data": { - "$ref": "#/definitions/model.Client" + "commissionRate": { + "type": "number" + }, + "employeeID": { + "type": "string" } } }, - "view.GetEngagementDashboardDetailResponse": { + "github_com_dwarvesf_fortress-api_pkg_handler_project_request.UpdateContactInfoInput": { "type": "object", "properties": { - "data": { + "accountManagers": { "type": "array", "items": { - "$ref": "#/definitions/view.EngagementDashboardDetail" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_project_request.ProjectHeadInput" } - } - } - }, - "view.GetEngagementDashboardResponse": { - "type": "object", - "properties": { - "data": { + }, + "clientEmail": { "type": "array", "items": { - "$ref": "#/definitions/view.EngagementDashboard" + "type": "string" } - } - } - }, - "view.GetListClientResponse": { - "type": "object", - "properties": { - "data": { + }, + "deliveryManagers": { "type": "array", "items": { - "$ref": "#/definitions/model.Client" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_project_request.ProjectHeadInput" } - } - } - }, - "view.GetQuestionResponse": { - "type": "object", - "properties": { - "data": { + }, + "projectEmail": { + "type": "string" + }, + "salePersons": { "type": "array", "items": { - "$ref": "#/definitions/view.Question" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_project_request.ProjectHeadInput" } } } }, - "view.GroupAudit": { + "github_com_dwarvesf_fortress-api_pkg_handler_project_request.UpdateMemberInput": { "type": "object", + "required": [ + "deploymentType", + "positions", + "projectSlotID", + "rate", + "seniorityID", + "status" + ], "properties": { - "backend": { - "type": "number" + "deploymentType": { + "type": "string" }, - "blockchain": { + "discount": { "type": "number" }, - "frontend": { - "type": "number" + "employeeID": { + "type": "string" }, - "mobile": { - "type": "number" + "endDate": { + "type": "string" }, - "process": { + "isLead": { + "type": "boolean" + }, + "leadCommissionRate": { "type": "number" }, - "quarter": { + "note": { "type": "string" }, - "system": { - "type": "number" + "positions": { + "type": "array", + "items": { + "type": "string" + } }, - "trend": { - "$ref": "#/definitions/view.GroupAuditTrend" - } - } - }, - "view.GroupAuditTrend": { - "type": "object", - "properties": { - "backend": { - "type": "number" + "projectMemberID": { + "type": "string" }, - "blockchain": { - "type": "number" + "projectSlotID": { + "type": "string" }, - "frontend": { + "rate": { "type": "number" }, - "mobile": { - "type": "number" + "seniorityID": { + "type": "string" }, - "process": { - "type": "number" + "startDate": { + "type": "string" }, - "system": { + "status": { + "type": "string" + }, + "upsellCommissionRate": { "type": "number" + }, + "upsellPersonID": { + "type": "string" } } }, - "view.GroupEngineeringHealth": { + "github_com_dwarvesf_fortress-api_pkg_handler_project_request.UpdateProjectGeneralInfoInput": { "type": "object", + "required": [ + "accountRating", + "countryID", + "deliveryRating", + "function", + "importantLevel", + "leadRating", + "name" + ], "properties": { - "collaboration": { - "type": "number" - }, - "delivery": { - "type": "number" - }, - "feedback": { - "type": "number" + "accountRating": { + "type": "integer", + "maximum": 5, + "minimum": 1 }, - "quality": { - "type": "number" + "auditNotionID": { + "type": "string" }, - "quarter": { + "bankAccountID": { "type": "string" }, - "trend": { - "$ref": "#/definitions/view.EngineeringHealthTrend" - } - } - }, - "view.InvitedEmployeeInfo": { - "type": "object", - "properties": { - "avatar": { + "clientID": { "type": "string" }, - "displayName": { + "countryID": { "type": "string" }, - "fullName": { + "deliveryRating": { + "type": "integer", + "maximum": 5, + "minimum": 1 + }, + "function": { "type": "string" }, - "id": { + "importantLevel": { "type": "string" }, - "personalEmail": { + "leadRating": { + "type": "integer", + "maximum": 5, + "minimum": 1 + }, + "name": { "type": "string" }, - "teamEmail": { + "organizationID": { "type": "string" }, - "username": { + "stacks": { + "type": "array", + "items": { + "type": "string" + } + }, + "startDate": { "type": "string" } } }, - "view.Invoice": { + "github_com_dwarvesf_fortress-api_pkg_handler_project_request.UpdateWorkUnitBody": { "type": "object", + "required": [ + "name", + "stacks", + "type" + ], "properties": { - "bankID": { - "type": "string" - }, - "cc": { + "members": { "type": "array", "items": { "type": "string" } }, - "conversionAmount": { - "type": "number" - }, - "conversionRate": { - "type": "number" - }, - "description": { - "type": "string" - }, - "discount": { - "type": "number" - }, - "dueAt": { - "type": "string" - }, - "email": { - "type": "string" - }, - "errorInvoiceID": { - "type": "string" - }, - "failedAt": { - "type": "string" - }, - "invoiceFileURL": { - "type": "string" - }, - "invoicedAt": { - "type": "string" + "name": { + "type": "string", + "maxLength": 100 }, - "lineItems": { + "stacks": { "type": "array", "items": { - "$ref": "#/definitions/view.InvoiceItem" + "type": "string" } }, - "month": { - "type": "integer" - }, - "note": { - "type": "string" - }, - "number": { - "type": "string" - }, - "paidAt": { + "type": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_model.WorkUnitType" + }, + "url": { "type": "string" + } + } + }, + "github_com_dwarvesf_fortress-api_pkg_handler_project_request.UpdateWorkUnitInput": { + "type": "object", + "properties": { + "body": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_project_request.UpdateWorkUnitBody" }, "projectID": { "type": "string" }, - "scheduledDate": { + "workUnitID": { "type": "string" - }, - "sentBy": { + } + } + }, + "github_com_dwarvesf_fortress-api_pkg_handler_survey_request.CreateSurveyFeedbackInput": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "fromDate": { "type": "string" }, - "status": { + "quarter": { "type": "string" }, - "subTotal": { - "type": "number" - }, - "tax": { - "type": "number" - }, - "threadID": { + "toDate": { "type": "string" }, - "total": { - "type": "number" + "type": { + "type": "string" }, "year": { "type": "integer" } } }, - "view.InvoiceData": { + "github_com_dwarvesf_fortress-api_pkg_handler_survey_request.DeleteTopicReviewersBody": { "type": "object", "properties": { - "bankAccount": { - "$ref": "#/definitions/view.BankAccount" + "reviewerIDs": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "github_com_dwarvesf_fortress-api_pkg_handler_survey_request.SendSurveyInput": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "topicIDs": { + "type": "array", + "items": { + "type": "string" + } }, - "bankID": { + "type": { "type": "string" - }, - "cc": { + } + } + }, + "github_com_dwarvesf_fortress-api_pkg_handler_survey_request.UpdateTopicReviewersBody": { + "type": "object", + "properties": { + "reviewerIDs": { "type": "array", "items": { "type": "string" } - }, - "client": { - "$ref": "#/definitions/view.ClientInfo" - }, - "companyInfo": { - "$ref": "#/definitions/view.CompanyInfo" - }, - "conversionAmount": { + } + } + }, + "github_com_dwarvesf_fortress-api_pkg_model.AccountingItem": { + "type": "object", + "properties": { + "amount": { "type": "number" }, - "conversionRate": { - "type": "number" + "name": { + "type": "string" + } + } + }, + "github_com_dwarvesf_fortress-api_pkg_model.Chapter": { + "type": "object", + "properties": { + "code": { + "type": "string" }, - "description": { + "createdAt": { "type": "string" }, - "discount": { - "type": "number" + "deletedAt": { + "$ref": "#/definitions/gorm.DeletedAt" }, - "dueAt": { + "id": { "type": "string" }, - "email": { + "lead_id": { "type": "string" }, - "errorInvoiceID": { + "name": { "type": "string" }, - "failedAt": { + "updatedAt": { "type": "string" + } + } + }, + "github_com_dwarvesf_fortress-api_pkg_model.HeadPosition": { + "type": "string", + "enum": [ + "technical-lead", + "delivery-manager", + "account-manager", + "sale-person" + ], + "x-enum-varnames": [ + "HeadPositionTechnicalLead", + "HeadPositionDeliveryManager", + "HeadPositionAccountManager", + "HeadPositionSalePerson" + ] + }, + "github_com_dwarvesf_fortress-api_pkg_model.LikertScaleCount": { + "type": "object", + "properties": { + "agree": { + "type": "integer" }, - "invoiceFileURL": { - "type": "string" + "disagree": { + "type": "integer" }, - "invoicedAt": { + "mixed": { + "type": "integer" + }, + "stronglyAgree": { + "type": "integer" + }, + "stronglyDisagree": { + "type": "integer" + } + } + }, + "github_com_dwarvesf_fortress-api_pkg_model.NotionTechRadar": { + "type": "object", + "properties": { + "assign": { "type": "string" }, - "lineItems": { + "categories": { "type": "array", "items": { - "$ref": "#/definitions/view.InvoiceItem" + "type": "string" } }, - "month": { - "type": "integer" - }, - "note": { - "type": "string" - }, - "number": { + "id": { "type": "string" }, - "paidAt": { + "name": { "type": "string" }, - "projectID": { + "quadrant": { "type": "string" }, - "projectName": { + "ring": { "type": "string" }, - "scheduledDate": { + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "github_com_dwarvesf_fortress-api_pkg_model.Organization": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, - "sentBy": { + "code": { "type": "string" }, - "status": { + "createdAt": { "type": "string" }, - "subTotal": { - "type": "number" - }, - "tax": { - "type": "number" + "deletedAt": { + "$ref": "#/definitions/gorm.DeletedAt" }, - "threadID": { + "id": { "type": "string" }, - "total": { - "type": "number" + "name": { + "type": "string" }, - "year": { - "type": "integer" + "updatedAt": { + "type": "string" } } }, - "view.InvoiceItem": { + "github_com_dwarvesf_fortress-api_pkg_model.Position": { "type": "object", "properties": { - "cost": { - "type": "number" + "code": { + "type": "string" }, - "description": { + "createdAt": { "type": "string" }, - "discount": { - "type": "number" + "deletedAt": { + "$ref": "#/definitions/gorm.DeletedAt" }, - "isExternal": { - "type": "boolean" + "id": { + "type": "string" }, - "quantity": { - "type": "number" + "name": { + "type": "string" }, - "unitCost": { - "type": "number" - } - } - }, - "view.InvoiceListResponse": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/definitions/view.InvoiceData" - } + "updatedAt": { + "type": "string" } } }, - "view.InvoiceTemplateResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/definitions/view.ProjectInvoiceTemplate" - } - } + "github_com_dwarvesf_fortress-api_pkg_model.ProjectFunction": { + "type": "string", + "enum": [ + "development", + "learning", + "training", + "management" + ], + "x-enum-varnames": [ + "ProjectFunctionDevelopment", + "ProjectFunctionLearning", + "ProjectFunctionTraining", + "ProjectFunctionManagement" + ] }, - "view.ItemValue": { + "github_com_dwarvesf_fortress-api_pkg_model.ProjectSize": { "type": "object", "properties": { - "trend": { - "type": "number" + "avatar": { + "type": "string" }, - "value": { - "type": "integer" - } - } - }, - "view.LineManagersResponse": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/definitions/view.BasicEmployeeInfo" - } - } - } - }, - "view.ListBankAccountResponse": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/definitions/view.BankAccount" - } - } - } - }, - "view.ListFeedbackResponse": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/definitions/view.Feedback" - } + "code": { + "type": "string" + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "size": { + "type": "integer" } } }, - "view.ListSurveyDetailResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/definitions/view.SurveyDetail" - } - } + "github_com_dwarvesf_fortress-api_pkg_model.QuestionDomain": { + "type": "string", + "enum": [ + "engagement", + "workload", + "deadline", + "learning" + ], + "x-enum-varnames": [ + "QuestionDomainEngagement", + "QuestionDomainWorkload", + "QuestionDomainDeadline", + "QuestionDomainLearning" + ] + }, + "github_com_dwarvesf_fortress-api_pkg_model.Relationship": { + "type": "string", + "enum": [ + "peer", + "line-manager", + "chapter-lead", + "self" + ], + "x-enum-varnames": [ + "RelationshipPeer", + "RelationshipLineManager", + "RelationshipChapterLead", + "RelationshipSelf" + ] }, - "view.ListSurveyResponse": { + "github_com_dwarvesf_fortress-api_pkg_model.Role": { "type": "object", "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/definitions/view.Survey" - } + "code": { + "type": "string" + }, + "color": { + "type": "string" + }, + "createdAt": { + "type": "string" + }, + "deletedAt": { + "$ref": "#/definitions/gorm.DeletedAt" + }, + "id": { + "type": "string" + }, + "isShow": { + "type": "boolean" + }, + "level": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "updatedAt": { + "type": "string" } } }, - "view.ListWorkUnitResponse": { + "github_com_dwarvesf_fortress-api_pkg_model.Seniority": { "type": "object", "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/definitions/view.WorkUnit" - } + "code": { + "type": "string" + }, + "createdAt": { + "type": "string" + }, + "deletedAt": { + "$ref": "#/definitions/gorm.DeletedAt" + }, + "id": { + "type": "string" + }, + "level": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "updatedAt": { + "type": "string" } } }, - "view.LoggedInUserData": { + "github_com_dwarvesf_fortress-api_pkg_model.Stack": { "type": "object", "properties": { "avatar": { "type": "string" }, - "displayName": { + "code": { "type": "string" }, - "fullName": { + "createdAt": { "type": "string" }, + "deletedAt": { + "$ref": "#/definitions/gorm.DeletedAt" + }, "id": { "type": "string" }, - "permissions": { - "type": "array", - "items": { - "type": "string" - } - }, - "role": { + "name": { "type": "string" }, - "teamEmail": { + "updatedAt": { "type": "string" } } }, - "view.MenteeInfo": { + "github_com_dwarvesf_fortress-api_pkg_model.Valuation": { "type": "object", "properties": { - "avatar": { - "type": "string" + "accountReceivable": { + "description": "money that company will receive in the future", + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_model.AccountingItem" + } + }, + "total": { + "type": "number" + } + } }, - "displayName": { - "type": "string" + "assets": { + "description": "valuation info", + "type": "number" }, - "fullName": { + "currency": { "type": "string" }, - "id": { - "type": "string" + "income": { + "description": "Total paid invoice, investment \u0026 bank interest", + "type": "object", + "properties": { + "detail": { + "type": "object", + "properties": { + "consultantService": { + "type": "number" + }, + "interest": { + "type": "number" + }, + "investment": { + "type": "number" + } + } + }, + "total": { + "type": "number" + } + } }, - "positions": { + "liabilities": { + "description": "money that company will pay in the future", + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_model.AccountingItem" + } + }, + "total": { + "type": "number" + } + } + }, + "outcome": { + "description": "Sum of Expenses and payroll", + "type": "object", + "properties": { + "detail": { + "type": "object", + "properties": { + "expense": { + "type": "number" + }, + "investment": { + "type": "number" + }, + "payroll": { + "type": "number" + } + } + }, + "total": { + "type": "number" + } + } + }, + "rate": { + "type": "number" + }, + "year": { + "description": "basic info", + "type": "string" + } + } + }, + "github_com_dwarvesf_fortress-api_pkg_model.WorkUnitType": { + "type": "string", + "enum": [ + "development", + "management", + "training", + "learning" + ], + "x-enum-varnames": [ + "WorkUnitTypeDevelopment", + "WorkUnitTypeManagement", + "WorkUnitTypeTraining", + "WorkUnitTypeLearning" + ] + }, + "github_com_dwarvesf_fortress-api_pkg_view.ApiError": { + "description": "validation error details", + "type": "object", + "properties": { + "enums": { + "description": "available options incase of field's payload is enums", "type": "array", "items": { - "$ref": "#/definitions/model.Position" + "type": "string" } }, - "seniority": { - "$ref": "#/definitions/model.Seniority" + "field": { + "description": "the field cause the error", + "type": "string" }, - "username": { + "msg": { + "description": "error message", "type": "string" } } }, - "view.MessageResponse": { + "github_com_dwarvesf_fortress-api_pkg_view.BasicBankAccountInfo": { "type": "object", "properties": { - "message": { + "accountNumber": { + "type": "string" + }, + "bankName": { + "type": "string" + }, + "id": { + "type": "string" + }, + "ownerName": { "type": "string" } } }, - "view.MetaData": { + "github_com_dwarvesf_fortress-api_pkg_view.BasicClientInfo": { "type": "object", "properties": { - "code": { + "description": { "type": "string" }, "id": { @@ -11579,16 +11115,16 @@ }, "name": { "type": "string" + }, + "registrationNumber": { + "type": "string" } } }, - "view.Organization": { + "github_com_dwarvesf_fortress-api_pkg_view.BasicCompanyInfo": { "type": "object", "properties": { - "avatar": { - "type": "string" - }, - "code": { + "description": { "type": "string" }, "id": { @@ -11596,224 +11132,199 @@ }, "name": { "type": "string" + }, + "registrationNumber": { + "type": "string" } } }, - "view.OrganizationsResponse": { + "github_com_dwarvesf_fortress-api_pkg_view.BasicCountryInfo": { "type": "object", "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/definitions/model.Organization" - } + "code": { + "type": "string" + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" } } }, - "view.PeerReviewer": { + "github_com_dwarvesf_fortress-api_pkg_view.BasicMember": { "type": "object", "properties": { - "eventReviewerID": { + "avatar": { "type": "string" }, - "isForcedDone": { - "type": "boolean" + "displayName": { + "type": "string" }, - "relationship": { + "employeeID": { "type": "string" }, - "reviewer": { - "$ref": "#/definitions/view.BasicEmployeeInfo" + "fullName": { + "type": "string" }, - "status": { + "username": { "type": "string" } } }, - "view.Position": { + "github_com_dwarvesf_fortress-api_pkg_view.BasicProjectHeadInfo": { "type": "object", "properties": { - "code": { + "avatar": { "type": "string" }, - "id": { + "commissionRate": { + "type": "number" + }, + "displayName": { "type": "string" }, - "name": { + "employeeID": { + "type": "string" + }, + "fullName": { + "type": "string" + }, + "position": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_model.HeadPosition" + }, + "username": { "type": "string" } } }, - "view.PositionResponse": { + "github_com_dwarvesf_fortress-api_pkg_view.BraineryMetric": { "type": "object", "properties": { - "data": { + "contributors": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.Post" + } + }, + "latestPosts": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.Post" + } + }, + "newContributors": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.Post" + } + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "topContributors": { "type": "array", "items": { - "$ref": "#/definitions/model.Position" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.TopContributor" } } } }, - "view.Post": { + "github_com_dwarvesf_fortress-api_pkg_view.ContentData": { "type": "object", "properties": { - "discordID": { - "type": "string" - }, - "publishedAt": { - "type": "string" - }, - "reward": { - "type": "number" - }, - "title": { - "type": "string" - }, "url": { "type": "string" } } }, - "view.ProfileData": { + "github_com_dwarvesf_fortress-api_pkg_view.CreateMemberData": { "type": "object", "properties": { - "address": { - "type": "string" - }, "avatar": { "type": "string" }, - "birthday": { - "type": "string" - }, - "city": { - "type": "string" - }, - "country": { - "type": "string" - }, - "discordID": { + "deploymentType": { "type": "string" }, - "discordName": { - "type": "string" + "discount": { + "type": "number" }, "displayName": { "type": "string" }, - "fullName": { - "type": "string" - }, - "gender": { - "type": "string" - }, - "githubID": { - "type": "string" - }, - "id": { - "type": "string" - }, - "linkedInName": { - "type": "string" - }, - "notionEmail": { - "type": "string" - }, - "notionID": { + "employeeID": { "type": "string" }, - "notionName": { + "fullName": { "type": "string" }, - "personalEmail": { - "type": "string" + "isLead": { + "type": "boolean" }, - "phoneNumber": { - "type": "string" + "leadCommissionRate": { + "type": "number" }, - "placeOfResidence": { + "note": { "type": "string" }, - "roles": { + "positions": { "type": "array", "items": { - "$ref": "#/definitions/view.Role" + "$ref": "#/definitions/Position" } }, - "teamEmail": { + "projectMemberID": { "type": "string" }, - "username": { + "projectSlotID": { "type": "string" }, - "wiseAccountNumber": { - "type": "string" + "rate": { + "type": "number" }, - "wiseCurrency": { - "type": "string" + "seniority": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_model.Seniority" }, - "wiseRecipientEmail": { + "status": { "type": "string" }, - "wiseRecipientID": { - "type": "string" + "upsellCommissionRate": { + "type": "number" }, - "wiseRecipientName": { - "type": "string" - } - } - }, - "view.ProfileDataResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/definitions/view.ProfileData" - } - } - }, - "view.ProjectContentData": { - "type": "object", - "properties": { - "url": { + "upsellPerson": { + "$ref": "#/definitions/BasicEmployeeInfo" + }, + "username": { "type": "string" } } }, - "view.ProjectContentDataResponse": { + "github_com_dwarvesf_fortress-api_pkg_view.CreateMemberDataResponse": { "type": "object", "properties": { "data": { - "$ref": "#/definitions/view.ProjectContentData" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.CreateMemberData" } } }, - "view.ProjectData": { + "github_com_dwarvesf_fortress-api_pkg_view.CreateProjectData": { "type": "object", "properties": { "accountManagers": { "type": "array", "items": { - "$ref": "#/definitions/view.ProjectHead" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ProjectHead" } }, - "accountRating": { - "type": "integer" - }, - "allowsSendingSurvey": { - "type": "boolean" - }, - "auditNotionID": { - "type": "string" - }, - "avatar": { - "type": "string" - }, "bankAccount": { - "$ref": "#/definitions/view.BasicBankAccountInfo" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.BasicBankAccountInfo" }, "client": { - "$ref": "#/definitions/view.BasicClientInfo" + "$ref": "#/definitions/Client" }, "clientEmail": { "type": "array", @@ -11824,62 +11335,38 @@ "code": { "type": "string" }, - "companyInfo": { - "$ref": "#/definitions/view.BasicCompanyInfo" - }, "country": { - "$ref": "#/definitions/view.BasicCountryInfo" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.BasicCountryInfo" }, "createdAt": { "type": "string" }, - "currency": { - "$ref": "#/definitions/view.Currency" - }, "deletedAt": { "$ref": "#/definitions/gorm.DeletedAt" }, "deliveryManagers": { "type": "array", "items": { - "$ref": "#/definitions/view.ProjectHead" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ProjectHead" } }, - "deliveryRating": { - "type": "integer" - }, - "endDate": { - "type": "string" - }, "function": { "type": "string" }, "id": { "type": "string" }, - "importantLevel": { - "type": "string" - }, - "industry": { - "type": "string" - }, - "leadRating": { - "type": "integer" - }, "members": { "type": "array", "items": { - "$ref": "#/definitions/view.ProjectMember" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.CreateMemberData" } }, - "monthlyChargeRate": { - "type": "number" - }, "name": { "type": "string" }, "organization": { - "$ref": "#/definitions/view.Organization" + "$ref": "#/definitions/Organization" }, "projectEmail": { "type": "string" @@ -11887,13 +11374,7 @@ "salePersons": { "type": "array", "items": { - "$ref": "#/definitions/view.ProjectHead" - } - }, - "stacks": { - "type": "array", - "items": { - "$ref": "#/definitions/view.Stack" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ProjectHead" } }, "startDate": { @@ -11902,12 +11383,6 @@ "status": { "type": "string" }, - "technicalLeads": { - "type": "array", - "items": { - "$ref": "#/definitions/view.ProjectHead" - } - }, "type": { "type": "string" }, @@ -11916,437 +11391,348 @@ } } }, - "view.ProjectDataResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/definitions/view.ProjectData" - } - } - }, - "view.ProjectHead": { - "type": "object", - "properties": { - "avatar": { - "type": "string" - }, - "commissionRate": { - "type": "number" - }, - "displayName": { - "type": "string" - }, - "employeeID": { - "type": "string" - }, - "finalCommissionRate": { - "type": "number" - }, - "fullName": { - "type": "string" - }, - "username": { - "type": "string" - } - } - }, - "view.ProjectInvoiceTemplate": { - "type": "object", - "properties": { - "bankAccount": { - "$ref": "#/definitions/view.BankAccount" - }, - "client": { - "$ref": "#/definitions/view.ClientInfo" - }, - "companyInfo": { - "$ref": "#/definitions/view.CompanyInfo" - }, - "id": { - "type": "string" - }, - "invoiceNumber": { - "type": "string" - }, - "lastInvoice": { - "$ref": "#/definitions/view.Invoice" - }, - "name": { - "type": "string" - } - } - }, - "view.ProjectListDataResponse": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/definitions/view.ProjectData" - } - } - } - }, - "view.ProjectMember": { - "type": "object", - "properties": { - "avatar": { - "type": "string" - }, - "currency": { - "$ref": "#/definitions/view.Currency" - }, - "deploymentType": { - "type": "string" - }, - "discount": { - "type": "number" - }, - "displayName": { - "type": "string" - }, - "employeeID": { - "type": "string" - }, - "endDate": { - "type": "string" - }, - "fullName": { - "type": "string" - }, - "isLead": { - "type": "boolean" - }, - "leadCommissionRate": { + "github_com_dwarvesf_fortress-api_pkg_view.Domain": { + "type": "object", + "properties": { + "average": { "type": "number" }, - "note": { + "count": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_model.LikertScaleCount" + }, + "name": { "type": "string" + } + } + }, + "github_com_dwarvesf_fortress-api_pkg_view.FeedBackReviewDetail": { + "type": "object", + "properties": { + "employee": { + "$ref": "#/definitions/BasicEmployeeInfo" }, - "positions": { + "project": { + "$ref": "#/definitions/BasicProjectInfo" + }, + "questions": { "type": "array", "items": { - "$ref": "#/definitions/view.Position" + "$ref": "#/definitions/QuestionAnswer" } }, - "projectMemberID": { - "type": "string" - }, - "projectSlotID": { + "relationship": { "type": "string" }, - "rate": { - "type": "number" - }, - "seniority": { - "$ref": "#/definitions/model.Seniority" - }, - "startDate": { - "type": "string" + "reviewer": { + "$ref": "#/definitions/BasicEmployeeInfo" }, - "status": { + "topicName": { "type": "string" + } + } + }, + "github_com_dwarvesf_fortress-api_pkg_view.FeedbackCount": { + "type": "object", + "properties": { + "done": { + "type": "integer" }, - "upsellCommissionRate": { - "type": "number" - }, - "upsellPerson": { - "$ref": "#/definitions/view.BasicEmployeeInfo" + "sent": { + "type": "integer" }, - "username": { - "type": "string" + "total": { + "type": "integer" } } }, - "view.ProjectMemberListResponse": { + "github_com_dwarvesf_fortress-api_pkg_view.FeedbackReviewDetailResponse": { "type": "object", "properties": { "data": { - "type": "array", - "items": { - "$ref": "#/definitions/view.ProjectMember" - } + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.FeedBackReviewDetail" } } }, - "view.ProjectSizeResponse": { + "github_com_dwarvesf_fortress-api_pkg_view.ListSurveyDetailResponse": { "type": "object", "properties": { "data": { - "type": "array", - "items": { - "$ref": "#/definitions/model.ProjectSize" - } + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.SurveyDetail" } } }, - "view.PublicClient": { + "github_com_dwarvesf_fortress-api_pkg_view.ListSurveyResponse": { "type": "object", "properties": { - "address": { - "$ref": "#/definitions/view.Address" - }, - "avatar": { - "type": "string" - }, - "companySize": { - "type": "string" - }, - "id": { - "type": "string" - }, - "industry": { - "type": "string" - }, - "name": { - "type": "string" - }, - "solutionType": { - "type": "string" - }, - "stacks": { + "data": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.Survey" } } } }, - "view.PublicClientListResponse": { + "github_com_dwarvesf_fortress-api_pkg_view.ListWorkUnitResponse": { "type": "object", "properties": { "data": { "type": "array", "items": { - "$ref": "#/definitions/view.PublicClient" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.WorkUnit" } } } }, - "view.Question": { + "github_com_dwarvesf_fortress-api_pkg_view.PeerReviewer": { "type": "object", "properties": { - "category": { - "type": "string" - }, - "content": { + "eventReviewerID": { "type": "string" }, - "id": { - "type": "string" + "isForcedDone": { + "type": "boolean" }, - "order": { - "type": "integer" + "relationship": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_model.Relationship" }, - "subcategory": { - "type": "string" + "reviewer": { + "$ref": "#/definitions/BasicEmployeeInfo" }, - "type": { - "type": "string" + "status": { + "$ref": "#/definitions/EventReviewerStatus" } } }, - "view.QuestionAnswer": { + "github_com_dwarvesf_fortress-api_pkg_view.Post": { "type": "object", "properties": { - "answer": { - "type": "string" - }, - "content": { + "discordID": { "type": "string" }, - "domain": { + "publishedAt": { "type": "string" }, - "eventQuestionID": { - "type": "string" + "reward": { + "type": "number" }, - "note": { + "title": { "type": "string" }, - "order": { - "type": "integer" - }, - "type": { + "url": { "type": "string" } } }, - "view.ResourceAvailability": { + "github_com_dwarvesf_fortress-api_pkg_view.ProjectContentData": { "type": "object", "properties": { - "employees": { - "type": "array", - "items": { - "$ref": "#/definitions/view.AvailableEmployee" - } - }, - "slots": { - "type": "array", - "items": { - "$ref": "#/definitions/view.AvailableSlot" - } + "url": { + "type": "string" } } }, - "view.ResourceAvailabilityResponse": { + "github_com_dwarvesf_fortress-api_pkg_view.ProjectContentDataResponse": { "type": "object", "properties": { "data": { - "$ref": "#/definitions/view.ResourceAvailability" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ProjectContentData" } } }, - "view.Role": { + "github_com_dwarvesf_fortress-api_pkg_view.ProjectData": { "type": "object", "properties": { - "code": { - "type": "string" + "accountManagers": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ProjectHead" + } }, - "id": { + "accountRating": { + "type": "integer" + }, + "allowsSendingSurvey": { + "type": "boolean" + }, + "auditNotionID": { "type": "string" }, - "name": { + "avatar": { "type": "string" - } - } - }, - "view.RolesResponse": { - "type": "object", - "properties": { - "data": { + }, + "bankAccount": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.BasicBankAccountInfo" + }, + "client": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.BasicClientInfo" + }, + "clientEmail": { "type": "array", "items": { - "$ref": "#/definitions/model.Role" + "type": "string" } - } - } - }, - "view.Seniority": { - "type": "object", - "properties": { + }, "code": { "type": "string" }, + "companyInfo": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.BasicCompanyInfo" + }, + "country": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.BasicCountryInfo" + }, + "createdAt": { + "type": "string" + }, + "currency": { + "$ref": "#/definitions/Currency" + }, + "deletedAt": { + "$ref": "#/definitions/gorm.DeletedAt" + }, + "deliveryManagers": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ProjectHead" + } + }, + "deliveryRating": { + "type": "integer" + }, + "endDate": { + "type": "string" + }, + "function": { + "type": "string" + }, "id": { "type": "string" }, + "importantLevel": { + "type": "string" + }, + "industry": { + "type": "string" + }, + "leadRating": { + "type": "integer" + }, + "members": { + "type": "array", + "items": { + "$ref": "#/definitions/ProjectMember" + } + }, + "monthlyChargeRate": { + "type": "number" + }, "name": { "type": "string" - } - } - }, - "view.SeniorityResponse": { - "type": "object", - "properties": { - "data": { + }, + "organization": { + "$ref": "#/definitions/Organization" + }, + "projectEmail": { + "type": "string" + }, + "salePersons": { "type": "array", "items": { - "$ref": "#/definitions/model.Seniority" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ProjectHead" } - } - } - }, - "view.Stack": { - "type": "object", - "properties": { - "avatar": { + }, + "stacks": { + "type": "array", + "items": { + "$ref": "#/definitions/Stack" + } + }, + "startDate": { "type": "string" }, - "code": { + "status": { "type": "string" }, - "id": { + "technicalLeads": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ProjectHead" + } + }, + "type": { "type": "string" }, - "name": { + "updatedAt": { "type": "string" } } }, - "view.StackResponse": { + "github_com_dwarvesf_fortress-api_pkg_view.ProjectDataResponse": { "type": "object", "properties": { "data": { - "type": "array", - "items": { - "$ref": "#/definitions/model.Stack" - } + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ProjectData" } } }, - "view.SubmitFeedback": { + "github_com_dwarvesf_fortress-api_pkg_view.ProjectHead": { "type": "object", "properties": { - "answers": { - "type": "array", - "items": { - "$ref": "#/definitions/view.QuestionAnswer" - } - }, - "employeeID": { + "avatar": { "type": "string" }, - "eventID": { - "type": "string" + "commissionRate": { + "type": "number" }, - "reviewer": { - "$ref": "#/definitions/view.BasicEmployeeInfo" + "displayName": { + "type": "string" }, - "status": { + "employeeID": { "type": "string" }, - "title": { + "finalCommissionRate": { + "type": "number" + }, + "fullName": { "type": "string" }, - "topicID": { + "username": { "type": "string" } } }, - "view.SubmitFeedbackResponse": { + "github_com_dwarvesf_fortress-api_pkg_view.ProjectListDataResponse": { "type": "object", "properties": { "data": { - "$ref": "#/definitions/view.SubmitFeedback" - } - } - }, - "view.SummaryWorkUnitDistributionData": { - "type": "object", - "properties": { - "development": { - "type": "number" - }, - "learning": { - "type": "number" - }, - "management": { - "type": "number" - }, - "training": { - "type": "number" + "type": "array", + "items": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ProjectData" + } } } }, - "view.SummaryWorkUnitDistributionResponse": { + "github_com_dwarvesf_fortress-api_pkg_view.ProjectMemberListResponse": { "type": "object", "properties": { "data": { - "$ref": "#/definitions/view.SummaryWorkUnitDistributionData" + "type": "array", + "items": { + "$ref": "#/definitions/ProjectMember" + } } } }, - "view.Survey": { + "github_com_dwarvesf_fortress-api_pkg_view.Survey": { "type": "object", "properties": { "count": { - "$ref": "#/definitions/view.FeedbackCount" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.FeedbackCount" }, "domains": { "type": "array", "items": { - "$ref": "#/definitions/view.Domain" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.Domain" } }, "endDate": { @@ -12372,11 +11758,11 @@ } } }, - "view.SurveyDetail": { + "github_com_dwarvesf_fortress-api_pkg_view.SurveyDetail": { "type": "object", "properties": { "author": { - "$ref": "#/definitions/view.BasicEmployeeInfo" + "$ref": "#/definitions/BasicEmployeeInfo" }, "endDate": { "type": "string" @@ -12399,7 +11785,7 @@ "topics": { "type": "array", "items": { - "$ref": "#/definitions/view.Topic" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.Topic" } }, "type": { @@ -12407,16 +11793,16 @@ } } }, - "view.SurveyTopicDetail": { + "github_com_dwarvesf_fortress-api_pkg_view.SurveyTopicDetail": { "type": "object", "properties": { "employee": { - "$ref": "#/definitions/view.BasicEmployeeInfo" + "$ref": "#/definitions/BasicEmployeeInfo" }, "participants": { "type": "array", "items": { - "$ref": "#/definitions/view.PeerReviewer" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.PeerReviewer" } }, "title": { @@ -12427,15 +11813,15 @@ } } }, - "view.SurveyTopicDetailResponse": { + "github_com_dwarvesf_fortress-api_pkg_view.SurveyTopicDetailResponse": { "type": "object", "properties": { "data": { - "$ref": "#/definitions/view.SurveyTopicDetail" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.SurveyTopicDetail" } } }, - "view.TopContributor": { + "github_com_dwarvesf_fortress-api_pkg_view.TopContributor": { "type": "object", "properties": { "count": { @@ -12449,23 +11835,23 @@ } } }, - "view.Topic": { + "github_com_dwarvesf_fortress-api_pkg_view.Topic": { "type": "object", "properties": { "comments": { "type": "integer" }, "count": { - "$ref": "#/definitions/view.FeedbackCount" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.FeedbackCount" }, "domains": { "type": "array", "items": { - "$ref": "#/definitions/view.Domain" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.Domain" } }, "employee": { - "$ref": "#/definitions/view.BasicEmployeeInfo" + "$ref": "#/definitions/BasicEmployeeInfo" }, "eventID": { "type": "string" @@ -12479,279 +11865,30 @@ "participants": { "type": "array", "items": { - "$ref": "#/definitions/view.BasicEmployeeInfo" - } - }, - "project": { - "$ref": "#/definitions/view.BasicProjectInfo" - }, - "reviewID": { - "type": "string" - }, - "status": { - "type": "string" - }, - "subtype": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - } - } - }, - "view.Trend": { - "type": "object", - "properties": { - "deadline": { - "type": "number" - }, - "learning": { - "type": "number" - }, - "workload": { - "type": "number" - } - } - }, - "view.UnreadFeedbackCountData": { - "type": "object", - "properties": { - "count": { - "type": "integer" - }, - "reviewerID": { - "type": "string" - } - } - }, - "view.UnreadFeedbackCountResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/definitions/view.UnreadFeedbackCountData" - } - } - }, - "view.UpdateBaseSalaryResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/definitions/view.BaseSalary" - } - } - }, - "view.UpdateEmployeeStatusResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/definitions/view.EmployeeData" - } - } - }, - "view.UpdateGeneralEmployeeResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/definitions/view.UpdateGeneralInfoEmployeeData" - } - } - }, - "view.UpdateGeneralInfoEmployeeData": { - "type": "object", - "properties": { - "createdAt": { - "type": "string" - }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "discordID": { - "type": "string" - }, - "discordName": { - "type": "string" - }, - "displayName": { - "type": "string" - }, - "fullName": { - "description": "basic info", - "type": "string" - }, - "githubID": { - "type": "string" - }, - "id": { - "type": "string" - }, - "lineManager": { - "$ref": "#/definitions/view.BasicEmployeeInfo" - }, - "linkedInName": { - "type": "string" - }, - "notionEmail": { - "type": "string" - }, - "notionID": { - "type": "string" - }, - "notionName": { - "type": "string" - }, - "organizations": { - "type": "array", - "items": { - "$ref": "#/definitions/view.Organization" + "$ref": "#/definitions/BasicEmployeeInfo" } }, - "phoneNumber": { - "type": "string" - }, - "referredBy": { - "$ref": "#/definitions/view.BasicEmployeeInfo" - }, - "teamEmail": { - "type": "string" - }, - "updatedAt": { - "type": "string" - } - } - }, - "view.UpdatePersonalEmployeeData": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "birthday": { - "type": "string" - }, - "city": { - "type": "string" - }, - "country": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "gender": { - "type": "string" - }, - "id": { - "type": "string" - }, - "personalEmail": { - "type": "string" - }, - "placeOfResidence": { - "type": "string" - }, - "updatedAt": { - "type": "string" - } - } - }, - "view.UpdatePersonalEmployeeResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/definitions/view.UpdatePersonalEmployeeData" - } - } - }, - "view.UpdateProfileInfoData": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "city": { - "type": "string" - }, - "country": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "discordID": { - "type": "string" - }, - "discordName": { - "type": "string" - }, - "githubID": { - "type": "string" - }, - "id": { - "type": "string" - }, - "linkedInName": { - "type": "string" - }, - "notionEmail": { - "type": "string" - }, - "notionID": { - "type": "string" - }, - "notionName": { - "type": "string" - }, - "phoneNumber": { - "type": "string" - }, - "placeOfResidence": { - "type": "string" - }, - "teamEmail": { - "description": "basic info", - "type": "string" - }, - "updatedAt": { - "type": "string" - }, - "username": { - "type": "string" + "project": { + "$ref": "#/definitions/BasicProjectInfo" }, - "wiseAccountNumber": { + "reviewID": { "type": "string" }, - "wiseCurrency": { + "status": { "type": "string" }, - "wiseRecipientEmail": { + "subtype": { "type": "string" }, - "wiseRecipientID": { + "title": { "type": "string" }, - "wiseRecipientName": { + "type": { "type": "string" } } }, - "view.UpdateProfileInfoResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/definitions/view.UpdateProfileInfoData" - } - } - }, - "view.UpdateProjectContactInfo": { + "github_com_dwarvesf_fortress-api_pkg_view.UpdateProjectContactInfo": { "type": "object", "properties": { "clientEmail": { @@ -12766,47 +11903,47 @@ "projectHead": { "type": "array", "items": { - "$ref": "#/definitions/view.BasicProjectHeadInfo" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.BasicProjectHeadInfo" } } } }, - "view.UpdateProjectContactInfoResponse": { + "github_com_dwarvesf_fortress-api_pkg_view.UpdateProjectContactInfoResponse": { "type": "object", "properties": { "data": { - "$ref": "#/definitions/view.UpdateProjectContactInfo" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.UpdateProjectContactInfo" } } }, - "view.UpdateProjectGeneralInfo": { + "github_com_dwarvesf_fortress-api_pkg_view.UpdateProjectGeneralInfo": { "type": "object", "properties": { "auditNotionID": { "type": "string" }, "bankAccount": { - "$ref": "#/definitions/view.BasicBankAccountInfo" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.BasicBankAccountInfo" }, "client": { - "$ref": "#/definitions/view.Client" + "$ref": "#/definitions/Client" }, "country": { - "$ref": "#/definitions/view.BasicCountryInfo" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.BasicCountryInfo" }, "function": { - "type": "string" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_model.ProjectFunction" }, "name": { "type": "string" }, "organization": { - "$ref": "#/definitions/view.Organization" + "$ref": "#/definitions/Organization" }, "stacks": { "type": "array", "items": { - "$ref": "#/definitions/model.Stack" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_model.Stack" } }, "startDate": { @@ -12814,69 +11951,23 @@ } } }, - "view.UpdateProjectGeneralInfoResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/definitions/view.UpdateProjectGeneralInfo" - } - } - }, - "view.UpdateProjectStatusResponse": { + "github_com_dwarvesf_fortress-api_pkg_view.UpdateProjectGeneralInfoResponse": { "type": "object", "properties": { "data": { - "$ref": "#/definitions/view.UpdatedProject" - } - } - }, - "view.UpdateSkillEmployeeData": { - "type": "object", - "properties": { - "chapters": { - "type": "array", - "items": { - "$ref": "#/definitions/model.Chapter" - } - }, - "createdAt": { - "type": "string" - }, - "deletedAt": { - "$ref": "#/definitions/gorm.DeletedAt" - }, - "id": { - "type": "string" - }, - "positions": { - "type": "array", - "items": { - "$ref": "#/definitions/model.Position" - } - }, - "seniority": { - "$ref": "#/definitions/model.Seniority" - }, - "stacks": { - "type": "array", - "items": { - "$ref": "#/definitions/model.Stack" - } - }, - "updatedAt": { - "type": "string" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.UpdateProjectGeneralInfo" } } }, - "view.UpdateSkillsEmployeeResponse": { + "github_com_dwarvesf_fortress-api_pkg_view.UpdateProjectStatusResponse": { "type": "object", "properties": { "data": { - "$ref": "#/definitions/view.UpdateSkillEmployeeData" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.UpdatedProject" } } }, - "view.UpdatedProject": { + "github_com_dwarvesf_fortress-api_pkg_view.UpdatedProject": { "type": "object", "properties": { "createdAt": { @@ -12908,119 +11999,7 @@ } } }, - "view.WorkSurvey": { - "type": "object", - "properties": { - "deadline": { - "type": "number" - }, - "endDate": { - "type": "string" - }, - "learning": { - "type": "number" - }, - "trend": { - "$ref": "#/definitions/view.Trend" - }, - "workload": { - "type": "number" - } - } - }, - "view.WorkSurveyResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/definitions/view.WorkSurveysData" - } - } - }, - "view.WorkSurveySummary": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/definitions/view.WorkSurveySummaryEmployee" - } - }, - "dates": { - "type": "array", - "items": { - "type": "string" - } - }, - "type": { - "type": "string" - } - } - }, - "view.WorkSurveySummaryAnswer": { - "type": "object", - "properties": { - "answer": { - "type": "string" - }, - "project": { - "$ref": "#/definitions/view.BasicProjectInfo" - } - } - }, - "view.WorkSurveySummaryEmployee": { - "type": "object", - "properties": { - "listAnswers": { - "type": "array", - "items": { - "$ref": "#/definitions/view.WorkSurveySummaryListAnswer" - } - }, - "reviewer": { - "$ref": "#/definitions/view.BasicEmployeeInfo" - } - } - }, - "view.WorkSurveySummaryListAnswer": { - "type": "object", - "properties": { - "answers": { - "type": "array", - "items": { - "$ref": "#/definitions/view.WorkSurveySummaryAnswer" - } - }, - "date": { - "type": "string" - } - } - }, - "view.WorkSurveySummaryResponse": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/definitions/view.WorkSurveySummary" - } - } - } - }, - "view.WorkSurveysData": { - "type": "object", - "properties": { - "project": { - "$ref": "#/definitions/view.BasicProjectInfo" - }, - "workSurveys": { - "type": "array", - "items": { - "$ref": "#/definitions/view.WorkSurvey" - } - } - } - }, - "view.WorkUnit": { + "github_com_dwarvesf_fortress-api_pkg_view.WorkUnit": { "type": "object", "properties": { "code": { @@ -13032,7 +12011,7 @@ "members": { "type": "array", "items": { - "$ref": "#/definitions/view.BasicMember" + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.BasicMember" } }, "name": { @@ -13044,7 +12023,7 @@ "stacks": { "type": "array", "items": { - "$ref": "#/definitions/view.Stack" + "$ref": "#/definitions/Stack" } }, "status": { @@ -13058,147 +12037,55 @@ } } }, - "view.WorkUnitDistribution": { - "type": "object", - "properties": { - "development": { - "$ref": "#/definitions/view.WorkUnitDistributionDevelopment" - }, - "employee": { - "$ref": "#/definitions/view.BasicEmployeeInfo" - }, - "learning": { - "$ref": "#/definitions/view.WorkUnitDistributionLearning" - }, - "management": { - "$ref": "#/definitions/view.WorkUnitDistributionManagement" - }, - "training": { - "$ref": "#/definitions/view.WorkUnitDistributionTraining" - } - } - }, - "view.WorkUnitDistributionData": { - "type": "object", - "properties": { - "workUnitDistributions": { - "type": "array", - "items": { - "$ref": "#/definitions/view.WorkUnitDistribution" - } - } - } - }, - "view.WorkUnitDistributionDevelopment": { + "github_com_dwarvesf_fortress-api_pkg_view.WorkUnitResponse": { "type": "object", "properties": { - "total": { - "type": "integer" - }, - "workUnits": { - "type": "array", - "items": { - "$ref": "#/definitions/view.WorkUnitDistributionWU" - } + "data": { + "$ref": "#/definitions/github_com_dwarvesf_fortress-api_pkg_view.WorkUnit" } } }, - "view.WorkUnitDistributionLearning": { + "gorm.DeletedAt": { "type": "object", "properties": { - "total": { - "type": "integer" + "time": { + "type": "string" }, - "workUnits": { - "type": "array", - "items": { - "$ref": "#/definitions/view.WorkUnitDistributionWU" - } + "valid": { + "description": "Valid is true if Time is not NULL", + "type": "boolean" } } }, - "view.WorkUnitDistributionManagement": { + "pkg_view.Question": { "type": "object", "properties": { - "projectHeads": { - "type": "array", - "items": { - "$ref": "#/definitions/view.WorkUnitDistributionWUProjectHead" - } + "category": { + "type": "string" }, - "total": { - "type": "integer" + "content": { + "type": "string" }, - "workUnits": { - "type": "array", - "items": { - "$ref": "#/definitions/view.WorkUnitDistributionWU" - } - } - } - }, - "view.WorkUnitDistributionTraining": { - "type": "object", - "properties": { - "mentees": { - "type": "array", - "items": { - "$ref": "#/definitions/view.BasicEmployeeInfo" - } + "id": { + "type": "string" }, - "total": { + "order": { "type": "integer" }, - "workUnits": { - "type": "array", - "items": { - "$ref": "#/definitions/view.WorkUnitDistributionWU" - } - } - } - }, - "view.WorkUnitDistributionWU": { - "type": "object", - "properties": { - "project": { - "$ref": "#/definitions/view.BasicProjectInfo" - }, - "workUnitName": { - "type": "string" - } - } - }, - "view.WorkUnitDistributionWUProjectHead": { - "type": "object", - "properties": { - "position": { + "subcategory": { "type": "string" }, - "project": { - "$ref": "#/definitions/view.BasicProjectInfo" - } - } - }, - "view.WorkUnitDistributionsResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/definitions/view.WorkUnitDistributionData" - } - } - }, - "view.WorkUnitResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/definitions/view.WorkUnit" + "type": { + "type": "string" } } } }, "securityDefinitions": { - "BasicAuth": { - "type": "basic" + "BearerAuth": { + "type": "apiKey", + "name": "Authorization", + "in": "header" } } } \ No newline at end of file diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 24ce1a5aa..e72d8a744 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -1,21 +1,214 @@ basePath: /api/v1 definitions: - gorm.DeletedAt: + APIKeyData: properties: - time: + key: type: string - valid: - description: Valid is true if Time is not NULL - type: boolean type: object - model.AccountingItem: + APIKeyResponse: properties: - amount: + data: + $ref: '#/definitions/APIKeyData' + type: object + ActionItemReportResponse: + properties: + data: + items: + $ref: '#/definitions/AuditActionItemReport' + type: array + type: object + ActionItemSquash: + properties: + snapDate: + type: string + trend: + type: number + value: + type: integer + type: object + ActionItemSquashReport: + properties: + all: + items: + $ref: '#/definitions/ActionItemSquash' + type: array + high: + items: + $ref: '#/definitions/ActionItemSquash' + type: array + low: + items: + $ref: '#/definitions/ActionItemSquash' + type: array + medium: + items: + $ref: '#/definitions/ActionItemSquash' + type: array + type: object + ActionItemSquashReportResponse: + properties: + data: + $ref: '#/definitions/ActionItemSquashReport' + type: object + ActionItemTrend: + properties: + high: + type: number + low: + type: number + medium: + type: number + type: object + Address: + properties: + address: + type: string + city: + type: string + country: + type: string + lat: + type: string + long: + type: string + type: object + Audit: + properties: + avg: + type: number + quarter: + type: string + trend: type: number + type: object + AuditActionItemReport: + properties: + high: + type: integer + low: + type: integer + medium: + type: integer + quarter: + type: string + trend: + $ref: '#/definitions/ActionItemTrend' + type: object + AuditData: + properties: + average: + items: + $ref: '#/definitions/Audit' + type: array + groups: + items: + $ref: '#/definitions/GroupAudit' + type: array + type: object + AuditResponse: + properties: + data: + $ref: '#/definitions/AuditData' + type: object + AuditSummaries: + properties: + summary: + items: + $ref: '#/definitions/AuditSummary' + type: array + type: object + AuditSummariesResponse: + properties: + data: + $ref: '#/definitions/AuditSummaries' + type: object + AuditSummary: + properties: + audit: + $ref: '#/definitions/AuditValue' + avatar: + type: string + code: + type: string + health: + $ref: '#/definitions/AuditValue' + id: + type: string name: type: string + newItem: + $ref: '#/definitions/ItemValue' + resolvedItem: + $ref: '#/definitions/ItemValue' + size: + $ref: '#/definitions/ItemValue' + type: object + AuditValue: + properties: + trend: + type: number + value: + type: number + type: object + AuthData: + properties: + accessToken: + type: string + employee: + $ref: '#/definitions/EmployeeData' + type: object + AuthUserResponse: + properties: + data: + $ref: '#/definitions/LoggedInUserData' + type: object + AvailableEmployee: + properties: + avatar: + type: string + displayName: + type: string + fullName: + type: string + id: + type: string + positions: + items: + $ref: '#/definitions/Position' + type: array + projects: + items: + $ref: '#/definitions/BasicProjectInfo' + type: array + seniority: + $ref: '#/definitions/Seniority' + stacks: + items: + $ref: '#/definitions/Stack' + type: array + username: + type: string type: object - model.BankAccount: + AvailableSlot: + properties: + createdAt: + type: string + id: + type: string + note: + type: string + positions: + items: + $ref: '#/definitions/Position' + type: array + project: + $ref: '#/definitions/BasicProjectInfo' + seniority: + $ref: '#/definitions/Seniority' + type: + type: string + type: object + BankAccount: properties: accountNumber: type: string @@ -23,14 +216,10 @@ definitions: type: string bankName: type: string - createdAt: - type: string currency: - $ref: '#/definitions/model.Currency' + $ref: '#/definitions/Currency' currencyID: type: string - deletedAt: - $ref: '#/definitions/gorm.DeletedAt' id: type: string intermediaryBankAddress: @@ -45,12 +234,10 @@ definitions: type: string swiftCode: type: string - uksortCode: - type: string - updatedAt: + ukSortCode: type: string type: object - model.BaseSalary: + BaseSalary: properties: batch: type: integer @@ -60,18 +247,12 @@ definitions: type: integer contract_amount: type: integer - createdAt: - type: string currency: - $ref: '#/definitions/model.Currency' + $ref: '#/definitions/Currency' currency_id: type: string - deletedAt: - $ref: '#/definitions/gorm.DeletedAt' effective_date: type: string - employee: - $ref: '#/definitions/model.Employee' employee_id: type: string id: @@ -82,27 +263,77 @@ definitions: type: integer type: type: string - updatedAt: + type: object + BasicEmployeeInfo: + properties: + avatar: + type: string + displayName: + type: string + fullName: + type: string + id: + type: string + username: + type: string + type: object + BasicEventQuestionRequest: + properties: + answer: + type: string + eventQuestionID: + type: string + note: type: string + required: + - eventQuestionID type: object - model.Chapter: + BasicProjectInfo: properties: + avatar: + type: string code: type: string - createdAt: + id: + type: string + name: + type: string + status: + type: string + type: + type: string + type: object + BraineryMetricResponse: + properties: + data: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.BraineryMetric' + type: object + Chapter: + properties: + code: type: string - deletedAt: - $ref: '#/definitions/gorm.DeletedAt' id: type: string - lead_id: + leadID: type: string name: type: string - updatedAt: - type: string type: object - model.City: + ChapterResponse: + properties: + data: + items: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_model.Chapter' + type: array + type: object + CitiesResponse: + properties: + data: + items: + type: string + type: array + type: object + City: properties: lat: type: string @@ -111,7 +342,7 @@ definitions: name: type: string type: object - model.Client: + Client: properties: address: type: string @@ -123,14 +354,12 @@ definitions: type: string contacts: items: - $ref: '#/definitions/model.ClientContact' + $ref: '#/definitions/ClientContact' type: array country: type: string createdAt: type: string - deletedAt: - $ref: '#/definitions/gorm.DeletedAt' description: type: string id: @@ -147,7 +376,7 @@ definitions: type: string projects: items: - $ref: '#/definitions/model.Project' + $ref: '#/definitions/Project' type: array registrationNumber: type: string @@ -158,17 +387,11 @@ definitions: website: type: string type: object - model.ClientContact: + ClientContact: properties: - clientID: - type: string - createdAt: - type: string - deletedAt: - $ref: '#/definitions/gorm.DeletedAt' emails: items: - type: integer + type: string type: array id: type: string @@ -178,79 +401,195 @@ definitions: type: string role: type: string - updatedAt: - type: string type: object - model.CommissionExplain: + ClientContactInfo: properties: - amount: - type: integer - bucket_id: - type: integer - formatted_amount: - type: string + emails: + items: + type: string + type: array id: type: string - month: - type: integer + isMainContact: + type: boolean name: type: string - todo_id: - type: integer - year: - type: integer type: object - model.CompanyContactInfo: + ClientInfo: properties: - address: + clientAddress: type: string - phone: + clientCompany: type: string + contacts: + items: + $ref: '#/definitions/ClientContactInfo' + type: array type: object - model.CompanyInfo: + CompanyContactInfo: properties: - createdAt: + address: type: string - deletedAt: - $ref: '#/definitions/gorm.DeletedAt' + phone: + type: string + type: object + CompanyInfo: + properties: description: type: string id: type: string info: - $ref: '#/definitions/pgtype.JSONB' + additionalProperties: + $ref: '#/definitions/CompanyContactInfo' + type: object name: type: string registrationNumber: type: string - updatedAt: - type: string type: object - model.Country: + ContentDataResponse: + properties: + data: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ContentData' + type: object + CountriesResponse: + properties: + data: + items: + $ref: '#/definitions/Country' + type: array + type: object + Country: properties: cities: items: - $ref: '#/definitions/model.City' + $ref: '#/definitions/City' type: array code: type: string - createdAt: - type: string - deletedAt: - $ref: '#/definitions/gorm.DeletedAt' id: type: string name: type: string - updatedAt: + type: object + CreateBraineryLogRequest: + properties: + discordID: + type: string + githubID: + type: string + publishedAt: + type: string + reward: + type: number + tags: + items: + type: string + type: array + title: + type: string + url: type: string + required: + - discordID + - publishedAt + - reward + - tags + - title + - url type: object - model.Currency: + CreateClientRequest: properties: - createdAt: + address: type: string - deletedAt: - $ref: '#/definitions/gorm.DeletedAt' + contacts: + items: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_client_request.CreateClientContactInput' + type: array + country: + type: string + description: + type: string + industry: + type: string + name: + type: string + registrationNumber: + type: string + website: + type: string + type: object + CreateClientResponse: + properties: + data: + $ref: '#/definitions/Client' + type: object + CreateEmployeeRequest: + properties: + displayName: + type: string + fullName: + maxLength: 100 + type: string + joinedDate: + type: string + personalEmail: + type: string + positions: + items: + type: string + type: array + referredBy: + type: string + roles: + items: + type: string + type: array + salary: + type: integer + seniorityID: + type: string + status: + type: string + teamEmail: + type: string + required: + - displayName + - fullName + - joinedDate + - personalEmail + - positions + - roles + - salary + - seniorityID + - status + - teamEmail + type: object + CreatePositionInput: + properties: + code: + type: string + name: + type: string + required: + - code + - name + type: object + CreateStackInput: + properties: + avatar: + type: string + code: + type: string + name: + type: string + required: + - code + - name + type: object + Currency: + properties: id: type: string locale: @@ -261,128 +600,89 @@ definitions: type: string type: type: string - updatedAt: - type: string type: object - model.DiscordAccount: + EmployeeAddress: properties: - createdAt: + address: type: string - deletedAt: - $ref: '#/definitions/gorm.DeletedAt' - discordID: + city: type: string - id: + country: type: string - updatedAt: + lat: type: string - username: + long: + type: string + type: object + EmployeeContentData: + properties: + url: type: string type: object - model.Employee: + EmployeeContentDataResponse: + properties: + data: + $ref: '#/definitions/EmployeeContentData' + type: object + EmployeeData: properties: address: type: string avatar: type: string - base_salary: - $ref: '#/definitions/model.BaseSalary' - basecampAttachableSGID: + baseSalary: + $ref: '#/definitions/BaseSalary' + birthday: type: string - basecampID: - description: social services - type: integer + chapters: + items: + $ref: '#/definitions/Chapter' + type: array city: type: string country: type: string createdAt: type: string - dateOfBirth: + discordID: type: string - deletedAt: - $ref: '#/definitions/gorm.DeletedAt' - discordAccount: - $ref: '#/definitions/model.DiscordAccount' - discordAccountID: + discordName: type: string displayName: type: string - employee_salary: - $ref: '#/definitions/model.EmployeeSalary' - employeeChapters: - items: - $ref: '#/definitions/model.EmployeeChapter' - type: array - employeeOrganizations: - items: - $ref: '#/definitions/model.EmployeeOrganization' - type: array - employeePositions: - items: - $ref: '#/definitions/model.EmployeePosition' - type: array - employeeRoles: - items: - $ref: '#/definitions/model.EmployeeRole' - type: array - employeeStacks: - items: - $ref: '#/definitions/model.EmployeeStack' - type: array fullName: description: basic info type: string gender: type: string - heads: - items: - $ref: '#/definitions/model.ProjectHead' - type: array + githubID: + type: string horoscope: type: string id: type: string - identityCardPhotoBack: - type: string - identityCardPhotoFront: - type: string joinedDate: type: string - lat: - type: string leftDate: type: string lineManager: - $ref: '#/definitions/model.Employee' - lineManagerID: - type: string - localBankBranch: - type: string - localBankCurrency: - type: string - localBankNumber: - type: string - localBankRecipientName: - type: string - localBranchName: - type: string - long: + $ref: '#/definitions/BasicEmployeeInfo' + linkedInName: type: string mbti: type: string mentees: items: - $ref: '#/definitions/model.Employee' + $ref: '#/definitions/MenteeInfo' type: array + notionID: + type: string + notionName: + type: string organizations: items: - $ref: '#/definitions/model.Organization' + $ref: '#/definitions/Organization' type: array - passportPhotoBack: - type: string - passportPhotoFront: - type: string personalEmail: type: string phoneNumber: @@ -391,28 +691,27 @@ definitions: type: string positions: items: - $ref: '#/definitions/model.Position' + $ref: '#/definitions/Position' type: array - projectMembers: + projects: items: - $ref: '#/definitions/model.ProjectMember' + $ref: '#/definitions/EmployeeProjectData' type: array referredBy: - type: string - referrer: - $ref: '#/definitions/model.Employee' + $ref: '#/definitions/BasicEmployeeInfo' roles: items: - $ref: '#/definitions/model.Role' + $ref: '#/definitions/Role' type: array seniority: - $ref: '#/definitions/model.Seniority' - seniorityID: - type: string - socialAccounts: + $ref: '#/definitions/Seniority' + stacks: items: - $ref: '#/definitions/model.SocialAccount' + $ref: '#/definitions/Stack' type: array + status: + description: working info + type: string teamEmail: type: string updatedAt: @@ -424,2401 +723,1438 @@ definitions: wiseCurrency: type: string wiseRecipientEmail: - description: payroll info type: string wiseRecipientID: type: string wiseRecipientName: type: string - workUnitMembers: - items: - $ref: '#/definitions/model.WorkUnitMember' - type: array - workingStatus: - description: working info - type: string type: object - model.EmployeeChapter: + EmployeeDataResponse: properties: - chapter: - $ref: '#/definitions/model.Chapter' - chapterID: - type: string - createdAt: - type: string - deletedAt: - $ref: '#/definitions/gorm.DeletedAt' - employeeID: - type: string - id: - type: string - updatedAt: - type: string + data: + $ref: '#/definitions/EmployeeData' type: object - model.EmployeeOrganization: + EmployeeInvitationData: properties: - createdAt: - type: string - deletedAt: - $ref: '#/definitions/gorm.DeletedAt' + employee: + $ref: '#/definitions/InvitedEmployeeInfo' employeeID: type: string id: type: string - organization: - $ref: '#/definitions/model.Organization' - organizationID: - type: string - updatedAt: + invitedBy: type: string + isBasecampAccountCreated: + type: boolean + isCompleted: + type: boolean + isDiscordRoleAssigned: + type: boolean + isInfoUpdated: + type: boolean + isTeamEmailCreated: + type: boolean type: object - model.EmployeePosition: + EmployeeInvitationResponse: properties: - createdAt: - type: string - deletedAt: - $ref: '#/definitions/gorm.DeletedAt' - employeeID: - type: string - id: - type: string - position: - $ref: '#/definitions/model.Position' - positionID: - type: string - updatedAt: - type: string + data: + $ref: '#/definitions/EmployeeInvitationData' type: object - model.EmployeeRole: + EmployeeListDataResponse: properties: - createdAt: - type: string - deletedAt: - $ref: '#/definitions/gorm.DeletedAt' - employeeID: + data: + items: + $ref: '#/definitions/EmployeeData' + type: array + type: object + EmployeeLocation: + properties: + address: + $ref: '#/definitions/EmployeeAddress' + avatar: type: string - id: + chapters: + items: + $ref: '#/definitions/Chapter' + type: array + discordID: type: string - role: - $ref: '#/definitions/model.Role' - roleID: + displayName: type: string - updatedAt: + fullName: type: string type: object - model.EmployeeSalary: + EmployeeLocationListResponse: properties: - actual_pay_day: - type: integer - bonus_amount: - type: integer - bonus_detail: - items: - type: integer - type: array - commission_amount: - type: integer - commission_detail: - items: - type: integer - type: array - employee_id: - type: string - is_done: - type: boolean - month: - type: integer - plan_pay_day: - type: integer - reimbursement_amount: - type: integer - reimbursement_detail: + data: items: - type: integer + $ref: '#/definitions/EmployeeLocation' type: array - total_amount: - type: integer - year: - type: integer type: object - model.EmployeeStack: + EmployeeProjectData: properties: - createdAt: + avatar: type: string - deletedAt: - $ref: '#/definitions/gorm.DeletedAt' - employeeID: + code: type: string - id: + deploymentType: type: string - stack: - $ref: '#/definitions/model.Stack' - stackID: + endDate: type: string - updatedAt: + id: type: string - type: object - model.LikertScaleCount: - properties: - agree: - type: integer - disagree: - type: integer - mixed: - type: integer - stronglyAgree: - type: integer - stronglyDisagree: - type: integer - type: object - model.NotionTechRadar: - properties: - assign: + name: type: string - categories: + positions: items: - type: string + $ref: '#/definitions/Position' type: array - id: + startDate: type: string - name: + status: type: string - quadrant: + type: object + EngagementDashboard: + properties: + content: type: string - ring: + questionID: type: string - tags: + stats: items: - type: string + $ref: '#/definitions/EngagementDashboardQuestionStat' type: array type: object - model.Organization: + EngagementDashboardDetail: properties: - avatar: - type: string - code: - type: string - createdAt: - type: string - deletedAt: - $ref: '#/definitions/gorm.DeletedAt' - id: + questionID: type: string - name: + stats: + items: + $ref: '#/definitions/EngagementDashboardQuestionDetailStat' + type: array + type: object + EngagementDashboardQuestionDetailStat: + properties: + field: type: string - updatedAt: + point: + type: number + startDate: type: string type: object - model.Payroll: + EngagementDashboardQuestionStat: properties: - base_salary_amount: - type: integer - commission_amount: - type: integer - commission_explain: - items: - type: integer - type: array - commission_explains: - description: CommissionExplains is commission explains in email template - items: - $ref: '#/definitions/model.CommissionExplain' - type: array - contract_amount: - type: integer - conversion_amount: - type: integer - due_date: + point: + type: number + startDate: type: string - employee: - $ref: '#/definitions/model.Employee' - employee_id: + title: type: string - id: + type: object + EngineeringHealth: + properties: + avg: + type: number + quarter: type: string - is_paid: - type: boolean - month: - type: integer - project_bonus: - type: integer - project_bonus_explain: + trend: + type: number + type: object + EngineeringHealthData: + properties: + average: items: - type: integer + $ref: '#/definitions/EngineeringHealth' type: array - project_bonus_explains: - description: ProjectBonusExplains is project bonus explains in email template + groups: items: - $ref: '#/definitions/model.ProjectBonusExplain' + $ref: '#/definitions/GroupEngineeringHealth' type: array - total: - type: integer - total_allowance: - description: TotalAllowance is amount of allowance in email template + type: object + EngineeringHealthResponse: + properties: + data: + $ref: '#/definitions/EngineeringHealthData' + type: object + EngineeringHealthTrend: + properties: + collaboration: type: number - total_explain: - items: - type: integer - type: array - twAmount: - description: TotalAllowance is amount of allowance in email template + delivery: type: number - twFee: + feedback: type: number - twRate: - description: TWRate is rate of allowance in email template + quality: type: number - user_rank_snapshot: - items: - type: integer - type: array - year: - type: integer type: object - model.Position: + ErrorResponse: properties: - code: - type: string - createdAt: - type: string - deletedAt: - $ref: '#/definitions/gorm.DeletedAt' - id: - type: string - name: - type: string - updatedAt: + error: type: string + errors: + items: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ApiError' + type: array type: object - model.Project: + EventReviewerStatus: + enum: + - none + - new + - draft + - done + type: string + x-enum-varnames: + - EventReviewerStatusNone + - EventReviewerStatusNew + - EventReviewerStatusDraft + - EventReviewerStatusDone + Feedback: properties: - accountRating: - type: integer - allowsSendingSurvey: - type: boolean - avatar: + author: + $ref: '#/definitions/BasicEmployeeInfo' + employeeID: type: string - bankAccount: - $ref: '#/definitions/model.BankAccount' - bankAccountID: + eventID: type: string - client: - $ref: '#/definitions/model.Client' - clientEmail: + eventReviewerID: type: string - clientID: + isRead: + type: boolean + lastUpdated: type: string - code: + projectID: type: string - commissionConfigs: - items: - $ref: '#/definitions/model.ProjectCommissionConfig' - type: array - companyInfo: - $ref: '#/definitions/model.CompanyInfo' - companyInfoID: + status: type: string - country: - $ref: '#/definitions/model.Country' - countryID: + subtype: type: string - createdAt: + title: type: string - deletedAt: - $ref: '#/definitions/gorm.DeletedAt' - deliveryRating: - type: integer - endDate: + topicID: type: string - function: + type: type: string - heads: + type: object + FeedbackDetail: + properties: + answers: items: - $ref: '#/definitions/model.ProjectHead' + $ref: '#/definitions/QuestionAnswer' type: array - id: - type: string - importantLevel: - type: string - leadRating: - type: integer - name: - type: string - organization: - $ref: '#/definitions/model.Organization' - organizationID: + employeeID: type: string - projectEmail: + eventID: type: string - projectMembers: - items: - $ref: '#/definitions/model.ProjectMember' - type: array - projectNotion: - $ref: '#/definitions/model.ProjectNotion' - projectStacks: - items: - $ref: '#/definitions/model.ProjectStack' - type: array - slots: - items: - $ref: '#/definitions/model.ProjectSlot' - type: array - startDate: + project: + $ref: '#/definitions/BasicProjectInfo' + relationship: type: string + reviewer: + $ref: '#/definitions/BasicEmployeeInfo' status: type: string - type: + title: type: string - updatedAt: + topicID: type: string type: object - model.ProjectBonusExplain: + FeedbackDetailResponse: properties: - amount: - type: integer - bucket_id: - type: integer - description: - type: string - formatted_amount: - type: string - month: - type: integer - name: - type: string - todo_id: - type: integer - year: - type: integer - type: object - model.ProjectCommissionConfig: - properties: - commissionRate: - type: number - createdAt: - type: string - deletedAt: - $ref: '#/definitions/gorm.DeletedAt' - id: - type: string - position: - type: string - projectID: - type: string - updatedAt: - type: string - type: object - model.ProjectHead: - properties: - commissionRate: - type: number - createdAt: - type: string - deletedAt: - $ref: '#/definitions/gorm.DeletedAt' - employee: - $ref: '#/definitions/model.Employee' - employeeID: - type: string - endDate: - type: string - id: - type: string - position: - type: string - project: - $ref: '#/definitions/model.Project' - projectID: - type: string - startDate: - type: string - updatedAt: - type: string - type: object - model.ProjectMember: - properties: - createdAt: - type: string - deletedAt: - $ref: '#/definitions/gorm.DeletedAt' - deploymentType: - type: string - discount: - type: number - employee: - $ref: '#/definitions/model.Employee' - employeeID: - type: string - endDate: - type: string - head: - $ref: '#/definitions/model.ProjectHead' - id: - type: string - isLead: - type: boolean - note: - type: string - positions: - items: - $ref: '#/definitions/model.Position' - type: array - project: - $ref: '#/definitions/model.Project' - projectID: - type: string - projectMemberPositions: - items: - $ref: '#/definitions/model.ProjectMemberPosition' - type: array - projectSlotID: - type: string - rate: - type: number - seniority: - $ref: '#/definitions/model.Seniority' - seniorityID: - type: string - startDate: - type: string - status: - type: string - updatedAt: - type: string - upsellCommissionRate: - type: number - upsellPerson: - $ref: '#/definitions/model.Employee' - upsellPersonID: - type: string - type: object - model.ProjectMemberPosition: - properties: - createdAt: - type: string - deletedAt: - $ref: '#/definitions/gorm.DeletedAt' - id: - type: string - position: - $ref: '#/definitions/model.Position' - positionID: - type: string - projectMemberID: - type: string - updatedAt: - type: string - type: object - model.ProjectNotion: - properties: - auditNotionID: - type: string - createdAt: - type: string - deletedAt: - $ref: '#/definitions/gorm.DeletedAt' - id: - type: string - project: - $ref: '#/definitions/model.Project' - projectID: - type: string - updatedAt: - type: string - type: object - model.ProjectSize: - properties: - avatar: - type: string - code: - type: string - id: - type: string - name: - type: string - size: - type: integer - type: object - model.ProjectSlot: - properties: - createdAt: - type: string - deletedAt: - $ref: '#/definitions/gorm.DeletedAt' - deploymentType: - type: string - discount: - type: number - id: - type: string - note: - type: string - project: - $ref: '#/definitions/model.Project' - projectID: - type: string - projectMember: - $ref: '#/definitions/model.ProjectMember' - projectSlotPositions: - items: - $ref: '#/definitions/model.ProjectSlotPosition' - type: array - rate: - type: number - seniority: - $ref: '#/definitions/model.Seniority' - seniorityID: - type: string - status: - type: string - updatedAt: - type: string - upsellPerson: - $ref: '#/definitions/model.Employee' - upsellPersonID: - type: string - type: object - model.ProjectSlotPosition: - properties: - createdAt: - type: string - deletedAt: - $ref: '#/definitions/gorm.DeletedAt' - id: - type: string - position: - $ref: '#/definitions/model.Position' - positionID: - type: string - projectSlotID: - type: string - updatedAt: - type: string - type: object - model.ProjectStack: - properties: - createdAt: - type: string - deletedAt: - $ref: '#/definitions/gorm.DeletedAt' - id: - type: string - projectID: - type: string - stack: - $ref: '#/definitions/model.Stack' - stackID: - type: string - updatedAt: - type: string - type: object - model.ResourceUtilization: - properties: - available: - type: integer - date: - type: string - internal: - type: integer - staffed: - type: integer - type: object - model.Role: - properties: - code: - type: string - color: - type: string - createdAt: - type: string - deletedAt: - $ref: '#/definitions/gorm.DeletedAt' - id: - type: string - isShow: - type: boolean - level: - type: integer - name: - type: string - updatedAt: - type: string - type: object - model.Seniority: - properties: - code: - type: string - createdAt: - type: string - deletedAt: - $ref: '#/definitions/gorm.DeletedAt' - id: - type: string - level: - type: integer - name: - type: string - updatedAt: - type: string - type: object - model.SocialAccount: - properties: - accountID: - type: string - createdAt: - type: string - deletedAt: - $ref: '#/definitions/gorm.DeletedAt' - email: - type: string - employeeID: - type: string - id: - type: string - name: - type: string - type: - type: string - updatedAt: - type: string - type: object - model.Stack: - properties: - avatar: - type: string - code: - type: string - createdAt: - type: string - deletedAt: - $ref: '#/definitions/gorm.DeletedAt' - id: - type: string - name: - type: string - updatedAt: - type: string - type: object - model.Valuation: - properties: - accountReceivable: - description: money that company will receive in the future - properties: - items: - items: - $ref: '#/definitions/model.AccountingItem' - type: array - total: - type: number - type: object - assets: - description: valuation info - type: number - currency: - type: string - income: - description: Total paid invoice, investment & bank interest - properties: - detail: - properties: - consultantService: - type: number - interest: - type: number - investment: - type: number - type: object - total: - type: number - type: object - liabilities: - description: money that company will pay in the future - properties: - items: - items: - $ref: '#/definitions/model.AccountingItem' - type: array - total: - type: number - type: object - outcome: - description: Sum of Expenses and payroll - properties: - detail: - properties: - expense: - type: number - investment: - type: number - payroll: - type: number - type: object - total: - type: number - type: object - rate: - type: number - year: - description: basic info - type: string - type: object - model.WorkUnit: - properties: - createdAt: - type: string - deletedAt: - $ref: '#/definitions/gorm.DeletedAt' - id: - type: string - name: - type: string - project: - $ref: '#/definitions/model.Project' - projectID: - type: string - sourceMetadata: - items: - type: integer - type: array - sourceURL: - type: string - status: - type: string - type: - type: string - updatedAt: - type: string - workUnitMembers: - items: - $ref: '#/definitions/model.WorkUnitMember' - type: array - workUnitStacks: - items: - $ref: '#/definitions/model.WorkUnitStack' - type: array - type: object - model.WorkUnitMember: - properties: - createdAt: - type: string - deletedAt: - $ref: '#/definitions/gorm.DeletedAt' - employee: - $ref: '#/definitions/model.Employee' - employeeID: - type: string - endDate: - type: string - id: - type: string - projectID: - type: string - startDate: - type: string - status: - type: string - updatedAt: - type: string - workUnit: - $ref: '#/definitions/model.WorkUnit' - workUnitID: - type: string - type: object - model.WorkUnitStack: - properties: - createdAt: - type: string - deletedAt: - $ref: '#/definitions/gorm.DeletedAt' - id: - type: string - stack: - $ref: '#/definitions/model.Stack' - stackID: - type: string - updatedAt: - type: string - workUnitID: - type: string - type: object - pgtype.JSONB: - properties: - bytes: - items: - type: integer - type: array - status: - type: integer - type: object - request.AssignMemberInput: - properties: - deploymentType: - type: string - discount: - type: number - employeeID: - type: string - endDate: - type: string - isLead: - type: boolean - leadCommissionRate: - type: number - note: - type: string - positions: - items: - type: string - type: array - rate: - type: number - seniorityID: - type: string - startDate: - type: string - status: - type: string - upsellCommissionRate: - type: number - upsellPersonID: - type: string - required: - - deploymentType - - positions - - rate - - seniorityID - - status - type: object - request.BasicEventQuestionInput: - properties: - answer: - type: string - eventQuestionID: - type: string - note: - type: string - required: - - eventQuestionID - type: object - request.CreateClientContactInput: - properties: - emails: - items: - type: string - type: array - isMainContact: - type: boolean - name: - type: string - role: - type: string - type: object - request.CreateClientInput: - properties: - address: - type: string - contacts: - items: - $ref: '#/definitions/request.CreateClientContactInput' - type: array - country: - type: string - description: - type: string - industry: - type: string - name: - type: string - registrationNumber: - type: string - website: - type: string - type: object - request.CreateEmployeeInput: - properties: - displayName: - type: string - fullName: - maxLength: 100 - type: string - joinedDate: - type: string - personalEmail: - type: string - positions: - items: - type: string - type: array - referredBy: - type: string - roles: - items: - type: string - type: array - salary: - type: integer - seniorityID: - type: string - status: - type: string - teamEmail: - type: string - required: - - displayName - - fullName - - joinedDate - - personalEmail - - positions - - roles - - salary - - seniorityID - - status - - teamEmail - type: object - request.CreatePositionInput: - properties: - code: - type: string - name: - type: string - required: - - code - - name - type: object - request.CreateProjectInput: - properties: - accountManagers: - items: - $ref: '#/definitions/request.ProjectHeadInput' - type: array - auditNotionID: - type: string - bankAccountID: - type: string - clientEmail: - items: - type: string - type: array - clientID: - type: string - code: - type: string - countryID: - type: string - deliveryManagers: - items: - $ref: '#/definitions/request.ProjectHeadInput' - type: array - function: - type: string - members: - items: - $ref: '#/definitions/request.AssignMemberInput' - type: array - name: - type: string - organizationID: - type: string - projectEmail: - type: string - salePersons: - items: - $ref: '#/definitions/request.ProjectHeadInput' - type: array - startDate: - type: string - status: - type: string - type: - type: string - required: - - countryID - - function - - name - - status - type: object - request.CreateStackInput: - properties: - avatar: - type: string - code: - type: string - name: - type: string - required: - - code - - name - type: object - request.CreateSurveyFeedbackInput: - properties: - fromDate: - type: string - quarter: - type: string - toDate: - type: string - type: - type: string - year: - type: integer - required: - - type - type: object - request.CreateWorkUnitBody: - properties: - members: - items: - type: string - type: array - name: - type: string - stacks: - items: - type: string - type: array - status: - type: string - type: - type: string - url: - type: string - required: - - name - - stacks - - status - - type - type: object - request.DeleteTopicReviewersBody: - properties: - reviewerIDs: - items: - type: string - type: array - type: object - request.GetListEmployeeInput: - properties: - chapters: - items: - type: string - type: array - keyword: - type: string - lineManagers: - items: - type: string - type: array - organizations: - items: - type: string - type: array - page: - description: page index - type: integer - positions: - items: - type: string - type: array - preload: - type: boolean - projects: - items: - type: string - type: array - seniorities: - items: - type: string - type: array - size: - description: page size - type: integer - stacks: - items: - type: string - type: array - workingStatuses: - items: - type: string - type: array - type: object - request.InvoiceItem: - properties: - cost: - type: number - description: - type: string - discount: - type: number - isExternal: - type: boolean - quantity: - type: number - unitCost: - type: number - type: object - request.ProjectHeadInput: - properties: - commissionRate: - type: number - employeeID: - type: string - type: object - request.SendInvoiceRequest: - properties: - bankID: - type: string - cc: - items: - type: string - type: array - description: - type: string - discount: - minimum: 0 - type: number - dueDate: - type: string - email: - type: string - invoiceDate: - type: string - invoiceMonth: - maximum: 11 - minimum: 0 - type: integer - invoiceYear: - minimum: 0 - type: integer - isDraft: - type: boolean - lineItems: - items: - $ref: '#/definitions/request.InvoiceItem' - type: array - note: - type: string - number: - type: string - projectID: - type: string - sentByID: - type: string - subtotal: - minimum: 0 - type: number - tax: - minimum: 0 - type: number - total: - minimum: 0 - type: number - required: - - bankID - - dueDate - - email - - invoiceDate - - projectID - type: object - request.SendSurveyInput: - properties: - topicIDs: - items: - type: string - type: array - type: - type: string - required: - - type - type: object - request.SubmitBody: - properties: - answers: - items: - $ref: '#/definitions/request.BasicEventQuestionInput' - type: array - status: - type: string - required: - - answers - - status - type: object - request.SubmitOnboardingFormRequest: - properties: - address: - type: string - avatar: - type: string - city: - type: string - country: - type: string - dateOfBirth: - type: string - discordName: - type: string - gender: - type: string - githubID: - type: string - horoscope: - type: string - identityCardPhotoBack: - type: string - identityCardPhotoFront: - type: string - lat: - type: string - linkedInName: - type: string - localBankBranch: - type: string - localBankCurrency: - type: string - localBankNumber: - type: string - localBankRecipientName: - type: string - localBranchName: - type: string - long: - type: string - mbti: - type: string - notionName: - type: string - passportPhotoBack: - type: string - passportPhotoFront: - type: string - phoneNumber: - maxLength: 18 - minLength: 8 - type: string - placeOfResidence: - type: string - required: - - address - - city - - country - - dateOfBirth - - discordName - - gender - - horoscope - - localBankBranch - - localBankCurrency - - localBankNumber - - localBankRecipientName - - localBranchName - - mbti - - phoneNumber - - placeOfResidence + data: + $ref: '#/definitions/FeedbackDetail' type: object - request.UpdateBaseSalaryInput: + GetCurrenciesResponse: properties: - batch: - type: integer - companyAccountAmount: - minimum: 0 - type: integer - contractAmount: - minimum: 0 - type: integer - currencyCode: - type: string - effectiveDate: - type: string - personalAccountAmount: - minimum: 0 - type: integer - required: - - batch - - currencyCode + data: + items: + $ref: '#/definitions/Currency' + type: array type: object - request.UpdateClientContactInput: + GetDashboardResourceUtilizationResponse: properties: - emails: + data: items: - type: string + $ref: '#/definitions/ResourceUtilization' type: array - isMainContact: - type: boolean - name: - type: string - role: - type: string type: object - request.UpdateClientInput: + GetDetailClientResponse: properties: - address: - type: string - contacts: + data: + $ref: '#/definitions/Client' + type: object + GetEngagementDashboardDetailResponse: + properties: + data: items: - $ref: '#/definitions/request.UpdateClientContactInput' + $ref: '#/definitions/EngagementDashboardDetail' type: array - country: - type: string - description: - type: string - industry: - type: string - name: - type: string - registrationNumber: - type: string - website: - type: string type: object - request.UpdateContactInfoInput: + GetEngagementDashboardResponse: properties: - accountManagers: + data: items: - $ref: '#/definitions/request.ProjectHeadInput' + $ref: '#/definitions/EngagementDashboard' type: array - clientEmail: + type: object + GetListClientResponse: + properties: + data: items: - type: string + $ref: '#/definitions/Client' type: array - deliveryManagers: + type: object + GetListEmployeeQuery: + properties: + chapters: items: - $ref: '#/definitions/request.ProjectHeadInput' + type: string type: array - projectEmail: + keyword: type: string - salePersons: + lineManagers: + items: + type: string + type: array + organizations: + items: + type: string + type: array + page: + description: page index + type: integer + positions: + items: + type: string + type: array + preload: + type: boolean + projects: + items: + type: string + type: array + seniorities: + items: + type: string + type: array + size: + description: page size + type: integer + stacks: + items: + type: string + type: array + workingStatuses: items: - $ref: '#/definitions/request.ProjectHeadInput' + type: string type: array type: object - request.UpdateEmployeeGeneralInfoInput: + GetQuestionResponse: properties: - discordID: - type: string - discordName: - type: string - displayName: - type: string - email: - type: string - fullName: - maxLength: 99 - type: string - githubID: - type: string - joinedDate: - type: string - leftDate: - type: string - lineManagerID: - type: string - linkedInName: - type: string - notionEmail: - type: string - notionID: - type: string - notionName: - type: string - organizationIDs: + data: items: - type: string + $ref: '#/definitions/pkg_view.Question' type: array - phone: - maxLength: 18 - minLength: 9 - type: string - referredBy: - type: string - wiseAccountNumber: - type: string - wiseCurrency: - type: string - wiseRecipientEmail: - type: string - wiseRecipientID: - type: string - wiseRecipientName: - type: string - required: - - email - - fullName - - phone type: object - request.UpdateInfoInput: + GroupAudit: properties: - address: - type: string - city: - type: string - country: - type: string - discordName: - type: string - githubID: - type: string - lat: - type: string - linkedInName: - type: string - long: - type: string - notionEmail: - type: string - notionID: - type: string - notionName: - type: string - personalEmail: - type: string - phoneNumber: - maxLength: 18 - minLength: 8 - type: string - placeOfResidence: - type: string - wiseAccountNumber: - type: string - wiseCurrency: - type: string - wiseRecipientEmail: - type: string - wiseRecipientID: - type: string - wiseRecipientName: + backend: + type: number + blockchain: + type: number + frontend: + type: number + mobile: + type: number + process: + type: number + quarter: type: string - required: - - city - - country - - personalEmail - - phoneNumber - - placeOfResidence + system: + type: number + trend: + $ref: '#/definitions/GroupAuditTrend' type: object - request.UpdateMemberInput: + GroupAuditTrend: properties: - deploymentType: - type: string - discount: + backend: type: number - employeeID: - type: string - endDate: - type: string - isLead: - type: boolean - leadCommissionRate: + blockchain: + type: number + frontend: + type: number + mobile: + type: number + process: + type: number + system: + type: number + type: object + GroupEngineeringHealth: + properties: + collaboration: + type: number + delivery: type: number - note: - type: string - positions: - items: - type: string - type: array - projectMemberID: - type: string - projectSlotID: - type: string - rate: + feedback: type: number - seniorityID: - type: string - startDate: - type: string - status: - type: string - upsellCommissionRate: + quality: type: number - upsellPersonID: + quarter: type: string - required: - - deploymentType - - positions - - projectSlotID - - rate - - seniorityID - - status + trend: + $ref: '#/definitions/EngineeringHealthTrend' type: object - request.UpdatePersonalInfoInput: + InvitedEmployeeInfo: properties: - address: - maxLength: 200 - type: string - city: + avatar: type: string - country: + displayName: type: string - dob: + fullName: type: string - gender: + id: type: string personalEmail: type: string - placeOfResidence: - type: string - required: - - address - - city - - country - - dob - - gender - - personalEmail - type: object - request.UpdatePositionBody: - properties: - code: + teamEmail: type: string - name: + username: type: string type: object - request.UpdateProjectGeneralInfoInput: + Invoice: properties: - accountRating: - maximum: 5 - minimum: 1 - type: integer - auditNotionID: + bankID: type: string - bankAccountID: + cc: + items: + type: string + type: array + conversionAmount: + type: number + conversionRate: + type: number + description: type: string - clientID: + discount: + type: number + dueAt: type: string - countryID: + email: type: string - deliveryRating: - maximum: 5 - minimum: 1 - type: integer - function: + errorInvoiceID: type: string - importantLevel: + failedAt: type: string - leadRating: - maximum: 5 - minimum: 1 - type: integer - name: + invoiceFileURL: type: string - organizationID: + invoicedAt: type: string - stacks: + lineItems: items: - type: string + $ref: '#/definitions/InvoiceItem' type: array - startDate: + month: + type: integer + note: type: string - required: - - accountRating - - countryID - - deliveryRating - - function - - importantLevel - - leadRating - - name - type: object - request.UpdateSkillsInput: - properties: - chapters: - items: - type: string - type: array - leadingChapters: - items: - type: string - type: array - positions: - items: - type: string - type: array - seniority: + number: type: string - stacks: - items: - type: string - type: array - required: - - chapters - - positions - - seniority - - stacks - type: object - request.UpdateStackBody: - properties: - avatar: + paidAt: type: string - code: + projectID: type: string - name: + scheduledDate: type: string + sentBy: + type: string + status: + type: string + subTotal: + type: number + tax: + type: number + threadID: + type: string + total: + type: number + year: + type: integer type: object - request.UpdateTopicReviewersBody: - properties: - reviewerIDs: - items: - type: string - type: array - type: object - request.UpdateWorkUnitBody: + InvoiceData: properties: - members: + bankAccount: + $ref: '#/definitions/BankAccount' + bankID: + type: string + cc: items: type: string type: array - name: - maxLength: 100 + client: + $ref: '#/definitions/ClientInfo' + companyInfo: + $ref: '#/definitions/CompanyInfo' + conversionAmount: + type: number + conversionRate: + type: number + description: type: string - stacks: + discount: + type: number + dueAt: + type: string + email: + type: string + errorInvoiceID: + type: string + failedAt: + type: string + invoiceFileURL: + type: string + invoicedAt: + type: string + lineItems: items: - type: string + $ref: '#/definitions/InvoiceItem' type: array - type: + month: + type: integer + note: type: string - url: + number: + type: string + paidAt: type: string - required: - - name - - stacks - - type - type: object - request.UpdateWorkUnitInput: - properties: - body: - $ref: '#/definitions/request.UpdateWorkUnitBody' projectID: type: string - workUnitID: + projectName: type: string - type: object - request.UpsertRollupRequest: - properties: - categoryID: + scheduledDate: type: string - channelID: + sentBy: type: string - discordUserID: + status: type: string - lastMessageID: + subTotal: + type: number + tax: + type: number + threadID: type: string - messageCount: - type: integer - reactionCount: + total: + type: number + year: type: integer - required: - - channelID - - discordUserID - - lastMessageID type: object - view.APIKeyData: + InvoiceItem: properties: - key: + cost: + type: number + description: + type: string + discount: + type: number + isExternal: + type: boolean + quantity: + type: number + unitCost: + type: number + type: object + InvoiceListResponse: + properties: + data: + items: + $ref: '#/definitions/InvoiceData' + type: array + page: + type: integer + size: + type: integer + sort: type: string + total: + type: integer type: object - view.APIKeyResponse: - properties: - data: - $ref: '#/definitions/view.APIKeyData' - type: object - view.ActionItemReportResponse: + InvoiceTemplateResponse: properties: data: - items: - $ref: '#/definitions/view.AuditActionItemReport' - type: array + $ref: '#/definitions/ProjectInvoiceTemplate' type: object - view.ActionItemSquash: + ItemValue: properties: - snapDate: - type: string trend: type: number value: type: integer type: object - view.ActionItemSquashReport: + LineManagersResponse: properties: - all: - items: - $ref: '#/definitions/view.ActionItemSquash' - type: array - high: - items: - $ref: '#/definitions/view.ActionItemSquash' - type: array - low: - items: - $ref: '#/definitions/view.ActionItemSquash' - type: array - medium: + data: items: - $ref: '#/definitions/view.ActionItemSquash' + $ref: '#/definitions/BasicEmployeeInfo' type: array type: object - view.ActionItemSquashReportResponse: + ListBankAccountResponse: properties: data: - $ref: '#/definitions/view.ActionItemSquashReport' + items: + $ref: '#/definitions/BankAccount' + type: array type: object - view.ActionItemTrend: + ListFeedbackResponse: properties: - high: - type: number - low: - type: number - medium: - type: number + data: + items: + $ref: '#/definitions/Feedback' + type: array type: object - view.Address: + LoggedInUserData: properties: - address: - type: string - city: + avatar: type: string - country: + displayName: type: string - lat: + fullName: type: string - long: + id: type: string - type: object - view.ApiError: - description: validation error details - properties: - enums: - description: available options incase of field's payload is enums + permissions: items: type: string type: array - field: - description: the field cause the error + role: type: string - msg: - description: error message + teamEmail: type: string type: object - view.Audit: + MenteeInfo: properties: - avg: - type: number - quarter: + avatar: type: string - trend: - type: number - type: object - view.AuditActionItemReport: - properties: - high: - type: integer - low: - type: integer - medium: - type: integer - quarter: + displayName: type: string - trend: - $ref: '#/definitions/view.ActionItemTrend' - type: object - view.AuditData: - properties: - average: - items: - $ref: '#/definitions/view.Audit' - type: array - groups: + fullName: + type: string + id: + type: string + positions: items: - $ref: '#/definitions/view.GroupAudit' + $ref: '#/definitions/Position' type: array + seniority: + $ref: '#/definitions/Seniority' + username: + type: string type: object - view.AuditResponse: + MessageResponse: properties: - data: - $ref: '#/definitions/view.AuditData' + message: + type: string type: object - view.AuditSummaries: + MetaData: properties: - summary: - items: - $ref: '#/definitions/view.AuditSummary' - type: array + code: + type: string + id: + type: string + name: + type: string type: object - view.AuditSummariesResponse: + MetaDataResponse: properties: data: - $ref: '#/definitions/view.AuditSummaries' + items: + $ref: '#/definitions/MetaData' + type: array type: object - view.AuditSummary: + Organization: properties: - audit: - $ref: '#/definitions/view.AuditValue' avatar: type: string code: type: string - health: - $ref: '#/definitions/view.AuditValue' id: type: string name: type: string - newItem: - $ref: '#/definitions/view.ItemValue' - resolvedItem: - $ref: '#/definitions/view.ItemValue' - size: - $ref: '#/definitions/view.ItemValue' type: object - view.AuditValue: + OrganizationsResponse: properties: - trend: - type: number - value: - type: number + data: + items: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_model.Organization' + type: array type: object - view.AuthData: + Position: properties: - accessToken: + code: + type: string + id: + type: string + name: type: string - employee: - $ref: '#/definitions/view.EmployeeData' type: object - view.AuthUserResponse: + PositionResponse: properties: data: - $ref: '#/definitions/view.LoggedInUserData' + items: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_model.Position' + type: array type: object - view.AvailableEmployee: + ProfileData: properties: + address: + type: string avatar: type: string + birthday: + type: string + city: + type: string + country: + type: string + discordID: + type: string + discordName: + type: string displayName: type: string fullName: type: string - id: - type: string - positions: - items: - $ref: '#/definitions/view.Position' - type: array - projects: - items: - $ref: '#/definitions/view.BasicProjectInfo' - type: array - seniority: - $ref: '#/definitions/view.Seniority' - stacks: - items: - $ref: '#/definitions/view.Stack' - type: array - username: + gender: type: string - type: object - view.AvailableSlot: - properties: - createdAt: + githubID: type: string id: type: string - note: + linkedInName: type: string - positions: - items: - $ref: '#/definitions/view.Position' - type: array - project: - $ref: '#/definitions/view.BasicProjectInfo' - seniority: - $ref: '#/definitions/view.Seniority' - type: + notionEmail: type: string - type: object - view.BankAccount: - properties: - accountNumber: + notionID: type: string - address: + notionName: type: string - bankName: + personalEmail: type: string - currency: - $ref: '#/definitions/view.Currency' - currencyID: + phoneNumber: type: string - id: + placeOfResidence: type: string - intermediaryBankAddress: + roles: + items: + $ref: '#/definitions/Role' + type: array + teamEmail: type: string - intermediaryBankName: + username: type: string - name: + wiseAccountNumber: type: string - ownerName: + wiseCurrency: type: string - routingNumber: + wiseRecipientEmail: type: string - swiftCode: + wiseRecipientID: type: string - ukSortCode: + wiseRecipientName: type: string type: object - view.BaseSalary: + ProfileDataResponse: properties: - batch: + data: + $ref: '#/definitions/ProfileData' + type: object + Project: + properties: + accountRating: type: integer - category: + allowsSendingSurvey: + type: boolean + avatar: type: string - company_account_amount: - type: integer - contract_amount: - type: integer - currency: - $ref: '#/definitions/view.Currency' - currency_id: + bankAccount: + $ref: '#/definitions/BankAccount' + bankAccountID: type: string - effective_date: + client: + $ref: '#/definitions/Client' + clientEmail: type: string - employee_id: + clientID: type: string - id: + code: type: string - insurance_amount: + commissionConfigs: + items: + $ref: '#/definitions/ProjectCommissionConfig' + type: array + companyInfo: + $ref: '#/definitions/CompanyInfo' + companyInfoID: + type: string + country: + $ref: '#/definitions/Country' + countryID: + type: string + createdAt: + type: string + deliveryRating: type: integer - personal_account_amount: + end_date: + type: string + function: + type: string + heads: + items: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ProjectHead' + type: array + id: + type: string + importantLevel: + type: string + leadRating: type: integer - type: + name: type: string - type: object - view.BasicBankAccountInfo: - properties: - accountNumber: + organization: + $ref: '#/definitions/Organization' + organizationID: + type: string + projectEmail: + type: string + projectInfo: + $ref: '#/definitions/ProjectInfo' + projectMembers: + items: + $ref: '#/definitions/ProjectMember' + type: array + projectNotion: + $ref: '#/definitions/ProjectNotion' + projectStacks: + items: + $ref: '#/definitions/Stack' + type: array + slots: + items: + $ref: '#/definitions/ProjectSlot' + type: array + startDate: type: string - bankName: + status: type: string - id: + type: type: string - ownerName: + updatedAt: type: string type: object - view.BasicClientInfo: + ProjectCommissionConfig: properties: - description: + commissionRate: + type: number + createdAt: type: string id: type: string - name: + position: type: string - registrationNumber: + projectID: + type: string + updatedAt: type: string type: object - view.BasicCompanyInfo: + ProjectInfo: properties: - description: + basecampBucketID: + type: integer + basecampCampfireID: + type: integer + basecampMessageBoardID: + type: integer + basecampScheduleID: + type: integer + basecampSentryID: + type: integer + basecampTodolistID: + type: integer + createdAt: type: string + gitlabID: + type: integer id: type: string - name: + project: + $ref: '#/definitions/Project' + projectID: type: string - registrationNumber: + repositories: + items: + type: integer + type: array + updatedAt: type: string type: object - view.BasicCountryInfo: + ProjectInvoiceTemplate: properties: - code: - type: string + bankAccount: + $ref: '#/definitions/BankAccount' + client: + $ref: '#/definitions/ClientInfo' + companyInfo: + $ref: '#/definitions/CompanyInfo' id: type: string + invoiceNumber: + type: string + lastInvoice: + $ref: '#/definitions/Invoice' name: type: string type: object - view.BasicEmployeeInfo: + ProjectMember: properties: avatar: type: string + currency: + $ref: '#/definitions/Currency' + deploymentType: + type: string + discount: + type: number displayName: type: string + employeeID: + type: string + endDate: + type: string fullName: type: string - id: + isLead: + type: boolean + leadCommissionRate: + type: number + note: + type: string + positions: + items: + $ref: '#/definitions/Position' + type: array + projectMemberID: + type: string + projectSlotID: + type: string + rate: + type: number + seniority: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_model.Seniority' + startDate: + type: string + status: type: string + upsellCommissionRate: + type: number + upsellPerson: + $ref: '#/definitions/BasicEmployeeInfo' username: type: string type: object - view.BasicMember: + ProjectNotion: properties: - avatar: + auditNotionID: type: string - displayName: + createdAt: type: string - employeeID: + id: type: string - fullName: + project: + $ref: '#/definitions/Project' + projectID: type: string - username: + updatedAt: type: string type: object - view.BasicProjectHeadInfo: + ProjectSizeResponse: properties: - avatar: + data: + items: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_model.ProjectSize' + type: array + type: object + ProjectSlot: + properties: + createdAt: type: string - commissionRate: + deploymentType: + type: string + discount: type: number - displayName: + id: type: string - employeeID: + note: type: string - fullName: + project: + $ref: '#/definitions/Project' + projectID: type: string - position: + projectMember: + $ref: '#/definitions/ProjectMember' + projectSlotPositions: + items: + $ref: '#/definitions/Position' + type: array + rate: + type: number + seniority: + $ref: '#/definitions/Seniority' + seniorityID: type: string - username: + status: + type: string + updatedAt: + type: string + upsellPerson: + $ref: '#/definitions/EmployeeData' + upsellPersonID: type: string type: object - view.BasicProjectInfo: + PublicClient: properties: + address: + $ref: '#/definitions/Address' avatar: type: string - code: + companySize: type: string id: type: string - name: + industry: type: string - status: + name: type: string - type: + solutionType: type: string - type: object - view.BraineryMetric: - properties: - contributors: - items: - $ref: '#/definitions/view.Post' - type: array - latestPosts: - items: - $ref: '#/definitions/view.Post' - type: array - newContributors: - items: - $ref: '#/definitions/view.Post' - type: array - tags: + stacks: items: type: string type: array - topContributors: + type: object + PublicClientListResponse: + properties: + data: items: - $ref: '#/definitions/view.TopContributor' + $ref: '#/definitions/PublicClient' type: array type: object - view.Chapter: + QuestionAnswer: properties: - code: + answer: type: string - id: + content: type: string - leadID: + domain: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_model.QuestionDomain' + eventQuestionID: type: string - name: + note: + type: string + order: + type: integer + type: type: string type: object - view.ChapterResponse: + ResourceAvailability: properties: - data: + employees: + items: + $ref: '#/definitions/AvailableEmployee' + type: array + slots: items: - $ref: '#/definitions/model.Chapter' + $ref: '#/definitions/AvailableSlot' type: array type: object - view.CitiesResponse: + ResourceAvailabilityResponse: properties: data: - items: - type: string - type: array + $ref: '#/definitions/ResourceAvailability' type: object - view.City: + ResourceUtilization: properties: - lat: - type: string - long: - type: string - name: + available: + type: integer + date: type: string + internal: + type: integer + staffed: + type: integer type: object - view.Client: + Role: properties: - address: - type: string - contacts: - items: - $ref: '#/definitions/view.ClientContact' - type: array - country: - type: string - description: + code: type: string id: type: string - industry: - type: string name: type: string - registrationNumber: - type: string - website: - type: string type: object - view.ClientContact: + RolesResponse: properties: - emails: + data: items: - type: string + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_model.Role' type: array - id: - type: string - isMainContact: - type: boolean - name: - type: string - role: - type: string type: object - view.ClientContactInfo: + SendInvoiceRequest: properties: - emails: + bankID: + type: string + cc: items: type: string type: array - id: + description: type: string - isMainContact: - type: boolean - name: + discount: + minimum: 0 + type: number + dueDate: type: string - type: object - view.ClientInfo: - properties: - clientAddress: + email: type: string - clientCompany: + invoiceDate: type: string - contacts: + invoiceMonth: + maximum: 11 + minimum: 0 + type: integer + invoiceYear: + minimum: 0 + type: integer + isDraft: + type: boolean + lineItems: items: - $ref: '#/definitions/view.ClientContactInfo' + $ref: '#/definitions/InvoiceItem' type: array + note: + type: string + number: + type: string + projectID: + type: string + subtotal: + minimum: 0 + type: number + tax: + minimum: 0 + type: number + total: + minimum: 0 + type: number + required: + - bankID + - dueDate + - email + - invoiceDate + - projectID type: object - view.CompanyInfo: + Seniority: properties: - description: + code: type: string id: type: string - info: - additionalProperties: - $ref: '#/definitions/model.CompanyContactInfo' - type: object name: type: string - registrationNumber: - type: string type: object - view.ContentData: + SeniorityResponse: properties: - url: - type: string + data: + items: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_model.Seniority' + type: array type: object - view.ContentDataResponse: + Stack: properties: - data: - $ref: '#/definitions/view.ContentData' + avatar: + type: string + code: + type: string + id: + type: string + name: + type: string type: object - view.CountriesResponse: + StackResponse: properties: data: items: - $ref: '#/definitions/view.Country' + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_model.Stack' type: array type: object - view.Country: + SubmitFeedback: properties: - cities: + answers: items: - $ref: '#/definitions/view.City' + $ref: '#/definitions/QuestionAnswer' type: array - code: + employeeID: type: string - id: + eventID: type: string - name: + reviewer: + $ref: '#/definitions/BasicEmployeeInfo' + status: + type: string + title: type: string + topicID: + type: string + type: object + SubmitFeedbackRequest: + properties: + answers: + items: + $ref: '#/definitions/BasicEventQuestionRequest' + type: array + status: + $ref: '#/definitions/EventReviewerStatus' + required: + - answers + - status type: object - view.CreateClientResponse: + SubmitFeedbackResponse: properties: data: - $ref: '#/definitions/model.Client' + $ref: '#/definitions/SubmitFeedback' type: object - view.CreateMemberData: + SubmitOnboardingFormRequest: properties: + address: + type: string avatar: type: string - deploymentType: + city: type: string - discount: - type: number - displayName: + country: type: string - employeeID: + dateOfBirth: type: string - fullName: + discordName: type: string - isLead: - type: boolean - leadCommissionRate: - type: number - note: + gender: type: string - positions: - items: - $ref: '#/definitions/view.Position' - type: array - projectMemberID: + githubID: type: string - projectSlotID: + horoscope: type: string - rate: - type: number - seniority: - $ref: '#/definitions/model.Seniority' - status: + identityCardPhotoBack: type: string - upsellCommissionRate: - type: number - upsellPerson: - $ref: '#/definitions/view.BasicEmployeeInfo' - username: + identityCardPhotoFront: + type: string + lat: + type: string + linkedInName: + type: string + localBankBranch: + type: string + localBankCurrency: + type: string + localBankNumber: + type: string + localBankRecipientName: + type: string + localBranchName: + type: string + long: + type: string + mbti: type: string + notionName: + type: string + passportPhotoBack: + type: string + passportPhotoFront: + type: string + phoneNumber: + maxLength: 18 + minLength: 8 + type: string + placeOfResidence: + type: string + required: + - address + - city + - country + - dateOfBirth + - discordName + - gender + - horoscope + - localBankBranch + - localBankCurrency + - localBankNumber + - localBankRecipientName + - localBranchName + - mbti + - phoneNumber + - placeOfResidence + type: object + SummaryWorkUnitDistributionData: + properties: + development: + type: number + learning: + type: number + management: + type: number + training: + type: number type: object - view.CreateMemberDataResponse: + SummaryWorkUnitDistributionResponse: properties: data: - $ref: '#/definitions/view.CreateMemberData' + $ref: '#/definitions/SummaryWorkUnitDistributionData' type: object - view.CreateProjectData: + Trend: properties: - accountManagers: - items: - $ref: '#/definitions/view.ProjectHead' - type: array - bankAccount: - $ref: '#/definitions/view.BasicBankAccountInfo' - client: - $ref: '#/definitions/view.Client' - clientEmail: - items: - type: string - type: array - code: + deadline: + type: number + learning: + type: number + workload: + type: number + type: object + UnreadFeedbackCountData: + properties: + count: + type: integer + reviewerID: type: string - country: - $ref: '#/definitions/view.BasicCountryInfo' - createdAt: + type: object + UnreadFeedbackCountResponse: + properties: + data: + $ref: '#/definitions/UnreadFeedbackCountData' + type: object + UpdateBaseSalaryRequest: + properties: + batch: + type: integer + companyAccountAmount: + minimum: 0 + type: integer + contractAmount: + minimum: 0 + type: integer + currencyCode: type: string - deletedAt: - $ref: '#/definitions/gorm.DeletedAt' - deliveryManagers: - items: - $ref: '#/definitions/view.ProjectHead' - type: array - function: + effectiveDate: type: string - id: + personalAccountAmount: + minimum: 0 + type: integer + required: + - batch + - currencyCode + type: object + UpdateBaseSalaryResponse: + properties: + data: + $ref: '#/definitions/BaseSalary' + type: object + UpdateClientInput: + properties: + address: type: string - members: + contacts: items: - $ref: '#/definitions/view.CreateMemberData' + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_client_request.UpdateClientContactInput' type: array - name: + country: type: string - organization: - $ref: '#/definitions/view.Organization' - projectEmail: + description: type: string - salePersons: - items: - $ref: '#/definitions/view.ProjectHead' - type: array - startDate: + industry: type: string - status: + name: type: string - type: + registrationNumber: type: string - updatedAt: + website: type: string type: object - view.Currency: + UpdateEmployeeGeneralInfoRequest: properties: - id: + discordID: type: string - locale: + discordName: type: string - name: + displayName: type: string - symbol: + email: type: string - type: + fullName: + maxLength: 99 type: string - type: object - view.Domain: - properties: - average: - type: number - count: - $ref: '#/definitions/model.LikertScaleCount' - name: + githubID: type: string - type: object - view.EmployeeAddress: - properties: - address: + joinedDate: type: string - city: + leftDate: + type: string + lineManagerID: + type: string + linkedInName: + type: string + notionEmail: + type: string + notionID: + type: string + notionName: + type: string + organizationIDs: + items: + type: string + type: array + phone: + maxLength: 18 + minLength: 9 + type: string + referredBy: + type: string + wiseAccountNumber: + type: string + wiseCurrency: type: string - country: + wiseRecipientEmail: type: string - lat: + wiseRecipientID: type: string - long: + wiseRecipientName: type: string + required: + - email + - fullName + - phone type: object - view.EmployeeContentData: + UpdateEmployeeStatusResponse: properties: - url: - type: string + data: + $ref: '#/definitions/EmployeeData' type: object - view.EmployeeContentDataResponse: + UpdateGeneralEmployeeResponse: properties: data: - $ref: '#/definitions/view.EmployeeContentData' + $ref: '#/definitions/UpdateGeneralInfoEmployeeData' type: object - view.EmployeeData: + UpdateGeneralInfoEmployeeData: properties: - address: - type: string - avatar: - type: string - baseSalary: - $ref: '#/definitions/view.BaseSalary' - birthday: - type: string - chapters: - items: - $ref: '#/definitions/view.Chapter' - type: array - city: - type: string - country: - type: string createdAt: type: string - deletedAt: - $ref: '#/definitions/gorm.DeletedAt' discordID: type: string discordName: @@ -2828,70 +2164,64 @@ definitions: fullName: description: basic info type: string - gender: - type: string githubID: type: string - horoscope: - type: string id: type: string - joinedDate: - type: string - leftDate: - type: string lineManager: - $ref: '#/definitions/view.BasicEmployeeInfo' + $ref: '#/definitions/BasicEmployeeInfo' linkedInName: type: string - mbti: + notionEmail: type: string - mentees: - items: - $ref: '#/definitions/view.MenteeInfo' - type: array notionID: type: string notionName: type: string organizations: items: - $ref: '#/definitions/view.Organization' + $ref: '#/definitions/Organization' type: array - personalEmail: - type: string phoneNumber: type: string - placeOfResidence: - type: string - positions: - items: - $ref: '#/definitions/view.Position' - type: array - projects: - items: - $ref: '#/definitions/view.EmployeeProjectData' - type: array referredBy: - $ref: '#/definitions/view.BasicEmployeeInfo' - roles: - items: - $ref: '#/definitions/view.Role' - type: array - seniority: - $ref: '#/definitions/model.Seniority' - stacks: - items: - $ref: '#/definitions/view.Stack' - type: array - status: - description: working info - type: string + $ref: '#/definitions/BasicEmployeeInfo' teamEmail: type: string updatedAt: type: string - username: + type: object + UpdateInfoInput: + properties: + address: + type: string + city: + type: string + country: + type: string + discordName: + type: string + githubID: + type: string + lat: + type: string + linkedInName: + type: string + long: + type: string + notionEmail: + type: string + notionID: + type: string + notionName: + type: string + personalEmail: + type: string + phoneNumber: + maxLength: 18 + minLength: 8 + type: string + placeOfResidence: type: string wiseAccountNumber: type: string @@ -2903,1385 +2233,1526 @@ definitions: type: string wiseRecipientName: type: string + required: + - city + - country + - personalEmail + - phoneNumber + - placeOfResidence type: object - view.EmployeeInvitationData: - properties: - employee: - $ref: '#/definitions/view.InvitedEmployeeInfo' - employeeID: - type: string - id: - type: string - invitedBy: - type: string - isBasecampAccountCreated: - type: boolean - isCompleted: - type: boolean - isDiscordRoleAssigned: - type: boolean - isInfoUpdated: - type: boolean - isTeamEmailCreated: - type: boolean - type: object - view.EmployeeInvitationResponse: - properties: - data: - $ref: '#/definitions/view.EmployeeInvitationData' - type: object - view.EmployeeListDataResponse: - properties: - data: - items: - $ref: '#/definitions/view.EmployeeData' - type: array - type: object - view.EmployeeLocation: + UpdatePersonalEmployeeData: properties: address: - $ref: '#/definitions/view.EmployeeAddress' - avatar: - type: string - chapters: - items: - $ref: '#/definitions/view.Chapter' - type: array - discordID: - type: string - displayName: type: string - fullName: + birthday: type: string - type: object - view.EmployeeLocationListResponse: - properties: - data: - items: - $ref: '#/definitions/view.EmployeeLocation' - type: array - type: object - view.EmployeeProjectData: - properties: - avatar: + city: type: string - code: + country: type: string - deploymentType: + createdAt: type: string - endDate: + gender: type: string id: type: string - name: + personalEmail: type: string - positions: - items: - $ref: '#/definitions/view.Position' - type: array - startDate: + placeOfResidence: type: string - status: + updatedAt: type: string type: object - view.EngagementDashboard: + UpdatePersonalEmployeeResponse: properties: - content: - type: string - questionID: - type: string - stats: - items: - $ref: '#/definitions/view.EngagementDashboardQuestionStat' - type: array + data: + $ref: '#/definitions/UpdatePersonalEmployeeData' type: object - view.EngagementDashboardDetail: + UpdatePersonalInfoRequest: properties: - questionID: + address: + maxLength: 200 type: string - stats: - items: - $ref: '#/definitions/view.EngagementDashboardQuestionDetailStat' - type: array - type: object - view.EngagementDashboardQuestionDetailStat: - properties: - field: + city: type: string - point: - type: number - startDate: + country: type: string - type: object - view.EngagementDashboardQuestionStat: - properties: - point: - type: number - startDate: + dob: type: string - title: + gender: type: string - type: object - view.EngineeringHealth: - properties: - avg: - type: number - quarter: + personalEmail: type: string - trend: - type: number - type: object - view.EngineeringHealthData: - properties: - average: - items: - $ref: '#/definitions/view.EngineeringHealth' - type: array - groups: - items: - $ref: '#/definitions/view.GroupEngineeringHealth' - type: array - type: object - view.EngineeringHealthResponse: - properties: - data: - $ref: '#/definitions/view.EngineeringHealthData' - type: object - view.EngineeringHealthTrend: - properties: - collaboration: - type: number - delivery: - type: number - feedback: - type: number - quality: - type: number - type: object - view.ErrorResponse: - properties: - error: + placeOfResidence: type: string - errors: - items: - $ref: '#/definitions/view.ApiError' - type: array + required: + - address + - city + - country + - dob + - gender + - personalEmail type: object - view.FeedBackReviewDetail: + UpdatePositionBody: properties: - employee: - $ref: '#/definitions/view.BasicEmployeeInfo' - project: - $ref: '#/definitions/view.BasicProjectInfo' - questions: - items: - $ref: '#/definitions/view.QuestionAnswer' - type: array - relationship: + code: type: string - reviewer: - $ref: '#/definitions/view.BasicEmployeeInfo' - topicName: + name: type: string type: object - view.Feedback: + UpdateProfileInfoData: properties: - author: - $ref: '#/definitions/view.BasicEmployeeInfo' - employeeID: + address: + type: string + city: + type: string + country: + type: string + createdAt: + type: string + discordID: type: string - eventID: + discordName: type: string - eventReviewerID: + githubID: type: string - isRead: - type: boolean - lastUpdated: + id: type: string - projectID: + linkedInName: type: string - status: + notionEmail: type: string - subtype: + notionID: type: string - title: + notionName: type: string - topicID: + phoneNumber: type: string - type: + placeOfResidence: type: string - type: object - view.FeedbackCount: - properties: - done: - type: integer - sent: - type: integer - total: - type: integer - type: object - view.FeedbackDetail: - properties: - answers: - items: - $ref: '#/definitions/view.QuestionAnswer' - type: array - employeeID: + teamEmail: + description: basic info type: string - eventID: + updatedAt: type: string - project: - $ref: '#/definitions/view.BasicProjectInfo' - relationship: + username: type: string - reviewer: - $ref: '#/definitions/view.BasicEmployeeInfo' - status: + wiseAccountNumber: type: string - title: + wiseCurrency: type: string - topicID: + wiseRecipientEmail: + type: string + wiseRecipientID: + type: string + wiseRecipientName: type: string type: object - view.FeedbackDetailResponse: - properties: - data: - $ref: '#/definitions/view.FeedbackDetail' - type: object - view.FeedbackReviewDetailResponse: - properties: - data: - $ref: '#/definitions/view.FeedBackReviewDetail' - type: object - view.GetCurrenciesResponse: - properties: - data: - items: - $ref: '#/definitions/view.Currency' - type: array - type: object - view.GetDashboardResourceUtilizationResponse: - properties: - data: - items: - $ref: '#/definitions/model.ResourceUtilization' - type: array - type: object - view.GetDetailClientResponse: + UpdateProfileInfoResponse: properties: data: - $ref: '#/definitions/model.Client' + $ref: '#/definitions/UpdateProfileInfoData' type: object - view.GetEngagementDashboardDetailResponse: + UpdateRoleRequest: properties: - data: + roles: items: - $ref: '#/definitions/view.EngagementDashboardDetail' + type: string type: array + required: + - roles type: object - view.GetEngagementDashboardResponse: + UpdateSkillEmployeeData: properties: - data: + chapters: items: - $ref: '#/definitions/view.EngagementDashboard' + $ref: '#/definitions/Chapter' type: array - type: object - view.GetListClientResponse: - properties: - data: + createdAt: + type: string + id: + type: string + positions: items: - $ref: '#/definitions/model.Client' + $ref: '#/definitions/Position' type: array - type: object - view.GetQuestionResponse: - properties: - data: + seniority: + $ref: '#/definitions/Seniority' + stacks: items: - $ref: '#/definitions/view.Question' + $ref: '#/definitions/Stack' type: array - type: object - view.GroupAudit: - properties: - backend: - type: number - blockchain: - type: number - frontend: - type: number - mobile: - type: number - process: - type: number - quarter: - type: string - system: - type: number - trend: - $ref: '#/definitions/view.GroupAuditTrend' - type: object - view.GroupAuditTrend: - properties: - backend: - type: number - blockchain: - type: number - frontend: - type: number - mobile: - type: number - process: - type: number - system: - type: number - type: object - view.GroupEngineeringHealth: - properties: - collaboration: - type: number - delivery: - type: number - feedback: - type: number - quality: - type: number - quarter: + updatedAt: type: string - trend: - $ref: '#/definitions/view.EngineeringHealthTrend' type: object - view.InvitedEmployeeInfo: + UpdateSkillsEmployeeResponse: properties: - avatar: - type: string - displayName: - type: string - fullName: - type: string - id: - type: string - personalEmail: - type: string - teamEmail: - type: string - username: - type: string + data: + $ref: '#/definitions/UpdateSkillEmployeeData' type: object - view.Invoice: + UpdateSkillsRequest: properties: - bankID: - type: string - cc: + chapters: items: type: string type: array - conversionAmount: - type: number - conversionRate: - type: number - description: - type: string - discount: - type: number - dueAt: - type: string - email: - type: string - errorInvoiceID: - type: string - failedAt: - type: string - invoiceFileURL: - type: string - invoicedAt: - type: string - lineItems: + leadingChapters: items: - $ref: '#/definitions/view.InvoiceItem' + type: string type: array - month: - type: integer - note: - type: string - number: - type: string - paidAt: - type: string - projectID: - type: string - scheduledDate: - type: string - sentBy: - type: string - status: - type: string - subTotal: - type: number - tax: - type: number - threadID: - type: string - total: - type: number - year: - type: integer - type: object - view.InvoiceData: - properties: - bankAccount: - $ref: '#/definitions/view.BankAccount' - bankID: - type: string - cc: + positions: items: type: string type: array - client: - $ref: '#/definitions/view.ClientInfo' - companyInfo: - $ref: '#/definitions/view.CompanyInfo' - conversionAmount: - type: number - conversionRate: - type: number - description: - type: string - discount: - type: number - dueAt: - type: string - email: - type: string - errorInvoiceID: - type: string - failedAt: - type: string - invoiceFileURL: - type: string - invoicedAt: + seniority: type: string - lineItems: + stacks: items: - $ref: '#/definitions/view.InvoiceItem' + type: string type: array - month: - type: integer - note: - type: string - number: + required: + - chapters + - positions + - seniority + - stacks + type: object + UpdateStackBody: + properties: + avatar: type: string - paidAt: + code: type: string - projectID: + name: type: string - projectName: + type: object + UpdateWorkingStatusRequest: + properties: + employeeStatus: type: string - scheduledDate: + type: object + UpsertRollupRequest: + properties: + categoryID: type: string - sentBy: + channelID: type: string - status: + discordUserID: type: string - subTotal: - type: number - tax: - type: number - threadID: + lastMessageID: type: string - total: - type: number - year: + messageCount: + type: integer + reactionCount: type: integer + required: + - channelID + - discordUserID + - lastMessageID type: object - view.InvoiceItem: + WorkSurvey: properties: - cost: + deadline: type: number - description: + endDate: type: string - discount: - type: number - isExternal: - type: boolean - quantity: + learning: type: number - unitCost: + trend: + $ref: '#/definitions/Trend' + workload: type: number type: object - view.InvoiceListResponse: + WorkSurveyResponse: + properties: + data: + $ref: '#/definitions/WorkSurveysData' + type: object + WorkSurveySummary: properties: data: items: - $ref: '#/definitions/view.InvoiceData' + $ref: '#/definitions/WorkSurveySummaryEmployee' + type: array + dates: + items: + type: string type: array + type: + type: string type: object - view.InvoiceTemplateResponse: + WorkSurveySummaryAnswer: properties: - data: - $ref: '#/definitions/view.ProjectInvoiceTemplate' + answer: + type: string + project: + $ref: '#/definitions/BasicProjectInfo' type: object - view.ItemValue: + WorkSurveySummaryEmployee: properties: - trend: - type: number - value: - type: integer + listAnswers: + items: + $ref: '#/definitions/WorkSurveySummaryListAnswer' + type: array + reviewer: + $ref: '#/definitions/BasicEmployeeInfo' type: object - view.LineManagersResponse: + WorkSurveySummaryListAnswer: properties: - data: + answers: items: - $ref: '#/definitions/view.BasicEmployeeInfo' + $ref: '#/definitions/WorkSurveySummaryAnswer' type: array + date: + type: string type: object - view.ListBankAccountResponse: + WorkSurveySummaryResponse: properties: data: items: - $ref: '#/definitions/view.BankAccount' + $ref: '#/definitions/WorkSurveySummary' type: array type: object - view.ListFeedbackResponse: + WorkSurveysData: properties: - data: + project: + $ref: '#/definitions/BasicProjectInfo' + workSurveys: items: - $ref: '#/definitions/view.Feedback' + $ref: '#/definitions/WorkSurvey' type: array type: object - view.ListSurveyDetailResponse: + WorkUnitDistribution: properties: - data: - $ref: '#/definitions/view.SurveyDetail' + development: + $ref: '#/definitions/WorkUnitDistributionDevelopment' + employee: + $ref: '#/definitions/BasicEmployeeInfo' + learning: + $ref: '#/definitions/WorkUnitDistributionLearning' + management: + $ref: '#/definitions/WorkUnitDistributionManagement' + training: + $ref: '#/definitions/WorkUnitDistributionTraining' type: object - view.ListSurveyResponse: + WorkUnitDistributionData: properties: - data: + workUnitDistributions: items: - $ref: '#/definitions/view.Survey' + $ref: '#/definitions/WorkUnitDistribution' type: array type: object - view.ListWorkUnitResponse: + WorkUnitDistributionDevelopment: properties: - data: + total: + type: integer + workUnits: items: - $ref: '#/definitions/view.WorkUnit' + $ref: '#/definitions/WorkUnitDistributionWU' type: array type: object - view.LoggedInUserData: + WorkUnitDistributionLearning: properties: - avatar: - type: string - displayName: - type: string - fullName: - type: string - id: - type: string - permissions: + total: + type: integer + workUnits: items: - type: string + $ref: '#/definitions/WorkUnitDistributionWU' type: array - role: - type: string - teamEmail: - type: string type: object - view.MenteeInfo: + WorkUnitDistributionManagement: properties: - avatar: - type: string - displayName: - type: string - fullName: - type: string - id: - type: string - positions: + projectHeads: items: - $ref: '#/definitions/model.Position' + $ref: '#/definitions/WorkUnitDistributionWUProjectHead' + type: array + total: + type: integer + workUnits: + items: + $ref: '#/definitions/WorkUnitDistributionWU' type: array - seniority: - $ref: '#/definitions/model.Seniority' - username: - type: string type: object - view.MessageResponse: + WorkUnitDistributionTraining: properties: - message: - type: string + mentees: + items: + $ref: '#/definitions/BasicEmployeeInfo' + type: array + total: + type: integer + workUnits: + items: + $ref: '#/definitions/WorkUnitDistributionWU' + type: array type: object - view.MetaData: + WorkUnitDistributionWU: properties: - code: - type: string - id: - type: string - name: + project: + $ref: '#/definitions/BasicProjectInfo' + workUnitName: type: string type: object - view.Organization: + WorkUnitDistributionWUProjectHead: properties: - avatar: - type: string - code: - type: string - id: - type: string - name: + position: type: string + project: + $ref: '#/definitions/BasicProjectInfo' type: object - view.OrganizationsResponse: + WorkUnitDistributionsResponse: properties: data: + $ref: '#/definitions/WorkUnitDistributionData' + type: object + github_com_dwarvesf_fortress-api_pkg_handler_client_request.CreateClientContactInput: + properties: + emails: items: - $ref: '#/definitions/model.Organization' + type: string type: array + isMainContact: + type: boolean + name: + type: string + role: + type: string type: object - view.PeerReviewer: + github_com_dwarvesf_fortress-api_pkg_handler_client_request.UpdateClientContactInput: properties: - eventReviewerID: - type: string - isForcedDone: + emails: + items: + type: string + type: array + isMainContact: type: boolean - relationship: + name: type: string - reviewer: - $ref: '#/definitions/view.BasicEmployeeInfo' - status: + role: type: string type: object - view.Position: + github_com_dwarvesf_fortress-api_pkg_handler_project_request.AssignMemberInput: properties: - code: + deploymentType: type: string - id: + discount: + type: number + employeeID: type: string - name: + endDate: type: string - type: object - view.PositionResponse: - properties: - data: + isLead: + type: boolean + leadCommissionRate: + type: number + note: + type: string + positions: items: - $ref: '#/definitions/model.Position' + type: string type: array - type: object - view.Post: - properties: - discordID: + rate: + type: number + seniorityID: type: string - publishedAt: + startDate: type: string - reward: - type: number - title: + status: type: string - url: + upsellCommissionRate: + type: number + upsellPersonID: type: string + required: + - deploymentType + - positions + - rate + - seniorityID + - status type: object - view.ProfileData: + github_com_dwarvesf_fortress-api_pkg_handler_project_request.CreateProjectInput: properties: - address: + accountManagers: + items: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_project_request.ProjectHeadInput' + type: array + auditNotionID: type: string - avatar: + bankAccountID: type: string - birthday: + clientEmail: + items: + type: string + type: array + clientID: type: string - city: + code: type: string - country: + countryID: type: string - discordID: + deliveryManagers: + items: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_project_request.ProjectHeadInput' + type: array + function: type: string - discordName: + members: + items: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_project_request.AssignMemberInput' + type: array + name: type: string - displayName: + organizationID: type: string - fullName: + projectEmail: type: string - gender: + salePersons: + items: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_project_request.ProjectHeadInput' + type: array + startDate: type: string - githubID: + status: + type: string + type: + type: string + required: + - countryID + - function + - name + - status + type: object + github_com_dwarvesf_fortress-api_pkg_handler_project_request.CreateWorkUnitBody: + properties: + members: + items: + type: string + type: array + name: + type: string + stacks: + items: + type: string + type: array + status: type: string - id: + type: type: string - linkedInName: + url: type: string - notionEmail: + required: + - name + - stacks + - status + - type + type: object + github_com_dwarvesf_fortress-api_pkg_handler_project_request.ProjectHeadInput: + properties: + commissionRate: + type: number + employeeID: type: string - notionID: + type: object + github_com_dwarvesf_fortress-api_pkg_handler_project_request.UpdateContactInfoInput: + properties: + accountManagers: + items: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_project_request.ProjectHeadInput' + type: array + clientEmail: + items: + type: string + type: array + deliveryManagers: + items: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_project_request.ProjectHeadInput' + type: array + projectEmail: type: string - notionName: + salePersons: + items: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_project_request.ProjectHeadInput' + type: array + type: object + github_com_dwarvesf_fortress-api_pkg_handler_project_request.UpdateMemberInput: + properties: + deploymentType: type: string - personalEmail: + discount: + type: number + employeeID: type: string - phoneNumber: + endDate: type: string - placeOfResidence: + isLead: + type: boolean + leadCommissionRate: + type: number + note: type: string - roles: + positions: items: - $ref: '#/definitions/view.Role' + type: string type: array - teamEmail: - type: string - username: - type: string - wiseAccountNumber: + projectMemberID: type: string - wiseCurrency: + projectSlotID: type: string - wiseRecipientEmail: + rate: + type: number + seniorityID: type: string - wiseRecipientID: + startDate: type: string - wiseRecipientName: + status: type: string - type: object - view.ProfileDataResponse: - properties: - data: - $ref: '#/definitions/view.ProfileData' - type: object - view.ProjectContentData: - properties: - url: + upsellCommissionRate: + type: number + upsellPersonID: type: string + required: + - deploymentType + - positions + - projectSlotID + - rate + - seniorityID + - status type: object - view.ProjectContentDataResponse: - properties: - data: - $ref: '#/definitions/view.ProjectContentData' - type: object - view.ProjectData: + github_com_dwarvesf_fortress-api_pkg_handler_project_request.UpdateProjectGeneralInfoInput: properties: - accountManagers: - items: - $ref: '#/definitions/view.ProjectHead' - type: array accountRating: + maximum: 5 + minimum: 1 type: integer - allowsSendingSurvey: - type: boolean auditNotionID: type: string - avatar: + bankAccountID: type: string - bankAccount: - $ref: '#/definitions/view.BasicBankAccountInfo' - client: - $ref: '#/definitions/view.BasicClientInfo' - clientEmail: - items: - type: string - type: array - code: + clientID: type: string - companyInfo: - $ref: '#/definitions/view.BasicCompanyInfo' - country: - $ref: '#/definitions/view.BasicCountryInfo' - createdAt: + countryID: type: string - currency: - $ref: '#/definitions/view.Currency' - deletedAt: - $ref: '#/definitions/gorm.DeletedAt' - deliveryManagers: - items: - $ref: '#/definitions/view.ProjectHead' - type: array deliveryRating: + maximum: 5 + minimum: 1 type: integer - endDate: - type: string function: type: string - id: - type: string importantLevel: type: string - industry: - type: string leadRating: + maximum: 5 + minimum: 1 type: integer - members: - items: - $ref: '#/definitions/view.ProjectMember' - type: array - monthlyChargeRate: - type: number name: type: string - organization: - $ref: '#/definitions/view.Organization' - projectEmail: + organizationID: type: string - salePersons: - items: - $ref: '#/definitions/view.ProjectHead' - type: array stacks: items: - $ref: '#/definitions/view.Stack' + type: string type: array startDate: type: string - status: + required: + - accountRating + - countryID + - deliveryRating + - function + - importantLevel + - leadRating + - name + type: object + github_com_dwarvesf_fortress-api_pkg_handler_project_request.UpdateWorkUnitBody: + properties: + members: + items: + type: string + type: array + name: + maxLength: 100 type: string - technicalLeads: + stacks: items: - $ref: '#/definitions/view.ProjectHead' + type: string type: array type: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_model.WorkUnitType' + url: type: string - updatedAt: - type: string + required: + - name + - stacks + - type type: object - view.ProjectDataResponse: + github_com_dwarvesf_fortress-api_pkg_handler_project_request.UpdateWorkUnitInput: properties: - data: - $ref: '#/definitions/view.ProjectData' + body: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_project_request.UpdateWorkUnitBody' + projectID: + type: string + workUnitID: + type: string type: object - view.ProjectHead: + github_com_dwarvesf_fortress-api_pkg_handler_survey_request.CreateSurveyFeedbackInput: properties: - avatar: - type: string - commissionRate: - type: number - displayName: + fromDate: type: string - employeeID: + quarter: type: string - finalCommissionRate: - type: number - fullName: + toDate: type: string - username: + type: type: string + year: + type: integer + required: + - type type: object - view.ProjectInvoiceTemplate: + github_com_dwarvesf_fortress-api_pkg_handler_survey_request.DeleteTopicReviewersBody: properties: - bankAccount: - $ref: '#/definitions/view.BankAccount' - client: - $ref: '#/definitions/view.ClientInfo' - companyInfo: - $ref: '#/definitions/view.CompanyInfo' - id: - type: string - invoiceNumber: - type: string - lastInvoice: - $ref: '#/definitions/view.Invoice' - name: + reviewerIDs: + items: + type: string + type: array + type: object + github_com_dwarvesf_fortress-api_pkg_handler_survey_request.SendSurveyInput: + properties: + topicIDs: + items: + type: string + type: array + type: type: string + required: + - type type: object - view.ProjectListDataResponse: + github_com_dwarvesf_fortress-api_pkg_handler_survey_request.UpdateTopicReviewersBody: properties: - data: + reviewerIDs: items: - $ref: '#/definitions/view.ProjectData' + type: string type: array type: object - view.ProjectMember: + github_com_dwarvesf_fortress-api_pkg_model.AccountingItem: properties: - avatar: + amount: + type: number + name: type: string - currency: - $ref: '#/definitions/view.Currency' - deploymentType: + type: object + github_com_dwarvesf_fortress-api_pkg_model.Chapter: + properties: + code: type: string - discount: - type: number - displayName: + createdAt: type: string - employeeID: + deletedAt: + $ref: '#/definitions/gorm.DeletedAt' + id: type: string - endDate: + lead_id: type: string - fullName: + name: type: string - isLead: - type: boolean - leadCommissionRate: - type: number - note: + updatedAt: type: string - positions: + type: object + github_com_dwarvesf_fortress-api_pkg_model.HeadPosition: + enum: + - technical-lead + - delivery-manager + - account-manager + - sale-person + type: string + x-enum-varnames: + - HeadPositionTechnicalLead + - HeadPositionDeliveryManager + - HeadPositionAccountManager + - HeadPositionSalePerson + github_com_dwarvesf_fortress-api_pkg_model.LikertScaleCount: + properties: + agree: + type: integer + disagree: + type: integer + mixed: + type: integer + stronglyAgree: + type: integer + stronglyDisagree: + type: integer + type: object + github_com_dwarvesf_fortress-api_pkg_model.NotionTechRadar: + properties: + assign: + type: string + categories: items: - $ref: '#/definitions/view.Position' + type: string type: array - projectMemberID: - type: string - projectSlotID: + id: type: string - rate: - type: number - seniority: - $ref: '#/definitions/model.Seniority' - startDate: + name: type: string - status: + quadrant: type: string - upsellCommissionRate: - type: number - upsellPerson: - $ref: '#/definitions/view.BasicEmployeeInfo' - username: + ring: type: string - type: object - view.ProjectMemberListResponse: - properties: - data: - items: - $ref: '#/definitions/view.ProjectMember' - type: array - type: object - view.ProjectSizeResponse: - properties: - data: + tags: items: - $ref: '#/definitions/model.ProjectSize' + type: string type: array type: object - view.PublicClient: + github_com_dwarvesf_fortress-api_pkg_model.Organization: properties: - address: - $ref: '#/definitions/view.Address' avatar: type: string - companySize: + code: type: string - id: + createdAt: type: string - industry: + deletedAt: + $ref: '#/definitions/gorm.DeletedAt' + id: type: string name: type: string - solutionType: + updatedAt: type: string - stacks: - items: - type: string - type: array - type: object - view.PublicClientListResponse: - properties: - data: - items: - $ref: '#/definitions/view.PublicClient' - type: array type: object - view.Question: + github_com_dwarvesf_fortress-api_pkg_model.Position: properties: - category: + code: type: string - content: + createdAt: type: string + deletedAt: + $ref: '#/definitions/gorm.DeletedAt' id: type: string - order: - type: integer - subcategory: + name: type: string - type: + updatedAt: type: string type: object - view.QuestionAnswer: + github_com_dwarvesf_fortress-api_pkg_model.ProjectFunction: + enum: + - development + - learning + - training + - management + type: string + x-enum-varnames: + - ProjectFunctionDevelopment + - ProjectFunctionLearning + - ProjectFunctionTraining + - ProjectFunctionManagement + github_com_dwarvesf_fortress-api_pkg_model.ProjectSize: properties: - answer: - type: string - content: + avatar: type: string - domain: + code: type: string - eventQuestionID: + id: type: string - note: + name: type: string - order: + size: type: integer - type: - type: string - type: object - view.ResourceAvailability: - properties: - employees: - items: - $ref: '#/definitions/view.AvailableEmployee' - type: array - slots: - items: - $ref: '#/definitions/view.AvailableSlot' - type: array - type: object - view.ResourceAvailabilityResponse: - properties: - data: - $ref: '#/definitions/view.ResourceAvailability' type: object - view.Role: + github_com_dwarvesf_fortress-api_pkg_model.QuestionDomain: + enum: + - engagement + - workload + - deadline + - learning + type: string + x-enum-varnames: + - QuestionDomainEngagement + - QuestionDomainWorkload + - QuestionDomainDeadline + - QuestionDomainLearning + github_com_dwarvesf_fortress-api_pkg_model.Relationship: + enum: + - peer + - line-manager + - chapter-lead + - self + type: string + x-enum-varnames: + - RelationshipPeer + - RelationshipLineManager + - RelationshipChapterLead + - RelationshipSelf + github_com_dwarvesf_fortress-api_pkg_model.Role: properties: code: type: string + color: + type: string + createdAt: + type: string + deletedAt: + $ref: '#/definitions/gorm.DeletedAt' id: type: string + isShow: + type: boolean + level: + type: integer name: type: string + updatedAt: + type: string type: object - view.RolesResponse: - properties: - data: - items: - $ref: '#/definitions/model.Role' - type: array - type: object - view.Seniority: + github_com_dwarvesf_fortress-api_pkg_model.Seniority: properties: code: type: string + createdAt: + type: string + deletedAt: + $ref: '#/definitions/gorm.DeletedAt' id: type: string + level: + type: integer name: type: string + updatedAt: + type: string type: object - view.SeniorityResponse: - properties: - data: - items: - $ref: '#/definitions/model.Seniority' - type: array - type: object - view.Stack: + github_com_dwarvesf_fortress-api_pkg_model.Stack: properties: avatar: type: string code: type: string + createdAt: + type: string + deletedAt: + $ref: '#/definitions/gorm.DeletedAt' id: type: string name: type: string + updatedAt: + type: string type: object - view.StackResponse: + github_com_dwarvesf_fortress-api_pkg_model.Valuation: properties: - data: - items: - $ref: '#/definitions/model.Stack' - type: array + accountReceivable: + description: money that company will receive in the future + properties: + items: + items: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_model.AccountingItem' + type: array + total: + type: number + type: object + assets: + description: valuation info + type: number + currency: + type: string + income: + description: Total paid invoice, investment & bank interest + properties: + detail: + properties: + consultantService: + type: number + interest: + type: number + investment: + type: number + type: object + total: + type: number + type: object + liabilities: + description: money that company will pay in the future + properties: + items: + items: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_model.AccountingItem' + type: array + total: + type: number + type: object + outcome: + description: Sum of Expenses and payroll + properties: + detail: + properties: + expense: + type: number + investment: + type: number + payroll: + type: number + type: object + total: + type: number + type: object + rate: + type: number + year: + description: basic info + type: string type: object - view.SubmitFeedback: + github_com_dwarvesf_fortress-api_pkg_model.WorkUnitType: + enum: + - development + - management + - training + - learning + type: string + x-enum-varnames: + - WorkUnitTypeDevelopment + - WorkUnitTypeManagement + - WorkUnitTypeTraining + - WorkUnitTypeLearning + github_com_dwarvesf_fortress-api_pkg_view.ApiError: + description: validation error details properties: - answers: + enums: + description: available options incase of field's payload is enums items: - $ref: '#/definitions/view.QuestionAnswer' + type: string type: array - employeeID: + field: + description: the field cause the error type: string - eventID: + msg: + description: error message type: string - reviewer: - $ref: '#/definitions/view.BasicEmployeeInfo' - status: + type: object + github_com_dwarvesf_fortress-api_pkg_view.BasicBankAccountInfo: + properties: + accountNumber: type: string - title: + bankName: type: string - topicID: + id: + type: string + ownerName: type: string type: object - view.SubmitFeedbackResponse: + github_com_dwarvesf_fortress-api_pkg_view.BasicClientInfo: properties: - data: - $ref: '#/definitions/view.SubmitFeedback' + description: + type: string + id: + type: string + name: + type: string + registrationNumber: + type: string type: object - view.SummaryWorkUnitDistributionData: + github_com_dwarvesf_fortress-api_pkg_view.BasicCompanyInfo: properties: - development: - type: number - learning: - type: number - management: - type: number - training: - type: number + description: + type: string + id: + type: string + name: + type: string + registrationNumber: + type: string type: object - view.SummaryWorkUnitDistributionResponse: + github_com_dwarvesf_fortress-api_pkg_view.BasicCountryInfo: properties: - data: - $ref: '#/definitions/view.SummaryWorkUnitDistributionData' + code: + type: string + id: + type: string + name: + type: string type: object - view.Survey: + github_com_dwarvesf_fortress-api_pkg_view.BasicMember: properties: - count: - $ref: '#/definitions/view.FeedbackCount' - domains: - items: - $ref: '#/definitions/view.Domain' - type: array - endDate: + avatar: type: string - id: + displayName: type: string - startDate: + employeeID: + type: string + fullName: + type: string + username: + type: string + type: object + github_com_dwarvesf_fortress-api_pkg_view.BasicProjectHeadInfo: + properties: + avatar: + type: string + commissionRate: + type: number + displayName: type: string - status: + employeeID: type: string - subtype: + fullName: type: string - title: + position: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_model.HeadPosition' + username: type: string - type: + type: object + github_com_dwarvesf_fortress-api_pkg_view.BraineryMetric: + properties: + contributors: + items: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.Post' + type: array + latestPosts: + items: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.Post' + type: array + newContributors: + items: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.Post' + type: array + tags: + items: + type: string + type: array + topContributors: + items: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.TopContributor' + type: array + type: object + github_com_dwarvesf_fortress-api_pkg_view.ContentData: + properties: + url: type: string type: object - view.SurveyDetail: + github_com_dwarvesf_fortress-api_pkg_view.CreateMemberData: properties: - author: - $ref: '#/definitions/view.BasicEmployeeInfo' - endDate: + avatar: type: string - eventID: + deploymentType: type: string - startDate: + discount: + type: number + displayName: type: string - status: + employeeID: type: string - subtype: + fullName: type: string - title: + isLead: + type: boolean + leadCommissionRate: + type: number + note: type: string - topics: + positions: items: - $ref: '#/definitions/view.Topic' + $ref: '#/definitions/Position' type: array - type: + projectMemberID: type: string - type: object - view.SurveyTopicDetail: - properties: - employee: - $ref: '#/definitions/view.BasicEmployeeInfo' - participants: - items: - $ref: '#/definitions/view.PeerReviewer' - type: array - title: + projectSlotID: type: string - topicID: + rate: + type: number + seniority: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_model.Seniority' + status: + type: string + upsellCommissionRate: + type: number + upsellPerson: + $ref: '#/definitions/BasicEmployeeInfo' + username: type: string type: object - view.SurveyTopicDetailResponse: + github_com_dwarvesf_fortress-api_pkg_view.CreateMemberDataResponse: properties: data: - $ref: '#/definitions/view.SurveyTopicDetail' + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.CreateMemberData' type: object - view.TopContributor: + github_com_dwarvesf_fortress-api_pkg_view.CreateProjectData: properties: - count: - type: integer - discordID: + accountManagers: + items: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ProjectHead' + type: array + bankAccount: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.BasicBankAccountInfo' + client: + $ref: '#/definitions/Client' + clientEmail: + items: + type: string + type: array + code: type: string - ranking: - type: integer - type: object - view.Topic: - properties: - comments: - type: integer - count: - $ref: '#/definitions/view.FeedbackCount' - domains: + country: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.BasicCountryInfo' + createdAt: + type: string + deletedAt: + $ref: '#/definitions/gorm.DeletedAt' + deliveryManagers: items: - $ref: '#/definitions/view.Domain' + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ProjectHead' type: array - employee: - $ref: '#/definitions/view.BasicEmployeeInfo' - eventID: + function: type: string id: type: string - isForcedDone: - type: boolean - participants: + members: items: - $ref: '#/definitions/view.BasicEmployeeInfo' + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.CreateMemberData' type: array - project: - $ref: '#/definitions/view.BasicProjectInfo' - reviewID: + name: type: string - status: + organization: + $ref: '#/definitions/Organization' + projectEmail: type: string - subtype: + salePersons: + items: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ProjectHead' + type: array + startDate: type: string - title: + status: type: string type: type: string + updatedAt: + type: string type: object - view.Trend: + github_com_dwarvesf_fortress-api_pkg_view.Domain: properties: - deadline: - type: number - learning: - type: number - workload: + average: type: number + count: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_model.LikertScaleCount' + name: + type: string type: object - view.UnreadFeedbackCountData: + github_com_dwarvesf_fortress-api_pkg_view.FeedBackReviewDetail: properties: - count: - type: integer - reviewerID: + employee: + $ref: '#/definitions/BasicEmployeeInfo' + project: + $ref: '#/definitions/BasicProjectInfo' + questions: + items: + $ref: '#/definitions/QuestionAnswer' + type: array + relationship: + type: string + reviewer: + $ref: '#/definitions/BasicEmployeeInfo' + topicName: type: string type: object - view.UnreadFeedbackCountResponse: + github_com_dwarvesf_fortress-api_pkg_view.FeedbackCount: + properties: + done: + type: integer + sent: + type: integer + total: + type: integer + type: object + github_com_dwarvesf_fortress-api_pkg_view.FeedbackReviewDetailResponse: properties: data: - $ref: '#/definitions/view.UnreadFeedbackCountData' + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.FeedBackReviewDetail' type: object - view.UpdateBaseSalaryResponse: + github_com_dwarvesf_fortress-api_pkg_view.ListSurveyDetailResponse: properties: data: - $ref: '#/definitions/view.BaseSalary' + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.SurveyDetail' type: object - view.UpdateEmployeeStatusResponse: + github_com_dwarvesf_fortress-api_pkg_view.ListSurveyResponse: properties: data: - $ref: '#/definitions/view.EmployeeData' + items: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.Survey' + type: array type: object - view.UpdateGeneralEmployeeResponse: + github_com_dwarvesf_fortress-api_pkg_view.ListWorkUnitResponse: properties: data: - $ref: '#/definitions/view.UpdateGeneralInfoEmployeeData' + items: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.WorkUnit' + type: array type: object - view.UpdateGeneralInfoEmployeeData: + github_com_dwarvesf_fortress-api_pkg_view.PeerReviewer: properties: - createdAt: + eventReviewerID: type: string - deletedAt: - $ref: '#/definitions/gorm.DeletedAt' + isForcedDone: + type: boolean + relationship: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_model.Relationship' + reviewer: + $ref: '#/definitions/BasicEmployeeInfo' + status: + $ref: '#/definitions/EventReviewerStatus' + type: object + github_com_dwarvesf_fortress-api_pkg_view.Post: + properties: discordID: type: string - discordName: - type: string - displayName: - type: string - fullName: - description: basic info - type: string - githubID: + publishedAt: type: string - id: + reward: + type: number + title: type: string - lineManager: - $ref: '#/definitions/view.BasicEmployeeInfo' - linkedInName: + url: type: string - notionEmail: + type: object + github_com_dwarvesf_fortress-api_pkg_view.ProjectContentData: + properties: + url: type: string - notionID: + type: object + github_com_dwarvesf_fortress-api_pkg_view.ProjectContentDataResponse: + properties: + data: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ProjectContentData' + type: object + github_com_dwarvesf_fortress-api_pkg_view.ProjectData: + properties: + accountManagers: + items: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ProjectHead' + type: array + accountRating: + type: integer + allowsSendingSurvey: + type: boolean + auditNotionID: type: string - notionName: + avatar: type: string - organizations: + bankAccount: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.BasicBankAccountInfo' + client: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.BasicClientInfo' + clientEmail: items: - $ref: '#/definitions/view.Organization' + type: string type: array - phoneNumber: + code: type: string - referredBy: - $ref: '#/definitions/view.BasicEmployeeInfo' - teamEmail: + companyInfo: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.BasicCompanyInfo' + country: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.BasicCountryInfo' + createdAt: type: string - updatedAt: + currency: + $ref: '#/definitions/Currency' + deletedAt: + $ref: '#/definitions/gorm.DeletedAt' + deliveryManagers: + items: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ProjectHead' + type: array + deliveryRating: + type: integer + endDate: type: string - type: object - view.UpdatePersonalEmployeeData: - properties: - address: + function: type: string - birthday: + id: type: string - city: + importantLevel: type: string - country: + industry: type: string - createdAt: + leadRating: + type: integer + members: + items: + $ref: '#/definitions/ProjectMember' + type: array + monthlyChargeRate: + type: number + name: type: string - deletedAt: - $ref: '#/definitions/gorm.DeletedAt' - gender: + organization: + $ref: '#/definitions/Organization' + projectEmail: type: string - id: + salePersons: + items: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ProjectHead' + type: array + stacks: + items: + $ref: '#/definitions/Stack' + type: array + startDate: type: string - personalEmail: + status: type: string - placeOfResidence: + technicalLeads: + items: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ProjectHead' + type: array + type: type: string updatedAt: type: string type: object - view.UpdatePersonalEmployeeResponse: + github_com_dwarvesf_fortress-api_pkg_view.ProjectDataResponse: properties: data: - $ref: '#/definitions/view.UpdatePersonalEmployeeData' + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ProjectData' type: object - view.UpdateProfileInfoData: + github_com_dwarvesf_fortress-api_pkg_view.ProjectHead: properties: - address: - type: string - city: + avatar: type: string - country: + commissionRate: + type: number + displayName: type: string - createdAt: + employeeID: type: string - deletedAt: - $ref: '#/definitions/gorm.DeletedAt' - discordID: + finalCommissionRate: + type: number + fullName: type: string - discordName: + username: type: string - githubID: + type: object + github_com_dwarvesf_fortress-api_pkg_view.ProjectListDataResponse: + properties: + data: + items: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ProjectData' + type: array + type: object + github_com_dwarvesf_fortress-api_pkg_view.ProjectMemberListResponse: + properties: + data: + items: + $ref: '#/definitions/ProjectMember' + type: array + type: object + github_com_dwarvesf_fortress-api_pkg_view.Survey: + properties: + count: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.FeedbackCount' + domains: + items: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.Domain' + type: array + endDate: type: string id: type: string - linkedInName: + startDate: type: string - notionEmail: + status: type: string - notionID: + subtype: type: string - notionName: + title: type: string - phoneNumber: + type: type: string - placeOfResidence: + type: object + github_com_dwarvesf_fortress-api_pkg_view.SurveyDetail: + properties: + author: + $ref: '#/definitions/BasicEmployeeInfo' + endDate: type: string - teamEmail: - description: basic info + eventID: type: string - updatedAt: + startDate: type: string - username: + status: type: string - wiseAccountNumber: + subtype: type: string - wiseCurrency: + title: type: string - wiseRecipientEmail: + topics: + items: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.Topic' + type: array + type: type: string - wiseRecipientID: + type: object + github_com_dwarvesf_fortress-api_pkg_view.SurveyTopicDetail: + properties: + employee: + $ref: '#/definitions/BasicEmployeeInfo' + participants: + items: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.PeerReviewer' + type: array + title: type: string - wiseRecipientName: + topicID: type: string type: object - view.UpdateProfileInfoResponse: + github_com_dwarvesf_fortress-api_pkg_view.SurveyTopicDetailResponse: properties: data: - $ref: '#/definitions/view.UpdateProfileInfoData' + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.SurveyTopicDetail' + type: object + github_com_dwarvesf_fortress-api_pkg_view.TopContributor: + properties: + count: + type: integer + discordID: + type: string + ranking: + type: integer + type: object + github_com_dwarvesf_fortress-api_pkg_view.Topic: + properties: + comments: + type: integer + count: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.FeedbackCount' + domains: + items: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.Domain' + type: array + employee: + $ref: '#/definitions/BasicEmployeeInfo' + eventID: + type: string + id: + type: string + isForcedDone: + type: boolean + participants: + items: + $ref: '#/definitions/BasicEmployeeInfo' + type: array + project: + $ref: '#/definitions/BasicProjectInfo' + reviewID: + type: string + status: + type: string + subtype: + type: string + title: + type: string + type: + type: string type: object - view.UpdateProjectContactInfo: + github_com_dwarvesf_fortress-api_pkg_view.UpdateProjectContactInfo: properties: clientEmail: items: @@ -4291,78 +3762,48 @@ definitions: type: string projectHead: items: - $ref: '#/definitions/view.BasicProjectHeadInfo' + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.BasicProjectHeadInfo' type: array type: object - view.UpdateProjectContactInfoResponse: + github_com_dwarvesf_fortress-api_pkg_view.UpdateProjectContactInfoResponse: properties: data: - $ref: '#/definitions/view.UpdateProjectContactInfo' + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.UpdateProjectContactInfo' type: object - view.UpdateProjectGeneralInfo: + github_com_dwarvesf_fortress-api_pkg_view.UpdateProjectGeneralInfo: properties: auditNotionID: type: string bankAccount: - $ref: '#/definitions/view.BasicBankAccountInfo' + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.BasicBankAccountInfo' client: - $ref: '#/definitions/view.Client' + $ref: '#/definitions/Client' country: - $ref: '#/definitions/view.BasicCountryInfo' + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.BasicCountryInfo' function: - type: string + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_model.ProjectFunction' name: type: string organization: - $ref: '#/definitions/view.Organization' + $ref: '#/definitions/Organization' stacks: items: - $ref: '#/definitions/model.Stack' + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_model.Stack' type: array startDate: type: string type: object - view.UpdateProjectGeneralInfoResponse: - properties: - data: - $ref: '#/definitions/view.UpdateProjectGeneralInfo' - type: object - view.UpdateProjectStatusResponse: + github_com_dwarvesf_fortress-api_pkg_view.UpdateProjectGeneralInfoResponse: properties: data: - $ref: '#/definitions/view.UpdatedProject' - type: object - view.UpdateSkillEmployeeData: - properties: - chapters: - items: - $ref: '#/definitions/model.Chapter' - type: array - createdAt: - type: string - deletedAt: - $ref: '#/definitions/gorm.DeletedAt' - id: - type: string - positions: - items: - $ref: '#/definitions/model.Position' - type: array - seniority: - $ref: '#/definitions/model.Seniority' - stacks: - items: - $ref: '#/definitions/model.Stack' - type: array - updatedAt: - type: string + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.UpdateProjectGeneralInfo' type: object - view.UpdateSkillsEmployeeResponse: + github_com_dwarvesf_fortress-api_pkg_view.UpdateProjectStatusResponse: properties: data: - $ref: '#/definitions/view.UpdateSkillEmployeeData' + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.UpdatedProject' type: object - view.UpdatedProject: + github_com_dwarvesf_fortress-api_pkg_view.UpdatedProject: properties: createdAt: type: string @@ -4383,79 +3824,7 @@ definitions: updatedAt: type: string type: object - view.WorkSurvey: - properties: - deadline: - type: number - endDate: - type: string - learning: - type: number - trend: - $ref: '#/definitions/view.Trend' - workload: - type: number - type: object - view.WorkSurveyResponse: - properties: - data: - $ref: '#/definitions/view.WorkSurveysData' - type: object - view.WorkSurveySummary: - properties: - data: - items: - $ref: '#/definitions/view.WorkSurveySummaryEmployee' - type: array - dates: - items: - type: string - type: array - type: - type: string - type: object - view.WorkSurveySummaryAnswer: - properties: - answer: - type: string - project: - $ref: '#/definitions/view.BasicProjectInfo' - type: object - view.WorkSurveySummaryEmployee: - properties: - listAnswers: - items: - $ref: '#/definitions/view.WorkSurveySummaryListAnswer' - type: array - reviewer: - $ref: '#/definitions/view.BasicEmployeeInfo' - type: object - view.WorkSurveySummaryListAnswer: - properties: - answers: - items: - $ref: '#/definitions/view.WorkSurveySummaryAnswer' - type: array - date: - type: string - type: object - view.WorkSurveySummaryResponse: - properties: - data: - items: - $ref: '#/definitions/view.WorkSurveySummary' - type: array - type: object - view.WorkSurveysData: - properties: - project: - $ref: '#/definitions/view.BasicProjectInfo' - workSurveys: - items: - $ref: '#/definitions/view.WorkSurvey' - type: array - type: object - view.WorkUnit: + github_com_dwarvesf_fortress-api_pkg_view.WorkUnit: properties: code: type: string @@ -4463,7 +3832,7 @@ definitions: type: string members: items: - $ref: '#/definitions/view.BasicMember' + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.BasicMember' type: array name: type: string @@ -4471,7 +3840,7 @@ definitions: type: string stacks: items: - $ref: '#/definitions/view.Stack' + $ref: '#/definitions/Stack' type: array status: type: string @@ -4480,93 +3849,33 @@ definitions: url: type: string type: object - view.WorkUnitDistribution: - properties: - development: - $ref: '#/definitions/view.WorkUnitDistributionDevelopment' - employee: - $ref: '#/definitions/view.BasicEmployeeInfo' - learning: - $ref: '#/definitions/view.WorkUnitDistributionLearning' - management: - $ref: '#/definitions/view.WorkUnitDistributionManagement' - training: - $ref: '#/definitions/view.WorkUnitDistributionTraining' - type: object - view.WorkUnitDistributionData: - properties: - workUnitDistributions: - items: - $ref: '#/definitions/view.WorkUnitDistribution' - type: array - type: object - view.WorkUnitDistributionDevelopment: - properties: - total: - type: integer - workUnits: - items: - $ref: '#/definitions/view.WorkUnitDistributionWU' - type: array - type: object - view.WorkUnitDistributionLearning: - properties: - total: - type: integer - workUnits: - items: - $ref: '#/definitions/view.WorkUnitDistributionWU' - type: array - type: object - view.WorkUnitDistributionManagement: + github_com_dwarvesf_fortress-api_pkg_view.WorkUnitResponse: properties: - projectHeads: - items: - $ref: '#/definitions/view.WorkUnitDistributionWUProjectHead' - type: array - total: - type: integer - workUnits: - items: - $ref: '#/definitions/view.WorkUnitDistributionWU' - type: array - type: object - view.WorkUnitDistributionTraining: - properties: - mentees: - items: - $ref: '#/definitions/view.BasicEmployeeInfo' - type: array - total: - type: integer - workUnits: - items: - $ref: '#/definitions/view.WorkUnitDistributionWU' - type: array - type: object - view.WorkUnitDistributionWU: - properties: - project: - $ref: '#/definitions/view.BasicProjectInfo' - workUnitName: - type: string + data: + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.WorkUnit' type: object - view.WorkUnitDistributionWUProjectHead: + gorm.DeletedAt: properties: - position: + time: type: string - project: - $ref: '#/definitions/view.BasicProjectInfo' - type: object - view.WorkUnitDistributionsResponse: - properties: - data: - $ref: '#/definitions/view.WorkUnitDistributionData' + valid: + description: Valid is true if Time is not NULL + type: boolean type: object - view.WorkUnitResponse: + pkg_view.Question: properties: - data: - $ref: '#/definitions/view.WorkUnit' + category: + type: string + content: + type: string + id: + type: string + order: + type: integer + subcategory: + type: string + type: + type: string type: object info: contact: @@ -4586,12 +3895,8 @@ paths: consumes: - application/json description: Upload the content + operationId: upload parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: content upload in: formData name: file @@ -4617,11 +3922,13 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.ContentDataResponse' + $ref: '#/definitions/ContentDataResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Upload the content tags: - Asset @@ -4630,6 +3937,7 @@ paths: consumes: - application/json description: Authorize user when login + operationId: auth parameters: - description: Google login code in: body @@ -4649,19 +3957,19 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.AuthData' + $ref: '#/definitions/AuthData' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' summary: Authorize user when login tags: - Auth @@ -4670,31 +3978,28 @@ paths: consumes: - application/json description: Create API key - parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string + operationId: createApiKey produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.APIKeyResponse' + $ref: '#/definitions/APIKeyResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Create API key tags: - Auth @@ -4703,31 +4008,28 @@ paths: consumes: - application/json description: Get logged-in user data - parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string + operationId: me produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.AuthUserResponse' + $ref: '#/definitions/AuthUserResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Get logged-in user data tags: - Auth @@ -4736,19 +4038,18 @@ paths: consumes: - application/json description: Get all bank accounts + operationId: listBankAccounts produces: - application/json responses: "200": description: OK schema: - items: - $ref: '#/definitions/view.ListBankAccountResponse' - type: array + $ref: '#/definitions/ListBankAccountResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' summary: Get all bank accounts tags: - Bank @@ -4757,27 +4058,31 @@ paths: consumes: - application/json description: Create brainery logs + operationId: createBraineryLog parameters: - - description: jwt token - in: header - name: Authorization + - description: Body + in: body + name: body required: true - type: string + schema: + $ref: '#/definitions/CreateBraineryLogRequest' produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.MessageResponse' + $ref: '#/definitions/MessageResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Create brainery logs tags: - Project @@ -4786,31 +4091,34 @@ paths: consumes: - application/json description: Get brainery metric + operationId: getBraineryMetric parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: Time view in: query name: view type: string + - description: Date + format: date + in: query + name: date + type: string produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.BraineryMetric' + $ref: '#/definitions/BraineryMetricResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Get brainery metric tags: - Project @@ -4819,23 +4127,20 @@ paths: consumes: - application/json description: Get all clients - parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string + operationId: getAllPublicClients produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.PublicClientListResponse' + $ref: '#/definitions/PublicClientListResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Get all clients tags: - Public @@ -4843,29 +4148,27 @@ paths: consumes: - application/json description: Create new client + operationId: createClient parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: Body in: body name: Body required: true schema: - $ref: '#/definitions/request.CreateClientInput' + $ref: '#/definitions/CreateClientRequest' produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.CreateClientResponse' + $ref: '#/definitions/CreateClientResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Create new client tags: - Client @@ -4874,25 +4177,32 @@ paths: consumes: - application/json description: Delete client by id + operationId: deleteClient + parameters: + - description: Client ID + in: path + name: id + required: true + type: string produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.MessageResponse' + $ref: '#/definitions/MessageResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' summary: Delete client by id tags: - Client @@ -4900,10 +4210,11 @@ paths: consumes: - application/json description: Get client detail by id + operationId: getClientDetail parameters: - - description: jwt token - in: header - name: Authorization + - description: Client ID + in: path + name: id required: true type: string produces: @@ -4912,19 +4223,21 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.GetDetailClientResponse' + $ref: '#/definitions/GetDetailClientResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Get client detail by id tags: - Client @@ -4932,10 +4245,11 @@ paths: consumes: - application/json description: Update client by id + operationId: updateClient parameters: - - description: jwt token - in: header - name: Authorization + - description: Client ID + in: path + name: id required: true type: string - description: Body @@ -4943,26 +4257,28 @@ paths: name: Body required: true schema: - $ref: '#/definitions/request.UpdateClientInput' + $ref: '#/definitions/UpdateClientInput' produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.MessageResponse' + $ref: '#/definitions/MessageResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Update client by id tags: - Client @@ -4977,19 +4293,19 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.MessageResponse' + $ref: '#/definitions/MessageResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' summary: Store vault tx as icy tx from Mochi service tags: - Vault @@ -5004,19 +4320,19 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.MessageResponse' + $ref: '#/definitions/MessageResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' summary: Sync project member status tags: - Project @@ -5025,19 +4341,16 @@ paths: consumes: - application/json description: Sync audit info from Notion to database - parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string + operationId: syncAudit produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.MessageResponse' + $ref: '#/definitions/MessageResponse' + security: + - BearerAuth: [] summary: Sync audit info from Notion to database tags: - Audit @@ -5046,27 +4359,24 @@ paths: consumes: - application/json description: Index messages of provided Discord server - parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string + operationId: indexEngagementMessages produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.MessageResponse' + $ref: '#/definitions/MessageResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Index messages of provided Discord server tags: - Engagement @@ -5075,12 +4385,8 @@ paths: consumes: - application/json description: Get engagement dashboard + operationId: getEngagementInfoDetailList parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: chapter/seniority/project in: query name: filter @@ -5097,11 +4403,13 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.GetEngagementDashboardDetailResponse' + $ref: '#/definitions/GetEngagementDashboardDetailResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Get engagement dashboard tags: - Dashboard @@ -5110,23 +4418,20 @@ paths: consumes: - application/json description: Get engagement dashboard - parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string + operationId: getEngagementInfo produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.GetEngagementDashboardResponse' + $ref: '#/definitions/GetEngagementDashboardResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Get engagement dashboard tags: - Dashboard @@ -5135,12 +4440,8 @@ paths: consumes: - application/json description: Get Action items squash report for dashboard + operationId: getActionItemSquashReportList parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: Project ID in: query name: projectID @@ -5151,19 +4452,21 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.ActionItemSquashReportResponse' + $ref: '#/definitions/ActionItemSquashReportResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Get Action items squash report for dashboard tags: - Dashboard @@ -5172,12 +4475,8 @@ paths: consumes: - application/json description: Get Action items report for dashboard + operationId: getActionItemReportList parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: Project ID in: query name: projectID @@ -5188,19 +4487,21 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.ActionItemReportResponse' + $ref: '#/definitions/ActionItemReportResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Get Action items report for dashboard tags: - Dashboard @@ -5209,12 +4510,8 @@ paths: consumes: - application/json description: Get Audit information for dashboard + operationId: getAuditList parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: Project ID in: query name: projectID @@ -5225,19 +4522,21 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.AuditResponse' + $ref: '#/definitions/AuditResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Get Audit information for dashboard tags: - Dashboard @@ -5246,12 +4545,8 @@ paths: consumes: - application/json description: Get Engineering health information for dashboard + operationId: getEngineeringHealth parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: Project ID in: query name: projectID @@ -5262,19 +4557,21 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.EngineeringHealthResponse' + $ref: '#/definitions/EngineeringHealthResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Get Engineering health information for dashboard tags: - Dashboard @@ -5283,23 +4580,20 @@ paths: consumes: - application/json description: Get the total number of active member in each project - parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string + operationId: getProjectSizeList produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.ProjectSizeResponse' + $ref: '#/definitions/ProjectSizeResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Get the total number of active member in each project tags: - Dashboard @@ -5308,31 +4602,28 @@ paths: consumes: - application/json description: Get the summary audit info for projects - parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string + operationId: getProjectSummary produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.AuditSummariesResponse' + $ref: '#/definitions/AuditSummariesResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Get the summary audit info for projects tags: - Dashboard @@ -5341,12 +4632,8 @@ paths: consumes: - application/json description: Get Work Surveys data for dashboard + operationId: getWorkSurveyList parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: Project ID in: query name: projectID @@ -5357,19 +4644,21 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.WorkSurveyResponse' + $ref: '#/definitions/WorkSurveyResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Get Work Surveys data for dashboard tags: - Dashboard @@ -5378,23 +4667,20 @@ paths: consumes: - application/json description: Get resources availability - parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string + operationId: getResourcesAvailability produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.ResourceAvailabilityResponse' + $ref: '#/definitions/ResourceAvailabilityResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Get resources availability tags: - Dashboard @@ -5403,23 +4689,20 @@ paths: consumes: - application/json description: Get dashboard resource utilization - parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string + operationId: getResourceUtilizationList produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.GetDashboardResourceUtilizationResponse' + $ref: '#/definitions/GetDashboardResourceUtilizationResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Get dashboard resource utilization tags: - Dashboard @@ -5428,12 +4711,8 @@ paths: consumes: - application/json description: Get resource work summaries for dashboard + operationId: getResourceWorkSurveySummaryList parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: Keyword in: query name: keyword @@ -5452,19 +4731,21 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.WorkSurveySummaryResponse' + $ref: '#/definitions/WorkSurveySummaryResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Get resource work summaries for dashboard tags: - Dashboard @@ -5473,12 +4754,8 @@ paths: consumes: - application/json description: Get work unit distribution data for dashboard + operationId: getWorkUnitDistributionList parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: employee name for filter in: query name: name @@ -5497,19 +4774,21 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.WorkUnitDistributionsResponse' + $ref: '#/definitions/WorkUnitDistributionsResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Get work unit distribution data for dashboard tags: - Dashboard @@ -5518,23 +4797,20 @@ paths: consumes: - application/json description: Get summary for workunit distribution dashboard - parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string + operationId: getWorkUnitDistributionSummary produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.SummaryWorkUnitDistributionResponse' + $ref: '#/definitions/SummaryWorkUnitDistributionResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Get summary for workunit distribution dashboard tags: - Dashboard @@ -5543,37 +4819,35 @@ paths: consumes: - application/json description: Create new employee + operationId: createEmployee parameters: - description: Body in: body name: Body required: true schema: - $ref: '#/definitions/request.CreateEmployeeInput' - - description: jwt token - in: header - name: Authorization - required: true - type: string + $ref: '#/definitions/CreateEmployeeRequest' produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.EmployeeData' + $ref: '#/definitions/EmployeeDataResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Create new employee tags: - Employee @@ -5582,12 +4856,8 @@ paths: consumes: - application/json description: Get employee by id + operationId: getEmployeeDetails parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: Employee ID in: path name: id @@ -5599,19 +4869,21 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.EmployeeData' + $ref: '#/definitions/EmployeeDataResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Get employee by id tags: - Employee @@ -5620,12 +4892,8 @@ paths: consumes: - application/json description: Update employee's base salary by employee and base salary id + operationId: updateBaseSalary parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: Employee ID in: path name: id @@ -5636,26 +4904,28 @@ paths: name: Body required: true schema: - $ref: '#/definitions/request.UpdateBaseSalaryInput' + $ref: '#/definitions/UpdateBaseSalaryRequest' produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.UpdateBaseSalaryResponse' + $ref: '#/definitions/UpdateBaseSalaryResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Update employee's base salary by employee and base salary id tags: - Employee @@ -5664,12 +4934,8 @@ paths: consumes: - application/json description: Update account status by employee id + operationId: updateEmployeeStatus parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: Employee ID in: path name: id @@ -5680,27 +4946,28 @@ paths: name: employeeStatus required: true schema: - description: working info - type: string + $ref: '#/definitions/UpdateWorkingStatusRequest' produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.UpdateEmployeeStatusResponse' + $ref: '#/definitions/UpdateEmployeeStatusResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Update account status by employee id tags: - Employee @@ -5709,12 +4976,8 @@ paths: consumes: - application/json description: Update general info of the employee by id + operationId: updateGeneralInfo parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: Employee ID in: path name: id @@ -5725,26 +4988,28 @@ paths: name: Body required: true schema: - $ref: '#/definitions/request.UpdateEmployeeGeneralInfoInput' + $ref: '#/definitions/UpdateEmployeeGeneralInfoRequest' produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.UpdateGeneralEmployeeResponse' + $ref: '#/definitions/UpdateGeneralEmployeeResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Update general info of the employee by id tags: - Employee @@ -5753,12 +5018,8 @@ paths: consumes: - application/json description: Update personal info of the employee by id + operationId: updatePersonalInfo parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: Employee ID in: path name: id @@ -5769,26 +5030,28 @@ paths: name: Body required: true schema: - $ref: '#/definitions/request.UpdatePersonalInfoInput' + $ref: '#/definitions/UpdatePersonalInfoRequest' produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.UpdatePersonalEmployeeResponse' + $ref: '#/definitions/UpdatePersonalEmployeeResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Update personal info of the employee by id tags: - Employee @@ -5797,42 +5060,40 @@ paths: consumes: - application/json description: Update role by employee id + operationId: updateRole parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: Employee ID in: path name: id required: true type: string - - description: Account role ID + - description: body in: body - name: roleID + name: Body required: true schema: - type: string + $ref: '#/definitions/UpdateRoleRequest' produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.MessageResponse' + $ref: '#/definitions/MessageResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Update role by employee id tags: - Employee @@ -5841,6 +5102,7 @@ paths: consumes: - application/json description: Update Skill for employee by id + operationId: updateSkill parameters: - description: Employee ID in: path @@ -5852,31 +5114,28 @@ paths: name: Body required: true schema: - $ref: '#/definitions/request.UpdateSkillsInput' - - description: jwt token - in: header - name: Authorization - required: true - type: string + $ref: '#/definitions/UpdateSkillsRequest' produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.UpdateSkillsEmployeeResponse' + $ref: '#/definitions/UpdateSkillsEmployeeResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Update Skill for employee by id tags: - Employee @@ -5885,17 +5144,13 @@ paths: consumes: - application/json description: Upload avatar of employee by id + operationId: uploadAvatar parameters: - description: Employee ID in: path name: id required: true type: string - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: avatar upload in: formData name: file @@ -5907,19 +5162,21 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.EmployeeContentDataResponse' + $ref: '#/definitions/EmployeeContentDataResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Upload avatar of employee by id tags: - Employee @@ -5928,37 +5185,35 @@ paths: consumes: - application/json description: Get the list of employees with pagination and workingStatus + operationId: getEmployeeList parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: Body in: body name: Body required: true schema: - $ref: '#/definitions/request.GetListEmployeeInput' + $ref: '#/definitions/GetListEmployeeQuery' produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.EmployeeListDataResponse' + $ref: '#/definitions/EmployeeListDataResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Get the list of employees tags: - Employee @@ -5967,12 +5222,8 @@ paths: consumes: - application/json description: Get local last message ID of a channel + operationId: getLastMessageID parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: Discord Channel ID in: path name: channel-id @@ -5984,15 +5235,17 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.MessageResponse' + $ref: '#/definitions/MessageResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Get local last message ID of a channel tags: - Engagement @@ -6001,33 +5254,31 @@ paths: consumes: - application/json description: Upsert engagement rollup + operationId: upsertEngagementRollup parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: Body in: body name: Body required: true schema: - $ref: '#/definitions/request.UpsertRollupRequest' + $ref: '#/definitions/UpsertRollupRequest' produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.MessageResponse' + $ref: '#/definitions/MessageResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Upsert engagement rollup tags: - Engagement @@ -6036,12 +5287,8 @@ paths: consumes: - application/json description: Get list feedbacks + operationId: getFeedbackList parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: Status in: query name: status @@ -6054,21 +5301,27 @@ paths: in: query name: size type: string + - description: Sort + in: query + name: sort + type: string produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.ListFeedbackResponse' + $ref: '#/definitions/ListFeedbackResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Get list feedbacks tags: - Feedback @@ -6077,12 +5330,8 @@ paths: consumes: - application/json description: Get feedback detail for logged-in users + operationId: getFeedbackDetail parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: Feedback Event ID in: path name: id @@ -6099,19 +5348,21 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.FeedbackDetailResponse' + $ref: '#/definitions/FeedbackDetailResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Get feedback detail for logged-in users tags: - Feedback @@ -6120,12 +5371,8 @@ paths: consumes: - application/json description: Submit the draft or done answers + operationId: submitFeedback parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: Feedback Event ID in: path name: id @@ -6141,26 +5388,28 @@ paths: name: Body required: true schema: - $ref: '#/definitions/request.SubmitBody' + $ref: '#/definitions/SubmitFeedbackRequest' produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.SubmitFeedbackResponse' + $ref: '#/definitions/SubmitFeedbackResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Submit the draft or done answers tags: - Feedback @@ -6169,27 +5418,24 @@ paths: consumes: - application/json description: Get number of unread inbox for user - parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string + operationId: countUnreadFeedback produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.UnreadFeedbackCountResponse' + $ref: '#/definitions/UnreadFeedbackCountResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Get number of unread inbox for user tags: - Feedback @@ -6198,31 +5444,28 @@ paths: consumes: - application/json description: Submit Get invitation state based on token - parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string + operationId: getInvitation produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.EmployeeInvitationResponse' + $ref: '#/definitions/EmployeeInvitationResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Get invitation state based on token tags: - Onboarding @@ -6231,37 +5474,35 @@ paths: consumes: - application/json description: Submit Onboarding form + operationId: submitOnboardingForm parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: Body in: body name: Body required: true schema: - $ref: '#/definitions/request.SubmitOnboardingFormRequest' + $ref: '#/definitions/SubmitOnboardingFormRequest' produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.MessageResponse' + $ref: '#/definitions/MessageResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Submit onboarding form tags: - Onboarding @@ -6270,12 +5511,8 @@ paths: consumes: - application/json description: Get latest invoice by project id + operationId: getInvoiceList parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: projectID in: query name: projectID @@ -6284,25 +5521,39 @@ paths: in: query name: status type: string + - description: page + in: query + name: page + type: integer + - description: size + in: query + name: size + type: integer + - description: sort + in: query + name: sort + type: string produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.InvoiceListResponse' + $ref: '#/definitions/InvoiceListResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Get latest invoice by project id tags: - Invoice @@ -6311,31 +5562,27 @@ paths: consumes: - application/json description: Update status for invoice - parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.MessageResponse' + $ref: '#/definitions/MessageResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Update status for invoice tags: - Invoice @@ -6343,38 +5590,36 @@ paths: post: consumes: - application/json - description: Create new invoice and send to clientm + description: Create new invoice and send to client + operationId: sendInvoice parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: body in: body name: Body required: true schema: - $ref: '#/definitions/request.SendInvoiceRequest' + $ref: '#/definitions/SendInvoiceRequest' produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.MessageResponse' + $ref: '#/definitions/MessageResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Create new invoice and send to client tags: - Invoice @@ -6383,12 +5628,8 @@ paths: consumes: - application/json description: Get the latest invoice by project id + operationId: getInvoiceTemplate parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: projectID in: query name: projectID @@ -6400,19 +5641,21 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.InvoiceTemplateResponse' + $ref: '#/definitions/InvoiceTemplateResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Get the latest invoice by project id tags: - Invoice @@ -6421,23 +5664,20 @@ paths: consumes: - application/json description: Get the list of line managers - parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string + operationId: getLineManagerList produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.LineManagersResponse' + $ref: '#/definitions/LineManagersResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Get the list of line managers tags: - Employee @@ -6446,21 +5686,22 @@ paths: consumes: - application/json description: Get list values for chapters + operationId: getChaptersList produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.ChapterResponse' + $ref: '#/definitions/ChapterResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' summary: Get list values for chapters tags: - Metadata @@ -6469,21 +5710,22 @@ paths: consumes: - application/json description: Get all countries + operationId: getCountriesList produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.CountriesResponse' + $ref: '#/definitions/CountriesResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' summary: Get all countries tags: - Metadata @@ -6492,21 +5734,22 @@ paths: consumes: - application/json description: Get list cities by country + operationId: getCitiesList produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.CitiesResponse' + $ref: '#/definitions/CitiesResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' summary: Get list cities by country tags: - Metadata @@ -6515,21 +5758,22 @@ paths: consumes: - application/json description: Get list currencies + operationId: getCurrenciesList produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.GetCurrenciesResponse' + $ref: '#/definitions/GetCurrenciesResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' summary: Get list currencies tags: - Metadata @@ -6538,21 +5782,22 @@ paths: consumes: - application/json description: Get list values for organizations + operationId: getOrganizationsList produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.OrganizationsResponse' + $ref: '#/definitions/OrganizationsResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' summary: Get list values for organizations tags: - Metadata @@ -6561,21 +5806,22 @@ paths: consumes: - application/json description: Get list values for positions + operationId: getPositionsList produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.PositionResponse' + $ref: '#/definitions/PositionResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' summary: Get list values for positions tags: - Metadata @@ -6583,37 +5829,35 @@ paths: consumes: - application/json description: Create new position + operationId: createPosition parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: Body in: body name: Body required: true schema: - $ref: '#/definitions/request.CreatePositionInput' + $ref: '#/definitions/CreatePositionInput' produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.MessageResponse' + $ref: '#/definitions/MessageResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Create new position tags: - Metadata @@ -6622,12 +5866,8 @@ paths: consumes: - application/json description: Delete position by ID + operationId: deletePosition parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: Position ID in: path name: id @@ -6639,19 +5879,21 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.MessageResponse' + $ref: '#/definitions/MessageResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Delete position by ID tags: - Metadata @@ -6659,12 +5901,8 @@ paths: consumes: - application/json description: Update position information by ID + operationId: updatePosition parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: Position ID in: path name: id @@ -6675,26 +5913,28 @@ paths: name: Body required: true schema: - $ref: '#/definitions/request.UpdatePositionBody' + $ref: '#/definitions/UpdatePositionBody' produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.MessageResponse' + $ref: '#/definitions/MessageResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Update position information by ID tags: - Metadata @@ -6703,23 +5943,22 @@ paths: consumes: - application/json description: Get list values for project statuses + operationId: getProjectStatusesList produces: - application/json responses: "200": description: OK schema: - items: - $ref: '#/definitions/view.MetaData' - type: array + $ref: '#/definitions/MetaDataResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' summary: Get list values for project statuses tags: - Metadata @@ -6728,21 +5967,42 @@ paths: consumes: - application/json description: Get list question by category and subcategory + operationId: getQuestionsList + parameters: + - description: Category + enum: + - feedback + - survey + in: query + name: category + required: true + type: string + - description: Subcategory + enum: + - peer-review + - engagement + - work + - appreciation + - comment + in: query + name: subcategory + required: true + type: string produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.GetQuestionResponse' + $ref: '#/definitions/GetQuestionResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' summary: Get list question by category and subcategory tags: - Metadata @@ -6751,21 +6011,22 @@ paths: consumes: - application/json description: Get list roles + operationId: getRolesList produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.RolesResponse' + $ref: '#/definitions/RolesResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' summary: Get list roles tags: - Metadata @@ -6774,21 +6035,22 @@ paths: consumes: - application/json description: Get list values for sentitorities + operationId: getSenioritiesList produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.SeniorityResponse' + $ref: '#/definitions/SeniorityResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' summary: Get list values for sentitorities tags: - Metadata @@ -6797,6 +6059,7 @@ paths: consumes: - application/json description: Get list values for stacks + operationId: getStacksList parameters: - description: Keyword in: query @@ -6816,15 +6079,15 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.StackResponse' + $ref: '#/definitions/StackResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' summary: Get list values for stacks tags: - Metadata @@ -6832,37 +6095,35 @@ paths: consumes: - application/json description: Create new stack + operationId: createStack parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: Body in: body name: Body required: true schema: - $ref: '#/definitions/request.CreateStackInput' + $ref: '#/definitions/CreateStackInput' produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.MessageResponse' + $ref: '#/definitions/MessageResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Create new stack tags: - Metadata @@ -6871,12 +6132,8 @@ paths: consumes: - application/json description: Delete stack by ID + operationId: deleteStack parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: Stack ID in: path name: id @@ -6888,19 +6145,21 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.MessageResponse' + $ref: '#/definitions/MessageResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Delete stack by ID tags: - Metadata @@ -6908,12 +6167,8 @@ paths: consumes: - application/json description: Update stack information by ID + operationId: updateStack parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: Stack ID in: path name: id @@ -6924,26 +6179,28 @@ paths: name: Body required: true schema: - $ref: '#/definitions/request.UpdateStackBody' + $ref: '#/definitions/UpdateStackBody' produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.MessageResponse' + $ref: '#/definitions/MessageResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Update stack information by ID tags: - Metadata @@ -6952,23 +6209,22 @@ paths: consumes: - application/json description: Get list values for working status + operationId: getWorkingStatusList produces: - application/json responses: "200": description: OK schema: - items: - $ref: '#/definitions/view.MetaData' - type: array + $ref: '#/definitions/MetaDataResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' summary: Get list values for working status tags: - Metadata @@ -6983,11 +6239,11 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.MessageResponse' + $ref: '#/definitions/MessageResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' summary: Get list audiences from DF Audience tags: - Notion @@ -7002,11 +6258,11 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.MessageResponse' + $ref: '#/definitions/MessageResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' summary: send project changelog tags: - Notion @@ -7021,11 +6277,11 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.MessageResponse' + $ref: '#/definitions/MessageResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' summary: get available projects changelog tags: - Notion @@ -7046,11 +6302,11 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.MessageResponse' + $ref: '#/definitions/MessageResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' summary: send project changelog tags: - Notion @@ -7065,11 +6321,11 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.MessageResponse' + $ref: '#/definitions/MessageResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' summary: Get list digests from DF Internal Digest tags: - Notion @@ -7084,11 +6340,11 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.MessageResponse' + $ref: '#/definitions/MessageResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' summary: Get list items from DF earn tags: - Notion @@ -7103,11 +6359,11 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.MessageResponse' + $ref: '#/definitions/MessageResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' summary: Get list events from DF Dwarves Community Events tags: - Notion @@ -7122,11 +6378,11 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.MessageResponse' + $ref: '#/definitions/MessageResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' summary: Get list hiring from DF Dwarves Hiring tags: - Notion @@ -7141,11 +6397,11 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.MessageResponse' + $ref: '#/definitions/MessageResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' summary: Get list issues from DF Issues & Resolution Log tags: - Notion @@ -7160,11 +6416,11 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.MessageResponse' + $ref: '#/definitions/MessageResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' summary: Get list memos from DF Memos tags: - Notion @@ -7179,11 +6435,11 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.MessageResponse' + $ref: '#/definitions/MessageResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' summary: Get list project milestones tags: - Notion @@ -7198,11 +6454,11 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.MessageResponse' + $ref: '#/definitions/MessageResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' summary: Get list staffing demands from DF Staffing Demand tags: - Notion @@ -7217,11 +6473,11 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.MessageResponse' + $ref: '#/definitions/MessageResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' summary: Get list items from DF TechRadar tags: - Notion @@ -7236,11 +6492,11 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.MessageResponse' + $ref: '#/definitions/MessageResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' summary: Get list updates from DF Updates tags: - Notion @@ -7249,31 +6505,28 @@ paths: consumes: - application/json description: Get profile information of employee - parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string + operationId: getPofile produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.ProfileDataResponse' + $ref: '#/definitions/ProfileDataResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Get profile information of employee tags: - Profile @@ -7281,12 +6534,8 @@ paths: consumes: - application/json description: Update profile info by id + operationId: updateProfileInfo parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: Employee ID in: path name: id @@ -7297,26 +6546,28 @@ paths: name: Body required: true schema: - $ref: '#/definitions/request.UpdateInfoInput' + $ref: '#/definitions/UpdateInfoInput' produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.UpdateProfileInfoResponse' + $ref: '#/definitions/UpdateProfileInfoResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Update profile info by id tags: - Profile @@ -7325,12 +6576,8 @@ paths: consumes: - application/json description: Upload image by id + operationId: uploadImage parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: content upload in: formData name: file @@ -7342,19 +6589,21 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.EmployeeContentDataResponse' + $ref: '#/definitions/EmployeeContentDataResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Upload image by id tags: - Profile @@ -7363,12 +6612,8 @@ paths: consumes: - application/json description: Upload avatar by id + operationId: uploadProfileAvatar parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: content upload in: formData name: file @@ -7380,19 +6625,21 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.EmployeeContentDataResponse' + $ref: '#/definitions/EmployeeContentDataResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Upload avatar by id tags: - Profile @@ -7402,11 +6649,6 @@ paths: - application/json description: Delete member in a project parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: Project ID in: path name: id @@ -7423,19 +6665,21 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.MessageResponse' + $ref: '#/definitions/MessageResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Delete member in a project tags: - Project @@ -7444,11 +6688,6 @@ paths: - application/json description: Unassign member in a project parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: Project ID in: path name: id @@ -7465,19 +6704,21 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.MessageResponse' + $ref: '#/definitions/MessageResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Unassign member in a project tags: - Project @@ -7487,11 +6728,6 @@ paths: - application/json description: Delete slot in a project parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: Project ID in: path name: id @@ -7508,19 +6744,21 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.MessageResponse' + $ref: '#/definitions/MessageResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Delete slot in a project tags: - Project @@ -7530,12 +6768,8 @@ paths: - application/json description: Get list of project parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - - description: Project status + - collectionFormat: csv + description: Project status in: query items: type: string @@ -7563,15 +6797,17 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.ProjectListDataResponse' + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ProjectListDataResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Get list of project tags: - Project @@ -7580,32 +6816,29 @@ paths: - application/json description: Create new project parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: body in: body name: Body required: true schema: - $ref: '#/definitions/request.CreateProjectInput' + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_project_request.CreateProjectInput' produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.CreateProjectData' + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.CreateProjectData' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Create new project tags: - Project @@ -7615,11 +6848,6 @@ paths: - application/json description: Get details of a project parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: Project ID in: path name: id @@ -7631,19 +6859,21 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.ProjectDataResponse' + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ProjectDataResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Get details of a project tags: - Project @@ -7653,11 +6883,6 @@ paths: - application/json description: Update contact info of the project by id parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: Project ID in: path name: id @@ -7668,26 +6893,28 @@ paths: name: Body required: true schema: - $ref: '#/definitions/request.UpdateContactInfoInput' + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_project_request.UpdateContactInfoInput' produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.UpdateProjectContactInfoResponse' + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.UpdateProjectContactInfoResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Update contact info of the project by id tags: - Project @@ -7697,11 +6924,6 @@ paths: - application/json description: Update general info of the project by id parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: Project ID in: path name: id @@ -7712,26 +6934,28 @@ paths: name: Body required: true schema: - $ref: '#/definitions/request.UpdateProjectGeneralInfoInput' + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_project_request.UpdateProjectGeneralInfoInput' produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.UpdateProjectGeneralInfoResponse' + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.UpdateProjectGeneralInfoResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Update general info of the project by id tags: - Project @@ -7741,11 +6965,6 @@ paths: - application/json description: Get list members of project parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: Project ID in: path name: id @@ -7780,19 +6999,21 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.ProjectMemberListResponse' + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ProjectMemberListResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Get list members of project tags: - Project @@ -7801,11 +7022,6 @@ paths: - application/json description: Assign member in an existing project parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: Project ID in: path name: id @@ -7816,26 +7032,28 @@ paths: name: Body required: true schema: - $ref: '#/definitions/request.AssignMemberInput' + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_project_request.AssignMemberInput' produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.CreateMemberDataResponse' + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.CreateMemberDataResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Assign member into an existing project tags: - Project @@ -7844,11 +7062,6 @@ paths: - application/json description: Update member in an existing project parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: Project ID in: path name: id @@ -7859,26 +7072,28 @@ paths: name: Body required: true schema: - $ref: '#/definitions/request.UpdateMemberInput' + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_project_request.UpdateMemberInput' produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.CreateMemberDataResponse' + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.CreateMemberDataResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Update member in an existing project tags: - Project @@ -7888,11 +7103,6 @@ paths: - application/json description: Update allows sending survey for project by id parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: Project ID in: path name: id @@ -7908,19 +7118,21 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.MessageResponse' + $ref: '#/definitions/MessageResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Update allows sending survey for project by id tags: - Project @@ -7930,11 +7142,6 @@ paths: - application/json description: Update status for project by id parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: Project ID in: path name: id @@ -7952,19 +7159,21 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.UpdateProjectStatusResponse' + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.UpdateProjectStatusResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Update status for project by id tags: - Project @@ -7979,11 +7188,6 @@ paths: name: id required: true type: string - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: avatar upload in: formData name: file @@ -7995,19 +7199,21 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.ProjectContentDataResponse' + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ProjectContentDataResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Upload avatar of project by id tags: - Project @@ -8017,35 +7223,39 @@ paths: - application/json description: Get list work units of a project parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: Project ID in: path name: id required: true type: string + - description: status + enum: + - active + - archived + in: query + name: status + type: string produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.ListWorkUnitResponse' + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ListWorkUnitResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Get list work units of a project tags: - Project @@ -8054,11 +7264,6 @@ paths: - application/json description: Get work unit of a project parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: Project ID in: path name: id @@ -8069,26 +7274,28 @@ paths: name: body required: true schema: - $ref: '#/definitions/request.CreateWorkUnitBody' + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_project_request.CreateWorkUnitBody' produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.WorkUnitResponse' + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.WorkUnitResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Create work unit of a project tags: - Project @@ -8098,11 +7305,6 @@ paths: - application/json description: Update work unit info parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: Project ID in: path name: id @@ -8118,26 +7320,28 @@ paths: name: Body required: true schema: - $ref: '#/definitions/request.UpdateWorkUnitInput' + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_project_request.UpdateWorkUnitInput' produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.MessageResponse' + $ref: '#/definitions/MessageResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Update work unit info tags: - Project @@ -8147,11 +7351,6 @@ paths: - application/json description: Archive an active work unit of a project parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: Project ID in: path name: id @@ -8168,19 +7367,21 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.MessageResponse' + $ref: '#/definitions/MessageResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Archive an active work unit of a project tags: - Project @@ -8190,11 +7391,6 @@ paths: - application/json description: Unarchive an archive work unit of a project parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: Project ID in: path name: id @@ -8211,19 +7407,21 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.MessageResponse' + $ref: '#/definitions/MessageResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Unarchive an archive work unit of a project tags: - Project @@ -8232,23 +7430,19 @@ paths: consumes: - application/json description: Get Icy Weekly Distribution - parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string produces: - application/json responses: "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Get Icy Weekly Distribution tags: - Project @@ -8257,25 +7451,26 @@ paths: consumes: - application/json description: Get public employees list + operationId: getPublicEmployeeList produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.EmployeeLocationListResponse' + $ref: '#/definitions/EmployeeLocationListResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' summary: Get public employees list tags: - Public @@ -8285,11 +7480,6 @@ paths: - application/json description: Get list event parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: Event Subtype in: query name: subtype @@ -8309,15 +7499,17 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.ListSurveyResponse' + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ListSurveyResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Get list event tags: - Survey @@ -8331,31 +7523,28 @@ paths: name: Body required: true schema: - $ref: '#/definitions/request.CreateSurveyFeedbackInput' - - description: jwt token - in: header - name: Authorization - required: true - type: string + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_survey_request.CreateSurveyFeedbackInput' produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.MessageResponse' + $ref: '#/definitions/MessageResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Create new survey tags: - Survey @@ -8365,11 +7554,6 @@ paths: - application/json description: Delete survey by id parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: Feedback Event ID in: path name: id @@ -8381,19 +7565,21 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.MessageResponse' + $ref: '#/definitions/MessageResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Delete survey by id tags: - Survey @@ -8402,11 +7588,6 @@ paths: - application/json description: Get survey detail parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: Feedback Event ID in: path name: id @@ -8428,7 +7609,8 @@ paths: in: query name: status type: string - - description: Projects + - collectionFormat: csv + description: Projects in: query items: type: string @@ -8440,19 +7622,21 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.ListSurveyDetailResponse' + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.ListSurveyDetailResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Get survey detail tags: - Survey @@ -8462,11 +7646,6 @@ paths: - application/json description: Mark done feedback event parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: Feedback Event ID in: path name: id @@ -8478,19 +7657,21 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.MessageResponse' + $ref: '#/definitions/MessageResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Mark done feedback event tags: - Survey @@ -8500,11 +7681,6 @@ paths: - application/json description: Send the survey parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: Feedback Event ID in: path name: id @@ -8515,26 +7691,28 @@ paths: name: Body required: true schema: - $ref: '#/definitions/request.SendSurveyInput' + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_survey_request.SendSurveyInput' produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.MessageResponse' + $ref: '#/definitions/MessageResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Send the survey tags: - Survey @@ -8543,31 +7721,27 @@ paths: consumes: - application/json description: delete survey topic - parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.MessageResponse' + $ref: '#/definitions/MessageResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: delete survey topic tags: - Survey @@ -8576,11 +7750,6 @@ paths: - application/json description: Get detail for peer review parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: Feedback Event ID in: path name: id @@ -8597,19 +7766,21 @@ paths: "200": description: OK schema: - $ref: '#/definitions/view.SurveyTopicDetailResponse' + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.SurveyTopicDetailResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Get detail for peer review tags: - Survey @@ -8619,11 +7790,6 @@ paths: - application/json description: Delete reviewers in a topic parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: Feedback Event ID in: path name: id @@ -8639,26 +7805,28 @@ paths: name: Body required: true schema: - $ref: '#/definitions/request.DeleteTopicReviewersBody' + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_survey_request.DeleteTopicReviewersBody' produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.MessageResponse' + $ref: '#/definitions/MessageResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Delete reviewers in a topic tags: - Survey @@ -8667,36 +7835,33 @@ paths: - application/json description: Update reviewers in a topic parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string - description: Body in: body name: Body required: true schema: - $ref: '#/definitions/request.UpdateTopicReviewersBody' + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_handler_survey_request.UpdateTopicReviewersBody' produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.MessageResponse' + $ref: '#/definitions/MessageResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Update reviewers in a topic tags: - Survey @@ -8705,35 +7870,33 @@ paths: consumes: - application/json description: Get survey review detail - parameters: - - description: jwt token - in: header - name: Authorization - required: true - type: string produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/view.FeedbackReviewDetailResponse' + $ref: '#/definitions/github_com_dwarvesf_fortress-api_pkg_view.FeedbackReviewDetailResponse' "400": description: Bad Request schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "404": description: Not Found schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' "500": description: Internal Server Error schema: - $ref: '#/definitions/view.ErrorResponse' + $ref: '#/definitions/ErrorResponse' + security: + - BearerAuth: [] summary: Get survey review detail tags: - Survey securityDefinitions: - BasicAuth: - type: basic + BearerAuth: + in: header + name: Authorization + type: apiKey swagger: "2.0" diff --git a/migrations/schemas/20231111011111-add_currency_conversion_rate.sql b/migrations/schemas/20231111011111-add_currency_conversion_rate.sql new file mode 100644 index 000000000..266846b70 --- /dev/null +++ b/migrations/schemas/20231111011111-add_currency_conversion_rate.sql @@ -0,0 +1,17 @@ +-- +migrate Up +CREATE TABLE IF NOT EXISTS conversion_rates ( + id UUID PRIMARY KEY DEFAULT (UUID()), + deleted_at TIMESTAMP(6), + created_at TIMESTAMP(6) DEFAULT (now()), + updated_at TIMESTAMP(6) DEFAULT (now()), + + currency_id UUID DEFAULT NULL, + to_usd DECIMAL, + to_vnd DECIMAL +); + +ALTER TABLE conversion_rates + ADD CONSTRAINT conversion_rates_currency_id_fkey FOREIGN KEY (currency_id) REFERENCES currencies (id); + +-- +migrate Down +DROP TABLE IF EXISTS conversion_rates; diff --git a/pkg/controller/client/create.go b/pkg/controller/client/create.go index 783a0ab7d..8646df956 100644 --- a/pkg/controller/client/create.go +++ b/pkg/controller/client/create.go @@ -10,7 +10,7 @@ import ( "github.com/dwarvesf/fortress-api/pkg/model" ) -func (r *controller) Create(c *gin.Context, input request.CreateClientInput) (*model.Client, error) { +func (r *controller) Create(c *gin.Context, input request.CreateClientRequest) (*model.Client, error) { tx, done := r.repo.NewTransaction() // Create client diff --git a/pkg/controller/client/new.go b/pkg/controller/client/new.go index 906cb1f18..6aa9fd47b 100644 --- a/pkg/controller/client/new.go +++ b/pkg/controller/client/new.go @@ -30,7 +30,7 @@ func New(store *store.Store, repo store.DBRepo, service *service.Service, logger } type IController interface { - Create(c *gin.Context, input request.CreateClientInput) (client *model.Client, err error) + Create(c *gin.Context, input request.CreateClientRequest) (client *model.Client, err error) List(c *gin.Context) (client []*model.Client, err error) Detail(c *gin.Context, clientID string) (client *model.Client, err error) Update(c *gin.Context, clientID string, input request.UpdateClientInput) (errCode int, err error) diff --git a/pkg/controller/controller.go b/pkg/controller/controller.go index 579040881..5c259f130 100644 --- a/pkg/controller/controller.go +++ b/pkg/controller/controller.go @@ -5,6 +5,7 @@ import ( "github.com/dwarvesf/fortress-api/pkg/controller/auth" "github.com/dwarvesf/fortress-api/pkg/controller/brainerylogs" "github.com/dwarvesf/fortress-api/pkg/controller/client" + "github.com/dwarvesf/fortress-api/pkg/controller/conversionrate" "github.com/dwarvesf/fortress-api/pkg/controller/deliverymetrics" "github.com/dwarvesf/fortress-api/pkg/controller/discord" "github.com/dwarvesf/fortress-api/pkg/controller/employee" @@ -19,6 +20,7 @@ type Controller struct { Auth auth.IController BraineryLog brainerylogs.IController Client client.IController + ConversionRate conversionrate.IController DeliveryMetric deliverymetrics.IController Employee employee.IController Invoice invoice.IController @@ -30,6 +32,7 @@ func New(store *store.Store, repo store.DBRepo, service *service.Service, worker Auth: auth.New(store, repo, service, logger, cfg), BraineryLog: brainerylogs.New(store, repo, service, logger, cfg), Client: client.New(store, repo, service, logger, cfg), + ConversionRate: conversionrate.New(store, repo, service, logger, cfg), DeliveryMetric: deliverymetrics.New(store, repo, service, logger, cfg), Employee: employee.New(store, repo, service, logger, cfg), Invoice: invoice.New(store, repo, service, worker, logger, cfg), diff --git a/pkg/controller/conversionrate/errors.go b/pkg/controller/conversionrate/errors.go new file mode 100644 index 000000000..0efee26af --- /dev/null +++ b/pkg/controller/conversionrate/errors.go @@ -0,0 +1,3 @@ +package conversionrate + +var () diff --git a/pkg/controller/conversionrate/new.go b/pkg/controller/conversionrate/new.go new file mode 100644 index 000000000..06b279502 --- /dev/null +++ b/pkg/controller/conversionrate/new.go @@ -0,0 +1,32 @@ +package conversionrate + +import ( + "github.com/gin-gonic/gin" + + "github.com/dwarvesf/fortress-api/pkg/config" + "github.com/dwarvesf/fortress-api/pkg/logger" + "github.com/dwarvesf/fortress-api/pkg/service" + "github.com/dwarvesf/fortress-api/pkg/store" +) + +type controller struct { + store *store.Store + service *service.Service + logger logger.Logger + repo store.DBRepo + config *config.Config +} + +func New(store *store.Store, repo store.DBRepo, service *service.Service, logger logger.Logger, cfg *config.Config) IController { + return &controller{ + store: store, + repo: repo, + service: service, + logger: logger, + config: cfg, + } +} + +type IController interface { + Sync(c *gin.Context) error +} diff --git a/pkg/controller/conversionrate/sync.go b/pkg/controller/conversionrate/sync.go new file mode 100644 index 000000000..48f5f5c59 --- /dev/null +++ b/pkg/controller/conversionrate/sync.go @@ -0,0 +1,45 @@ +package conversionrate + +import ( + "github.com/gin-gonic/gin" + "github.com/shopspring/decimal" +) + +var destCurrencies = []string{"USD", "VND"} + +func (r *controller) Sync(c *gin.Context) error { + tx, done := r.repo.NewTransaction() + + // Get list conversion rate + conversionRates, err := r.store.ConversionRate.GetList(tx.DB()) + if err != nil { + return done(err) + } + + currencyRateMap := make(map[string]float64) + for _, conversionRate := range conversionRates { + srcCurrency := conversionRate.Currency.Name + for _, destCurrency := range destCurrencies { + rate, err := r.service.Wise.GetRate(srcCurrency, destCurrency) + if err != nil { + return done(err) + } + currencyRateMap[destCurrency] = rate + } + + for k, v := range currencyRateMap { + switch k { + case "USD": + conversionRate.ToUSD = decimal.NewFromFloat(v) + case "VND": + conversionRate.ToVND = decimal.NewFromFloat(v) + } + } + + if err := r.store.ConversionRate.Update(tx.DB(), &conversionRate); err != nil { + return done(err) + } + } + + return done(nil) +} diff --git a/pkg/controller/employee/list.go b/pkg/controller/employee/list.go index 049eec8dd..f77adb7ac 100644 --- a/pkg/controller/employee/list.go +++ b/pkg/controller/employee/list.go @@ -2,11 +2,11 @@ package employee import ( "errors" - "gorm.io/gorm" "github.com/dwarvesf/fortress-api/pkg/model" "github.com/dwarvesf/fortress-api/pkg/store/employee" "github.com/dwarvesf/fortress-api/pkg/utils/authutils" + "gorm.io/gorm" ) type GetListEmployeeInput struct { diff --git a/pkg/controller/employee/update_general_info.go b/pkg/controller/employee/update_general_info.go index 9777ce38e..cb9dc5529 100644 --- a/pkg/controller/employee/update_general_info.go +++ b/pkg/controller/employee/update_general_info.go @@ -32,7 +32,7 @@ type UpdateEmployeeGeneralInfoInput struct { WiseRecipientName string WiseAccountNumber string WiseCurrency string -} +} // @name UpdateEmployeeGeneralInfoInput func (r *controller) UpdateGeneralInfo(employeeID string, body UpdateEmployeeGeneralInfoInput) (*model.Employee, error) { l := r.logger.Fields(logger.Fields{ diff --git a/pkg/handler/asset/asset.go b/pkg/handler/asset/asset.go index 50f60be7a..c0bc42ef4 100644 --- a/pkg/handler/asset/asset.go +++ b/pkg/handler/asset/asset.go @@ -39,16 +39,17 @@ func New(store *store.Store, repo store.DBRepo, service *service.Service, logger // Upload godoc // @Summary Upload the content // @Description Upload the content +// @id upload // @Tags Asset // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param file formData file true "content upload" // @Param type formData string true "image/doc" // @Param targetType formData string true "employees/projects/change-logs/invoices" // @Param targetID formData string false "employeeID/projectID" -// @Success 200 {object} view.ContentDataResponse -// @Failure 500 {object} view.ErrorResponse +// @Success 200 {object} ContentDataResponse +// @Failure 500 {object} ErrorResponse // @Router /assets/upload [post] func (h *handler) Upload(c *gin.Context) { // 1.1 get userID diff --git a/pkg/handler/audit/audit.go b/pkg/handler/audit/audit.go index 7d91be482..cd2e0eb99 100644 --- a/pkg/handler/audit/audit.go +++ b/pkg/handler/audit/audit.go @@ -46,11 +46,12 @@ func New(store *store.Store, repo store.DBRepo, service *service.Service, logger // Sync godoc // @Summary Sync audit info from Notion to database // @Description Sync audit info from Notion to database +// @id syncAudit // @Tags Audit // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" -// @Success 200 {object} view.MessageResponse +// @Security BearerAuth +// @Success 200 {object} MessageResponse // @Router /cronjobs/audits [post] func (h *handler) Sync(c *gin.Context) { h.SyncAuditCycle() diff --git a/pkg/handler/auth/auth.go b/pkg/handler/auth/auth.go index 083a3b91e..5238deb8f 100644 --- a/pkg/handler/auth/auth.go +++ b/pkg/handler/auth/auth.go @@ -32,15 +32,16 @@ func New(controller *controller.Controller, logger logger.Logger, cfg *config.Co // Auth godoc // @Summary Authorize user when login // @Description Authorize user when login +// @id auth // @Tags Auth // @Accept json // @Produce json // @Param code body string true "Google login code" // @Param redirectUrl body string true "Google redirect url" -// @Success 200 {object} view.AuthData -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Success 200 {object} AuthData +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /auth [post] func (h *handler) Auth(c *gin.Context) { // 1. parse code, redirectUrl from body @@ -78,14 +79,15 @@ func (h *handler) Auth(c *gin.Context) { // Me godoc // @Summary Get logged-in user data // @Description Get logged-in user data +// @id me // @Tags Auth // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" -// @Success 200 {object} view.AuthUserResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Security BearerAuth +// @Success 200 {object} AuthUserResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /auth/me [get] func (h *handler) Me(c *gin.Context) { userID, err := authutils.GetUserIDFromContext(c, h.config) @@ -112,14 +114,15 @@ func (h *handler) Me(c *gin.Context) { // CreateAPIKey godoc // @Summary Create API key // @Description Create API key +// @id createApiKey // @Tags Auth // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" -// @Success 200 {object} view.APIKeyResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Security BearerAuth +// @Success 200 {object} APIKeyResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /auth/api-key [post] func (h *handler) CreateAPIKey(c *gin.Context) { var body request.CreateAPIKeyInput diff --git a/pkg/handler/bankaccount/bank_account.go b/pkg/handler/bankaccount/bank_account.go index f7cd067fe..de629d2d5 100644 --- a/pkg/handler/bankaccount/bank_account.go +++ b/pkg/handler/bankaccount/bank_account.go @@ -34,11 +34,12 @@ func New(store *store.Store, repo store.DBRepo, service *service.Service, logger // List godoc // @Summary Get all bank accounts // @Description Get all bank accounts +// @id listBankAccounts // @Tags Bank // @Accept json // @Produce json -// @Success 200 {object} []view.ListBankAccountResponse -// @Failure 500 {object} view.ErrorResponse +// @Success 200 {object} ListBankAccountResponse +// @Failure 500 {object} ErrorResponse // @Router /bank-accounts [get] func (h *handler) List(c *gin.Context) { l := h.logger.Fields(logger.Fields{ diff --git a/pkg/handler/brainerylogs/brainery_log.go b/pkg/handler/brainerylogs/brainery_log.go index 86ddd38db..7f2d52e37 100644 --- a/pkg/handler/brainerylogs/brainery_log.go +++ b/pkg/handler/brainerylogs/brainery_log.go @@ -50,13 +50,15 @@ const ( // Create godoc // @Summary Create brainery logs // @Description Create brainery logs +// @id createBraineryLog // @Tags Project // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" -// @Success 200 {object} view.MessageResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Security BearerAuth +// @Param body body CreateBraineryLogRequest true "Body" +// @Success 200 {object} MessageResponse +// @Failure 400 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /brainery-logs [post] func (h *handler) Create(c *gin.Context) { l := h.logger.Fields( @@ -103,15 +105,16 @@ func (h *handler) Create(c *gin.Context) { // GetMetrics godoc // @Summary Get brainery metric // @Description Get brainery metric +// @id getBraineryMetric // @Tags Project // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param view query string false "Time view" -// @Param date query string false "Date" -// @Success 200 {object} view.BraineryMetric -// @Failure 400 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Param date query string false "Date" Format(date) +// @Success 200 {object} BraineryMetricResponse +// @Failure 400 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /brainery-logs/metrics [get] func (h *handler) GetMetrics(c *gin.Context) { l := h.logger.Fields( diff --git a/pkg/handler/brainerylogs/request/request.go b/pkg/handler/brainerylogs/request/request.go index 75ddb38e7..25875cb68 100644 --- a/pkg/handler/brainerylogs/request/request.go +++ b/pkg/handler/brainerylogs/request/request.go @@ -16,7 +16,7 @@ type CreateBraineryLogRequest struct { Tags []string `json:"tags" binding:"required"` PublishedAt string `json:"publishedAt" binding:"required"` Reward decimal.Decimal `json:"reward" binding:"required"` -} +} // @name CreateBraineryLogRequest func (r CreateBraineryLogRequest) Validate() error { if _, err := time.Parse(time.RFC3339Nano, r.PublishedAt); err != nil { diff --git a/pkg/handler/client/client.go b/pkg/handler/client/client.go index b636bb9f6..98d2858d3 100644 --- a/pkg/handler/client/client.go +++ b/pkg/handler/client/client.go @@ -42,16 +42,17 @@ func New(controller *controller.Controller, store *store.Store, repo store.DBRep // Create godoc // @Summary Create new client // @Description Create new client +// @id createClient // @Tags Client // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" -// @Param Body body request.CreateClientInput true "Body" -// @Success 200 {object} view.CreateClientResponse -// @Failure 500 {object} view.ErrorResponse +// @Security BearerAuth +// @Param Body body CreateClientRequest true "Body" +// @Success 200 {object} CreateClientResponse +// @Failure 500 {object} ErrorResponse // @Router /clients [post] func (h *handler) Create(c *gin.Context) { - input := request.CreateClientInput{} + input := request.CreateClientRequest{} if err := c.ShouldBindJSON(&input); err != nil { c.JSON(http.StatusBadRequest, view.CreateResponse[any](nil, nil, err, input, "")) return @@ -70,18 +71,19 @@ func (h *handler) Create(c *gin.Context) { return } - c.JSON(http.StatusOK, view.CreateResponse[any](client, nil, nil, nil, "")) + c.JSON(http.StatusOK, view.CreateResponse[any](view.ToClient(client), nil, nil, nil, "")) } // List godoc // @Summary Get all clients // @Description Get all clients +// @id getListClients // @Tags Client // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" -// @Success 200 {object} view.GetListClientResponse -// @Failure 500 {object} view.ErrorResponse +// @Security BearerAuth +// @Success 200 {object} GetListClientResponse +// @Failure 500 {object} ErrorResponse // @Router /clients [get] func (h *handler) List(c *gin.Context) { l := h.logger.Fields(logger.Fields{ @@ -96,20 +98,22 @@ func (h *handler) List(c *gin.Context) { return } - c.JSON(http.StatusOK, view.CreateResponse[any](clients, nil, nil, nil, "")) + c.JSON(http.StatusOK, view.CreateResponse[any](view.ToClients(clients), nil, nil, nil, "")) } // Detail godoc // @Summary Get client detail by id // @Description Get client detail by id +// @id getClientDetail // @Tags Client // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" -// @Success 200 {object} view.GetDetailClientResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Security BearerAuth +// @Param id path string true "Client ID" +// @Success 200 {object} GetDetailClientResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /clients/{id} [get] func (h *handler) Detail(c *gin.Context) { clientID := c.Param("id") @@ -135,21 +139,23 @@ func (h *handler) Detail(c *gin.Context) { return } - c.JSON(http.StatusOK, view.CreateResponse[any](client, nil, nil, nil, "")) + c.JSON(http.StatusOK, view.CreateResponse[any](view.ToClient(client), nil, nil, nil, "")) } // Update godoc // @Summary Update client by id // @Description Update client by id +// @id updateClient // @Tags Client // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" -// @Param Body body request.UpdateClientInput true "Body" -// @Success 200 {object} view.MessageResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Security BearerAuth +// @Param id path string true "Client ID" +// @Param Body body UpdateClientInput true "Body" +// @Success 200 {object} MessageResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /clients/{id} [put] func (h *handler) Update(c *gin.Context) { clientID := c.Param("id") @@ -183,13 +189,15 @@ func (h *handler) Update(c *gin.Context) { // Delete godoc // @Summary Delete client by id // @Description Delete client by id +// @id deleteClient // @Tags Client // @Accept json // @Produce json -// @Success 200 {object} view.MessageResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Param id path string true "Client ID" +// @Success 200 {object} MessageResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /clients/{id} [delete] func (h *handler) Delete(c *gin.Context) { clientID := c.Param("id") @@ -217,12 +225,13 @@ func (h *handler) Delete(c *gin.Context) { // PublicList godoc // @Summary Get all clients // @Description Get all clients +// @id getAllPublicClients // @Tags Public // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" -// @Success 200 {object} view.PublicClientListResponse -// @Failure 500 {object} view.ErrorResponse +// @Security BearerAuth +// @Success 200 {object} PublicClientListResponse +// @Failure 500 {object} ErrorResponse // @Router /clients [get] func (h *handler) PublicList(c *gin.Context) { l := h.logger.Fields(logger.Fields{ diff --git a/pkg/handler/client/request/request.go b/pkg/handler/client/request/request.go index d380ba6a6..0c9c2cd29 100644 --- a/pkg/handler/client/request/request.go +++ b/pkg/handler/client/request/request.go @@ -1,6 +1,6 @@ package request -type CreateClientInput struct { +type CreateClientRequest struct { Name string `json:"name"` Description string `json:"description"` RegistrationNumber string `json:"registrationNumber"` @@ -9,7 +9,7 @@ type CreateClientInput struct { Industry string `json:"industry"` Website string `json:"website"` Contacts []*CreateClientContactInput `json:"contacts"` -} +} // @name CreateClientRequest type CreateClientContactInput struct { Name string `json:"name"` @@ -27,7 +27,7 @@ type UpdateClientInput struct { Industry string `json:"industry"` Website string `json:"website"` Contacts []*UpdateClientContactInput `json:"contacts"` -} +} // @name UpdateClientInput type UpdateClientContactInput struct { Name string `json:"name"` diff --git a/pkg/handler/conversionrate/conversion_rate.go b/pkg/handler/conversionrate/conversion_rate.go new file mode 100644 index 000000000..4d8f64029 --- /dev/null +++ b/pkg/handler/conversionrate/conversion_rate.go @@ -0,0 +1,67 @@ +package conversionrate + +import ( + "net/http" + + "github.com/gin-gonic/gin" + + "github.com/dwarvesf/fortress-api/pkg/config" + "github.com/dwarvesf/fortress-api/pkg/controller" + "github.com/dwarvesf/fortress-api/pkg/logger" + "github.com/dwarvesf/fortress-api/pkg/service" + "github.com/dwarvesf/fortress-api/pkg/store" + "github.com/dwarvesf/fortress-api/pkg/view" +) + +type handler struct { + store *store.Store + service *service.Service + logger logger.Logger + repo store.DBRepo + config *config.Config + controller *controller.Controller +} + +// New returns a handler +func New(controller *controller.Controller, store *store.Store, repo store.DBRepo, service *service.Service, logger logger.Logger, cfg *config.Config) IHandler { + return &handler{ + store: store, + repo: repo, + service: service, + logger: logger, + config: cfg, + controller: controller, + } +} + +func (h *handler) List(c *gin.Context) { + //l := h.logger.Fields(logger.Fields{ + // "handler": "conversionRate", + // "method": "List", + //}) + + //clients, err := h.controller.Client.List(c) + //if err != nil { + // l.Error(err, "failed to get client list") + // c.JSON(http.StatusInternalServerError, view.CreateResponse[any](nil, nil, err, nil, "")) + // return + //} + + c.JSON(http.StatusOK, view.CreateResponse[any](nil, nil, nil, nil, "ok")) +} + +func (h *handler) Sync(c *gin.Context) { + l := h.logger.Fields(logger.Fields{ + "handler": "conversionRate", + "method": "Sync", + }) + + err := h.controller.ConversionRate.Sync(c) + if err != nil { + l.Error(err, "failed to sync") + c.JSON(http.StatusInternalServerError, view.CreateResponse[any](nil, nil, err, nil, "")) + return + } + + c.JSON(http.StatusOK, view.CreateResponse[any](nil, nil, nil, nil, "ok")) +} diff --git a/pkg/handler/conversionrate/interface.go b/pkg/handler/conversionrate/interface.go new file mode 100644 index 000000000..daa2cb29e --- /dev/null +++ b/pkg/handler/conversionrate/interface.go @@ -0,0 +1,8 @@ +package conversionrate + +import "github.com/gin-gonic/gin" + +type IHandler interface { + List(c *gin.Context) + Sync(c *gin.Context) +} diff --git a/pkg/handler/dashboard/dashboard.go b/pkg/handler/dashboard/dashboard.go index a282420c8..13b6783a1 100644 --- a/pkg/handler/dashboard/dashboard.go +++ b/pkg/handler/dashboard/dashboard.go @@ -43,12 +43,13 @@ func New(store *store.Store, repo store.DBRepo, service *service.Service, logger // GetProjectSizes godoc // @Summary Get the total number of active member in each project // @Description Get the total number of active member in each project +// @id getProjectSizeList // @Tags Dashboard // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" -// @Success 200 {object} view.ProjectSizeResponse -// @Failure 500 {object} view.ErrorResponse +// @Security BearerAuth +// @Success 200 {object} ProjectSizeResponse +// @Failure 500 {object} ErrorResponse // @Router /dashboards/projects/sizes [get] func (h *handler) GetProjectSizes(c *gin.Context) { l := h.logger.Fields(logger.Fields{ @@ -63,21 +64,22 @@ func (h *handler) GetProjectSizes(c *gin.Context) { return } - c.JSON(http.StatusOK, view.CreateResponse[any](res, nil, nil, nil, "")) + c.JSON(http.StatusOK, view.CreateResponse[any](view.ToProjectSizes(res), nil, nil, nil, "")) } // GetWorkSurveys godoc // @Summary Get Work Surveys data for dashboard // @Description Get Work Surveys data for dashboard +// @id getWorkSurveyList // @Tags Dashboard // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param projectID query string false "Project ID" -// @Success 200 {object} view.WorkSurveyResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Success 200 {object} WorkSurveyResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /dashboards/projects/work-surveys [get] func (h *handler) GetWorkSurveys(c *gin.Context) { input := request.WorkSurveysInput{} @@ -138,15 +140,16 @@ func (h *handler) GetWorkSurveys(c *gin.Context) { // GetActionItemReports godoc // @Summary Get Action items report for dashboard // @Description Get Action items report for dashboard +// @id getActionItemReportList // @Tags Dashboard // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param projectID query string false "Project ID" -// @Success 200 {object} view.ActionItemReportResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Success 200 {object} ActionItemReportResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /dashboards/projects/action-items [get] func (h *handler) GetActionItemReports(c *gin.Context) { input := request.ActionItemInput{} @@ -219,15 +222,16 @@ func (h *handler) GetActionItemReports(c *gin.Context) { // GetEngineeringHealth godoc // @Summary Get Engineering health information for dashboard // @Description Get Engineering health information for dashboard +// @id getEngineeringHealth // @Tags Dashboard // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param projectID query string false "Project ID" -// @Success 200 {object} view.EngineeringHealthResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Success 200 {object} EngineeringHealthResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /dashboards/projects/engineering-healths [get] func (h *handler) GetEngineeringHealth(c *gin.Context) { input := request.WorkSurveysInput{} @@ -314,15 +318,16 @@ func (h *handler) GetEngineeringHealth(c *gin.Context) { // GetAudits godoc // @Summary Get Audit information for dashboard // @Description Get Audit information for dashboard +// @id getAuditList // @Tags Dashboard // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param projectID query string false "Project ID" -// @Success 200 {object} view.AuditResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Success 200 {object} AuditResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /dashboards/projects/audits [get] func (h *handler) GetAudits(c *gin.Context) { input := request.WorkSurveysInput{} @@ -409,15 +414,16 @@ func (h *handler) GetAudits(c *gin.Context) { // GetActionItemSquashReports godoc // @Summary Get Action items squash report for dashboard // @Description Get Action items squash report for dashboard +// @id getActionItemSquashReportList // @Tags Dashboard // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param projectID query string false "Project ID" -// @Success 200 {object} view.ActionItemSquashReportResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Success 200 {object} ActionItemSquashReportResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /dashboards/projects/action-item-squash [get] func (h *handler) GetActionItemSquashReports(c *gin.Context) { input := request.ActionItemInput{} @@ -476,14 +482,15 @@ func (h *handler) GetActionItemSquashReports(c *gin.Context) { // GetSummary godoc // @Summary Get the summary audit info for projects // @Description Get the summary audit info for projects +// @id getProjectSummary // @Tags Dashboard // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" -// @Success 200 {object} view.AuditSummariesResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Security BearerAuth +// @Success 200 {object} AuditSummariesResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /dashboards/projects/summary [get] func (h *handler) GetSummary(c *gin.Context) { l := h.logger.Fields(logger.Fields{ @@ -539,12 +546,13 @@ func (h *handler) GetSummary(c *gin.Context) { // GetResourcesAvailability godoc // @Summary Get resources availability // @Description Get resources availability +// @id getResourcesAvailability // @Tags Dashboard // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" -// @Success 200 {object} view.ResourceAvailabilityResponse -// @Failure 500 {object} view.ErrorResponse +// @Security BearerAuth +// @Success 200 {object} ResourceAvailabilityResponse +// @Failure 500 {object} ErrorResponse // @Router /dashboards/resources/availabilities [get] func (h *handler) GetResourcesAvailability(c *gin.Context) { l := h.logger.Fields(logger.Fields{ @@ -572,12 +580,13 @@ func (h *handler) GetResourcesAvailability(c *gin.Context) { // GetEngagementInfo godoc // @Summary Get engagement dashboard // @Description Get engagement dashboard +// @id getEngagementInfo // @Tags Dashboard // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" -// @Success 200 {object} view.GetEngagementDashboardResponse -// @Failure 500 {object} view.ErrorResponse +// @Security BearerAuth +// @Success 200 {object} GetEngagementDashboardResponse +// @Failure 500 {object} ErrorResponse // @Router /dashboards/engagement/info [get] func (h *handler) GetEngagementInfo(c *gin.Context) { l := h.logger.Fields(logger.Fields{ @@ -610,14 +619,15 @@ func (h *handler) GetEngagementInfo(c *gin.Context) { // GetEngagementInfoDetail godoc // @Summary Get engagement dashboard // @Description Get engagement dashboard +// @id getEngagementInfoDetailList // @Tags Dashboard // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param filter query string true "chapter/seniority/project" // @Param startDate query string true "startDate" -// @Success 200 {object} view.GetEngagementDashboardDetailResponse -// @Failure 500 {object} view.ErrorResponse +// @Success 200 {object} GetEngagementDashboardDetailResponse +// @Failure 500 {object} ErrorResponse // @Router /dashboards/engagement/detail [get] func (h *handler) GetEngagementInfoDetail(c *gin.Context) { query := request.GetEngagementDashboardDetailRequest{} @@ -656,12 +666,13 @@ func (h *handler) GetEngagementInfoDetail(c *gin.Context) { // GetResourceUtilization godoc // @Summary Get dashboard resource utilization // @Description Get dashboard resource utilization +// @id getResourceUtilizationList // @Tags Dashboard // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" -// @Success 200 {object} view.GetDashboardResourceUtilizationResponse -// @Failure 500 {object} view.ErrorResponse +// @Security BearerAuth +// @Success 200 {object} GetDashboardResourceUtilizationResponse +// @Failure 500 {object} ErrorResponse // @Router /dashboards/resources/utilization [get] func (h *handler) GetResourceUtilization(c *gin.Context) { l := h.logger.Fields(logger.Fields{ @@ -676,18 +687,19 @@ func (h *handler) GetResourceUtilization(c *gin.Context) { return } - c.JSON(http.StatusOK, view.CreateResponse[any](res, nil, nil, nil, "")) + c.JSON(http.StatusOK, view.CreateResponse[any](view.ToReSourceUtilizations(res), nil, nil, nil, "")) } // GetWorkUnitDistributionSummary godoc // @Summary Get summary for workunit distribution dashboard // @Description Get summary for workunit distribution dashboard +// @id getWorkUnitDistributionSummary // @Tags Dashboard // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" -// @Success 200 {object} view.SummaryWorkUnitDistributionResponse -// @Failure 500 {object} view.ErrorResponse +// @Security BearerAuth +// @Success 200 {object} SummaryWorkUnitDistributionResponse +// @Failure 500 {object} ErrorResponse // @Router /dashboards/resources/work-unit-distribution-summary [get] func (h *handler) GetWorkUnitDistributionSummary(c *gin.Context) { l := h.logger.Fields(logger.Fields{ @@ -709,17 +721,18 @@ func (h *handler) GetWorkUnitDistributionSummary(c *gin.Context) { // GetWorkUnitDistribution godoc // @Summary Get work unit distribution data for dashboard // @Description Get work unit distribution data for dashboard +// @id getWorkUnitDistributionList // @Tags Dashboard // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param name query string false "employee name for filter" // @Param sort query string false "sort required" // @Param type query string false "work unit type for filter" -// @Success 200 {object} view.WorkUnitDistributionsResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Success 200 {object} WorkUnitDistributionsResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /dashboards/resources/work-unit-distribution [get] func (h *handler) GetWorkUnitDistribution(c *gin.Context) { input := request.WorkUnitDistributionInput{} @@ -760,17 +773,18 @@ func (h *handler) GetWorkUnitDistribution(c *gin.Context) { // GetResourceWorkSurveySummaries godoc // @Summary Get resource work summaries for dashboard // @Description Get resource work summaries for dashboard +// @id getResourceWorkSurveySummaryList // @Tags Dashboard // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param keyword query string false "Keyword" // @Param page query string false "Page" // @Param size query string false "Size" -// @Success 200 {object} view.WorkSurveySummaryResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Success 200 {object} WorkSurveySummaryResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /dashboards/resources/work-survey-summaries [get] func (h *handler) GetResourceWorkSurveySummaries(c *gin.Context) { input := request.GetResourceWorkSurveySummariesInput{} diff --git a/pkg/handler/dashboard/dashboard_test.go b/pkg/handler/dashboard/dashboard_test.go index 2fcff8b17..0e148e4fd 100644 --- a/pkg/handler/dashboard/dashboard_test.go +++ b/pkg/handler/dashboard/dashboard_test.go @@ -21,7 +21,7 @@ import ( "github.com/dwarvesf/fortress-api/pkg/utils/timeutil" ) -const testToken = "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2OTkzMjExNDIsImlkIjoiMjY1NTgzMmUtZjAwOS00YjczLWE1MzUtNjRjM2EyMmU1NThmIiwiYXZhdGFyIjoiaHR0cHM6Ly9zMy1hcC1zb3V0aGVhc3QtMS5hbWF6b25hd3MuY29tL2ZvcnRyZXNzLWltYWdlcy81MTUzNTc0Njk1NjYzOTU1OTQ0LnBuZyIsImVtYWlsIjoidGhhbmhAZC5mb3VuZGF0aW9uIiwicGVybWlzc2lvbnMiOlsiZW1wbG95ZWVzLnJlYWQiXSwidXNlcl9pbmZvIjpudWxsfQ.GENGPEucSUrILN6tHDKxLMtj0M0REVMUPC7-XhDMpGM" +const testToken = "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjk1ODMzMzA5NDUsImlkIjoiMjY1NTgzMmUtZjAwOS00YjczLWE1MzUtNjRjM2EyMmU1NThmIiwiYXZhdGFyIjoiaHR0cHM6Ly9zMy1hcC1zb3V0aGVhc3QtMS5hbWF6b25hd3MuY29tL2ZvcnRyZXNzLWltYWdlcy81MTUzNTc0Njk1NjYzOTU1OTQ0LnBuZyIsImVtYWlsIjoidGhhbmhAZC5mb3VuZGF0aW9uIn0.oIdlwWGBy4E1CbSoEX6r2B6NQLbew_J-RttpAcg6w8M" func TestHandler_GetProjectSizes(t *testing.T) { cfg := config.LoadTestConfig() diff --git a/pkg/handler/employee/employee.go b/pkg/handler/employee/employee.go index 7ef1944d4..ac232b18c 100644 --- a/pkg/handler/employee/employee.go +++ b/pkg/handler/employee/employee.go @@ -45,15 +45,16 @@ func New(controller *controller.Controller, store *store.Store, repo store.DBRep // List godoc // @Summary Get the list of employees // @Description Get the list of employees with pagination and workingStatus +// @id getEmployeeList // @Tags Employee // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" -// @Param Body body request.GetListEmployeeInput true "Body" -// @Success 200 {object} view.EmployeeListDataResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Security BearerAuth +// @Param Body body GetListEmployeeQuery true "Body" +// @Success 200 {object} EmployeeListDataResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /employees/search [post] func (h *handler) List(c *gin.Context) { // 0. Get current logged in user data @@ -63,7 +64,7 @@ func (h *handler) List(c *gin.Context) { return } - var body request.GetListEmployeeInput + var body request.GetListEmployeeQuery if err := c.ShouldBindJSON(&body); err != nil { c.JSON(http.StatusBadRequest, view.CreateResponse[any](nil, nil, err, body, "")) @@ -75,8 +76,6 @@ func (h *handler) List(c *gin.Context) { return } - body.Standardize() - l := h.logger.Fields(logger.Fields{ "handler": "employee", "method": "List", @@ -89,8 +88,14 @@ func (h *handler) List(c *gin.Context) { c.JSON(http.StatusInternalServerError, view.CreateResponse[any](nil, nil, err, nil, "")) } + pagination := model.Pagination{ + Page: body.Pagination.Page, + Size: body.Pagination.Size, + } + pagination.Standardize() + requestBody := employee.GetListEmployeeInput{ - Pagination: body.Pagination, + Pagination: pagination, WorkingStatuses: body.WorkingStatuses, Preload: body.Preload, @@ -112,7 +117,7 @@ func (h *handler) List(c *gin.Context) { } c.JSON(http.StatusOK, view.CreateResponse(view.ToEmployeeListData(employees, userInfo), - &view.PaginationResponse{Pagination: body.Pagination, Total: total}, nil, nil, "")) + &view.PaginationResponse{Pagination: pagination, Total: total}, nil, nil, "")) } func (h *handler) getWorkingStatusInput(input []string, userInfo *model.CurrentLoggedUserInfo) ([]string, error) { @@ -155,15 +160,16 @@ func (h *handler) getWorkingStatusInput(input []string, userInfo *model.CurrentL // Details godoc // @Summary Get employee by id // @Description Get employee by id +// @id getEmployeeDetails // @Tags Employee // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param id path string true "Employee ID" -// @Success 200 {object} view.EmployeeData -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Success 200 {object} EmployeeDataResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /employees/{id} [get] func (h *handler) Details(c *gin.Context) { // 0. Get current logged in user data @@ -197,16 +203,17 @@ func (h *handler) Details(c *gin.Context) { // UpdateEmployeeStatus godoc // @Summary Update account status by employee id // @Description Update account status by employee id +// @id updateEmployeeStatus // @Tags Employee // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param id path string true "Employee ID" -// @Param employeeStatus body model.WorkingStatus true "Employee Status" -// @Success 200 {object} view.UpdateEmployeeStatusResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Param employeeStatus body UpdateWorkingStatusRequest true "Employee Status" +// @Success 200 {object} UpdateEmployeeStatusResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /employees/{id}/employee-status [put] func (h *handler) UpdateEmployeeStatus(c *gin.Context) { employeeID := c.Param("id") @@ -215,7 +222,7 @@ func (h *handler) UpdateEmployeeStatus(c *gin.Context) { return } - var body request.UpdateWorkingStatusInput + var body request.UpdateWorkingStatusRequest if err := c.ShouldBindJSON(&body); err != nil { c.JSON(http.StatusBadRequest, view.CreateResponse[any](nil, nil, err, body, "")) return @@ -234,7 +241,7 @@ func (h *handler) UpdateEmployeeStatus(c *gin.Context) { } emp, err := h.controller.Employee.UpdateEmployeeStatus(employeeID, employee.UpdateWorkingStatusInput{ - EmployeeStatus: body.EmployeeStatus, + EmployeeStatus: model.WorkingStatus(body.EmployeeStatus), }) if err != nil { l.Error(err, "failed to update employee status") @@ -262,16 +269,17 @@ func (h *handler) UpdateEmployeeStatus(c *gin.Context) { // UpdateGeneralInfo godoc // @Summary Update general info of the employee by id // @Description Update general info of the employee by id +// @id updateGeneralInfo // @Tags Employee // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param id path string true "Employee ID" -// @Param Body body request.UpdateEmployeeGeneralInfoInput true "Body" -// @Success 200 {object} view.UpdateGeneralEmployeeResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Param Body body UpdateEmployeeGeneralInfoRequest true "Body" +// @Success 200 {object} UpdateGeneralEmployeeResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /employees/{id}/general-info [put] func (h *handler) UpdateGeneralInfo(c *gin.Context) { employeeID := c.Param("id") @@ -280,7 +288,7 @@ func (h *handler) UpdateGeneralInfo(c *gin.Context) { return } - var body request.UpdateEmployeeGeneralInfoInput + var body request.UpdateEmployeeGeneralInfoRequest if err := c.ShouldBindJSON(&body); err != nil { if err != nil { c.JSON(http.StatusBadRequest, view.CreateResponse[any](nil, nil, err, body, "")) @@ -298,7 +306,7 @@ func (h *handler) UpdateGeneralInfo(c *gin.Context) { FullName: body.FullName, Email: body.Email, Phone: body.Phone, - LineManagerID: body.LineManagerID, + LineManagerID: model.UUID(body.LineManagerID), DisplayName: body.DisplayName, GithubID: body.GithubID, NotionID: body.NotionID, @@ -308,8 +316,8 @@ func (h *handler) UpdateGeneralInfo(c *gin.Context) { LinkedInName: body.LinkedInName, LeftDate: body.LeftDate, JoinedDate: body.JoinedDate, - OrganizationIDs: body.OrganizationIDs, - ReferredBy: body.ReferredBy, + OrganizationIDs: view.ToModelUUIDs(body.OrganizationIDs), + ReferredBy: model.UUID(body.ReferredBy), WiseRecipientID: body.WiseRecipientID, WiseAccountNumber: body.WiseAccountNumber, WiseRecipientEmail: body.WiseRecipientEmail, @@ -330,15 +338,16 @@ func (h *handler) UpdateGeneralInfo(c *gin.Context) { // Create godoc // @Summary Create new employee // @Description Create new employee +// @id createEmployee // @Tags Employee // @Accept json // @Produce json -// @Param Body body request.CreateEmployeeInput true "Body" -// @Param Authorization header string true "jwt token" -// @Success 200 {object} view.EmployeeData -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Security BearerAuth +// @Param Body body CreateEmployeeRequest true "Body" +// @Success 200 {object} EmployeeDataResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /employees [post] func (h *handler) Create(c *gin.Context) { userID, err := authutils.GetUserIDFromContext(c, h.config) @@ -348,7 +357,7 @@ func (h *handler) Create(c *gin.Context) { } // 1. parse eml data from body - var input request.CreateEmployeeInput + var input request.CreateEmployeeRequest if err := c.ShouldBindJSON(&input); err != nil { c.JSON(http.StatusBadRequest, view.CreateResponse[any](nil, nil, err, input, "")) @@ -395,16 +404,17 @@ func (h *handler) Create(c *gin.Context) { // UpdateSkills godoc // @Summary Update Skill for employee by id // @Description Update Skill for employee by id +// @id updateSkill // @Tags Employee // @Accept json // @Produce json // @Param id path string true "Employee ID" -// @Param Body body request.UpdateSkillsInput true "Body" -// @Param Authorization header string true "jwt token" -// @Success 200 {object} view.UpdateSkillsEmployeeResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Security BearerAuth +// @Param Body body UpdateSkillsRequest true "Body" +// @Success 200 {object} UpdateSkillsEmployeeResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /employees/{id}/skills [put] func (h *handler) UpdateSkills(c *gin.Context) { employeeID := c.Param("id") @@ -413,7 +423,7 @@ func (h *handler) UpdateSkills(c *gin.Context) { return } - var body request.UpdateSkillsInput + var body request.UpdateSkillsRequest if err := c.ShouldBindJSON(&body); err != nil { if err != nil { c.JSON(http.StatusBadRequest, view.CreateResponse[any](nil, nil, err, body, "")) @@ -434,6 +444,7 @@ func (h *handler) UpdateSkills(c *gin.Context) { Seniority: body.Seniority, Stacks: body.Stacks, } + emp, err := h.controller.Employee.UpdateSkills(h.logger, employeeID, requestBody) if err != nil { l.Error(err, "failed to update skills") @@ -447,16 +458,17 @@ func (h *handler) UpdateSkills(c *gin.Context) { // UpdatePersonalInfo godoc // @Summary Update personal info of the employee by id // @Description Update personal info of the employee by id +// @id updatePersonalInfo // @Tags Employee // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param id path string true "Employee ID" -// @Param Body body request.UpdatePersonalInfoInput true "Body" -// @Success 200 {object} view.UpdatePersonalEmployeeResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Param Body body UpdatePersonalInfoRequest true "Body" +// @Success 200 {object} UpdatePersonalEmployeeResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /employees/{id}/personal-info [put] func (h *handler) UpdatePersonalInfo(c *gin.Context) { employeeID := c.Param("id") @@ -465,7 +477,7 @@ func (h *handler) UpdatePersonalInfo(c *gin.Context) { return } - var body request.UpdatePersonalInfoInput + var body request.UpdatePersonalInfoRequest if err := c.ShouldBindJSON(&body); err != nil { if err != nil { c.JSON(http.StatusBadRequest, view.CreateResponse[any](nil, nil, err, body, "")) @@ -527,16 +539,17 @@ func (h *handler) validateAndMappingCity(db *gorm.DB, countryName string, cityNa // UploadAvatar godoc // @Summary Upload avatar of employee by id // @Description Upload avatar of employee by id +// @id uploadAvatar // @Tags Employee // @Accept json // @Produce json // @Param id path string true "Employee ID" -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param file formData file true "avatar upload" -// @Success 200 {object} view.EmployeeContentDataResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Success 200 {object} EmployeeContentDataResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /employees/{id}/upload-avatar [post] func (h *handler) UploadAvatar(c *gin.Context) { // 1.1 get userID @@ -592,16 +605,17 @@ func (h *handler) UploadAvatar(c *gin.Context) { // UpdateRole godoc // @Summary Update role by employee id // @Description Update role by employee id +// @id updateRole // @Tags Employee // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param id path string true "Employee ID" -// @Param roleID body model.UUID true "Account role ID" -// @Success 200 {object} view.MessageResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Param Body body UpdateRoleRequest true "body" +// @Success 200 {object} MessageResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /employees/{id}/roles [put] func (h *handler) UpdateRole(c *gin.Context) { userID, err := authutils.GetUserIDFromContext(c, h.config) @@ -650,12 +664,13 @@ func (h *handler) UpdateRole(c *gin.Context) { // GetLineManagers godoc // @Summary Get the list of line managers // @Description Get the list of line managers +// @id getLineManagerList // @Tags Employee // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" -// @Success 200 {object} view.LineManagersResponse -// @Failure 500 {object} view.ErrorResponse +// @Security BearerAuth +// @Success 200 {object} LineManagersResponse +// @Failure 500 {object} ErrorResponse // @Router /line-managers [get] func (h *handler) GetLineManagers(c *gin.Context) { userInfo, err := authutils.GetLoggedInUserInfo(c, h.store, h.repo.DB(), h.config) @@ -683,16 +698,17 @@ func (h *handler) GetLineManagers(c *gin.Context) { // UpdateBaseSalary godoc // @Summary Update employee's base salary by employee and base salary id // @Description Update employee's base salary by employee and base salary id +// @id updateBaseSalary // @Tags Employee // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param id path string true "Employee ID" -// @Param Body body request.UpdateBaseSalaryInput true "Body" -// @Success 200 {object} view.UpdateBaseSalaryResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Param Body body UpdateBaseSalaryRequest true "Body" +// @Success 200 {object} UpdateBaseSalaryResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /employees/{id}/base-salary [put] func (h *handler) UpdateBaseSalary(c *gin.Context) { employeeID := c.Param("id") @@ -701,7 +717,7 @@ func (h *handler) UpdateBaseSalary(c *gin.Context) { return } - var req request.UpdateBaseSalaryInput + var req request.UpdateBaseSalaryRequest if err := c.ShouldBindJSON(&req); err != nil { if err != nil { c.JSON(http.StatusBadRequest, view.CreateResponse[any](nil, nil, err, req, "")) @@ -758,13 +774,14 @@ func (h *handler) UpdateBaseSalary(c *gin.Context) { // PublicList godoc // @Summary Get public employees list // @Description Get public employees list +// @id getPublicEmployeeList // @Tags Public // @Accept json // @Produce json -// @Success 200 {object} view.EmployeeLocationListResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Success 200 {object} EmployeeLocationListResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /public/employees [get] func (h *handler) PublicList(c *gin.Context) { l := h.logger.Fields(logger.Fields{ diff --git a/pkg/handler/employee/employee_test.go b/pkg/handler/employee/employee_test.go index 33da07db7..717a99f89 100644 --- a/pkg/handler/employee/employee_test.go +++ b/pkg/handler/employee/employee_test.go @@ -24,10 +24,11 @@ import ( "github.com/dwarvesf/fortress-api/pkg/store" "github.com/dwarvesf/fortress-api/pkg/utils" "github.com/dwarvesf/fortress-api/pkg/utils/testhelper" + "github.com/dwarvesf/fortress-api/pkg/view" "github.com/dwarvesf/fortress-api/pkg/worker" ) -const testToken = "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2OTkzMjExNDIsImlkIjoiMjY1NTgzMmUtZjAwOS00YjczLWE1MzUtNjRjM2EyMmU1NThmIiwiYXZhdGFyIjoiaHR0cHM6Ly9zMy1hcC1zb3V0aGVhc3QtMS5hbWF6b25hd3MuY29tL2ZvcnRyZXNzLWltYWdlcy81MTUzNTc0Njk1NjYzOTU1OTQ0LnBuZyIsImVtYWlsIjoidGhhbmhAZC5mb3VuZGF0aW9uIiwicGVybWlzc2lvbnMiOlsiZW1wbG95ZWVzLnJlYWQiXSwidXNlcl9pbmZvIjpudWxsfQ.GENGPEucSUrILN6tHDKxLMtj0M0REVMUPC7-XhDMpGM" +const testToken = "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjk1ODMzMzA5NDUsImlkIjoiMjY1NTgzMmUtZjAwOS00YjczLWE1MzUtNjRjM2EyMmU1NThmIiwiYXZhdGFyIjoiaHR0cHM6Ly9zMy1hcC1zb3V0aGVhc3QtMS5hbWF6b25hd3MuY29tL2ZvcnRyZXNzLWltYWdlcy81MTUzNTc0Njk1NjYzOTU1OTQ0LnBuZyIsImVtYWlsIjoidGhhbmhAZC5mb3VuZGF0aW9uIn0.oIdlwWGBy4E1CbSoEX6r2B6NQLbew_J-RttpAcg6w8M" func TestHandler_List(t *testing.T) { cfg := config.LoadTestConfig() @@ -39,7 +40,7 @@ func TestHandler_List(t *testing.T) { tests := []struct { name string - body request.GetListEmployeeInput + body request.GetListEmployeeQuery wantCode int wantErr error wantResponsePath string @@ -51,7 +52,7 @@ func TestHandler_List(t *testing.T) { }, { name: "have_workingStatus_and_no_pagination", - body: request.GetListEmployeeInput{ + body: request.GetListEmployeeQuery{ WorkingStatuses: []string{"contractor"}, }, wantCode: http.StatusOK, @@ -59,8 +60,8 @@ func TestHandler_List(t *testing.T) { }, { name: "have_workingStatuses_and_pagination", - body: request.GetListEmployeeInput{ - Pagination: model.Pagination{ + body: request.GetListEmployeeQuery{ + Pagination: view.Pagination{ Page: 1, Size: 5, }, @@ -71,8 +72,8 @@ func TestHandler_List(t *testing.T) { }, { name: "out_of_content", - body: request.GetListEmployeeInput{ - Pagination: model.Pagination{ + body: request.GetListEmployeeQuery{ + Pagination: view.Pagination{ Page: 5, Size: 5, }, @@ -83,7 +84,7 @@ func TestHandler_List(t *testing.T) { }, { name: "with_preload_false", - body: request.GetListEmployeeInput{ + body: request.GetListEmployeeQuery{ Preload: false, WorkingStatuses: []string{"probation"}, }, @@ -92,7 +93,7 @@ func TestHandler_List(t *testing.T) { }, { name: "without_preload", - body: request.GetListEmployeeInput{ + body: request.GetListEmployeeQuery{ Preload: false, WorkingStatuses: []string{"probation"}, }, @@ -101,7 +102,7 @@ func TestHandler_List(t *testing.T) { }, { name: "with_keyword", - body: request.GetListEmployeeInput{ + body: request.GetListEmployeeQuery{ Preload: false, Keyword: "thanh", }, @@ -110,7 +111,7 @@ func TestHandler_List(t *testing.T) { }, { name: "with_stack_code", - body: request.GetListEmployeeInput{ + body: request.GetListEmployeeQuery{ Preload: false, Stacks: []string{"golang"}, }, @@ -119,7 +120,7 @@ func TestHandler_List(t *testing.T) { }, { name: "with_project_code_and_position_code", - body: request.GetListEmployeeInput{ + body: request.GetListEmployeeQuery{ Preload: false, Projects: []string{"fortress"}, Positions: []string{"blockchain"}, @@ -129,7 +130,7 @@ func TestHandler_List(t *testing.T) { }, { name: "with_list_working_status", - body: request.GetListEmployeeInput{ + body: request.GetListEmployeeQuery{ Preload: false, WorkingStatuses: []string{"contractor", "probation"}, }, @@ -138,7 +139,7 @@ func TestHandler_List(t *testing.T) { }, { name: "invalid_position_code", - body: request.GetListEmployeeInput{ + body: request.GetListEmployeeQuery{ Positions: []string{""}, }, wantCode: http.StatusBadRequest, @@ -146,7 +147,7 @@ func TestHandler_List(t *testing.T) { }, { name: "invalid_chapter_code", - body: request.GetListEmployeeInput{ + body: request.GetListEmployeeQuery{ Chapters: []string{""}, }, wantCode: http.StatusBadRequest, @@ -154,7 +155,7 @@ func TestHandler_List(t *testing.T) { }, { name: "invalid_organization_code", - body: request.GetListEmployeeInput{ + body: request.GetListEmployeeQuery{ Organizations: []string{""}, }, wantCode: http.StatusBadRequest, @@ -162,7 +163,7 @@ func TestHandler_List(t *testing.T) { }, { name: "invalid_project_code", - body: request.GetListEmployeeInput{ + body: request.GetListEmployeeQuery{ Projects: []string{""}, }, wantCode: http.StatusBadRequest, @@ -170,7 +171,7 @@ func TestHandler_List(t *testing.T) { }, { name: "invalid_seniority_code", - body: request.GetListEmployeeInput{ + body: request.GetListEmployeeQuery{ Seniorities: []string{""}, }, wantCode: http.StatusBadRequest, @@ -178,7 +179,7 @@ func TestHandler_List(t *testing.T) { }, { name: "invalid_stack_code", - body: request.GetListEmployeeInput{ + body: request.GetListEmployeeQuery{ Stacks: []string{""}, }, wantCode: http.StatusBadRequest, @@ -186,7 +187,7 @@ func TestHandler_List(t *testing.T) { }, { name: "with_multiple_stacks", - body: request.GetListEmployeeInput{ + body: request.GetListEmployeeQuery{ Stacks: []string{"golang", "react"}, }, wantCode: http.StatusOK, @@ -292,14 +293,14 @@ func TestHandler_UpdateEmployeeStatus(t *testing.T) { name string wantCode int id string - body request.UpdateWorkingStatusInput + body request.UpdateWorkingStatusRequest wantResponsePath string }{ { name: "ok_update_employee_status", wantCode: http.StatusOK, id: "2655832e-f009-4b73-a535-64c3a22e558f", - body: request.UpdateWorkingStatusInput{ + body: request.UpdateWorkingStatusRequest{ EmployeeStatus: "contractor", }, wantResponsePath: "testdata/update_employee_status/200.json", @@ -308,7 +309,7 @@ func TestHandler_UpdateEmployeeStatus(t *testing.T) { name: "empty_employee_id", wantCode: http.StatusBadRequest, id: "", - body: request.UpdateWorkingStatusInput{ + body: request.UpdateWorkingStatusRequest{ EmployeeStatus: "contractor", }, wantResponsePath: "testdata/update_employee_status/400.json", @@ -317,7 +318,7 @@ func TestHandler_UpdateEmployeeStatus(t *testing.T) { name: "wrong_format_employee_id", wantCode: http.StatusBadRequest, id: "2655832e-f009-4b73-a535-64c3a22e558fa", - body: request.UpdateWorkingStatusInput{ + body: request.UpdateWorkingStatusRequest{ EmployeeStatus: "contractor", }, wantResponsePath: "testdata/update_employee_status/400.json", @@ -326,7 +327,7 @@ func TestHandler_UpdateEmployeeStatus(t *testing.T) { name: "invalid_employee_status", wantCode: http.StatusBadRequest, id: "2655832e-f009-4b73-a535-64c3a22e558f", - body: request.UpdateWorkingStatusInput{ + body: request.UpdateWorkingStatusRequest{ EmployeeStatus: "contractorr", }, wantResponsePath: "testdata/update_employee_status/invalid_employee_status.json", @@ -335,7 +336,7 @@ func TestHandler_UpdateEmployeeStatus(t *testing.T) { name: "employee_not_found", wantCode: http.StatusNotFound, id: "2655832e-f009-4b73-a535-64c3a22e558d", - body: request.UpdateWorkingStatusInput{ + body: request.UpdateWorkingStatusRequest{ EmployeeStatus: "contractor", }, wantResponsePath: "testdata/update_employee_status/404.json", @@ -524,7 +525,7 @@ func Test_UpdateSkill(t *testing.T) { wantCode int wantErr bool wantResponsePath string - body request.UpdateSkillsInput + body request.UpdateSkillsRequest id string }{ { @@ -532,7 +533,7 @@ func Test_UpdateSkill(t *testing.T) { wantCode: http.StatusOK, wantErr: false, wantResponsePath: "testdata/update_skills/200.json", - body: request.UpdateSkillsInput{ + body: request.UpdateSkillsRequest{ Positions: []model.UUID{ model.MustGetUUIDFromString("11ccffea-2cc9-4e98-9bef-3464dfe4dec8"), model.MustGetUUIDFromString("d796884d-a8c4-4525-81e7-54a3b6099eac"), @@ -554,7 +555,7 @@ func Test_UpdateSkill(t *testing.T) { wantCode: http.StatusNotFound, wantErr: true, wantResponsePath: "testdata/update_skills/404.json", - body: request.UpdateSkillsInput{ + body: request.UpdateSkillsRequest{ Positions: []model.UUID{ model.MustGetUUIDFromString("11ccffea-2cc9-4e98-9bef-3464dfe4dec8"), model.MustGetUUIDFromString("d796884d-a8c4-4525-81e7-54a3b6099eac"), @@ -576,7 +577,7 @@ func Test_UpdateSkill(t *testing.T) { wantCode: http.StatusBadRequest, wantErr: true, wantResponsePath: "testdata/update_skills/400.json", - body: request.UpdateSkillsInput{ + body: request.UpdateSkillsRequest{ Positions: []model.UUID{ model.MustGetUUIDFromString("11ccffea-2cc9-4e98-9bef-3464dfe4dec8"), model.MustGetUUIDFromString("d796884d-a8c4-4525-81e7-54a3b6099eac"), @@ -598,7 +599,7 @@ func Test_UpdateSkill(t *testing.T) { wantCode: http.StatusBadRequest, wantErr: true, wantResponsePath: "testdata/update_skills/400.json", - body: request.UpdateSkillsInput{ + body: request.UpdateSkillsRequest{ Positions: []model.UUID{ model.MustGetUUIDFromString("11ccffea-2cc9-4e98-9bef-3464dfe4dec8"), model.MustGetUUIDFromString("d796884d-a8c4-4525-81e7-54a3b6099eac"), @@ -620,7 +621,7 @@ func Test_UpdateSkill(t *testing.T) { wantCode: http.StatusNotFound, wantErr: true, wantResponsePath: "testdata/update_skills/stack_not_found.json", - body: request.UpdateSkillsInput{ + body: request.UpdateSkillsRequest{ Positions: []model.UUID{ model.MustGetUUIDFromString("11ccffea-2cc9-4e98-9bef-3464dfe4dec8"), model.MustGetUUIDFromString("d796884d-a8c4-4525-81e7-54a3b6099eac"), @@ -683,7 +684,7 @@ func Test_Create(t *testing.T) { wantCode int wantErr bool wantResponsePath string - body request.CreateEmployeeInput + body request.CreateEmployeeRequest id string }{ { @@ -691,7 +692,7 @@ func Test_Create(t *testing.T) { wantCode: 400, wantErr: true, wantResponsePath: "testdata/create/existed_user.json", - body: request.CreateEmployeeInput{ + body: request.CreateEmployeeRequest{ FullName: "Lê Nguyễn Minh Khôi", DisplayName: "Khoi Le", TeamEmail: "thanh@d.foundation", @@ -712,7 +713,7 @@ func Test_Create(t *testing.T) { wantCode: 400, wantErr: true, wantResponsePath: "testdata/create/validation_err.json", - body: request.CreateEmployeeInput{ + body: request.CreateEmployeeRequest{ FullName: "Lê Nguyễn Minh Khôi", DisplayName: "Khoi Le", TeamEmail: "thanh@d.foundation", @@ -733,7 +734,7 @@ func Test_Create(t *testing.T) { wantCode: 404, wantErr: true, wantResponsePath: "testdata/create/invalid_uuid.json", - body: request.CreateEmployeeInput{ + body: request.CreateEmployeeRequest{ FullName: "Lê Nguyễn Minh Khôi", DisplayName: "Khoi Le", TeamEmail: "thanh@d.foundation", @@ -797,7 +798,7 @@ func Test_UpdatePersonalInfo(t *testing.T) { wantCode int wantErr bool wantResponsePath string - body request.UpdatePersonalInfoInput + body request.UpdatePersonalInfoRequest id string }{ { @@ -805,7 +806,7 @@ func Test_UpdatePersonalInfo(t *testing.T) { wantCode: http.StatusOK, wantErr: false, wantResponsePath: "testdata/update_personal_info/200.json", - body: request.UpdatePersonalInfoInput{ + body: request.UpdatePersonalInfoRequest{ DoB: &dob, Gender: "Male", Address: "Phan Huy Ich, Tan Binh District, Ho Chi Minh, Vietnam", @@ -820,7 +821,7 @@ func Test_UpdatePersonalInfo(t *testing.T) { wantCode: http.StatusNotFound, wantErr: true, wantResponsePath: "testdata/update_personal_info/404.json", - body: request.UpdatePersonalInfoInput{ + body: request.UpdatePersonalInfoRequest{ DoB: &dob, Gender: "Male", Address: "Phan Huy Ich, Tan Binh District, Ho Chi Minh, Vietnam", @@ -835,7 +836,7 @@ func Test_UpdatePersonalInfo(t *testing.T) { wantCode: http.StatusBadRequest, wantErr: true, wantResponsePath: "testdata/update_personal_info/400.json", - body: request.UpdatePersonalInfoInput{ + body: request.UpdatePersonalInfoRequest{ DoB: &dob, Gender: "Male", Address: "Phan Huy Ich, Tan Binh District, Ho Chi Minh, Vietnam", @@ -850,7 +851,7 @@ func Test_UpdatePersonalInfo(t *testing.T) { wantCode: http.StatusBadRequest, wantErr: true, wantResponsePath: "testdata/update_personal_info/400.json", - body: request.UpdatePersonalInfoInput{ + body: request.UpdatePersonalInfoRequest{ DoB: &dob, Gender: "Male", Address: "Phan Huy Ich, Tan Binh District, Ho Chi Minh, Vietnam", @@ -865,7 +866,7 @@ func Test_UpdatePersonalInfo(t *testing.T) { wantCode: http.StatusBadRequest, wantErr: true, wantResponsePath: "testdata/update_personal_info/invalid_country.json", - body: request.UpdatePersonalInfoInput{ + body: request.UpdatePersonalInfoRequest{ DoB: &dob, Gender: "Male", Address: "Phan Huy Ich, Tan Binh District, Ho Chi Minh, Vietnam", diff --git a/pkg/handler/employee/errs/errors.go b/pkg/handler/employee/errs/errors.go index 490b06132..11e145977 100644 --- a/pkg/handler/employee/errs/errors.go +++ b/pkg/handler/employee/errs/errors.go @@ -24,6 +24,9 @@ var ( ErrRoleCannotBeEmpty = errors.New("role cannot be empty") ErrCountryNotFound = errors.New("country not found") ErrCityDoesNotBelongToCountry = errors.New("city does not belong to country") + ErrInvalidLineManagerID = errors.New("invalid line manager ID") + ErrInvalidOrganizationID = errors.New("invalid organization ID") + ErrInvalidReferredBy = errors.New("invalid referred by") ) func ConvertControllerErr(c *gin.Context, err error) { diff --git a/pkg/handler/employee/request/request.go b/pkg/handler/employee/request/request.go index 840c46c08..251b8e23f 100644 --- a/pkg/handler/employee/request/request.go +++ b/pkg/handler/employee/request/request.go @@ -7,10 +7,11 @@ import ( "github.com/dwarvesf/fortress-api/pkg/handler/employee/errs" "github.com/dwarvesf/fortress-api/pkg/model" + "github.com/dwarvesf/fortress-api/pkg/view" ) -type GetListEmployeeInput struct { - model.Pagination +type GetListEmployeeQuery struct { + view.Pagination WorkingStatuses []string `json:"workingStatuses" form:"workingStatuses"` Preload bool `json:"preload" form:"preload,default=true"` @@ -22,40 +23,39 @@ type GetListEmployeeInput struct { Organizations []string `json:"organizations" form:"organizations"` LineManagers []string `json:"lineManagers" form:"lineManagers"` Keyword string `json:"keyword" form:"keyword"` -} - -type UpdateEmployeeGeneralInfoInput struct { - FullName string `form:"fullName" json:"fullName" binding:"required,max=99"` - Email string `form:"email" json:"email" binding:"required,email"` - Phone string `form:"phone" json:"phone" binding:"required,max=18,min=9"` - LineManagerID model.UUID `form:"lineManagerID" json:"lineManagerID"` - DisplayName string `form:"displayName" json:"displayName"` - GithubID string `form:"githubID" json:"githubID"` - NotionID string `form:"notionID" json:"notionID"` - NotionName string `form:"notionName" json:"notionName"` - NotionEmail string `form:"notionEmail" json:"notionEmail"` - DiscordID string `form:"discordID" json:"discordID"` - DiscordName string `form:"discordName" json:"discordName"` - LinkedInName string `form:"linkedInName" json:"linkedInName"` - LeftDate string `form:"leftDate" json:"leftDate"` - JoinedDate string `form:"joinedDate" json:"joinedDate"` - OrganizationIDs []model.UUID `form:"organizationIDs" json:"organizationIDs"` - ReferredBy model.UUID `form:"referredBy" json:"referredBy"` - WiseRecipientID string `form:"wiseRecipientID" json:"wiseRecipientID"` - WiseRecipientEmail string `form:"wiseRecipientEmail" json:"wiseRecipientEmail"` - WiseRecipientName string `form:"wiseRecipientName" json:"wiseRecipientName"` - WiseAccountNumber string `form:"wiseAccountNumber" json:"wiseAccountNumber"` - WiseCurrency string `form:"wiseCurrency" json:"wiseCurrency"` -} - -type UpdateBaseSalaryInput struct { +} // @name GetListEmployeeQuery + +type UpdateEmployeeGeneralInfoRequest struct { + FullName string `form:"fullName" json:"fullName" binding:"required,max=99"` + Email string `form:"email" json:"email" binding:"required,email"` + Phone string `form:"phone" json:"phone" binding:"required,max=18,min=9"` + LineManagerID view.UUID `form:"lineManagerID" json:"lineManagerID"` + DisplayName string `form:"displayName" json:"displayName"` + GithubID string `form:"githubID" json:"githubID"` + NotionID string `form:"notionID" json:"notionID"` + NotionName string `form:"notionName" json:"notionName"` + NotionEmail string `form:"notionEmail" json:"notionEmail"` + DiscordID string `form:"discordID" json:"discordID"` + DiscordName string `form:"discordName" json:"discordName"` + LinkedInName string `form:"linkedInName" json:"linkedInName"` + LeftDate string `form:"leftDate" json:"leftDate"` + JoinedDate string `form:"joinedDate" json:"joinedDate"` + OrganizationIDs []view.UUID `form:"organizationIDs" json:"organizationIDs"` + ReferredBy view.UUID `form:"referredBy" json:"referredBy"` + WiseRecipientID string `form:"wiseRecipientID" json:"wiseRecipientID"` + WiseRecipientEmail string `form:"wiseRecipientEmail" json:"wiseRecipientEmail"` + WiseRecipientName string `form:"wiseRecipientName" json:"wiseRecipientName"` + WiseAccountNumber string `form:"wiseAccountNumber" json:"wiseAccountNumber"` + WiseCurrency string `form:"wiseCurrency" json:"wiseCurrency"` +} // @name UpdateEmployeeGeneralInfoRequest +type UpdateBaseSalaryRequest struct { ContractAmount int64 `form:"contractAmount" json:"contractAmount" binding:"gte=0"` CompanyAccountAmount int64 `form:"companyAccountAmount" json:"companyAccountAmount" binding:"gte=0"` PersonalAccountAmount int64 `form:"personalAccountAmount" json:"personalAccountAmount" binding:"gte=0"` CurrencyCode string `form:"currencyCode" json:"currencyCode" binding:"required"` EffectiveDate *time.Time `form:"effectiveDate" json:"effectiveDate"` Batch int `form:"batch" json:"batch" binding:"required,eq=1|eq=15"` -} +} // @name UpdateBaseSalaryRequest type AddMenteeInput struct { MenteeID model.UUID `form:"menteeID" json:"menteeID" binding:"required"` @@ -78,8 +78,8 @@ func (e *DeleteMenteeInput) Validate() error { return nil } -// CreateEmployeeInput view for create new employee -type CreateEmployeeInput struct { +// CreateEmployeeRequest view for create new employee +type CreateEmployeeRequest struct { FullName string `json:"fullName" binding:"required,max=100"` DisplayName string `json:"displayName" binding:"required"` TeamEmail string `json:"teamEmail" binding:"required"` @@ -91,17 +91,17 @@ type CreateEmployeeInput struct { Status string `json:"status" binding:"required"` ReferredBy model.UUID `json:"referredBy"` JoinedDate string `json:"joinedDate" binding:"required"` -} +} // @name CreateEmployeeRequest -type UpdateSkillsInput struct { +type UpdateSkillsRequest struct { Positions []model.UUID `form:"positions" json:"positions" binding:"required"` LeadingChapters []model.UUID `form:"leadingChapters" json:"leadingChapters"` Chapters []model.UUID `form:"chapters" json:"chapters" binding:"required"` Seniority model.UUID `form:"seniority" json:"seniority" binding:"required"` Stacks []model.UUID `form:"stacks" json:"stacks" binding:"required"` -} +} // @name UpdateSkillsRequest -type UpdatePersonalInfoInput struct { +type UpdatePersonalInfoRequest struct { DoB *time.Time `form:"dob" json:"dob" binding:"required"` Gender string `form:"gender" json:"gender" binding:"required"` PlaceOfResidence string `form:"placeOfResidence" json:"placeOfResidence"` @@ -109,13 +109,41 @@ type UpdatePersonalInfoInput struct { PersonalEmail string `form:"personalEmail" json:"personalEmail" binding:"required,email"` Country string `form:"country" json:"country" binding:"required"` City string `form:"city" json:"city" binding:"required"` +} // @name UpdatePersonalInfoRequest + +type UpdateWorkingStatusRequest struct { + EmployeeStatus WorkingStatus `json:"employeeStatus"` +} // @name UpdateWorkingStatusRequest + +type WorkingStatus string // @name WorkingStatus + +const ( + WorkingStatusOnBoarding WorkingStatus = "on-boarding" + WorkingStatusLeft WorkingStatus = "left" + WorkingStatusProbation WorkingStatus = "probation" + WorkingStatusFullTime WorkingStatus = "full-time" + WorkingStatusContractor WorkingStatus = "contractor" +) + +func (e WorkingStatus) IsValid() bool { + switch e { + case + WorkingStatusOnBoarding, + WorkingStatusContractor, + WorkingStatusLeft, + WorkingStatusProbation, + WorkingStatusFullTime: + return true + } + return false } -type UpdateWorkingStatusInput struct { - EmployeeStatus model.WorkingStatus `json:"employeeStatus"` +// String returns the string type from the WorkingStatus type +func (e WorkingStatus) String() string { + return string(e) } -func (i *UpdateWorkingStatusInput) Validate() error { +func (i *UpdateWorkingStatusRequest) Validate() error { if !i.EmployeeStatus.IsValid() { return errs.ErrInvalidEmployeeStatus } @@ -123,7 +151,7 @@ func (i *UpdateWorkingStatusInput) Validate() error { return nil } -func (input *GetListEmployeeInput) Validate() error { +func (input *GetListEmployeeQuery) Validate() error { if len(input.Positions) > 0 { for _, p := range input.Positions { if strings.TrimSpace(p) == "" { @@ -170,7 +198,7 @@ func (input *GetListEmployeeInput) Validate() error { return nil } -func (i *CreateEmployeeInput) Validate() error { +func (i *CreateEmployeeRequest) Validate() error { teamEmailRegex := ".+@((dwarvesv\\.com)|(d\\.foundation))" regex, _ := regexp.Compile(teamEmailRegex) if i.TeamEmail != "" && !regex.MatchString(i.TeamEmail) { @@ -193,7 +221,7 @@ func (i *CreateEmployeeInput) Validate() error { return nil } -func (i *CreateEmployeeInput) GetJoinedDate() *time.Time { +func (i *CreateEmployeeRequest) GetJoinedDate() *time.Time { date, err := time.Parse("2006-01-02", i.JoinedDate) if i.JoinedDate == "" || err != nil { return nil @@ -202,13 +230,13 @@ func (i *CreateEmployeeInput) GetJoinedDate() *time.Time { return &date } -type UpdateRoleBody struct { +type UpdateRoleRequest struct { Roles []model.UUID `form:"roles" json:"roles" binding:"required"` -} +} // @name UpdateRoleRequest type UpdateRoleInput struct { EmployeeID string - Body UpdateRoleBody + Body UpdateRoleRequest } func (i UpdateRoleInput) Validate() error { diff --git a/pkg/handler/employee/testdata/create/validation_err.json b/pkg/handler/employee/testdata/create/validation_err.json index 7fc40265e..58c48b6a3 100644 --- a/pkg/handler/employee/testdata/create/validation_err.json +++ b/pkg/handler/employee/testdata/create/validation_err.json @@ -1,6 +1,6 @@ { "data": null, - "error": "Key: 'CreateEmployeeInput.PersonalEmail' Error:Field validation for 'PersonalEmail' failed on the 'email' tag", + "error": "Key: 'CreateEmployeeRequest.PersonalEmail' Error:Field validation for 'PersonalEmail' failed on the 'email' tag", "errors": [ { "field": "PersonalEmail", diff --git a/pkg/handler/employee/testdata/one/200.json b/pkg/handler/employee/testdata/one/200.json index e5c18dd49..7a31b3493 100644 --- a/pkg/handler/employee/testdata/one/200.json +++ b/pkg/handler/employee/testdata/one/200.json @@ -29,11 +29,8 @@ "leftDate": null, "seniority": { "id": "01fb6322-d727-47e3-a242-5039ea4732fd", - "createdAt": "2022-11-07T09:50:25.714604Z", - "updatedAt": "2022-11-07T09:50:25.714604Z", - "name": "Staff", "code": "staff", - "level": 5 + "name": "Staff" }, "lineManager": null, "referredBy": null, @@ -60,6 +57,25 @@ "name": "Blockchain" } ], + "projects": [ + { + "id": "8dc3be2e-19a4-4942-8a79-56db391a0b15", + "name": "Fortress", + "deploymentType": "official", + "status": "active", + "positions": [ + { + "id": "11ccffea-2cc9-4e98-9bef-3464dfe4dec8", + "code": "frontend", + "name": "Frontend" + } + ], + "code": "", + "avatar": "", + "startDate": "2022-11-01T00:00:00Z", + "endDate": null + } + ], "stacks": [ { "id": "0ecf47c8-cca4-4c30-94bb-054b1124c44f", @@ -81,25 +97,6 @@ "name": "⚪️ Admin" } ], - "projects": [ - { - "id": "8dc3be2e-19a4-4942-8a79-56db391a0b15", - "name": "Fortress", - "deploymentType": "official", - "status": "active", - "positions": [ - { - "id": "11ccffea-2cc9-4e98-9bef-3464dfe4dec8", - "code": "frontend", - "name": "Frontend" - } - ], - "code": "", - "avatar": "", - "startDate": "2022-11-01T00:00:00Z", - "endDate": null - } - ], "chapters": [], "mentees": [ { @@ -110,11 +107,8 @@ "username": "ducnv", "seniority": { "id": "d796884d-a8c4-4525-81e7-54a3b6099eac", - "createdAt": "2022-11-07T09:50:25.714604Z", - "updatedAt": "2022-11-07T09:50:25.714604Z", - "name": "Junior", "code": "junior", - "level": 2 + "name": "Junior" }, "positions": [] }, @@ -126,11 +120,8 @@ "username": "truongnx", "seniority": { "id": "11ccffea-2cc9-4e98-9bef-3464dfe4dec8", - "createdAt": "2022-11-07T09:50:25.714604Z", - "updatedAt": "2022-11-07T09:50:25.714604Z", - "name": "Fresher", "code": "fresher", - "level": 1 + "name": "Fresher" }, "positions": [] }, @@ -142,19 +133,14 @@ "username": "quynhlv", "seniority": { "id": "01fb6322-d727-47e3-a242-5039ea4732fc", - "createdAt": "2022-11-07T09:50:25.714604Z", - "updatedAt": "2022-11-07T09:50:25.714604Z", - "name": "Senior", "code": "senior", - "level": 4 + "name": "Senior" }, "positions": [ { "id": "dac16ce6-9e5a-4ff3-9ea2-fdea4853925e", - "createdAt": "2022-11-07T09:50:25.714604Z", - "updatedAt": "2022-11-07T09:50:25.714604Z", - "name": "Devops", - "code": "devops" + "code": "devops", + "name": "Devops" } ] }, @@ -166,11 +152,8 @@ "username": "nguyennh", "seniority": { "id": "11ccffea-2cc9-4e98-9bef-3464dfe4dec8", - "createdAt": "2022-11-07T09:50:25.714604Z", - "updatedAt": "2022-11-07T09:50:25.714604Z", - "name": "Fresher", "code": "fresher", - "level": 1 + "name": "Fresher" }, "positions": [] }, @@ -182,40 +165,29 @@ "username": "huynh", "seniority": { "id": "01fb6322-d727-47e3-a242-5039ea4732fd", - "createdAt": "2022-11-07T09:50:25.714604Z", - "updatedAt": "2022-11-07T09:50:25.714604Z", - "name": "Staff", "code": "staff", - "level": 5 + "name": "Staff" }, "positions": [ { "id": "dac16ce6-9e5a-4ff3-9ea2-fdea4853925e", - "createdAt": "2022-11-07T09:50:25.714604Z", - "updatedAt": "2022-11-07T09:50:25.714604Z", - "name": "Devops", - "code": "devops" + "code": "devops", + "name": "Devops" }, { "id": "01fb6322-d727-47e3-a242-5039ea4732fc", - "createdAt": "2022-11-07T09:50:25.714604Z", - "updatedAt": "2022-11-07T09:50:25.714604Z", - "name": "Blockchain", - "code": "blockchain" + "code": "blockchain", + "name": "Blockchain" }, { "id": "11ccffea-2cc9-4e98-9bef-3464dfe4dec8", - "createdAt": "2022-11-07T09:50:25.714604Z", - "updatedAt": "2022-11-07T09:50:25.714604Z", - "name": "Frontend", - "code": "frontend" + "code": "frontend", + "name": "Frontend" }, { "id": "d796884d-a8c4-4525-81e7-54a3b6099eac", - "createdAt": "2022-11-07T09:50:25.714604Z", - "updatedAt": "2022-11-07T09:50:25.714604Z", - "name": "Backend", - "code": "backend" + "code": "backend", + "name": "Backend" } ] }, @@ -227,40 +199,29 @@ "username": "huytq", "seniority": { "id": "01fb6322-d727-47e3-a242-5039ea4732fd", - "createdAt": "2022-11-07T09:50:25.714604Z", - "updatedAt": "2022-11-07T09:50:25.714604Z", - "name": "Staff", "code": "staff", - "level": 5 + "name": "Staff" }, "positions": [ { "id": "11ccffea-2cc9-4e98-9bef-3464dfe4dec8", - "createdAt": "2022-11-07T09:50:25.714604Z", - "updatedAt": "2022-11-07T09:50:25.714604Z", - "name": "Frontend", - "code": "frontend" + "code": "frontend", + "name": "Frontend" }, { "id": "d796884d-a8c4-4525-81e7-54a3b6099eac", - "createdAt": "2022-11-07T09:50:25.714604Z", - "updatedAt": "2022-11-07T09:50:25.714604Z", - "name": "Backend", - "code": "backend" + "code": "backend", + "name": "Backend" }, { "id": "dac16ce6-9e5a-4ff3-9ea2-fdea4853925e", - "createdAt": "2022-11-07T09:50:25.714604Z", - "updatedAt": "2022-11-07T09:50:25.714604Z", - "name": "Devops", - "code": "devops" + "code": "devops", + "name": "Devops" }, { "id": "01fb6322-d727-47e3-a242-5039ea4732fc", - "createdAt": "2022-11-07T09:50:25.714604Z", - "updatedAt": "2022-11-07T09:50:25.714604Z", - "name": "Blockchain", - "code": "blockchain" + "code": "blockchain", + "name": "Blockchain" } ] }, @@ -272,40 +233,29 @@ "username": "huy", "seniority": { "id": "01fb6322-d727-47e3-a242-5039ea4732fd", - "createdAt": "2022-11-07T09:50:25.714604Z", - "updatedAt": "2022-11-07T09:50:25.714604Z", - "name": "Staff", "code": "staff", - "level": 5 + "name": "Staff" }, "positions": [ { "id": "11ccffea-2cc9-4e98-9bef-3464dfe4dec8", - "createdAt": "2022-11-07T09:50:25.714604Z", - "updatedAt": "2022-11-07T09:50:25.714604Z", - "name": "Frontend", - "code": "frontend" + "code": "frontend", + "name": "Frontend" }, { "id": "d796884d-a8c4-4525-81e7-54a3b6099eac", - "createdAt": "2022-11-07T09:50:25.714604Z", - "updatedAt": "2022-11-07T09:50:25.714604Z", - "name": "Backend", - "code": "backend" + "code": "backend", + "name": "Backend" }, { "id": "dac16ce6-9e5a-4ff3-9ea2-fdea4853925e", - "createdAt": "2022-11-07T09:50:25.714604Z", - "updatedAt": "2022-11-07T09:50:25.714604Z", - "name": "Devops", - "code": "devops" + "code": "devops", + "name": "Devops" }, { "id": "01fb6322-d727-47e3-a242-5039ea4732fc", - "createdAt": "2022-11-07T09:50:25.714604Z", - "updatedAt": "2022-11-07T09:50:25.714604Z", - "name": "Blockchain", - "code": "blockchain" + "code": "blockchain", + "name": "Blockchain" } ] }, @@ -317,19 +267,14 @@ "username": "thuongptt", "seniority": { "id": "01fb6322-d727-47e3-a242-5039ea4732fc", - "createdAt": "2022-11-07T09:50:25.714604Z", - "updatedAt": "2022-11-07T09:50:25.714604Z", - "name": "Senior", "code": "senior", - "level": 4 + "name": "Senior" }, "positions": [ { "id": "dac16ce6-9e5a-4ff3-9ea2-fdea4853925e", - "createdAt": "2022-11-07T09:50:25.714604Z", - "updatedAt": "2022-11-07T09:50:25.714604Z", - "name": "Devops", - "code": "devops" + "code": "devops", + "name": "Devops" } ] }, @@ -341,19 +286,14 @@ "username": "thaontm", "seniority": { "id": "dac16ce6-9e5a-4ff3-9ea2-fdea4853925e", - "createdAt": "2022-11-07T09:50:25.714604Z", - "updatedAt": "2022-11-07T09:50:25.714604Z", - "name": "Mid", "code": "mid", - "level": 3 + "name": "Mid" }, "positions": [ { "id": "dac16ce6-9e5a-4ff3-9ea2-fdea4853925e", - "createdAt": "2022-11-07T09:50:25.714604Z", - "updatedAt": "2022-11-07T09:50:25.714604Z", - "name": "Devops", - "code": "devops" + "code": "devops", + "name": "Devops" } ] }, @@ -365,19 +305,14 @@ "username": "cody", "seniority": { "id": "dac16ce6-9e5a-4ff3-9ea2-fdea4853925e", - "createdAt": "2022-11-07T09:50:25.714604Z", - "updatedAt": "2022-11-07T09:50:25.714604Z", - "name": "Mid", "code": "mid", - "level": 3 + "name": "Mid" }, "positions": [ { "id": "dac16ce6-9e5a-4ff3-9ea2-fdea4853925e", - "createdAt": "2022-11-07T09:50:25.714604Z", - "updatedAt": "2022-11-07T09:50:25.714604Z", - "name": "Devops", - "code": "devops" + "code": "devops", + "name": "Devops" } ] }, @@ -389,19 +324,14 @@ "username": "bean", "seniority": { "id": "dac16ce6-9e5a-4ff3-9ea2-fdea4853925e", - "createdAt": "2022-11-07T09:50:25.714604Z", - "updatedAt": "2022-11-07T09:50:25.714604Z", - "name": "Mid", "code": "mid", - "level": 3 + "name": "Mid" }, "positions": [ { "id": "dac16ce6-9e5a-4ff3-9ea2-fdea4853925e", - "createdAt": "2022-11-07T09:50:25.714604Z", - "updatedAt": "2022-11-07T09:50:25.714604Z", - "name": "Devops", - "code": "devops" + "code": "devops", + "name": "Devops" } ] }, @@ -413,11 +343,8 @@ "username": "anhnh", "seniority": { "id": "d796884d-a8c4-4525-81e7-54a3b6099eac", - "createdAt": "2022-11-07T09:50:25.714604Z", - "updatedAt": "2022-11-07T09:50:25.714604Z", - "name": "Junior", "code": "junior", - "level": 2 + "name": "Junior" }, "positions": [] }, @@ -429,11 +356,8 @@ "username": "hungvt", "seniority": { "id": "d796884d-a8c4-4525-81e7-54a3b6099eac", - "createdAt": "2022-11-07T09:50:25.714604Z", - "updatedAt": "2022-11-07T09:50:25.714604Z", - "name": "Junior", "code": "junior", - "level": 2 + "name": "Junior" }, "positions": [] }, @@ -445,11 +369,8 @@ "username": "khanglna", "seniority": { "id": "11ccffea-2cc9-4e98-9bef-3464dfe4dec8", - "createdAt": "2022-11-07T09:50:25.714604Z", - "updatedAt": "2022-11-07T09:50:25.714604Z", - "name": "Fresher", "code": "fresher", - "level": 1 + "name": "Fresher" }, "positions": [] }, @@ -461,40 +382,29 @@ "username": "benjamin", "seniority": { "id": "01fb6322-d727-47e3-a242-5039ea4732fd", - "createdAt": "2022-11-07T09:50:25.714604Z", - "updatedAt": "2022-11-07T09:50:25.714604Z", - "name": "Staff", "code": "staff", - "level": 5 + "name": "Staff" }, "positions": [ { "id": "11ccffea-2cc9-4e98-9bef-3464dfe4dec8", - "createdAt": "2022-11-07T09:50:25.714604Z", - "updatedAt": "2022-11-07T09:50:25.714604Z", - "name": "Frontend", - "code": "frontend" + "code": "frontend", + "name": "Frontend" }, { "id": "d796884d-a8c4-4525-81e7-54a3b6099eac", - "createdAt": "2022-11-07T09:50:25.714604Z", - "updatedAt": "2022-11-07T09:50:25.714604Z", - "name": "Backend", - "code": "backend" + "code": "backend", + "name": "Backend" }, { "id": "dac16ce6-9e5a-4ff3-9ea2-fdea4853925e", - "createdAt": "2022-11-07T09:50:25.714604Z", - "updatedAt": "2022-11-07T09:50:25.714604Z", - "name": "Devops", - "code": "devops" + "code": "devops", + "name": "Devops" }, { "id": "01fb6322-d727-47e3-a242-5039ea4732fc", - "createdAt": "2022-11-07T09:50:25.714604Z", - "updatedAt": "2022-11-07T09:50:25.714604Z", - "name": "Blockchain", - "code": "blockchain" + "code": "blockchain", + "name": "Blockchain" } ] }, @@ -506,40 +416,29 @@ "username": "alan", "seniority": { "id": "01fb6322-d727-47e3-a242-5039ea4732fd", - "createdAt": "2022-11-07T09:50:25.714604Z", - "updatedAt": "2022-11-07T09:50:25.714604Z", - "name": "Staff", "code": "staff", - "level": 5 + "name": "Staff" }, "positions": [ { "id": "11ccffea-2cc9-4e98-9bef-3464dfe4dec8", - "createdAt": "2022-11-07T09:50:25.714604Z", - "updatedAt": "2022-11-07T09:50:25.714604Z", - "name": "Frontend", - "code": "frontend" + "code": "frontend", + "name": "Frontend" }, { "id": "d796884d-a8c4-4525-81e7-54a3b6099eac", - "createdAt": "2022-11-07T09:50:25.714604Z", - "updatedAt": "2022-11-07T09:50:25.714604Z", - "name": "Backend", - "code": "backend" + "code": "backend", + "name": "Backend" }, { "id": "dac16ce6-9e5a-4ff3-9ea2-fdea4853925e", - "createdAt": "2022-11-07T09:50:25.714604Z", - "updatedAt": "2022-11-07T09:50:25.714604Z", - "name": "Devops", - "code": "devops" + "code": "devops", + "name": "Devops" }, { "id": "01fb6322-d727-47e3-a242-5039ea4732fc", - "createdAt": "2022-11-07T09:50:25.714604Z", - "updatedAt": "2022-11-07T09:50:25.714604Z", - "name": "Blockchain", - "code": "blockchain" + "code": "blockchain", + "name": "Blockchain" } ] }, @@ -551,19 +450,14 @@ "username": "duc", "seniority": { "id": "01fb6322-d727-47e3-a242-5039ea4732fc", - "createdAt": "2022-11-07T09:50:25.714604Z", - "updatedAt": "2022-11-07T09:50:25.714604Z", - "name": "Senior", "code": "senior", - "level": 4 + "name": "Senior" }, "positions": [ { "id": "dac16ce6-9e5a-4ff3-9ea2-fdea4853925e", - "createdAt": "2022-11-07T09:50:25.714604Z", - "updatedAt": "2022-11-07T09:50:25.714604Z", - "name": "Devops", - "code": "devops" + "code": "devops", + "name": "Devops" } ] }, @@ -575,19 +469,14 @@ "username": "mia", "seniority": { "id": "01fb6322-d727-47e3-a242-5039ea4732fc", - "createdAt": "2022-11-07T09:50:25.714604Z", - "updatedAt": "2022-11-07T09:50:25.714604Z", - "name": "Senior", "code": "senior", - "level": 4 + "name": "Senior" }, "positions": [ { "id": "dac16ce6-9e5a-4ff3-9ea2-fdea4853925e", - "createdAt": "2022-11-07T09:50:25.714604Z", - "updatedAt": "2022-11-07T09:50:25.714604Z", - "name": "Devops", - "code": "devops" + "code": "devops", + "name": "Devops" } ] } diff --git a/pkg/handler/employee/testdata/update_employee_status/200.json b/pkg/handler/employee/testdata/update_employee_status/200.json index adb1f413a..363a39f57 100644 --- a/pkg/handler/employee/testdata/update_employee_status/200.json +++ b/pkg/handler/employee/testdata/update_employee_status/200.json @@ -1,112 +1,109 @@ { "data": { - "id": "2655832e-f009-4b73-a535-64c3a22e558f", - "createdAt": "2022-11-02T09:52:34.586566Z", - "updatedAt": "", - "fullName": "Phạm Đức Thành", - "displayName": "Thanh Pham", - "teamEmail": "thanh@d.foundation", - "personalEmail": "thanhpham123@gmail.com", - "avatar": "https://s3-ap-southeast-1.amazonaws.com/fortress-images/5153574695663955944.png", - "phoneNumber": "0123456788", "address": "Tan Binh District, Ho Chi Minh, Vietnam", - "placeOfResidence": "", - "country": "", - "city": "", - "mbti": "ISFJ-A", - "gender": "Male", - "horoscope": "Aquaman", + "avatar": "https://s3-ap-southeast-1.amazonaws.com/fortress-images/5153574695663955944.png", + "baseSalary": null, "birthday": "1990-01-02T00:00:00Z", - "username": "thanh", - "githubID": "thanhpham", - "notionID": "39523061", - "notionName": "notionName", + "chapters": [], + "city": "", + "country": "", + "createdAt": "2022-11-02T09:52:34.586566Z", "discordID": "", "discordName": "", - "linkedInName": "", - "status": "contractor", + "displayName": "Thanh Pham", + "fullName": "Phạm Đức Thành", + "gender": "Male", + "githubID": "thanhpham", + "horoscope": "Aquaman", + "id": "2655832e-f009-4b73-a535-64c3a22e558f", "joinedDate": "2018-09-01T00:00:00Z", "leftDate": null, - "seniority": { - "id": "01fb6322-d727-47e3-a242-5039ea4732fd", - "createdAt": "2022-11-07T09:50:25.714604Z", - "updatedAt": "2022-11-07T09:50:25.714604Z", - "name": "Staff", - "code": "staff", - "level": 5 - }, "lineManager": null, - "referredBy": null, + "linkedInName": "", + "mbti": "ISFJ-A", + "mentees": null, + "notionID": "39523061", + "notionName": "notionName", "organizations": [], + "personalEmail": "thanhpham123@gmail.com", + "phoneNumber": "0123456788", + "placeOfResidence": "", "positions": [ { - "id": "11ccffea-2cc9-4e98-9bef-3464dfe4dec8", "code": "frontend", + "id": "11ccffea-2cc9-4e98-9bef-3464dfe4dec8", "name": "Frontend" }, { - "id": "d796884d-a8c4-4525-81e7-54a3b6099eac", "code": "backend", + "id": "d796884d-a8c4-4525-81e7-54a3b6099eac", "name": "Backend" }, { - "id": "dac16ce6-9e5a-4ff3-9ea2-fdea4853925e", "code": "devops", + "id": "dac16ce6-9e5a-4ff3-9ea2-fdea4853925e", "name": "Devops" }, { - "id": "01fb6322-d727-47e3-a242-5039ea4732fc", "code": "blockchain", + "id": "01fb6322-d727-47e3-a242-5039ea4732fc", "name": "Blockchain" } ], - "stacks": [ - { - "id": "0ecf47c8-cca4-4c30-94bb-054b1124c44f", - "name": "Golang", - "code": "golang", - "avatar": "" - }, - { - "id": "b403ef95-4269-4830-bbb6-8e56e5ec0af4", - "name": "Google Cloud", - "code": "gcloud", - "avatar": "" - } - ], - "roles": [ - { - "id": "11ccffea-2cc9-4e98-9bef-3464dfe4dec8", - "code": "admin", - "name": "⚪️ Admin" - } - ], "projects": [ { + "avatar": "", + "code": "", + "deploymentType": "official", + "endDate": null, "id": "8dc3be2e-19a4-4942-8a79-56db391a0b15", "name": "Fortress", - "deploymentType": "official", - "status": "active", "positions": [ { - "id": "11ccffea-2cc9-4e98-9bef-3464dfe4dec8", "code": "frontend", + "id": "11ccffea-2cc9-4e98-9bef-3464dfe4dec8", "name": "Frontend" } ], - "code": "", - "avatar": "", "startDate": "2022-11-01T00:00:00Z", - "endDate": null + "status": "active" } ], - "chapters": [], - "mentees": null, - "baseSalary": null, - "wiseRecipientID": "", + "referredBy": null, + "roles": [ + { + "code": "admin", + "id": "11ccffea-2cc9-4e98-9bef-3464dfe4dec8", + "name": "⚪️ Admin" + } + ], + "seniority": { + "code": "staff", + "id": "01fb6322-d727-47e3-a242-5039ea4732fd", + "name": "Staff" + }, + "stacks": [ + { + "avatar": "", + "code": "golang", + "id": "0ecf47c8-cca4-4c30-94bb-054b1124c44f", + "name": "Golang" + }, + { + "avatar": "", + "code": "gcloud", + "id": "b403ef95-4269-4830-bbb6-8e56e5ec0af4", + "name": "Google Cloud" + } + ], + "status": "contractor", + "teamEmail": "thanh@d.foundation", + "updatedAt": "", + "username": "thanh", "wiseAccountNumber": "", + "wiseCurrency": "", "wiseRecipientEmail": "", - "wiseRecipientName": "", - "wiseCurrency": "" + "wiseRecipientID": "", + "wiseRecipientName": "" } } diff --git a/pkg/handler/employee/testdata/update_skills/200.json b/pkg/handler/employee/testdata/update_skills/200.json index a51adc200..865534e79 100644 --- a/pkg/handler/employee/testdata/update_skills/200.json +++ b/pkg/handler/employee/testdata/update_skills/200.json @@ -1,64 +1,49 @@ { "data": { - "id": "2655832e-f009-4b73-a535-64c3a22e558f", + "chapters": [], "createdAt": "2022-11-02T09:52:34.586566Z", - "updatedAt": "", - "seniority": { - "id": "01fb6322-d727-47e3-a242-5039ea4732fd", - "createdAt": "2022-11-07T09:50:25.714604Z", - "updatedAt": "2022-11-07T09:50:25.714604Z", - "name": "Staff", - "code": "staff", - "level": 5 - }, + "id": "2655832e-f009-4b73-a535-64c3a22e558f", "positions": [ { + "code": "frontend", "id": "11ccffea-2cc9-4e98-9bef-3464dfe4dec8", - "createdAt": "2022-11-07T09:50:25.714604Z", - "updatedAt": "2022-11-07T09:50:25.714604Z", - "name": "Frontend", - "code": "frontend" + "name": "Frontend" }, { + "code": "backend", "id": "d796884d-a8c4-4525-81e7-54a3b6099eac", - "createdAt": "2022-11-07T09:50:25.714604Z", - "updatedAt": "2022-11-07T09:50:25.714604Z", - "name": "Backend", - "code": "backend" + "name": "Backend" }, { + "code": "devops", "id": "dac16ce6-9e5a-4ff3-9ea2-fdea4853925e", - "createdAt": "2022-11-07T09:50:25.714604Z", - "updatedAt": "2022-11-07T09:50:25.714604Z", - "name": "Devops", - "code": "devops" + "name": "Devops" }, { + "code": "blockchain", "id": "01fb6322-d727-47e3-a242-5039ea4732fc", - "createdAt": "2022-11-07T09:50:25.714604Z", - "updatedAt": "2022-11-07T09:50:25.714604Z", - "name": "Blockchain", - "code": "blockchain" + "name": "Blockchain" } ], + "seniority": { + "code": "staff", + "id": "01fb6322-d727-47e3-a242-5039ea4732fd", + "name": "Staff" + }, "stacks": [ { - "id": "0ecf47c8-cca4-4c30-94bb-054b1124c44f", - "createdAt": "2022-11-11T18:38:46.266725Z", - "updatedAt": "2022-11-11T18:38:46.266725Z", - "name": "Golang", + "avatar": "", "code": "golang", - "avatar": "" + "id": "0ecf47c8-cca4-4c30-94bb-054b1124c44f", + "name": "Golang" }, { - "id": "b403ef95-4269-4830-bbb6-8e56e5ec0af4", - "createdAt": "2022-11-11T18:38:46.266725Z", - "updatedAt": "2022-11-11T18:38:46.266725Z", - "name": "Google Cloud", + "avatar": "", "code": "gcloud", - "avatar": "" + "id": "b403ef95-4269-4830-bbb6-8e56e5ec0af4", + "name": "Google Cloud" } ], - "chapters": [] + "updatedAt": "" } } diff --git a/pkg/handler/engagement/engagement.go b/pkg/handler/engagement/engagement.go index 7f1cca397..c79ca4bbd 100644 --- a/pkg/handler/engagement/engagement.go +++ b/pkg/handler/engagement/engagement.go @@ -2,6 +2,10 @@ package engagement import ( "fmt" + "net/http" + "strconv" + "time" + "github.com/bwmarrin/discordgo" "github.com/dwarvesf/fortress-api/pkg/config" "github.com/dwarvesf/fortress-api/pkg/controller" @@ -12,9 +16,6 @@ import ( "github.com/dwarvesf/fortress-api/pkg/store" "github.com/dwarvesf/fortress-api/pkg/view" "github.com/gin-gonic/gin" - "net/http" - "strconv" - "time" ) type handler struct { @@ -51,14 +52,15 @@ func New( // UpsertRollup godoc // @Summary Upsert engagement rollup // @Description Upsert engagement rollup +// @id upsertEngagementRollup // @Tags Engagement // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" -// @Param Body body request.UpsertRollupRequest true "Body" -// @Success 200 {object} view.MessageResponse -// @Success 400 {object} view.ErrorResponse -// @Success 500 {object} view.ErrorResponse +// @Security BearerAuth +// @Param Body body UpsertRollupRequest true "Body" +// @Success 200 {object} MessageResponse +// @Success 400 {object} ErrorResponse +// @Success 500 {object} ErrorResponse // @Router /engagements/rollup [post] func (h *handler) UpsertRollup(c *gin.Context) { l := h.logger.Fields( @@ -156,14 +158,15 @@ func (h *handler) UpsertRollup(c *gin.Context) { // GetLastMessageID godoc // @Summary Get local last message ID of a channel // @Description Get local last message ID of a channel +// @id getLastMessageID // @Tags Engagement // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param channel-id path string true "Discord Channel ID" -// @Success 200 {object} view.MessageResponse -// @Success 400 {object} view.ErrorResponse -// @Success 500 {object} view.ErrorResponse +// @Success 200 {object} MessageResponse +// @Success 400 {object} ErrorResponse +// @Success 500 {object} ErrorResponse // @Router /engagements/channel/:channel-id/last-message-id [get] func (h *handler) GetLastMessageID(c *gin.Context) { channelID := c.Param("channel-id") @@ -263,13 +266,14 @@ func AggregateMessages( // IndexMessages godoc // @Summary Index messages of provided Discord server // @Description Index messages of provided Discord server +// @id indexEngagementMessages // @Tags Engagement // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" -// @Success 200 {object} view.MessageResponse -// @Success 400 {object} view.ErrorResponse -// @Success 500 {object} view.ErrorResponse +// @Security BearerAuth +// @Success 200 {object} MessageResponse +// @Success 400 {object} ErrorResponse +// @Success 500 {object} ErrorResponse // @Router /cronjobs/index-engagement-messages [post] func (h *handler) IndexMessages(c *gin.Context) { l := h.logger.Fields( diff --git a/pkg/handler/engagement/request/request.go b/pkg/handler/engagement/request/request.go index d10ff21b4..54c58ee22 100644 --- a/pkg/handler/engagement/request/request.go +++ b/pkg/handler/engagement/request/request.go @@ -11,7 +11,7 @@ type UpsertRollupRequest struct { CategoryID string `json:"categoryID"` MessageCount int `json:"messageCount"` ReactionCount int `json:"reactionCount"` -} +} // @name UpsertRollupRequest func (r UpsertRollupRequest) Validate() error { if r.MessageCount == 0 && r.ReactionCount == 0 { diff --git a/pkg/handler/feedback/feedback.go b/pkg/handler/feedback/feedback.go index 6d2f497c0..c1c32dcb8 100644 --- a/pkg/handler/feedback/feedback.go +++ b/pkg/handler/feedback/feedback.go @@ -42,16 +42,18 @@ func New(store *store.Store, repo store.DBRepo, service *service.Service, logger // List godoc // @Summary Get list feedbacks // @Description Get list feedbacks +// @id getFeedbackList // @Tags Feedback // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param status query string false "Status" // @Param page query string false "Page" // @Param size query string false "Size" -// @Success 200 {object} view.ListFeedbackResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Param sort query string false "Sort" +// @Success 200 {object} ListFeedbackResponse +// @Failure 400 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /feedbacks [get] func (h *handler) List(c *gin.Context) { userID, err := authutils.GetUserIDFromContext(c, h.config) @@ -71,7 +73,12 @@ func (h *handler) List(c *gin.Context) { return } - input.Standardize() + pagination := model.Pagination{ + Page: input.Page, + Size: input.Size, + Sort: input.Sort, + } + pagination.Standardize() l := h.logger.Fields(logger.Fields{ "handler": "feedback", @@ -83,7 +90,7 @@ func (h *handler) List(c *gin.Context) { rs, total, err := h.store.EmployeeEventTopic.GetByEmployeeID(h.repo.DB(), userID, employeeeventtopic.GetByEmployeeIDInput{Status: input.Status}, - input.Pagination) + pagination) if err != nil { l.Error(err, "failed to get employee event topic by employeeID") c.JSON(http.StatusInternalServerError, view.CreateResponse[any](nil, nil, err, nil, "")) @@ -91,22 +98,23 @@ func (h *handler) List(c *gin.Context) { } c.JSON(http.StatusOK, view.CreateResponse[any](view.ToListFeedback(rs), - &view.PaginationResponse{Pagination: input.Pagination, Total: total}, nil, nil, "")) + &view.PaginationResponse{Pagination: pagination, Total: total}, nil, nil, "")) } // Detail godoc // @Summary Get feedback detail for logged-in users // @Description Get feedback detail for logged-in users +// @id getFeedbackDetail // @Tags Feedback // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param id path string true "Feedback Event ID" // @Param topicID path string true "Employee Event Topic ID" -// @Success 200 {object} view.FeedbackDetailResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Success 200 {object} FeedbackDetailResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /feedbacks/{id}/topics/{topicID} [get] func (h *handler) Detail(c *gin.Context) { userID, err := authutils.GetUserIDFromContext(c, h.config) @@ -220,17 +228,18 @@ func (h *handler) Detail(c *gin.Context) { // Submit godoc // @Summary Submit the draft or done answers // @Description Submit the draft or done answers +// @id submitFeedback // @Tags Feedback // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param id path string true "Feedback Event ID" // @Param topicID path string true "Employee Event Topic ID" -// @Param Body body request.SubmitBody true "Body" -// @Success 200 {object} view.SubmitFeedbackResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Param Body body SubmitFeedbackRequest true "Body" +// @Success 200 {object} SubmitFeedbackResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /feedbacks/{id}/topics/{topicID}/submit [post] func (h *handler) Submit(c *gin.Context) { userID, err := authutils.GetUserIDFromContext(c, h.config) @@ -398,13 +407,14 @@ func (h *handler) Submit(c *gin.Context) { // CountUnreadFeedback godoc // @Summary Get number of unread inbox for user // @Description Get number of unread inbox for user +// @id countUnreadFeedback // @Tags Feedback // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" -// @Success 200 {object} view.UnreadFeedbackCountResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Security BearerAuth +// @Success 200 {object} UnreadFeedbackCountResponse +// @Failure 400 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /feedbacks/unreads [get] func (h *handler) CountUnreadFeedback(c *gin.Context) { userID, err := authutils.GetUserIDFromContext(c, h.config) diff --git a/pkg/handler/feedback/feedback_test.go b/pkg/handler/feedback/feedback_test.go index 8638f2479..6f9a5c50a 100644 --- a/pkg/handler/feedback/feedback_test.go +++ b/pkg/handler/feedback/feedback_test.go @@ -23,7 +23,7 @@ import ( "github.com/dwarvesf/fortress-api/pkg/utils/testhelper" ) -const testToken = "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2OTkzMjExNDIsImlkIjoiMjY1NTgzMmUtZjAwOS00YjczLWE1MzUtNjRjM2EyMmU1NThmIiwiYXZhdGFyIjoiaHR0cHM6Ly9zMy1hcC1zb3V0aGVhc3QtMS5hbWF6b25hd3MuY29tL2ZvcnRyZXNzLWltYWdlcy81MTUzNTc0Njk1NjYzOTU1OTQ0LnBuZyIsImVtYWlsIjoidGhhbmhAZC5mb3VuZGF0aW9uIiwicGVybWlzc2lvbnMiOlsiZW1wbG95ZWVzLnJlYWQiXSwidXNlcl9pbmZvIjpudWxsfQ.GENGPEucSUrILN6tHDKxLMtj0M0REVMUPC7-XhDMpGM" +const testToken = "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjk1ODMzMzA5NDUsImlkIjoiMjY1NTgzMmUtZjAwOS00YjczLWE1MzUtNjRjM2EyMmU1NThmIiwiYXZhdGFyIjoiaHR0cHM6Ly9zMy1hcC1zb3V0aGVhc3QtMS5hbWF6b25hd3MuY29tL2ZvcnRyZXNzLWltYWdlcy81MTUzNTc0Njk1NjYzOTU1OTQ0LnBuZyIsImVtYWlsIjoidGhhbmhAZC5mb3VuZGF0aW9uIn0.oIdlwWGBy4E1CbSoEX6r2B6NQLbew_J-RttpAcg6w8M" func TestHandler_List(t *testing.T) { cfg := config.LoadTestConfig() @@ -150,7 +150,7 @@ func TestHandler_Submit(t *testing.T) { storeMock := store.New() tests := []struct { name string - body request.SubmitBody + body request.SubmitFeedbackRequest wantCode int wantResponsePath string topicID string @@ -160,8 +160,8 @@ func TestHandler_Submit(t *testing.T) { name: "failed_unanswer_question", wantCode: http.StatusBadRequest, wantResponsePath: "testdata/submit/400_unanswer_question.json", - body: request.SubmitBody{ - Answers: []request.BasicEventQuestionInput{ + body: request.SubmitFeedbackRequest{ + Answers: []request.BasicEventQuestionRequest{ { EventQuestionID: model.MustGetUUIDFromString("7a94c0f4-81cf-4736-8628-710e25cfc4e7"), Answer: "ok", @@ -200,8 +200,8 @@ func TestHandler_Submit(t *testing.T) { name: "ok_draft", wantCode: http.StatusOK, wantResponsePath: "testdata/submit/200.json", - body: request.SubmitBody{ - Answers: []request.BasicEventQuestionInput{ + body: request.SubmitFeedbackRequest{ + Answers: []request.BasicEventQuestionRequest{ { EventQuestionID: model.MustGetUUIDFromString("7a94c0f4-81cf-4736-8628-710e25cfc4e7"), Answer: "ok", @@ -240,8 +240,8 @@ func TestHandler_Submit(t *testing.T) { name: "draft_not_found_topicID", wantCode: http.StatusNotFound, wantResponsePath: "testdata/submit/404.json", - body: request.SubmitBody{ - Answers: []request.BasicEventQuestionInput{ + body: request.SubmitFeedbackRequest{ + Answers: []request.BasicEventQuestionRequest{ { EventQuestionID: model.MustGetUUIDFromString("7a94c0f4-81cf-4736-8628-710e25cfc4e7"), Answer: "ok", @@ -280,8 +280,8 @@ func TestHandler_Submit(t *testing.T) { name: "ok_draft_engagement", wantCode: http.StatusOK, wantResponsePath: "testdata/submit/200_engagement.json", - body: request.SubmitBody{ - Answers: []request.BasicEventQuestionInput{ + body: request.SubmitFeedbackRequest{ + Answers: []request.BasicEventQuestionRequest{ { EventQuestionID: model.MustGetUUIDFromString("a9b63a36-0134-4aa3-9a9a-edb5a1d52645"), Answer: "agree", @@ -342,8 +342,8 @@ func TestHandler_Submit(t *testing.T) { name: "ok_work", wantCode: http.StatusOK, wantResponsePath: "testdata/submit/200_work.json", - body: request.SubmitBody{ - Answers: []request.BasicEventQuestionInput{ + body: request.SubmitFeedbackRequest{ + Answers: []request.BasicEventQuestionRequest{ { EventQuestionID: model.MustGetUUIDFromString("3784e437-c7d6-4142-9007-82a7f18f7d50"), Answer: model.AgreementLevelMixed.String(), diff --git a/pkg/handler/feedback/request/request.go b/pkg/handler/feedback/request/request.go index 4f9e6bdd7..386c3d7b5 100644 --- a/pkg/handler/feedback/request/request.go +++ b/pkg/handler/feedback/request/request.go @@ -3,10 +3,11 @@ package request import ( "github.com/dwarvesf/fortress-api/pkg/handler/feedback/errs" "github.com/dwarvesf/fortress-api/pkg/model" + "github.com/dwarvesf/fortress-api/pkg/view" ) type GetListFeedbackInput struct { - model.Pagination + view.Pagination Status string `json:"status" form:"status"` } @@ -36,18 +37,18 @@ func (i *DetailInput) Validate() error { return nil } -type BasicEventQuestionInput struct { +type BasicEventQuestionRequest struct { EventQuestionID model.UUID `json:"eventQuestionID" form:"eventQuestionID" binding:"required"` Answer string `json:"answer" form:"answer"` Note string `json:"note" form:"note"` -} +} // @name BasicEventQuestionRequest -type SubmitBody struct { - Answers []BasicEventQuestionInput `json:"answers" form:"answers" binding:"required"` - Status model.EventReviewerStatus `json:"status" form:"status" binding:"required"` -} +type SubmitFeedbackRequest struct { + Answers []BasicEventQuestionRequest `json:"answers" form:"answers" binding:"required"` + Status model.EventReviewerStatus `json:"status" form:"status" binding:"required"` +} // @name SubmitFeedbackRequest -func (i *SubmitBody) Validate() error { +func (i *SubmitFeedbackRequest) Validate() error { if !i.Status.IsValid() { return errs.ErrInvalidReviewerStatus } @@ -56,7 +57,7 @@ func (i *SubmitBody) Validate() error { } type SubmitInput struct { - Body SubmitBody + Body SubmitFeedbackRequest EventID string TopicID string } diff --git a/pkg/handler/handler.go b/pkg/handler/handler.go index ef89951b3..eda9a987f 100644 --- a/pkg/handler/handler.go +++ b/pkg/handler/handler.go @@ -10,6 +10,7 @@ import ( "github.com/dwarvesf/fortress-api/pkg/handler/bankaccount" "github.com/dwarvesf/fortress-api/pkg/handler/brainerylogs" "github.com/dwarvesf/fortress-api/pkg/handler/client" + "github.com/dwarvesf/fortress-api/pkg/handler/conversionrate" "github.com/dwarvesf/fortress-api/pkg/handler/dashboard" "github.com/dwarvesf/fortress-api/pkg/handler/dashboard/util" "github.com/dwarvesf/fortress-api/pkg/handler/deliverymetric" @@ -42,6 +43,7 @@ type Handler struct { BankAccount bankaccount.IHandler BraineryLog brainerylogs.IHandler Client client.IHandler + ConversionRate conversionrate.IHandler Dashboard dashboard.IHandler DeliveryMetric deliverymetric.IHandler Discord discord.IHandler @@ -70,6 +72,7 @@ func New(store *store.Store, repo store.DBRepo, service *service.Service, ctrl * BankAccount: bankaccount.New(store, repo, service, logger, cfg), BraineryLog: brainerylogs.New(ctrl, store, repo, service, logger, cfg), Client: client.New(ctrl, store, repo, service, logger, cfg), + ConversionRate: conversionrate.New(ctrl, store, repo, service, logger, cfg), Dashboard: dashboard.New(store, repo, service, logger, cfg, util.New()), DeliveryMetric: deliverymetric.New(ctrl, store, repo, service, logger, cfg), Discord: discord.New(ctrl, store, repo, service, logger, cfg), diff --git a/pkg/handler/invoice/invoice.go b/pkg/handler/invoice/invoice.go index 39e9cd5ab..2a9bff520 100644 --- a/pkg/handler/invoice/invoice.go +++ b/pkg/handler/invoice/invoice.go @@ -46,16 +46,20 @@ func New(ctrl *controller.Controller, store *store.Store, repo store.DBRepo, ser // List godoc // @Summary Get latest invoice by project id // @Description Get latest invoice by project id +// @id getInvoiceList // @Tags Invoice // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param projectID query string false "projectID" // @Param status query string false "status" -// @Success 200 {object} view.InvoiceListResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Param page query int false "page" +// @Param size query int false "size" +// @Param sort query string false "sort" +// @Success 200 {object} InvoiceListResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /invoices [get] func (h *handler) List(c *gin.Context) { var query request.GetListInvoiceInput @@ -70,7 +74,7 @@ func (h *handler) List(c *gin.Context) { "query": query, }) - query.StandardizeInput() + pagination := query.StandardizeInput() if err := query.Validate(); err != nil { c.JSON(http.StatusBadRequest, view.CreateResponse[any](nil, nil, err, query, "")) @@ -78,7 +82,7 @@ func (h *handler) List(c *gin.Context) { } invoices, total, err := h.controller.Invoice.List(invoiceCtrl.GetListInvoiceInput{ - Pagination: query.Pagination, + Pagination: pagination, ProjectIDs: query.ProjectID, Statuses: query.Status, }) @@ -95,21 +99,22 @@ func (h *handler) List(c *gin.Context) { return } - c.JSON(http.StatusOK, view.CreateResponse[any](rs, &view.PaginationResponse{Total: total, Pagination: query.Pagination}, nil, nil, "")) + c.JSON(http.StatusOK, view.CreateResponse[any](rs, &view.PaginationResponse{Total: total, Pagination: pagination}, nil, nil, "")) } // GetTemplate godoc // @Summary Get the latest invoice by project id // @Description Get the latest invoice by project id +// @id getInvoiceTemplate // @Tags Invoice // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param projectID query string true "projectID" -// @Success 200 {object} view.InvoiceTemplateResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Success 200 {object} InvoiceTemplateResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /invoices/template [get] func (h *handler) GetTemplate(c *gin.Context) { now := time.Now() @@ -152,16 +157,17 @@ func (h *handler) GetTemplate(c *gin.Context) { // Send godoc // @Summary Create new invoice and send to client -// @Description Create new invoice and send to clientm +// @Description Create new invoice and send to client +// @id sendInvoice // @Tags Invoice // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" -// @Param Body body request.SendInvoiceRequest true "body" -// @Success 200 {object} view.MessageResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Security BearerAuth +// @Param Body body SendInvoiceRequest true "body" +// @Success 200 {object} MessageResponse +// @Failure 404 {object} ErrorResponse +// @Failure 400 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /invoices/send [post] func (h *handler) Send(c *gin.Context) { userID, err := authutils.GetUserIDFromContext(c, h.config) @@ -183,15 +189,7 @@ func (h *handler) Send(c *gin.Context) { return } - senderID, err := model.UUIDFromString(userID) - if err != nil { - l.Error(err, "failed to parse sender id") - c.JSON(http.StatusInternalServerError, view.CreateResponse[any](nil, nil, err, req, "")) - } - - req.SentByID = &senderID - - iv, err := req.ToInvoiceModel() + iv, err := req.ToInvoiceModel(userID) if err != nil { l.Error(err, "failed to parse request to invoice model") c.JSON(http.StatusBadRequest, view.CreateResponse[any](nil, nil, err, req, "")) @@ -226,11 +224,11 @@ func (h *handler) Send(c *gin.Context) { // @Tags Invoice // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" -// @Success 200 {object} view.MessageResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Security BearerAuth +// @Success 200 {object} MessageResponse +// @Failure 404 {object} ErrorResponse +// @Failure 400 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /invoices/{id}/status [put] func (h *handler) UpdateStatus(c *gin.Context) { invoiceID := c.Param("id") diff --git a/pkg/handler/invoice/request/request.go b/pkg/handler/invoice/request/request.go index 9908d4fb3..c0edf58cc 100644 --- a/pkg/handler/invoice/request/request.go +++ b/pkg/handler/invoice/request/request.go @@ -13,6 +13,7 @@ import ( "github.com/dwarvesf/fortress-api/pkg/model" "github.com/dwarvesf/fortress-api/pkg/utils" "github.com/dwarvesf/fortress-api/pkg/utils/mailutils" + "github.com/dwarvesf/fortress-api/pkg/view" ) type UpdateStatusRequest struct { @@ -33,17 +34,25 @@ type GetInvoiceInput struct { } type GetListInvoiceInput struct { - model.Pagination + view.Pagination ProjectID []string `json:"projectID" form:"projectID"` Status []string `json:"status" form:"status"` } -func (r *GetListInvoiceInput) StandardizeInput() { +func (r *GetListInvoiceInput) StandardizeInput() model.Pagination { statuses := utils.RemoveEmptyString(r.Status) projectsIDs := utils.RemoveEmptyString(r.ProjectID) - r.Pagination.Standardize() + + pagination := model.Pagination{ + Page: r.Page, + Size: r.Size, + Sort: r.Sort, + } + pagination.Standardize() r.Status = statuses r.ProjectID = projectsIDs + + return pagination } func (r *GetListInvoiceInput) Validate() error { @@ -64,8 +73,8 @@ func (r *GetListInvoiceInput) Validate() error { type SendInvoiceRequest struct { IsDraft bool `json:"isDraft"` - ProjectID model.UUID `json:"projectID" binding:"required"` - BankID model.UUID `json:"bankID" binding:"required"` + ProjectID view.UUID `json:"projectID" binding:"required"` + BankID view.UUID `json:"bankID" binding:"required"` Description string `json:"description"` Note string `json:"note"` CC []string `json:"cc"` @@ -79,9 +88,8 @@ type SendInvoiceRequest struct { DueDate string `json:"dueDate" binding:"required"` Month int `json:"invoiceMonth" binding:"gte=0,lte=11"` Year int `json:"invoiceYear" binding:"gte=0"` - SentByID *model.UUID Number string -} +} // @name SendInvoiceRequest type InvoiceItem struct { Quantity float64 `json:"quantity"` @@ -90,7 +98,7 @@ type InvoiceItem struct { Cost float64 `json:"cost"` Description string `json:"description"` IsExternal bool `json:"isExternal"` -} +} // @name InvoiceItem func toInvoiceItemsModel(lineItems []InvoiceItem) []model.InvoiceItem { var items []model.InvoiceItem @@ -140,7 +148,7 @@ func (i *SendInvoiceRequest) ValidateAndMappingRequest(c *gin.Context, cfg *conf return nil } -func (i *SendInvoiceRequest) ToInvoiceModel() (*model.Invoice, error) { +func (i *SendInvoiceRequest) ToInvoiceModel(sentByID string) (*model.Invoice, error) { lineItems, err := json.Marshal(toInvoiceItemsModel(i.LineItems)) if err != nil { return nil, err @@ -166,9 +174,18 @@ func (i *SendInvoiceRequest) ToInvoiceModel() (*model.Invoice, error) { return nil, err } + var senderID *model.UUID + if sentByID != "" { + s, err := model.UUIDFromString(sentByID) + if err != nil { + return nil, err + } + senderID = &s + } + return &model.Invoice{ - ProjectID: i.ProjectID, - BankID: i.BankID, + ProjectID: model.UUID(i.ProjectID), + BankID: model.UUID(i.BankID), Description: i.Description, Note: i.Note, LineItems: lineItems, @@ -181,7 +198,7 @@ func (i *SendInvoiceRequest) ToInvoiceModel() (*model.Invoice, error) { Month: i.Month + 1, Year: i.Year, Status: defaultStatus, - SentBy: i.SentByID, + SentBy: senderID, DueAt: &dueAt, InvoicedAt: &invoiceAt, }, nil diff --git a/pkg/handler/metadata/metadata.go b/pkg/handler/metadata/metadata.go index e5770eea0..d657f9e9f 100644 --- a/pkg/handler/metadata/metadata.go +++ b/pkg/handler/metadata/metadata.go @@ -39,12 +39,13 @@ func New(store *store.Store, repo store.DBRepo, service *service.Service, logger // WorkingStatuses godoc // @Summary Get list values for working status // @Description Get list values for working status +// @id getWorkingStatusList // @Tags Metadata // @Accept json // @Produce json -// @Success 200 {object} []view.MetaData -// @Failure 400 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Success 200 {object} MetaDataResponse +// @Failure 400 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /metadata/working-status [get] func (h *handler) WorkingStatuses(c *gin.Context) { // return list values for working status @@ -78,12 +79,13 @@ func (h *handler) WorkingStatuses(c *gin.Context) { // Seniorities godoc // @Summary Get list values for sentitorities // @Description Get list values for sentitorities +// @id getSenioritiesList // @Tags Metadata // @Accept json // @Produce json -// @Success 200 {object} view.SeniorityResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Success 200 {object} SeniorityResponse +// @Failure 400 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /metadata/seniorities [get] func (h *handler) Seniorities(c *gin.Context) { // 1 prepare the logger @@ -107,12 +109,13 @@ func (h *handler) Seniorities(c *gin.Context) { // Chapters godoc // @Summary Get list values for chapters // @Description Get list values for chapters +// @id getChaptersList // @Tags Metadata // @Accept json // @Produce json -// @Success 200 {object} view.ChapterResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Success 200 {object} ChapterResponse +// @Failure 400 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /metadata/chapters [get] func (h *handler) Chapters(c *gin.Context) { // 1 prepare the logger @@ -137,12 +140,13 @@ func (h *handler) Chapters(c *gin.Context) { // Organizations godoc // @Summary Get list values for organizations // @Description Get list values for organizations +// @id getOrganizationsList // @Tags Metadata // @Accept json // @Produce json -// @Success 200 {object} view.OrganizationsResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Success 200 {object} OrganizationsResponse +// @Failure 400 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /metadata/organizations [get] func (h *handler) Organizations(c *gin.Context) { // 1 prepare the logger @@ -166,12 +170,13 @@ func (h *handler) Organizations(c *gin.Context) { // GetRoles godoc // @Summary Get list roles // @Description Get list roles +// @id getRolesList // @Tags Metadata // @Accept json // @Produce json -// @Success 200 {object} view.RolesResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Success 200 {object} RolesResponse +// @Failure 400 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /metadata/roles [get] func (h *handler) GetRoles(c *gin.Context) { l := h.logger.Fields(logger.Fields{ @@ -194,12 +199,13 @@ func (h *handler) GetRoles(c *gin.Context) { // ProjectStatuses godoc // @Summary Get list values for project statuses // @Description Get list values for project statuses +// @id getProjectStatusesList // @Tags Metadata // @Accept json // @Produce json -// @Success 200 {object} []view.MetaData -// @Failure 400 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Success 200 {object} MetaDataResponse +// @Failure 400 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /metadata/project-statuses [get] func (h *handler) ProjectStatuses(c *gin.Context) { // return list values for project statuses @@ -229,12 +235,13 @@ func (h *handler) ProjectStatuses(c *gin.Context) { // Positions godoc // @Summary Get list values for positions // @Description Get list values for positions +// @id getPositionsList // @Tags Metadata // @Accept json // @Produce json -// @Success 200 {object} view.PositionResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Success 200 {object} PositionResponse +// @Failure 400 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /metadata/positions [get] func (h *handler) Positions(c *gin.Context) { // 1 prepare the logger @@ -259,12 +266,13 @@ func (h *handler) Positions(c *gin.Context) { // GetCountries godoc // @Summary Get all countries // @Description Get all countries +// @id getCountriesList // @Tags Metadata // @Accept json // @Produce json -// @Success 200 {object} view.CountriesResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Success 200 {object} CountriesResponse +// @Failure 400 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /metadata/countries [get] func (h *handler) GetCountries(c *gin.Context) { countries, err := h.store.Country.All(h.repo.DB()) @@ -289,12 +297,13 @@ func (h *handler) GetCountries(c *gin.Context) { // GetCities godoc // @Summary Get list cities by country // @Description Get list cities by country +// @id getCitiesList // @Tags Metadata // @Accept json // @Produce json -// @Success 200 {object} view.CitiesResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Success 200 {object} CitiesResponse +// @Failure 400 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /metadata/countries/{country_id}/cities [get] func (h *handler) GetCities(c *gin.Context) { l := h.logger.Fields(logger.Fields{ @@ -322,15 +331,16 @@ func (h *handler) GetCities(c *gin.Context) { // Stacks godoc // @Summary Get list values for stacks // @Description Get list values for stacks +// @id getStacksList // @Tags Metadata // @Accept json // @Produce json // @Param keyword query string false "Keyword" // @Param page query string false "Page" // @Param size query string false "Size" -// @Success 200 {object} view.StackResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Success 200 {object} StackResponse +// @Failure 400 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /metadata/stacks [get] func (h *handler) Stacks(c *gin.Context) { var input request.GetStacksInput @@ -359,16 +369,17 @@ func (h *handler) Stacks(c *gin.Context) { // UpdateStack godoc // @Summary Update stack information by ID // @Description Update stack information by ID +// @id updateStack // @Tags Metadata // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param id path string true "Stack ID" -// @Param Body body request.UpdateStackBody true "Body" -// @Success 200 {object} view.MessageResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Param Body body UpdateStackBody true "Body" +// @Success 200 {object} MessageResponse +// @Failure 404 {object} ErrorResponse +// @Failure 400 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /metadata/stacks/{id} [put] func (h *handler) UpdateStack(c *gin.Context) { var input request.UpdateStackInput @@ -421,15 +432,16 @@ func (h *handler) UpdateStack(c *gin.Context) { // CreateStack godoc // @Summary Create new stack // @Description Create new stack +// @id createStack // @Tags Metadata // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" -// @Param Body body request.CreateStackInput true "Body" -// @Success 200 {object} view.MessageResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Security BearerAuth +// @Param Body body CreateStackInput true "Body" +// @Success 200 {object} MessageResponse +// @Failure 404 {object} ErrorResponse +// @Failure 400 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /metadata/stacks [post] func (h *handler) CreateStack(c *gin.Context) { var input request.CreateStackInput @@ -465,15 +477,16 @@ func (h *handler) CreateStack(c *gin.Context) { // DeleteStack godoc // @Summary Delete stack by ID // @Description Delete stack by ID +// @id deleteStack // @Tags Metadata // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param id path string true "Stack ID" -// @Success 200 {object} view.MessageResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Success 200 {object} MessageResponse +// @Failure 404 {object} ErrorResponse +// @Failure 400 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /metadata/stacks/{id} [delete] func (h *handler) DeleteStack(c *gin.Context) { stackID := c.Param("id") @@ -502,16 +515,17 @@ func (h *handler) DeleteStack(c *gin.Context) { // UpdatePosition godoc // @Summary Update position information by ID // @Description Update position information by ID +// @id updatePosition // @Tags Metadata // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param id path string true "Position ID" -// @Param Body body request.UpdatePositionBody true "Body" -// @Success 200 {object} view.MessageResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Param Body body UpdatePositionBody true "Body" +// @Success 200 {object} MessageResponse +// @Failure 404 {object} ErrorResponse +// @Failure 400 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /metadata/positions/{id} [put] func (h *handler) UpdatePosition(c *gin.Context) { var input request.UpdatePositionInput @@ -562,15 +576,16 @@ func (h *handler) UpdatePosition(c *gin.Context) { // CreatePosition godoc // @Summary Create new position // @Description Create new position +// @id createPosition // @Tags Metadata // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" -// @Param Body body request.CreatePositionInput true "Body" -// @Success 200 {object} view.MessageResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Security BearerAuth +// @Param Body body CreatePositionInput true "Body" +// @Success 200 {object} MessageResponse +// @Failure 404 {object} ErrorResponse +// @Failure 400 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /metadata/positions [post] func (h *handler) CreatePosition(c *gin.Context) { var input request.CreatePositionInput @@ -604,15 +619,16 @@ func (h *handler) CreatePosition(c *gin.Context) { // DeletePosition godoc // @Summary Delete position by ID // @Description Delete position by ID +// @id deletePosition // @Tags Metadata // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param id path string true "Position ID" -// @Success 200 {object} view.MessageResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Success 200 {object} MessageResponse +// @Failure 404 {object} ErrorResponse +// @Failure 400 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /metadata/positions/{id} [delete] func (h *handler) DeletePosition(c *gin.Context) { positionID := c.Param("id") @@ -640,14 +656,15 @@ func (h *handler) DeletePosition(c *gin.Context) { // GetQuestions godoc // @Summary Get list question by category and subcategory // @Description Get list question by category and subcategory +// @id getQuestionsList // @Tags Metadata // @Accept json // @Produce json -// @Param category query model.EventType true "Category" -// @Param subcategory query model.EventSubtype true "Subcategory" -// @Success 200 {object} view.GetQuestionResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Param category query EventType true "Category" +// @Param subcategory query EventSubtype true "Subcategory" +// @Success 200 {object} GetQuestionResponse +// @Failure 400 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /metadata/questions [get] func (h *handler) GetQuestions(c *gin.Context) { var input GetQuestionsInput @@ -668,7 +685,7 @@ func (h *handler) GetQuestions(c *gin.Context) { "input": input, }) - rs, err := h.store.Question.AllByCategory(h.repo.DB(), input.Category, input.Subcategory) + rs, err := h.store.Question.AllByCategory(h.repo.DB(), model.EventType(input.Category), model.EventSubtype(input.Subcategory)) if err != nil { l.Error(err, "failed to get question from db") c.JSON(http.StatusInternalServerError, view.CreateResponse[any](nil, nil, err, nil, "")) @@ -681,12 +698,13 @@ func (h *handler) GetQuestions(c *gin.Context) { // GetCurrencies godoc // @Summary Get list currencies // @Description Get list currencies +// @id getCurrenciesList // @Tags Metadata // @Accept json // @Produce json -// @Success 200 {object} view.GetCurrenciesResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Success 200 {object} GetCurrenciesResponse +// @Failure 400 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /metadata/currencies [get] func (h *handler) GetCurrencies(c *gin.Context) { l := h.logger.Fields(logger.Fields{ diff --git a/pkg/handler/metadata/metadata_test.go b/pkg/handler/metadata/metadata_test.go index fb98d8df9..bbf79ea2c 100644 --- a/pkg/handler/metadata/metadata_test.go +++ b/pkg/handler/metadata/metadata_test.go @@ -21,7 +21,7 @@ import ( "github.com/stretchr/testify/require" ) -const testToken = "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2OTkzMjExNDIsImlkIjoiMjY1NTgzMmUtZjAwOS00YjczLWE1MzUtNjRjM2EyMmU1NThmIiwiYXZhdGFyIjoiaHR0cHM6Ly9zMy1hcC1zb3V0aGVhc3QtMS5hbWF6b25hd3MuY29tL2ZvcnRyZXNzLWltYWdlcy81MTUzNTc0Njk1NjYzOTU1OTQ0LnBuZyIsImVtYWlsIjoidGhhbmhAZC5mb3VuZGF0aW9uIiwicGVybWlzc2lvbnMiOlsiZW1wbG95ZWVzLnJlYWQiXSwidXNlcl9pbmZvIjpudWxsfQ.GENGPEucSUrILN6tHDKxLMtj0M0REVMUPC7-XhDMpGM" +const testToken = "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjk1ODMzMzA5NDUsImlkIjoiMjY1NTgzMmUtZjAwOS00YjczLWE1MzUtNjRjM2EyMmU1NThmIiwiYXZhdGFyIjoiaHR0cHM6Ly9zMy1hcC1zb3V0aGVhc3QtMS5hbWF6b25hd3MuY29tL2ZvcnRyZXNzLWltYWdlcy81MTUzNTc0Njk1NjYzOTU1OTQ0LnBuZyIsImVtYWlsIjoidGhhbmhAZC5mb3VuZGF0aW9uIn0.oIdlwWGBy4E1CbSoEX6r2B6NQLbew_J-RttpAcg6w8M" func TestHandler_GetWorkingStatus(t *testing.T) { // load env and test data diff --git a/pkg/handler/metadata/request.go b/pkg/handler/metadata/request.go index e816eb566..4db3e27d1 100644 --- a/pkg/handler/metadata/request.go +++ b/pkg/handler/metadata/request.go @@ -1,11 +1,55 @@ package metadata -import "github.com/dwarvesf/fortress-api/pkg/model" - // GetQuestionsInput input params for get questions api type GetQuestionsInput struct { - Category model.EventType `form:"category" json:"category" binding:"required"` - Subcategory model.EventSubtype `form:"subcategory" json:"subcategory" binding:"required"` + Category EventType `form:"category" json:"category" binding:"required"` + Subcategory EventSubtype `form:"subcategory" json:"subcategory" binding:"required"` +} + +type EventType string // @name EventType +type EventStatus string // @name EventStatus + +const ( + EventTypeFeedback EventType = "feedback" + EventTypeSurvey EventType = "survey" +) + +// IsValid validation for EventType +func (e EventType) IsValid() bool { + switch e { + case + EventTypeFeedback, + EventTypeSurvey: + return true + } + return false +} + +func (e EventType) String() string { + return string(e) +} + +type EventSubtype string + +const ( + EventSubtypePeerReview EventSubtype = "peer-review" + EventSubtypeEngagement EventSubtype = "engagement" + EventSubtypeWork EventSubtype = "work" + EventSubtypeAppreciation EventSubtype = "appreciation" + EventSubtypeComment EventSubtype = "comment" +) + +func (e EventSubtype) IsValid() bool { + switch e { + case + EventSubtypePeerReview, + EventSubtypeEngagement, + EventSubtypeWork, + EventSubtypeAppreciation, + EventSubtypeComment: + return true + } + return false } // Validate check valid for values in input params diff --git a/pkg/handler/metadata/request/request.go b/pkg/handler/metadata/request/request.go index fc077f4e7..5e21a55e4 100644 --- a/pkg/handler/metadata/request/request.go +++ b/pkg/handler/metadata/request/request.go @@ -9,12 +9,12 @@ type UpdateStackBody struct { Name string `json:"name"` Code string `json:"code"` Avatar string `json:"avatar"` -} +} // @name UpdateStackBody type UpdateStackInput struct { ID string Body UpdateStackBody -} +} // @name UpdateStackInput func (i UpdateStackInput) Validate() error { if i.ID == "" || !model.IsUUIDFromString(i.ID) { @@ -28,17 +28,17 @@ type CreateStackInput struct { Name string `json:"name" binding:"required"` Code string `json:"code" binding:"required"` Avatar string `json:"avatar"` -} +} // @name CreateStackInput type UpdatePositionBody struct { Name string `json:"name"` Code string `json:"code"` -} +} // @name UpdatePositionBody type UpdatePositionInput struct { ID string Body UpdatePositionBody -} +} // @name UpdatePositionInput func (i UpdatePositionInput) Validate() error { if i.ID == "" || !model.IsUUIDFromString(i.ID) { @@ -51,7 +51,7 @@ func (i UpdatePositionInput) Validate() error { type CreatePositionInput struct { Name string `json:"name" binding:"required"` Code string `json:"code" binding:"required"` -} +} // @name CreatePositionInput type GetStacksInput struct { model.Pagination diff --git a/pkg/handler/notion/audience.go b/pkg/handler/notion/audience.go index aef285c63..bd0ec3017 100644 --- a/pkg/handler/notion/audience.go +++ b/pkg/handler/notion/audience.go @@ -17,8 +17,8 @@ import ( // @Tags Notion // @Accept json // @Produce json -// @Success 200 {object} view.MessageResponse -// @Failure 400 {object} view.ErrorResponse +// @Success 200 {object} MessageResponse +// @Failure 400 {object} ErrorResponse // @Router /notion/audiences [get] func (h *handler) ListAudiences(c *gin.Context) { filter := ¬ion.DatabaseQueryFilter{} diff --git a/pkg/handler/notion/changelog.go b/pkg/handler/notion/changelog.go index fadfcca86..857b099c2 100644 --- a/pkg/handler/notion/changelog.go +++ b/pkg/handler/notion/changelog.go @@ -55,8 +55,8 @@ func parseProjectChangelogNotionMessageFromCtx(c *gin.Context) (ProjectChangelog // @Tags Notion // @Accept json // @Produce json -// @Success 200 {object} view.MessageResponse -// @Failure 400 {object} view.ErrorResponse +// @Success 200 {object} MessageResponse +// @Failure 400 {object} ErrorResponse // @Router /notion/changelogs/projects/available [get] func (h *handler) GetAvailableProjectsChangelog(c *gin.Context) { projects, err := h.service.Notion.ListProject() @@ -73,8 +73,8 @@ func (h *handler) GetAvailableProjectsChangelog(c *gin.Context) { // @Tags Notion // @Accept json // @Produce json -// @Success 200 {object} view.MessageResponse -// @Failure 400 {object} view.ErrorResponse +// @Success 200 {object} MessageResponse +// @Failure 400 {object} ErrorResponse // @Router /notion/changelogs/project [post] func (h *handler) SendProjectChangelog(c *gin.Context) { msg, err := parseProjectChangelogNotionMessageFromCtx(c) diff --git a/pkg/handler/notion/digest.go b/pkg/handler/notion/digest.go index e8a928d0f..2b376bb45 100644 --- a/pkg/handler/notion/digest.go +++ b/pkg/handler/notion/digest.go @@ -17,8 +17,8 @@ import ( // @Tags Notion // @Accept json // @Produce json -// @Success 200 {object} view.MessageResponse -// @Failure 400 {object} view.ErrorResponse +// @Success 200 {object} MessageResponse +// @Failure 400 {object} ErrorResponse // @Router /notion/digests [get] func (h *handler) ListDigests(c *gin.Context) { resp, err := h.service.Notion.GetDatabase(h.config.Notion.Databases.Digest, nil, []notion.DatabaseQuerySort{ diff --git a/pkg/handler/notion/earn.go b/pkg/handler/notion/earn.go index 939c2396d..c2c190f5c 100644 --- a/pkg/handler/notion/earn.go +++ b/pkg/handler/notion/earn.go @@ -18,8 +18,8 @@ import ( // @Tags Notion // @Accept json // @Produce json -// @Success 200 {object} view.MessageResponse -// @Failure 400 {object} view.ErrorResponse +// @Success 200 {object} MessageResponse +// @Failure 400 {object} ErrorResponse // @Router /notion/earns [get] func (h *handler) ListEarns(c *gin.Context) { filter := ¬ion.DatabaseQueryFilter{} diff --git a/pkg/handler/notion/event.go b/pkg/handler/notion/event.go index aeaeb1a1a..f7a58e145 100644 --- a/pkg/handler/notion/event.go +++ b/pkg/handler/notion/event.go @@ -19,8 +19,8 @@ import ( // @Tags Notion // @Accept json // @Produce json -// @Success 200 {object} view.MessageResponse -// @Failure 400 {object} view.ErrorResponse +// @Success 200 {object} MessageResponse +// @Failure 400 {object} ErrorResponse // @Router /notion/events [get] func (h *handler) ListEvents(c *gin.Context) { filter := ¬ion.DatabaseQueryFilter{} diff --git a/pkg/handler/notion/hiring.go b/pkg/handler/notion/hiring.go index 7c16ac3e1..acb758322 100644 --- a/pkg/handler/notion/hiring.go +++ b/pkg/handler/notion/hiring.go @@ -18,8 +18,8 @@ import ( // @Tags Notion // @Accept json // @Produce json -// @Success 200 {object} view.MessageResponse -// @Failure 400 {object} view.ErrorResponse +// @Success 200 {object} MessageResponse +// @Failure 400 {object} ErrorResponse // @Router /notion/hiring-positions [get] func (h *handler) ListHiringPositions(c *gin.Context) { filter := ¬ion.DatabaseQueryFilter{} diff --git a/pkg/handler/notion/issue.go b/pkg/handler/notion/issue.go index 323d4aa73..b9287c454 100644 --- a/pkg/handler/notion/issue.go +++ b/pkg/handler/notion/issue.go @@ -18,8 +18,8 @@ import ( // @Tags Notion // @Accept json // @Produce json -// @Success 200 {object} view.MessageResponse -// @Failure 400 {object} view.ErrorResponse +// @Success 200 {object} MessageResponse +// @Failure 400 {object} ErrorResponse // @Router /notion/issues [get] func (h *handler) ListIssues(c *gin.Context) { resp, err := h.service.Notion.GetDatabase(h.config.Notion.Databases.Issue, nil, []notion.DatabaseQuerySort{ diff --git a/pkg/handler/notion/memo.go b/pkg/handler/notion/memo.go index 68b803726..9dbb8ffa3 100644 --- a/pkg/handler/notion/memo.go +++ b/pkg/handler/notion/memo.go @@ -16,8 +16,8 @@ import ( // @Tags Notion // @Accept json // @Produce json -// @Success 200 {object} view.MessageResponse -// @Failure 400 {object} view.ErrorResponse +// @Success 200 {object} MessageResponse +// @Failure 400 {object} ErrorResponse // @Router /notion/memos [get] func (h *handler) ListMemos(c *gin.Context) { resp, err := h.service.Notion.GetDatabase(h.config.Notion.Databases.Memo, nil, []notion.DatabaseQuerySort{ diff --git a/pkg/handler/notion/newsletter.go b/pkg/handler/notion/newsletter.go index 611e609dd..d4486db02 100644 --- a/pkg/handler/notion/newsletter.go +++ b/pkg/handler/notion/newsletter.go @@ -35,8 +35,8 @@ type ProjectChangelog struct { // @Accept json // @Produce json // @Param id path string true "id" -// @Success 200 {object} view.MessageResponse -// @Failure 400 {object} view.ErrorResponse +// @Success 200 {object} MessageResponse +// @Failure 400 {object} ErrorResponse // @Router /notion/df-updates/{id}/send [post] func (h *handler) SendNewsLetter(c *gin.Context) { contentID := c.Param("id") diff --git a/pkg/handler/notion/project_milestone.go b/pkg/handler/notion/project_milestone.go index 47cbd53ba..2dab3aee5 100644 --- a/pkg/handler/notion/project_milestone.go +++ b/pkg/handler/notion/project_milestone.go @@ -19,8 +19,8 @@ import ( // @Tags Notion // @Accept json // @Produce json -// @Success 200 {object} view.MessageResponse -// @Failure 400 {object} view.ErrorResponse +// @Success 200 {object} MessageResponse +// @Failure 400 {object} ErrorResponse // @Router /notion/projects/milestones [get] func (h *handler) ListProjectMilestones(c *gin.Context) { filter := ¬ion.DatabaseQueryFilter{} diff --git a/pkg/handler/notion/staffing_demand.go b/pkg/handler/notion/staffing_demand.go index 43e07497d..465b316cf 100644 --- a/pkg/handler/notion/staffing_demand.go +++ b/pkg/handler/notion/staffing_demand.go @@ -17,8 +17,8 @@ import ( // @Tags Notion // @Accept json // @Produce json -// @Success 200 {object} view.MessageResponse -// @Failure 400 {object} view.ErrorResponse +// @Success 200 {object} MessageResponse +// @Failure 400 {object} ErrorResponse // @Router /notion/staffing-demands [get] func (h *handler) ListStaffingDemands(c *gin.Context) { resp, err := h.service.Notion.GetDatabase(h.config.Notion.Databases.StaffingDemand, nil, nil, 0) diff --git a/pkg/handler/notion/tech_radar.go b/pkg/handler/notion/tech_radar.go index b3a31577b..c84c8ca9c 100644 --- a/pkg/handler/notion/tech_radar.go +++ b/pkg/handler/notion/tech_radar.go @@ -21,8 +21,8 @@ import ( // @Tags Notion // @Accept json // @Produce json -// @Success 200 {object} view.MessageResponse -// @Failure 400 {object} view.ErrorResponse +// @Success 200 {object} MessageResponse +// @Failure 400 {object} ErrorResponse // @Router /notion/tech-radars [get] func (h *handler) ListTechRadars(c *gin.Context) { filter := ¬ion.DatabaseQueryFilter{} @@ -123,8 +123,8 @@ func (h *handler) ListTechRadars(c *gin.Context) { // @Accept json // @Produce json // @Param body body model.NotionTechRadar true "body for create tech radar item" -// @Success 200 {object} view.MessageResponse -// @Failure 400 {object} view.ErrorResponse +// @Success 200 {object} MessageResponse +// @Failure 400 {object} ErrorResponse func (h *handler) CreateTechRadar(c *gin.Context) { var input model.NotionTechRadar if err := c.ShouldBindJSON(&input); err != nil { diff --git a/pkg/handler/notion/update.go b/pkg/handler/notion/update.go index 764d206f5..dc5b21c30 100644 --- a/pkg/handler/notion/update.go +++ b/pkg/handler/notion/update.go @@ -17,8 +17,8 @@ import ( // @Tags Notion // @Accept json // @Produce json -// @Success 200 {object} view.MessageResponse -// @Failure 400 {object} view.ErrorResponse +// @Success 200 {object} MessageResponse +// @Failure 400 {object} ErrorResponse // @Router /notion/update [get] func (h *handler) ListUpdates(c *gin.Context) { resp, err := h.service.Notion.GetDatabase(h.config.Notion.Databases.Updates, nil, []notion.DatabaseQuerySort{ diff --git a/pkg/handler/payroll/payroll.go b/pkg/handler/payroll/payroll.go index 3d4589f29..6f6575dd5 100644 --- a/pkg/handler/payroll/payroll.go +++ b/pkg/handler/payroll/payroll.go @@ -56,14 +56,6 @@ func New(controller *controller.Controller, store *store.Store, repo store.DBRep } } -// GetPayrollsByMonth godoc -// @Summary Get payrolls by month -// @Description Get payrolls by month -// @Tags payrolls -// @Accept json -// @Produce json -// @Success 200 {object} []model.Payroll -// @Failure 400 {object} view.ErrorResponse func (h *handler) GetPayrollsByMonth(c *gin.Context) { q := c.Request.URL.Query() diff --git a/pkg/handler/profile/profile.go b/pkg/handler/profile/profile.go index 7c80e4471..e668906fc 100644 --- a/pkg/handler/profile/profile.go +++ b/pkg/handler/profile/profile.go @@ -47,14 +47,15 @@ func New(controller *controller.Controller, store *store.Store, repo store.DBRep // GetProfile godoc // @Summary Get profile information of employee // @Description Get profile information of employee +// @id getPofile // @Tags Profile // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" -// @Success 200 {object} view.ProfileDataResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Security BearerAuth +// @Success 200 {object} ProfileDataResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /profile [get] func (h *handler) GetProfile(c *gin.Context) { userID, err := authutils.GetUserIDFromContext(c, h.config) @@ -86,16 +87,17 @@ func (h *handler) GetProfile(c *gin.Context) { // UpdateInfo godoc // @Summary Update profile info by id // @Description Update profile info by id +// @id updateProfileInfo // @Tags Profile // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param id path string true "Employee ID" -// @Param Body body request.UpdateInfoInput true "Body" -// @Success 200 {object} view.UpdateProfileInfoResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Param Body body UpdateInfoInput true "Body" +// @Success 200 {object} UpdateProfileInfoResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /profile [put] func (h *handler) UpdateInfo(c *gin.Context) { employeeID, err := authutils.GetUserIDFromContext(c, h.config) @@ -325,15 +327,16 @@ func (h *handler) validateAndMappingCity(db *gorm.DB, countryName string, cityNa // UploadAvatar godoc // @Summary Upload avatar by id // @Description Upload avatar by id +// @id uploadProfileAvatar // @Tags Profile // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param file formData file true "content upload" -// @Success 200 {object} view.EmployeeContentDataResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Success 200 {object} EmployeeContentDataResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /profile/upload-avatar [post] func (h *handler) UploadAvatar(c *gin.Context) { employeeID, err := authutils.GetUserIDFromContext(c, h.config) @@ -447,15 +450,16 @@ func (h *handler) UploadAvatar(c *gin.Context) { // Upload godoc // @Summary Upload image by id // @Description Upload image by id +// @id uploadImage // @Tags Profile // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param file formData file true "content upload" -// @Success 200 {object} view.EmployeeContentDataResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Success 200 {object} EmployeeContentDataResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /profile/upload [post] func (h *handler) Upload(c *gin.Context) { employeeID, err := authutils.GetUserIDFromContext(c, h.config) @@ -599,14 +603,15 @@ func (h *handler) Upload(c *gin.Context) { // GetInvitation godoc // @Summary Get invitation state based on token // @Description Submit Get invitation state based on token +// @id getInvitation // @Tags Onboarding // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" -// @Success 200 {object} view.EmployeeInvitationResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Security BearerAuth +// @Success 200 {object} EmployeeInvitationResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /invite [get] func (h *handler) GetInvitation(c *gin.Context) { employeeID, err := authutils.GetUserIDFromContext(c, h.config) @@ -639,15 +644,16 @@ func (h *handler) GetInvitation(c *gin.Context) { // SubmitOnboardingForm godoc // @Summary Submit onboarding form // @Description Submit Onboarding form +// @id submitOnboardingForm // @Tags Onboarding // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" -// @Param Body body request.SubmitOnboardingFormRequest true "Body" -// @Success 200 {object} view.MessageResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Security BearerAuth +// @Param Body body SubmitOnboardingFormRequest true "Body" +// @Success 200 {object} MessageResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /invite/submit [put] func (h *handler) SubmitOnboardingForm(c *gin.Context) { employeeID, err := authutils.GetUserIDFromContext(c, h.config) diff --git a/pkg/handler/profile/profile_test.go b/pkg/handler/profile/profile_test.go index 0019630b6..7497ba8bd 100644 --- a/pkg/handler/profile/profile_test.go +++ b/pkg/handler/profile/profile_test.go @@ -17,7 +17,7 @@ import ( "github.com/dwarvesf/fortress-api/pkg/utils/testhelper" ) -const testToken = "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2OTkzMjExNDIsImlkIjoiMjY1NTgzMmUtZjAwOS00YjczLWE1MzUtNjRjM2EyMmU1NThmIiwiYXZhdGFyIjoiaHR0cHM6Ly9zMy1hcC1zb3V0aGVhc3QtMS5hbWF6b25hd3MuY29tL2ZvcnRyZXNzLWltYWdlcy81MTUzNTc0Njk1NjYzOTU1OTQ0LnBuZyIsImVtYWlsIjoidGhhbmhAZC5mb3VuZGF0aW9uIiwicGVybWlzc2lvbnMiOlsiZW1wbG95ZWVzLnJlYWQiXSwidXNlcl9pbmZvIjpudWxsfQ.GENGPEucSUrILN6tHDKxLMtj0M0REVMUPC7-XhDMpGM" +const testToken = "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjk1ODMzMzA5NDUsImlkIjoiMjY1NTgzMmUtZjAwOS00YjczLWE1MzUtNjRjM2EyMmU1NThmIiwiYXZhdGFyIjoiaHR0cHM6Ly9zMy1hcC1zb3V0aGVhc3QtMS5hbWF6b25hd3MuY29tL2ZvcnRyZXNzLWltYWdlcy81MTUzNTc0Njk1NjYzOTU1OTQ0LnBuZyIsImVtYWlsIjoidGhhbmhAZC5mb3VuZGF0aW9uIn0.oIdlwWGBy4E1CbSoEX6r2B6NQLbew_J-RttpAcg6w8M" func TestHandler_GetProfile(t *testing.T) { // load env and test data diff --git a/pkg/handler/profile/request/request.go b/pkg/handler/profile/request/request.go index a97b5d679..7997c8ce1 100644 --- a/pkg/handler/profile/request/request.go +++ b/pkg/handler/profile/request/request.go @@ -29,7 +29,7 @@ type UpdateInfoInput struct { WiseRecipientName string `form:"wiseRecipientName" json:"wiseRecipientName"` WiseAccountNumber string `form:"wiseAccountNumber" json:"wiseAccountNumber"` WiseCurrency string `form:"wiseCurrency" json:"wiseCurrency"` -} +} // @name UpdateInfoInput func (i UpdateInfoInput) ToEmployeeModel(employee *model.Employee) { employee.PersonalEmail = i.PersonalEmail @@ -86,7 +86,7 @@ type SubmitOnboardingFormRequest struct { GithubID string `json:"githubID"` LinkedInName string `json:"linkedInName"` NotionName string `json:"notionName"` -} +} // @name SubmitOnboardingFormRequest func (i *SubmitOnboardingFormRequest) Validate() error { if i.DateOfBirth.After(time.Now()) { diff --git a/pkg/handler/project/project.go b/pkg/handler/project/project.go index e632e85d8..1dff9b41a 100644 --- a/pkg/handler/project/project.go +++ b/pkg/handler/project/project.go @@ -53,10 +53,10 @@ func New(controller *controller.Controller, store *store.Store, repo store.DBRep // @Tags Project // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @PSuccess 200 {object} view.IcyWeeklyDistribution -// @Failure 400 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Failure 400 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /projects/icy-weekly-distribution [get] func (h *handler) IcyWeeklyDistribution(c *gin.Context) { l := h.logger.Fields(logger.Fields{ @@ -80,15 +80,15 @@ func (h *handler) IcyWeeklyDistribution(c *gin.Context) { // @Tags Project // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param status query []string false "Project status" // @Param name query string false "Project name" // @Param type query string false "Project type" // @Param page query string false "Page" // @Param size query string false "Size" // @Success 200 {object} view.ProjectListDataResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Failure 400 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /projects [get] func (h *handler) List(c *gin.Context) { // 0. Get current logged in user data @@ -139,13 +139,13 @@ func (h *handler) List(c *gin.Context) { // @Tags Project // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param id path string true "Project ID" // @Param status body model.ProjectStatus true "Project Status" // @Success 200 {object} view.UpdateProjectStatusResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /projects/{id}/status [put] func (h *handler) UpdateProjectStatus(c *gin.Context) { projectID := c.Param("id") @@ -249,11 +249,11 @@ func (h *handler) UpdateProjectStatus(c *gin.Context) { // @Tags Project // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param Body body request.CreateProjectInput true "body" // @Success 200 {object} view.CreateProjectData -// @Failure 400 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Failure 400 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /projects [post] func (h *handler) Create(c *gin.Context) { userInfo, err := authutils.GetLoggedInUserInfo(c, h.store, h.repo.DB(), h.config) @@ -484,7 +484,7 @@ func (h *handler) createProjectHeads(db *gorm.DB, projectID model.UUID, position // @Tags Project // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param id path string false "Project ID" // @Param status query string false "Status" // @Param preload query bool false "Preload data with default value is true" @@ -493,9 +493,9 @@ func (h *handler) createProjectHeads(db *gorm.DB, projectID model.UUID, position // @Param sort query string false "Sort" // @Param distinct query bool false "Distinct" // @Success 200 {object} view.ProjectMemberListResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /projects/{id}/members [get] func (h *handler) GetMembers(c *gin.Context) { userInfo, err := authutils.GetLoggedInUserInfo(c, h.store, h.repo.DB(), h.config) @@ -625,13 +625,13 @@ func (h *handler) mergeSlotAndMembers(db *gorm.DB, slots []*model.ProjectSlot, m // @Tags Project // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param id path string true "Project ID" // @Param memberID path string true "Project Member ID" -// @Success 200 {object} view.MessageResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Success 200 {object} MessageResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /project/{id}/members/{memberID} [delete] func (h *handler) DeleteMember(c *gin.Context) { input := request.DeleteMemberInput{ @@ -716,13 +716,13 @@ func (h *handler) DeleteMember(c *gin.Context) { // @Tags Project // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param id path string true "Project ID" // @Param slotID path string true "Slot ID" -// @Success 200 {object} view.MessageResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Success 200 {object} MessageResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /project/{id}/slot/{slotID} [delete] func (h *handler) DeleteSlot(c *gin.Context) { input := request.DeleteSlotInput{ @@ -771,13 +771,13 @@ func (h *handler) DeleteSlot(c *gin.Context) { // @Tags Project // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param id path string true "Project ID" // @Param memberID path string true "Employee ID" -// @Success 200 {object} view.MessageResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Success 200 {object} MessageResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /project/{id}/members/{memberID} [put] func (h *handler) UnassignMember(c *gin.Context) { input := request.UnassignMemberInput{ @@ -870,13 +870,13 @@ func (h *handler) UnassignMember(c *gin.Context) { // @Tags Project // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param id path string true "Project ID" // @Param Body body request.UpdateMemberInput true "Body" // @Success 200 {object} view.CreateMemberDataResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /projects/{id}/members [put] func (h *handler) UpdateMember(c *gin.Context) { userInfo, err := authutils.GetLoggedInUserInfo(c, h.store, h.repo.DB(), h.config) @@ -1342,13 +1342,13 @@ func (h *handler) updateProjectMember(db *gorm.DB, p *model.Project, slotID stri // @Tags Project // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param id path string true "Project ID" // @Param Body body request.AssignMemberInput true "Body" // @Success 200 {object} view.CreateMemberDataResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /projects/{id}/members [post] func (h *handler) AssignMember(c *gin.Context) { userInfo, err := authutils.GetLoggedInUserInfo(c, h.store, h.repo.DB(), h.config) @@ -1615,12 +1615,12 @@ func (h *handler) createSlotsAndAssignMembers(db *gorm.DB, p *model.Project, req // @Tags Project // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param id path string true "Project ID" // @Success 200 {object} view.ProjectDataResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /projects/{id} [get] func (h *handler) Details(c *gin.Context) { // 0. Get current logged in user data @@ -1676,13 +1676,13 @@ func (h *handler) Details(c *gin.Context) { // @Tags Project // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param id path string true "Project ID" // @Param Body body request.UpdateProjectGeneralInfoInput true "Body" // @Success 200 {object} view.UpdateProjectGeneralInfoResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /projects/{id}/general-info [put] func (h *handler) UpdateGeneralInfo(c *gin.Context) { projectID := c.Param("id") @@ -1905,13 +1905,13 @@ func (h *handler) UpdateGeneralInfo(c *gin.Context) { // @Tags Project // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param id path string true "Project ID" // @Param Body body request.UpdateContactInfoInput true "Body" // @Success 200 {object} view.UpdateProjectContactInfoResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /projects/{id}/contact-info [put] func (h *handler) UpdateContactInfo(c *gin.Context) { userInfo, err := authutils.GetLoggedInUserInfo(c, h.store, h.repo.DB(), h.config) @@ -2143,13 +2143,13 @@ func (h *handler) updateProjectLead(db *gorm.DB, projectID string, employeeID mo // @Tags Project // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param id path string true "Project ID" // @Param status query model.WorkUnitStatus false "status" // @Success 200 {object} view.ListWorkUnitResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /projects/{id}/work-units [get] func (h *handler) GetWorkUnits(c *gin.Context) { // 0. Get current logged in user data @@ -2218,13 +2218,13 @@ func (h *handler) GetWorkUnits(c *gin.Context) { // @Tags Project // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param id path string true "Project ID" // @Param body body request.CreateWorkUnitBody true "Body" // @Success 200 {object} view.WorkUnitResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /projects/{id}/work-units [post] func (h *handler) CreateWorkUnit(c *gin.Context) { // 0. Get current logged in user data @@ -2370,14 +2370,14 @@ func (h *handler) CreateWorkUnit(c *gin.Context) { // @Tags Project // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param id path string true "Project ID" // @Param workUnitID path string true "Work Unit ID" // @Param Body body request.UpdateWorkUnitInput true "Body" -// @Success 200 {object} view.MessageResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Success 200 {object} MessageResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /projects/{id}/work-units/{workUnitID} [put] func (h *handler) UpdateWorkUnit(c *gin.Context) { // 0. Get current logged in user data @@ -2655,13 +2655,13 @@ func (h *handler) createWorkUnit(db *gorm.DB, projectID string, workUnitID strin // @Tags Project // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param id path string true "Project ID" // @Param workUnitID path string true "Work Unit ID" -// @Success 200 {object} view.MessageResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Success 200 {object} MessageResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /projects/{id}/work-units/{workUnitID}/archive [put] func (h *handler) ArchiveWorkUnit(c *gin.Context) { // 0. Get current logged in user data @@ -2776,13 +2776,13 @@ func (h *handler) ArchiveWorkUnit(c *gin.Context) { // @Tags Project // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param id path string true "Project ID" // @Param workUnitID path string true "Work Unit ID" -// @Success 200 {object} view.MessageResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Success 200 {object} MessageResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /projects/{id}/work-units/{workUnitID}/unarchive [put] func (h *handler) UnarchiveWorkUnit(c *gin.Context) { // 0. Get current logged in user data @@ -2909,13 +2909,13 @@ func (h *handler) UnarchiveWorkUnit(c *gin.Context) { // @Tags Project // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param id path string true "Project ID" // @Param allowsSendingSurvey query bool false "Allows sending survey" -// @Success 200 {object} view.MessageResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Success 200 {object} MessageResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /projects/{id}/sending-survey-state [put] func (h *handler) UpdateSendingSurveyState(c *gin.Context) { projectID := c.Param("id") @@ -2967,12 +2967,12 @@ func (h *handler) UpdateSendingSurveyState(c *gin.Context) { // @Accept json // @Produce json // @Param id path string true "Project ID" -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param file formData file true "avatar upload" // @Success 200 {object} view.ProjectContentDataResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /projects/{id}/upload-avatar [post] func (h *handler) UploadAvatar(c *gin.Context) { // 1.1 parse id from uri, validate id @@ -3068,10 +3068,10 @@ func (h *handler) UploadAvatar(c *gin.Context) { // @Tags Project // @Accept json // @Produce json -// @Success 200 {object} view.MessageResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Success 200 {object} MessageResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /cron-jobs/sync-project-member-status [post] func (h *handler) SyncProjectMemberStatus(c *gin.Context) { l := h.logger.Fields(logger.Fields{ diff --git a/pkg/handler/project/project_test.go b/pkg/handler/project/project_test.go index c9f697a61..595b755a4 100644 --- a/pkg/handler/project/project_test.go +++ b/pkg/handler/project/project_test.go @@ -28,7 +28,7 @@ import ( "github.com/dwarvesf/fortress-api/pkg/utils" ) -const testToken = "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2OTkzMjExNDIsImlkIjoiMjY1NTgzMmUtZjAwOS00YjczLWE1MzUtNjRjM2EyMmU1NThmIiwiYXZhdGFyIjoiaHR0cHM6Ly9zMy1hcC1zb3V0aGVhc3QtMS5hbWF6b25hd3MuY29tL2ZvcnRyZXNzLWltYWdlcy81MTUzNTc0Njk1NjYzOTU1OTQ0LnBuZyIsImVtYWlsIjoidGhhbmhAZC5mb3VuZGF0aW9uIiwicGVybWlzc2lvbnMiOlsiZW1wbG95ZWVzLnJlYWQiXSwidXNlcl9pbmZvIjpudWxsfQ.GENGPEucSUrILN6tHDKxLMtj0M0REVMUPC7-XhDMpGM" +const testToken = "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjk1ODMzMzA5NDUsImlkIjoiMjY1NTgzMmUtZjAwOS00YjczLWE1MzUtNjRjM2EyMmU1NThmIiwiYXZhdGFyIjoiaHR0cHM6Ly9zMy1hcC1zb3V0aGVhc3QtMS5hbWF6b25hd3MuY29tL2ZvcnRyZXNzLWltYWdlcy81MTUzNTc0Njk1NjYzOTU1OTQ0LnBuZyIsImVtYWlsIjoidGhhbmhAZC5mb3VuZGF0aW9uIn0.oIdlwWGBy4E1CbSoEX6r2B6NQLbew_J-RttpAcg6w8M" func TestHandler_Detail(t *testing.T) { cfg := config.LoadTestConfig() @@ -1209,7 +1209,7 @@ func TestHandler_DeleteProjectMember(t *testing.T) { ctx, _ := gin.CreateTestContext(w) ctx.Params = gin.Params{gin.Param{Key: "id", Value: tt.id}, gin.Param{Key: "memberID", Value: tt.memberID}} ctx.Request = httptest.NewRequest("DELETE", fmt.Sprintf("/api/v1/projects/%s/members/%s", tt.id, tt.memberID), nil) - ctx.Request.Header.Set("Authorization", "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2OTkzMjExNDIsImlkIjoiMjY1NTgzMmUtZjAwOS00YjczLWE1MzUtNjRjM2EyMmU1NThmIiwiYXZhdGFyIjoiaHR0cHM6Ly9zMy1hcC1zb3V0aGVhc3QtMS5hbWF6b25hd3MuY29tL2ZvcnRyZXNzLWltYWdlcy81MTUzNTc0Njk1NjYzOTU1OTQ0LnBuZyIsImVtYWlsIjoidGhhbmhAZC5mb3VuZGF0aW9uIiwicGVybWlzc2lvbnMiOlsiZW1wbG95ZWVzLnJlYWQiXSwidXNlcl9pbmZvIjpudWxsfQ.GENGPEucSUrILN6tHDKxLMtj0M0REVMUPC7-XhDMpGM") + ctx.Request.Header.Set("Authorization", "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjk1ODMzMzA5NDUsImlkIjoiMjY1NTgzMmUtZjAwOS00YjczLWE1MzUtNjRjM2EyMmU1NThmIiwiYXZhdGFyIjoiaHR0cHM6Ly9zMy1hcC1zb3V0aGVhc3QtMS5hbWF6b25hd3MuY29tL2ZvcnRyZXNzLWltYWdlcy81MTUzNTc0Njk1NjYzOTU1OTQ0LnBuZyIsImVtYWlsIjoidGhhbmhAZC5mb3VuZGF0aW9uIn0.oIdlwWGBy4E1CbSoEX6r2B6NQLbew_J-RttpAcg6w8M") metadataHandler := New(controllerMock, storeMock, txRepo, serviceMock, loggerMock, &cfg) metadataHandler.DeleteMember(ctx) @@ -1458,7 +1458,7 @@ func TestHandler_UpdateGeneralInfo(t *testing.T) { ctx, _ := gin.CreateTestContext(w) ctx.Params = gin.Params{gin.Param{Key: "id", Value: tt.id}} ctx.Request = httptest.NewRequest("PUT", fmt.Sprintf("/api/v1/projects/%s/general-info", tt.id), bodyReader) - ctx.Request.Header.Set("Authorization", "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2OTkzMjExNDIsImlkIjoiMjY1NTgzMmUtZjAwOS00YjczLWE1MzUtNjRjM2EyMmU1NThmIiwiYXZhdGFyIjoiaHR0cHM6Ly9zMy1hcC1zb3V0aGVhc3QtMS5hbWF6b25hd3MuY29tL2ZvcnRyZXNzLWltYWdlcy81MTUzNTc0Njk1NjYzOTU1OTQ0LnBuZyIsImVtYWlsIjoidGhhbmhAZC5mb3VuZGF0aW9uIiwicGVybWlzc2lvbnMiOlsiZW1wbG95ZWVzLnJlYWQiXSwidXNlcl9pbmZvIjpudWxsfQ.GENGPEucSUrILN6tHDKxLMtj0M0REVMUPC7-XhDMpGM") + ctx.Request.Header.Set("Authorization", "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjk1ODMzMzA5NDUsImlkIjoiMjY1NTgzMmUtZjAwOS00YjczLWE1MzUtNjRjM2EyMmU1NThmIiwiYXZhdGFyIjoiaHR0cHM6Ly9zMy1hcC1zb3V0aGVhc3QtMS5hbWF6b25hd3MuY29tL2ZvcnRyZXNzLWltYWdlcy81MTUzNTc0Njk1NjYzOTU1OTQ0LnBuZyIsImVtYWlsIjoidGhhbmhAZC5mb3VuZGF0aW9uIn0.oIdlwWGBy4E1CbSoEX6r2B6NQLbew_J-RttpAcg6w8M") metadataHandler := New(controllerMock, storeMock, txRepo, serviceMock, loggerMock, &cfg) metadataHandler.UpdateGeneralInfo(ctx) @@ -1696,7 +1696,7 @@ func TestHandler_UpdateContactInfo(t *testing.T) { ctx, _ := gin.CreateTestContext(w) ctx.Params = gin.Params{gin.Param{Key: "id", Value: tt.id}} ctx.Request = httptest.NewRequest("PUT", fmt.Sprintf("/api/v1/projects/%s/contact-info", tt.id), bodyReader) - ctx.Request.Header.Set("Authorization", "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2OTkzMjExNDIsImlkIjoiMjY1NTgzMmUtZjAwOS00YjczLWE1MzUtNjRjM2EyMmU1NThmIiwiYXZhdGFyIjoiaHR0cHM6Ly9zMy1hcC1zb3V0aGVhc3QtMS5hbWF6b25hd3MuY29tL2ZvcnRyZXNzLWltYWdlcy81MTUzNTc0Njk1NjYzOTU1OTQ0LnBuZyIsImVtYWlsIjoidGhhbmhAZC5mb3VuZGF0aW9uIiwicGVybWlzc2lvbnMiOlsiZW1wbG95ZWVzLnJlYWQiXSwidXNlcl9pbmZvIjpudWxsfQ.GENGPEucSUrILN6tHDKxLMtj0M0REVMUPC7-XhDMpGM") + ctx.Request.Header.Set("Authorization", "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjk1ODMzMzA5NDUsImlkIjoiMjY1NTgzMmUtZjAwOS00YjczLWE1MzUtNjRjM2EyMmU1NThmIiwiYXZhdGFyIjoiaHR0cHM6Ly9zMy1hcC1zb3V0aGVhc3QtMS5hbWF6b25hd3MuY29tL2ZvcnRyZXNzLWltYWdlcy81MTUzNTc0Njk1NjYzOTU1OTQ0LnBuZyIsImVtYWlsIjoidGhhbmhAZC5mb3VuZGF0aW9uIn0.oIdlwWGBy4E1CbSoEX6r2B6NQLbew_J-RttpAcg6w8M") metadataHandler := New(controllerMock, storeMock, txRepo, serviceMock, loggerMock, &cfg) metadataHandler.UpdateContactInfo(ctx) @@ -2498,7 +2498,7 @@ func TestHandler_UnassignMember(t *testing.T) { ctx, _ := gin.CreateTestContext(w) ctx.Params = gin.Params{gin.Param{Key: "id", Value: tt.id}, gin.Param{Key: "memberID", Value: tt.memberID}} ctx.Request = httptest.NewRequest("PUT", fmt.Sprintf("/api/v1/projects/%s/members/%s", tt.id, tt.memberID), nil) - ctx.Request.Header.Set("Authorization", "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2OTkzMjExNDIsImlkIjoiMjY1NTgzMmUtZjAwOS00YjczLWE1MzUtNjRjM2EyMmU1NThmIiwiYXZhdGFyIjoiaHR0cHM6Ly9zMy1hcC1zb3V0aGVhc3QtMS5hbWF6b25hd3MuY29tL2ZvcnRyZXNzLWltYWdlcy81MTUzNTc0Njk1NjYzOTU1OTQ0LnBuZyIsImVtYWlsIjoidGhhbmhAZC5mb3VuZGF0aW9uIiwicGVybWlzc2lvbnMiOlsiZW1wbG95ZWVzLnJlYWQiXSwidXNlcl9pbmZvIjpudWxsfQ.GENGPEucSUrILN6tHDKxLMtj0M0REVMUPC7-XhDMpGM") + ctx.Request.Header.Set("Authorization", "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjk1ODMzMzA5NDUsImlkIjoiMjY1NTgzMmUtZjAwOS00YjczLWE1MzUtNjRjM2EyMmU1NThmIiwiYXZhdGFyIjoiaHR0cHM6Ly9zMy1hcC1zb3V0aGVhc3QtMS5hbWF6b25hd3MuY29tL2ZvcnRyZXNzLWltYWdlcy81MTUzNTc0Njk1NjYzOTU1OTQ0LnBuZyIsImVtYWlsIjoidGhhbmhAZC5mb3VuZGF0aW9uIn0.oIdlwWGBy4E1CbSoEX6r2B6NQLbew_J-RttpAcg6w8M") metadataHandler := New(controllerMock, storeMock, txRepo, serviceMock, loggerMock, &cfg) metadataHandler.UnassignMember(ctx) diff --git a/pkg/handler/project/testdata/create/200.json b/pkg/handler/project/testdata/create/200.json index 9fdc4a213..1bff82f21 100644 --- a/pkg/handler/project/testdata/create/200.json +++ b/pkg/handler/project/testdata/create/200.json @@ -1,88 +1,101 @@ { "data": { - "id": "", - "createdAt": "", - "updatedAt": "", - "name": "Project1", - "type": "dwarves", - "status": "on-boarding", - "startDate": "2022-11-14", "accountManagers": [ { - "employeeID": "ecea9d15-05ba-4a4e-9787-54210e3b98ce", - "fullName": "Nguyễn Hoàng Huy", - "displayName": "Huy Nguyen", "avatar": "https://s3-ap-southeast-1.amazonaws.com/fortress-images/2830497479497502617.png", - "username": "huynh", "commissionRate": "100", - "finalCommissionRate": "0" - } - ], - "deliveryManagers": [ - { - "employeeID": "2655832e-f009-4b73-a535-64c3a22e558f", - "fullName": "Phạm Đức Thành", - "displayName": "Thanh Pham", - "avatar": "https://s3-ap-southeast-1.amazonaws.com/fortress-images/5153574695663955944.png", - "username": "thanh", - "commissionRate": "100", - "finalCommissionRate": "0" - } - ], - "salePersons": [ - { - "employeeID": "2655832e-f009-4b73-a535-64c3a22e558f", - "fullName": "Phạm Đức Thành", - "displayName": "Thanh Pham", - "avatar": "https://s3-ap-southeast-1.amazonaws.com/fortress-images/5153574695663955944.png", - "username": "thanh", - "commissionRate": "100", - "finalCommissionRate": "0" + "displayName": "Huy Nguyen", + "employeeID": "ecea9d15-05ba-4a4e-9787-54210e3b98ce", + "finalCommissionRate": "0", + "fullName": "Nguyễn Hoàng Huy", + "username": "huynh" } ], - "members": [], - "clientEmail": ["b@gmail.com", "c@gmail.com"], - "projectEmail": "a@gmail.com", - "country": { - "id": "4ef64490-c906-4192-a7f9-d2221dadfe4c", - "name": "Vietnam", - "code": "+84" - }, - "code": "project1", - "function": "learning", "bankAccount": { - "id": "e79eb5b3-e2cb-4d7f-9273-46f4be88cb20", "accountNumber": "1234567891", "bankName": "OCB", + "id": "e79eb5b3-e2cb-4d7f-9273-46f4be88cb20", "ownerName": "Phạm Văn Đạt" }, "client": { - "id": "afb9cf05-9517-4fb9-a4f2-66e6d90ad215", - "name": "Lorem Ipsum Inc.", - "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", - "registrationNumber": "32320398488", "address": "Hado Centrosa", - "country": "Vietnam", - "industry": "Technology", - "website": "https://d.foundations", + "avatar": "", + "city": "", + "companySize": "", "contacts": [ { - "id": "0569e64d-3b57-454a-ab88-0482e087eb5f", - "name": "Thanh Pham ", - "role": "PM", "emails": [ "thanh@d.foundation", "huytq@d.foundation" ], - "isMainContact": true + "id": "0569e64d-3b57-454a-ab88-0482e087eb5f", + "isMainContact": true, + "name": "Thanh Pham ", + "role": "PM" } - ] + ], + "country": "Vietnam", + "createdAt": "2023-02-07T18:41:35.740901Z", + "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", + "id": "afb9cf05-9517-4fb9-a4f2-66e6d90ad215", + "industry": "Technology", + "isPublic": false, + "lat": "", + "long": "", + "name": "Lorem Ipsum Inc.", + "projects": [], + "registrationNumber": "32320398488", + "solutionType": "", + "updatedAt": "2023-02-07T18:41:35.740901Z", + "website": "https://d.foundations" }, + "clientEmail": [ + "b@gmail.com", + "c@gmail.com" + ], + "code": "project1", + "country": { + "code": "+84", + "id": "4ef64490-c906-4192-a7f9-d2221dadfe4c", + "name": "Vietnam" + }, + "createdAt": "", + "deliveryManagers": [ + { + "avatar": "https://s3-ap-southeast-1.amazonaws.com/fortress-images/5153574695663955944.png", + "commissionRate": "100", + "displayName": "Thanh Pham", + "employeeID": "2655832e-f009-4b73-a535-64c3a22e558f", + "finalCommissionRate": "0", + "fullName": "Phạm Đức Thành", + "username": "thanh" + } + ], + "function": "learning", + "id": "", + "members": [], + "name": "Project1", "organization": { - "id": "31fdf38f-77c0-4c06-b530-e2be8bc297e0", + "avatar": "", "code": "dwarves-foundation", - "name": "Dwarves Foundation", - "avatar": "" - } + "id": "31fdf38f-77c0-4c06-b530-e2be8bc297e0", + "name": "Dwarves Foundation" + }, + "projectEmail": "a@gmail.com", + "salePersons": [ + { + "avatar": "https://s3-ap-southeast-1.amazonaws.com/fortress-images/5153574695663955944.png", + "commissionRate": "100", + "displayName": "Thanh Pham", + "employeeID": "2655832e-f009-4b73-a535-64c3a22e558f", + "finalCommissionRate": "0", + "fullName": "Phạm Đức Thành", + "username": "thanh" + } + ], + "startDate": "2022-11-14", + "status": "on-boarding", + "type": "dwarves", + "updatedAt": "" } } diff --git a/pkg/handler/project/testdata/update_general_info/200.json b/pkg/handler/project/testdata/update_general_info/200.json index 21fdc764f..684c6eff3 100644 --- a/pkg/handler/project/testdata/update_general_info/200.json +++ b/pkg/handler/project/testdata/update_general_info/200.json @@ -43,13 +43,22 @@ }, "client": { "id": "afb9cf05-9517-4fb9-a4f2-66e6d90ad215", + "createdAt": "2023-02-07T18:41:35.740901Z", + "updatedAt": "2023-02-07T18:41:35.740901Z", "name": "Lorem Ipsum Inc.", "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", "registrationNumber": "32320398488", + "avatar": "", "address": "Hado Centrosa", "country": "Vietnam", + "city": "", "industry": "Technology", "website": "https://d.foundations", + "isPublic": false, + "lat": "", + "long": "", + "companySize": "", + "solutionType": "", "contacts": [ { "id": "0569e64d-3b57-454a-ab88-0482e087eb5f", @@ -61,7 +70,8 @@ ], "isMainContact": true } - ] + ], + "projects": [] }, "organization": { "id": "31fdf38f-77c0-4c06-b530-e2be8bc297e0", diff --git a/pkg/handler/survey/survey.go b/pkg/handler/survey/survey.go index 14e550357..05490e222 100644 --- a/pkg/handler/survey/survey.go +++ b/pkg/handler/survey/survey.go @@ -48,13 +48,13 @@ func New(store *store.Store, repo store.DBRepo, service *service.Service, logger // @Tags Survey // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param subtype query string true "Event Subtype" // @Param page query string false "Page" // @Param size query string false "Size" // @Success 200 {object} view.ListSurveyResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Failure 400 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /surveys [get] func (h *handler) ListSurvey(c *gin.Context) { input := request.GetListSurveyInput{} @@ -154,7 +154,7 @@ func (h *handler) getQuestionDomainCountsByEvent(db *gorm.DB, eventID string) ([ // @Tags Survey // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param id path string true "Feedback Event ID" // @Param page query string false "Page" // @Param size query string false "Size" @@ -162,9 +162,9 @@ func (h *handler) getQuestionDomainCountsByEvent(db *gorm.DB, eventID string) ([ // @Param status query string false "Status" // @Param projects query []string false "Projects" // @Success 200 {object} view.ListSurveyDetailResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /surveys/{id} [get] func (h *handler) GetSurveyDetail(c *gin.Context) { input := request.GetSurveyDetailInput{ @@ -230,11 +230,11 @@ func (h *handler) GetSurveyDetail(c *gin.Context) { // @Accept json // @Produce json // @Param Body body request.CreateSurveyFeedbackInput true "Body" -// @Param Authorization header string true "jwt token" -// @Success 200 {object} view.MessageResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Security BearerAuth +// @Success 200 {object} MessageResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /surveys [post] func (h *handler) CreateSurvey(c *gin.Context) { // 1. parse request @@ -892,13 +892,13 @@ func (h *handler) createWorkEvent(db *gorm.DB, req request.CreateSurveyFeedbackI // @Tags Survey // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param id path string true "Feedback Event ID" // @Param Body body request.SendSurveyInput true "Body" -// @Success 200 {object} view.MessageResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Success 200 {object} MessageResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /surveys/{id}/send [post] func (h *handler) SendSurvey(c *gin.Context) { eventID := c.Param("id") @@ -1030,12 +1030,12 @@ func (h *handler) updateEventReviewer(db *gorm.DB, l logger.Logger, topicID mode // @Tags Survey // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param id path string true "Feedback Event ID" -// @Success 200 {object} view.MessageResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Success 200 {object} MessageResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /surveys/{id} [delete] func (h *handler) DeleteSurvey(c *gin.Context) { eventID := c.Param("id") @@ -1108,11 +1108,11 @@ func (h *handler) doSurveyDelete(db *gorm.DB, eventID string) (int, error) { // @Tags Survey // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Success 200 {object} view.FeedbackReviewDetailResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /surveys/{id}/topics/{topicID}/reviews/{reviewID} [get] func (h *handler) GetSurveyReviewDetail(c *gin.Context) { eventID := c.Param("id") @@ -1200,11 +1200,11 @@ func (h *handler) GetSurveyReviewDetail(c *gin.Context) { // @Tags Survey // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" -// @Success 200 {object} view.MessageResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Security BearerAuth +// @Success 200 {object} MessageResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /surveys/{id}/topics/{topicID} [delete] func (h *handler) DeleteSurveyTopic(c *gin.Context) { eventID := c.Param("id") @@ -1294,13 +1294,13 @@ func (h *handler) DeleteSurveyTopic(c *gin.Context) { // @Tags Survey // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param id path string true "Feedback Event ID" // @Param topicID path string true "Employee Event Topic ID" // @Success 200 {object} view.SurveyTopicDetailResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /surveys/{id}/topics/{topicID} [get] func (h *handler) GetSurveyTopicDetail(c *gin.Context) { input := request.PeerReviewDetailInput{ @@ -1342,12 +1342,12 @@ func (h *handler) GetSurveyTopicDetail(c *gin.Context) { // @Tags Survey // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param Body body request.UpdateTopicReviewersBody true "Body" -// @Success 200 {object} view.MessageResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Success 200 {object} MessageResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /surveys/{id}/topics/{topicID}/employees [put] func (h *handler) UpdateTopicReviewers(c *gin.Context) { input := request.UpdateTopicReviewersInput{ @@ -1550,12 +1550,12 @@ func (h *handler) createEventQuestions(db *gorm.DB, eventType model.EventType, e // @Tags Survey // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param id path string true "Feedback Event ID" -// @Success 200 {object} view.MessageResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Success 200 {object} MessageResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /surveys/{id}/done [put] func (h *handler) MarkDone(c *gin.Context) { eventID := c.Param("id") @@ -1670,14 +1670,14 @@ func (h *handler) forceEventReviewersToDone(db *gorm.DB, l logger.Logger, topicI // @Tags Survey // @Accept json // @Produce json -// @Param Authorization header string true "jwt token" +// @Security BearerAuth // @Param id path string true "Feedback Event ID" // @Param topicID path string true "Employee Event Topic ID" // @Param Body body request.DeleteTopicReviewersBody true "Body" -// @Success 200 {object} view.MessageResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Success 200 {object} MessageResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /surveys/{id}/topics/{topicID}/employees [delete] func (h *handler) DeleteTopicReviewers(c *gin.Context) { input := request.DeleteTopicReviewersInput{ diff --git a/pkg/handler/survey/survey_test.go b/pkg/handler/survey/survey_test.go index 2ad34cb04..aab4db0de 100644 --- a/pkg/handler/survey/survey_test.go +++ b/pkg/handler/survey/survey_test.go @@ -23,7 +23,7 @@ import ( "github.com/dwarvesf/fortress-api/pkg/utils/testhelper" ) -const testToken = "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2OTkzMjExNDIsImlkIjoiMjY1NTgzMmUtZjAwOS00YjczLWE1MzUtNjRjM2EyMmU1NThmIiwiYXZhdGFyIjoiaHR0cHM6Ly9zMy1hcC1zb3V0aGVhc3QtMS5hbWF6b25hd3MuY29tL2ZvcnRyZXNzLWltYWdlcy81MTUzNTc0Njk1NjYzOTU1OTQ0LnBuZyIsImVtYWlsIjoidGhhbmhAZC5mb3VuZGF0aW9uIiwicGVybWlzc2lvbnMiOlsiZW1wbG95ZWVzLnJlYWQiXSwidXNlcl9pbmZvIjpudWxsfQ.GENGPEucSUrILN6tHDKxLMtj0M0REVMUPC7-XhDMpGM" +const testToken = "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjk1ODMzMzA5NDUsImlkIjoiMjY1NTgzMmUtZjAwOS00YjczLWE1MzUtNjRjM2EyMmU1NThmIiwiYXZhdGFyIjoiaHR0cHM6Ly9zMy1hcC1zb3V0aGVhc3QtMS5hbWF6b25hd3MuY29tL2ZvcnRyZXNzLWltYWdlcy81MTUzNTc0Njk1NjYzOTU1OTQ0LnBuZyIsImVtYWlsIjoidGhhbmhAZC5mb3VuZGF0aW9uIn0.oIdlwWGBy4E1CbSoEX6r2B6NQLbew_J-RttpAcg6w8M" func TestHandler_ListSurvey(t *testing.T) { cfg := config.LoadTestConfig() diff --git a/pkg/handler/valuation/valuation.go b/pkg/handler/valuation/valuation.go index 44f86af75..90f2792aa 100644 --- a/pkg/handler/valuation/valuation.go +++ b/pkg/handler/valuation/valuation.go @@ -41,7 +41,7 @@ func New(store *store.Store, repo store.DBRepo, service *service.Service, logger // @Produce json // @Param year path int true "Year" // @Success 200 {object} model.Valuation -// @Failure 400 {object} view.ErrorResponse +// @Failure 400 {object} ErrorResponse func (h *handler) One(c *gin.Context) { // parse params & prepare logger year := c.Param("year") diff --git a/pkg/handler/vault/vault.go b/pkg/handler/vault/vault.go index 76a622361..804e73915 100644 --- a/pkg/handler/vault/vault.go +++ b/pkg/handler/vault/vault.go @@ -44,10 +44,10 @@ func New(store *store.Store, repo store.DBRepo, service *service.Service, logger // @Tags Vault // @Accept json // @Produce json -// @Success 200 {object} view.MessageResponse -// @Failure 400 {object} view.ErrorResponse -// @Failure 404 {object} view.ErrorResponse -// @Failure 500 {object} view.ErrorResponse +// @Success 200 {object} MessageResponse +// @Failure 400 {object} ErrorResponse +// @Failure 404 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse // @Router /cron-jobs/store-vault-transaction [post] func (h *handler) StoreVaultTransaction(c *gin.Context) { l := h.logger.Fields(logger.Fields{ diff --git a/pkg/model/company_info.go b/pkg/model/company_info.go index 7a875d554..ba3a32322 100644 --- a/pkg/model/company_info.go +++ b/pkg/model/company_info.go @@ -15,4 +15,4 @@ type CompanyInfo struct { type CompanyContactInfo struct { Address string `json:"address"` Phone string `json:"phone"` -} +} // @name CompanyContactInfo diff --git a/pkg/model/conversion_rate.go b/pkg/model/conversion_rate.go new file mode 100644 index 000000000..0ab01263b --- /dev/null +++ b/pkg/model/conversion_rate.go @@ -0,0 +1,12 @@ +package model + +import "github.com/shopspring/decimal" + +type ConversionRate struct { + BaseModel + + CurrencyID UUID + Currency Currency + ToUSD decimal.Decimal + ToVND decimal.Decimal +} diff --git a/pkg/model/employee_event_reviewer.go b/pkg/model/employee_event_reviewer.go index 78bd3eb14..4f5326295 100644 --- a/pkg/model/employee_event_reviewer.go +++ b/pkg/model/employee_event_reviewer.go @@ -21,7 +21,7 @@ type EmployeeEventReviewer struct { } // EventReviewerStatus event_reviewer_status for table employee event reviewer -type EventReviewerStatus string +type EventReviewerStatus string // @name EventReviewerStatus // EventReviewerStatus values const ( diff --git a/pkg/model/pagination.go b/pkg/model/pagination.go index e1423b863..98f55c206 100644 --- a/pkg/model/pagination.go +++ b/pkg/model/pagination.go @@ -15,7 +15,7 @@ type Pagination struct { Size int64 `json:"size" form:"size"` // page size Sort string `json:"sort" form:"sort" swaggerignore:"true"` // sort by field Standardized bool `json:"-" form:"-" swaggerignore:"true"` -} +} // @name Pagination const ( SortOrderASC SortOrder = "asc" diff --git a/pkg/routes/v1.go b/pkg/routes/v1.go index fca0f2326..4ed443c5e 100644 --- a/pkg/routes/v1.go +++ b/pkg/routes/v1.go @@ -30,6 +30,7 @@ func loadV1Routes(r *gin.Engine, h *handler.Handler, repo store.DBRepo, s *store cronjob.POST("/brainery-reports", amw.WithAuth, pmw.WithPerm(model.PermissionCronjobExecute), h.Discord.ReportBraineryMetrics) cronjob.POST("/delivery-metric-reports", amw.WithAuth, pmw.WithPerm(model.PermissionCronjobExecute), h.Discord.DeliveryMetricsReport) cronjob.POST("/sync-delivery-metrics", amw.WithAuth, pmw.WithPerm(model.PermissionCronjobExecute), h.DeliveryMetric.Sync) + cronjob.POST("/sync-conversion-rates", amw.WithAuth, pmw.WithPerm(model.PermissionCronjobExecute), h.ConversionRate.Sync) } ///////////////// @@ -353,6 +354,11 @@ func loadV1Routes(r *gin.Engine, h *handler.Handler, repo store.DBRepo, s *store discordGroup.GET("/mma-scores", amw.WithAuth, pmw.WithPerm(model.PermissionEmployeesDiscordRead), h.Employee.ListWithMMAScore) } + conversionRateGroup := v1.Group("/conversion-rates") + { + conversionRateGroup.GET("", amw.WithAuth, h.ConversionRate.List) + } + ///////////////// // PUBLIC API GROUP ///////////////// diff --git a/pkg/routes/v1_test.go b/pkg/routes/v1_test.go index 4ce8cfa93..0f9be3749 100644 --- a/pkg/routes/v1_test.go +++ b/pkg/routes/v1_test.go @@ -663,6 +663,12 @@ func Test_loadV1Routes(t *testing.T) { Handler: "github.com/dwarvesf/fortress-api/pkg/handler/deliverymetric.IHandler.Sync-fm", }, }, + "/cronjobs/sync-conversion-rates": { + "POST": { + Method: "POST", + Handler: "github.com/dwarvesf/fortress-api/pkg/handler/conversionrate.IHandler.Sync-fm", + }, + }, "/webhooks/n8n": { "POST": { Method: "POST", @@ -902,6 +908,12 @@ func Test_loadV1Routes(t *testing.T) { Handler: "github.com/dwarvesf/fortress-api/pkg/handler/employee.IHandler.ListWithMMAScore-fm", }, }, + "/api/v1/conversion-rates": { + "GET": { + Method: "GET", + Handler: "github.com/dwarvesf/fortress-api/pkg/handler/conversionrate.IHandler.List-fm", + }, + }, } l := logger.NewLogrusLogger() diff --git a/pkg/service/wise/wise.go b/pkg/service/wise/wise.go index 9463440b3..5eb5f7274 100644 --- a/pkg/service/wise/wise.go +++ b/pkg/service/wise/wise.go @@ -75,7 +75,6 @@ func (w *wiseService) GetRate(sourceCurrency, targetCurrency string) (float64, e if sourceCurrency == targetCurrency { return 1, nil } - return w.getTWRate(sourceCurrency, targetCurrency) } diff --git a/pkg/store/conversionrate/conversion_rate.go b/pkg/store/conversionrate/conversion_rate.go new file mode 100644 index 000000000..ca5693195 --- /dev/null +++ b/pkg/store/conversionrate/conversion_rate.go @@ -0,0 +1,28 @@ +package conversionrate + +import ( + "gorm.io/gorm" + + "github.com/dwarvesf/fortress-api/pkg/model" +) + +type store struct{} + +// New create new pg service +func New() IStore { + return &store{} +} + +func (c *store) GetByCurrencyID(db *gorm.DB, id string) (*model.ConversionRate, error) { + rs := &model.ConversionRate{} + return rs, db.Where("id = ?", id).Preload("Currency").First(rs).Error +} + +func (c *store) GetList(db *gorm.DB) ([]model.ConversionRate, error) { + var rs []model.ConversionRate + return rs, db.Preload("Currency").Find(&rs).Error +} + +func (s *store) Update(db *gorm.DB, cr *model.ConversionRate) error { + return db.Model(&cr).Where("currency_id = ?", cr.CurrencyID).Updates(&cr).Error +} diff --git a/pkg/store/conversionrate/interface.go b/pkg/store/conversionrate/interface.go new file mode 100644 index 000000000..9dac58c3f --- /dev/null +++ b/pkg/store/conversionrate/interface.go @@ -0,0 +1,13 @@ +package conversionrate + +import ( + "gorm.io/gorm" + + "github.com/dwarvesf/fortress-api/pkg/model" +) + +type IStore interface { + GetByCurrencyID(db *gorm.DB, id string) (*model.ConversionRate, error) + GetList(db *gorm.DB) ([]model.ConversionRate, error) + Update(db *gorm.DB, cr *model.ConversionRate) error +} diff --git a/pkg/store/operationalservice/operational_service.go b/pkg/store/operationalservice/operational_service.go index 90dcd1f5b..9cfc09694 100644 --- a/pkg/store/operationalservice/operational_service.go +++ b/pkg/store/operationalservice/operational_service.go @@ -17,7 +17,7 @@ func (s store) FindOperationByMonth(db *gorm.DB, month time.Month) ([]*model.Ope var res []*model.OperationalService query := db.Table("operational_services"). Preload("Currency"). - Where("is_active is true and date_part('month',register_date) = ?", month) + Where("is_active is true and type = 'monthly'") err := query.Find(&res).Error if err != nil && err != gorm.ErrRecordNotFound { diff --git a/pkg/store/store.go b/pkg/store/store.go index 62e99365d..00c696c09 100644 --- a/pkg/store/store.go +++ b/pkg/store/store.go @@ -19,6 +19,7 @@ import ( "github.com/dwarvesf/fortress-api/pkg/store/client" "github.com/dwarvesf/fortress-api/pkg/store/clientcontact" "github.com/dwarvesf/fortress-api/pkg/store/content" + "github.com/dwarvesf/fortress-api/pkg/store/conversionrate" "github.com/dwarvesf/fortress-api/pkg/store/country" "github.com/dwarvesf/fortress-api/pkg/store/currency" "github.com/dwarvesf/fortress-api/pkg/store/dashboard" @@ -94,6 +95,7 @@ type Store struct { Client client.IStore ClientContact clientcontact.IStore Content content.IStore + ConversionRate conversionrate.IStore Country country.IStore Currency currency.IStore Dashboard dashboard.IStore @@ -169,6 +171,7 @@ func New() *Store { Client: client.New(), ClientContact: clientcontact.New(), Content: content.New(), + ConversionRate: conversionrate.New(), Country: country.New(), Currency: currency.New(), Dashboard: dashboard.New(), diff --git a/pkg/view/asset.go b/pkg/view/asset.go index 4c60f2050..4eaec78ea 100644 --- a/pkg/view/asset.go +++ b/pkg/view/asset.go @@ -4,9 +4,10 @@ type ContentData struct { Url string `json:"url"` } +// ContentDataResponse represent the content data type ContentDataResponse struct { Data *ContentData `json:"data"` -} +} // @name ContentDataResponse func ToContentData(url string) *ContentData { return &ContentData{ diff --git a/pkg/view/auth.go b/pkg/view/auth.go index a786276ee..e777c75e4 100644 --- a/pkg/view/auth.go +++ b/pkg/view/auth.go @@ -7,11 +7,11 @@ import ( type AuthData struct { Employee EmployeeData `json:"employee"` AccessToken string `json:"accessToken"` -} +} // @name AuthData type APIKeyData struct { Key string `json:"key"` -} +} // @name APIKeyData func ToAuthData(accessToken string, employee *model.Employee) *AuthData { return &AuthData{ @@ -28,7 +28,7 @@ type LoggedInUserData struct { TeamEmail string `json:"teamEmail"` Role string `json:"role"` Permissions []string `json:"permissions"` -} +} // @name LoggedInUserData func ToAuthorizedUserData(employee *model.Employee, perms []*model.Permission) *LoggedInUserData { permissions := make([]string, len(perms)) @@ -49,8 +49,8 @@ func ToAuthorizedUserData(employee *model.Employee, perms []*model.Permission) * type AuthUserResponse struct { Data LoggedInUserData `json:"data"` -} +} // @name AuthUserResponse type APIKeyResponse struct { Data APIKeyData `json:"data"` -} +} // @name APIKeyResponse diff --git a/pkg/view/auth_test.go b/pkg/view/auth_test.go index 3ed65d856..2a0d47780 100644 --- a/pkg/view/auth_test.go +++ b/pkg/view/auth_test.go @@ -30,9 +30,7 @@ func TestToAuthData(t *testing.T) { }, want: &AuthData{ Employee: EmployeeData{ - BaseModel: model.BaseModel{ - ID: id, - }, + ID: id.String(), Projects: []EmployeeProjectData{}, Positions: []Position{}, }, diff --git a/pkg/view/bank.go b/pkg/view/bank.go index 21eabbd8e..88b55f34b 100644 --- a/pkg/view/bank.go +++ b/pkg/view/bank.go @@ -4,7 +4,7 @@ import "github.com/dwarvesf/fortress-api/pkg/model" type ListBankAccountResponse struct { Data []BankAccount `json:"data"` -} +} // @name ListBankAccountResponse type BankAccount struct { ID string `json:"id"` @@ -20,6 +20,24 @@ type BankAccount struct { UKSortCode string `json:"ukSortCode"` CurrencyID string `json:"currencyID"` Currency Currency `json:"currency"` +} // @name BankAccount + +func ToBankAccount(account *model.BankAccount) *BankAccount { + return &BankAccount{ + ID: account.ID.String(), + AccountNumber: account.AccountNumber, + BankName: account.BankName, + OwnerName: account.OwnerName, + Address: account.Address, + SwiftCode: account.SwiftCode, + RoutingNumber: account.RoutingNumber, + Name: account.Name, + UKSortCode: account.UKSortCode, + IntermediaryBankName: account.IntermediaryBankName, + IntermediaryBankAddress: account.IntermediaryBankAddress, + CurrencyID: account.CurrencyID.String(), + Currency: *toCurrency(account.Currency), + } } func ToListBankAccount(accounts []*model.BankAccount) []BankAccount { diff --git a/pkg/view/brainery_metric.go b/pkg/view/brainery_metric.go index 18c0b43ff..d3edd51bb 100644 --- a/pkg/view/brainery_metric.go +++ b/pkg/view/brainery_metric.go @@ -42,6 +42,10 @@ func ToPost(l model.BraineryLog) Post { } } +type BraineryMetricResponse struct { + Data BraineryMetric `json:"data"` +} // @name BraineryMetricResponse + // ToBraineryMetric parse BraineryLog logs to BraineryMetric func ToBraineryMetric(latestPosts, logs []*model.BraineryLog, ncids []string, queryView string) BraineryMetric { metric := BraineryMetric{} diff --git a/pkg/view/chapter.go b/pkg/view/chapter.go index 737141dd1..993db3a13 100644 --- a/pkg/view/chapter.go +++ b/pkg/view/chapter.go @@ -9,7 +9,7 @@ type Chapter struct { Code string `json:"code"` Name string `json:"name"` LeadID string `json:"leadID"` -} +} // @name Chapter func ToChapters(employeeChapters []model.EmployeeChapter) []Chapter { rs := make([]Chapter, 0, len(employeeChapters)) diff --git a/pkg/view/client.go b/pkg/view/client.go index 9bce822f4..11ab00601 100644 --- a/pkg/view/client.go +++ b/pkg/view/client.go @@ -2,35 +2,59 @@ package view import ( "strings" + "time" "github.com/dwarvesf/fortress-api/pkg/model" ) type CreateClientResponse struct { - Data *model.Client `json:"data"` -} + Data *Client `json:"data"` +} // @name CreateClientResponse type GetListClientResponse struct { - Data []*model.Client `json:"data"` -} + Data []*Client `json:"data"` +} // @name GetListClientResponse type GetDetailClientResponse struct { - Data *model.Client `json:"data"` -} + Data *Client `json:"data"` +} // @name GetDetailClientResponse type Client struct { - ID string `json:"id"` - Name string `json:"name"` - Description string `json:"description"` - RegistrationNumber string `json:"registrationNumber"` - Address string `json:"address"` - Country string `json:"country"` - Industry string `json:"industry"` - Website string `json:"website"` - Contacts []ClientContact `json:"contacts"` + ID string `json:"id"` + CreatedAt time.Time `json:"createdAt"` + UpdatedAt *time.Time `json:"updatedAt"` + Name string `json:"name"` + Description string `json:"description"` + RegistrationNumber string `json:"registrationNumber"` + Avatar string `json:"avatar"` + Address string `json:"address"` + Country string `json:"country"` + City string `json:"city"` + Industry string `json:"industry"` + Website string `json:"website"` + IsPublic bool `json:"isPublic"` + Lat string `json:"lat"` + Long string `json:"long"` + CompanySize string `json:"companySize"` + SolutionType string `json:"solutionType"` + + Contacts []ClientContact `json:"contacts"` + Projects []Project `json:"projects"` +} // @name Client + +func ToClients(clients []*model.Client) []Client { + rs := make([]Client, 0, len(clients)) + for _, client := range clients { + c := ToClient(client) + if c != nil { + rs = append(rs, *c) + } + } + + return rs } -func toClient(client *model.Client) *Client { +func ToClient(client *model.Client) *Client { contacts := make([]ClientContact, 0) for _, contact := range client.Contacts { contacts = append(contacts, *toClientContact(&contact)) @@ -38,14 +62,24 @@ func toClient(client *model.Client) *Client { return &Client{ ID: client.ID.String(), + CreatedAt: client.CreatedAt, + UpdatedAt: client.UpdatedAt, Name: client.Name, Description: client.Description, RegistrationNumber: client.RegistrationNumber, + Avatar: client.Avatar, Address: client.Address, Country: client.Country, + City: client.City, Industry: client.Industry, Website: client.Website, + IsPublic: client.IsPublic, + Lat: client.Lat, + Long: client.Long, + CompanySize: client.CompanySize, + SolutionType: client.SolutionType, Contacts: contacts, + Projects: ToProjects(client.Projects), } } @@ -55,7 +89,7 @@ type Address struct { City string `json:"city"` Lat string `json:"lat"` Long string `json:"long"` -} +} // @name Address type PublicClient struct { ID string `json:"id"` @@ -66,11 +100,11 @@ type PublicClient struct { Industry string `json:"industry"` CompanySize string `json:"companySize"` SolutionType string `json:"solutionType"` -} +} // @name PublicClient type PublicClientListResponse struct { Data []PublicClient `json:"data"` -} +} // @name PublicClientListResponse func ToPublicClientListResponse(clients []*model.Client) []PublicClient { rs := make([]PublicClient, 0, len(clients)) diff --git a/pkg/view/client_contact.go b/pkg/view/client_contact.go index e45aa570c..b41dec5e4 100644 --- a/pkg/view/client_contact.go +++ b/pkg/view/client_contact.go @@ -13,7 +13,7 @@ type ClientContact struct { Role string `json:"role"` Emails []string `json:"emails"` IsMainContact bool `json:"isMainContact"` -} +} // @name ClientContact func toClientContact(cc *model.ClientContact) *ClientContact { emails := []string{} diff --git a/pkg/view/currency.go b/pkg/view/currency.go index e9347eab5..918ffa647 100644 --- a/pkg/view/currency.go +++ b/pkg/view/currency.go @@ -8,7 +8,7 @@ type Currency struct { Symbol string `json:"symbol"` Locale string `json:"locale"` Type string `json:"type"` -} +} // @name Currency func toCurrency(c *model.Currency) *Currency { if c == nil { @@ -33,4 +33,4 @@ func ToCurrencies(c []model.Currency) []Currency { type GetCurrenciesResponse struct { Data []Currency `json:"data"` -} +} // @name GetCurrenciesResponse diff --git a/pkg/view/dashboard.go b/pkg/view/dashboard.go index 68c501f39..c42062ab8 100644 --- a/pkg/view/dashboard.go +++ b/pkg/view/dashboard.go @@ -14,37 +14,60 @@ type EngagementDashboardQuestionStat struct { Title string `json:"title"` StartDate *time.Time `json:"startDate"` Point float64 `json:"point"` -} +} // @name EngagementDashboardQuestionStat type EngagementDashboard struct { Content string `json:"content"` QuestionID string `json:"questionID"` Stats []EngagementDashboardQuestionStat `json:"stats"` -} +} // @name EngagementDashboard type EngagementDashboardQuestionDetailStat struct { Field string `json:"field"` StartDate *time.Time `json:"startDate"` Point float64 `json:"point"` -} +} // @name EngagementDashboardQuestionDetailStat type EngagementDashboardDetail struct { QuestionID string `json:"questionID"` Stats []EngagementDashboardQuestionDetailStat `json:"stats"` -} +} // @name EngagementDashboardDetail type ProjectSizeResponse struct { Data []*model.ProjectSize `json:"data"` +} // @name ProjectSizeResponse + +type ProjectSize struct { + ID string `json:"id"` + Name string `json:"name"` + Code string `json:"code"` + Avatar string `json:"avatar"` + Size int64 `json:"size"` +} // @name ProjectSize + +func ToProjectSizes(projects []*model.ProjectSize) []*ProjectSize { + var rs []*ProjectSize + for _, p := range projects { + rs = append(rs, &ProjectSize{ + ID: p.ID.String(), + Name: p.Name, + Code: p.Code, + Avatar: p.Avatar, + Size: p.Size, + }) + } + + return rs } type WorkSurveyResponse struct { Data WorkSurveysData `json:"data"` -} +} // @name WorkSurveyResponse type Trend struct { Workload float64 `json:"workload"` Deadline float64 `json:"deadline"` Learning float64 `json:"learning"` -} +} // @name Trend type WorkSurvey struct { EndDate string `json:"endDate"` @@ -52,13 +75,13 @@ type WorkSurvey struct { Deadline float64 `json:"deadline"` Learning float64 `json:"learning"` Trend Trend `json:"trend"` -} +} // @name WorkSurvey type ActionItemTrend struct { High float64 `json:"high"` Medium float64 `json:"medium"` Low float64 `json:"low"` -} +} // @name ActionItemTrend type AuditActionItemReport struct { Quarter string `json:"quarter"` @@ -66,16 +89,16 @@ type AuditActionItemReport struct { Medium int64 `json:"medium"` Low int64 `json:"low"` Trend ActionItemTrend `json:"trend"` -} +} // @name AuditActionItemReport type WorkSurveysData struct { Project *BasicProjectInfo `json:"project"` WorkSurveys []*WorkSurvey `json:"workSurveys"` -} +} // @name WorkSurveysData type ActionItemReportResponse struct { AuditActionItemReports []*AuditActionItemReport `json:"data"` -} +} // @name ActionItemReportResponse func ToWorkSurveyData(project *model.Project, workSurveys []*model.WorkSurvey) *WorkSurveysData { rs := &WorkSurveysData{} @@ -180,18 +203,18 @@ func calculateActionItemReportTrend(previous *model.ActionItemReport, current *m type EngineeringHealthResponse struct { Data EngineeringHealthData `json:"data"` -} +} // @name EngineeringHealthResponse type EngineeringHealthData struct { Average []*EngineeringHealth `json:"average"` Groups []*GroupEngineeringHealth `json:"groups"` -} +} // @name EngineeringHealthData type EngineeringHealth struct { Quarter string `json:"quarter"` Value float64 `json:"avg"` Trend float64 `json:"trend"` -} +} // @name EngineeringHealth type GroupEngineeringHealth struct { Quarter string `json:"quarter"` @@ -200,14 +223,14 @@ type GroupEngineeringHealth struct { Collaboration float64 `json:"collaboration"` Feedback float64 `json:"feedback"` Trend EngineeringHealthTrend `json:"trend"` -} +} // @name GroupEngineeringHealth type EngineeringHealthTrend struct { Delivery float64 `json:"delivery"` Quality float64 `json:"quality"` Collaboration float64 `json:"collaboration"` Feedback float64 `json:"feedback"` -} +} // @name EngineeringHealthTrend func ToEngineeringHealthData(average []*model.AverageEngineeringHealth, groups []*model.GroupEngineeringHealth) *EngineeringHealthData { rs := &EngineeringHealthData{} @@ -305,18 +328,18 @@ func calculateEngineeringHealthTrend(previous *EngineeringHealth, current *Engin type AuditResponse struct { Data AuditData `json:"data"` -} +} // @name AuditResponse type AuditData struct { Average []*Audit `json:"average"` Groups []*GroupAudit `json:"groups"` -} +} // @name AuditData type Audit struct { Quarter string `json:"quarter"` Value float64 `json:"avg"` Trend float64 `json:"trend"` -} +} // @name Audit type GroupAudit struct { Quarter string `json:"quarter"` @@ -327,7 +350,7 @@ type GroupAudit struct { Mobile float64 `json:"mobile"` Blockchain float64 `json:"blockchain"` Trend GroupAuditTrend `json:"trend"` -} +} // @name GroupAudit type GroupAuditTrend struct { Frontend float64 `json:"frontend"` @@ -336,7 +359,7 @@ type GroupAuditTrend struct { Process float64 `json:"process"` Mobile float64 `json:"mobile"` Blockchain float64 `json:"blockchain"` -} +} // @name GroupAuditTrend func ToAuditData(average []*model.AverageAudit, groups []*model.GroupAudit) *AuditData { rs := &AuditData{} @@ -414,18 +437,17 @@ type ActionItemSquash struct { SnapDate string `json:"snapDate"` Value int64 `json:"value"` Trend float64 `json:"trend"` -} - +} // @name ActionItemSquash type ActionItemSquashReport struct { All []*ActionItemSquash `json:"all"` High []*ActionItemSquash `json:"high"` Medium []*ActionItemSquash `json:"medium"` Low []*ActionItemSquash `json:"low"` -} +} // @name ActionItemSquashReport type ActionItemSquashReportResponse struct { Data *ActionItemSquashReport `json:"data"` -} +} // @name ActionItemSquashReportResponse func ToActionItemSquashReportData(actionItemReports []*model.ActionItemSquashReport) *ActionItemSquashReport { rs := &ActionItemSquashReport{} @@ -479,12 +501,12 @@ func calculateTrendForActionItemSquash(items []*ActionItemSquash) { type AuditValue struct { Value float64 `json:"value"` Trend float64 `json:"trend"` -} +} // @name AuditValue type ItemValue struct { Value int64 `json:"value"` Trend float64 `json:"trend"` -} +} // @name ItemValue type AuditSummary struct { ID model.UUID `json:"id"` @@ -496,15 +518,15 @@ type AuditSummary struct { Audit AuditValue `json:"audit"` NewItem ItemValue `json:"newItem"` ResolvedItem ItemValue `json:"resolvedItem"` -} +} // @name AuditSummary type AuditSummaries struct { Summary []*AuditSummary `json:"summary"` -} +} // @name AuditSummaries type AuditSummariesResponse struct { Data *AuditSummaries `json:"data"` -} +} // @name AuditSummariesResponse func ToAuditSummary(summary []*model.AuditSummary, previousSize int) *AuditSummary { rs := &AuditSummary{ @@ -601,7 +623,7 @@ type AvailableSlot struct { Seniority Seniority `json:"seniority"` Project BasicProjectInfo `json:"project"` Positions []Position `json:"positions"` -} +} // @name AvailableSlot type AvailableEmployee struct { ID string `json:"id"` @@ -613,16 +635,16 @@ type AvailableEmployee struct { Positions []Position `json:"positions"` Stacks []Stack `json:"stacks"` Projects []BasicProjectInfo `json:"projects"` -} +} // @name AvailableEmployee type ResourceAvailability struct { Slots []AvailableSlot `json:"slots"` Employees []AvailableEmployee `json:"employees"` -} +} // @name ResourceAvailability type ResourceAvailabilityResponse struct { Data ResourceAvailability `json:"data"` -} +} // @name ResourceAvailabilityResponse func ToResourceAvailability(slots []*model.ProjectSlot, employees []*model.Employee) ResourceAvailability { var res ResourceAvailability @@ -724,15 +746,15 @@ func ToEngagementDashboardDetails(statistic []*model.StatisticEngagementDashboar type GetEngagementDashboardResponse struct { Data []EngagementDashboard `json:"data"` -} +} // @name GetEngagementDashboardResponse type GetEngagementDashboardDetailResponse struct { Data []EngagementDashboardDetail `json:"data"` -} +} // @name GetEngagementDashboardDetailResponse type GetDashboardResourceUtilizationResponse struct { - Data []model.ResourceUtilization `json:"data"` -} + Data []ResourceUtilization `json:"data"` +} // @name GetDashboardResourceUtilizationResponse type WorkUnitDistribution struct { Employee BasicEmployeeInfo `json:"employee"` @@ -740,7 +762,7 @@ type WorkUnitDistribution struct { Development WorkUnitDistributionDevelopment `json:"development"` Management WorkUnitDistributionManagement `json:"management"` Training WorkUnitDistributionTraining `json:"training"` -} +} // @name WorkUnitDistribution func ManagementInfoToProjectHead(managementInfo *model.ManagementInfo) *WorkUnitDistributionWUProjectHead { return &WorkUnitDistributionWUProjectHead{ @@ -766,38 +788,38 @@ func ToWorkUnitDistributionWU(workUnit *model.WorkUnit) *WorkUnitDistributionWU type WorkUnitDistributionLearning struct { Total int `json:"total"` WorkUnits []*WorkUnitDistributionWU `json:"workUnits"` -} +} // @name WorkUnitDistributionLearning type WorkUnitDistributionDevelopment struct { Total int `json:"total"` WorkUnits []*WorkUnitDistributionWU `json:"workUnits"` -} +} // @name WorkUnitDistributionDevelopment type WorkUnitDistributionManagement struct { Total int `json:"total"` WorkUnits []*WorkUnitDistributionWU `json:"workUnits"` ProjectHeads []*WorkUnitDistributionWUProjectHead `json:"projectHeads"` -} +} // @name WorkUnitDistributionManagement type WorkUnitDistributionTraining struct { Total int `json:"total"` WorkUnits []*WorkUnitDistributionWU `json:"workUnits"` Mentees []BasicEmployeeInfo `json:"mentees"` -} +} // @name WorkUnitDistributionTraining type WorkUnitDistributionWU struct { Project BasicProjectInfo `json:"project"` WorkUnitName string `json:"workUnitName"` -} +} // @name WorkUnitDistributionWU type WorkUnitDistributionWUProjectHead struct { Project BasicProjectInfo `json:"project"` Position string `json:"position"` -} +} // @name WorkUnitDistributionWUProjectHead type WorkUnitDistributionData struct { WorkUnitDistributions []*WorkUnitDistribution `json:"workUnitDistributions"` -} +} // @name WorkUnitDistributionData func toWorkUnitDistributionWUProjectHeads(projectHeads []model.ProjectHead) []*WorkUnitDistributionWUProjectHead { rs := make([]*WorkUnitDistributionWUProjectHead, 0) @@ -875,11 +897,11 @@ type SummaryWorkUnitDistributionData struct { Development float64 `json:"development"` Management float64 `json:"management"` Training float64 `json:"training"` -} +} // @name SummaryWorkUnitDistributionData type SummaryWorkUnitDistributionResponse struct { Data *SummaryWorkUnitDistributionData `json:"data"` -} +} // @name SummaryWorkUnitDistributionResponse func ToSummaryWorkUnitDistributionData(data *model.TotalWorkUnitDistribution) *SummaryWorkUnitDistributionData { total := data.TotalLineManagerCount + data.TotalProjectHead + data.TotalLearning + data.TotalDevelopment + data.TotalManagement + data.TotalTraining @@ -895,32 +917,32 @@ func ToSummaryWorkUnitDistributionData(data *model.TotalWorkUnitDistribution) *S type WorkUnitDistributionsResponse struct { Data *WorkUnitDistributionData `json:"data"` -} +} // @name WorkUnitDistributionsResponse type WorkSurveySummaryAnswer struct { Answer string `json:"answer"` Project BasicProjectInfo `json:"project"` -} +} // @name WorkSurveySummaryAnswer type WorkSurveySummaryListAnswer struct { Date string `json:"date"` Answers []WorkSurveySummaryAnswer `json:"answers"` -} +} // @name WorkSurveySummaryListAnswer type WorkSurveySummaryEmployee struct { Reviewer BasicEmployeeInfo `json:"reviewer"` ListAnswers []WorkSurveySummaryListAnswer `json:"listAnswers"` -} +} // @name WorkSurveySummaryEmployee type WorkSurveySummary struct { Type string `json:"type"` Dates []string `json:"dates"` Data []WorkSurveySummaryEmployee `json:"data"` -} +} // @name WorkSurveySummary type WorkSurveySummaryResponse struct { Data []WorkSurveySummary `json:"data"` -} +} // @name WorkSurveySummaryResponse func ToWorkSummaries(eers []*model.EmployeeEventReviewer) []WorkSurveySummary { rs := []WorkSurveySummary{ @@ -998,3 +1020,25 @@ func ToWorkSummaries(eers []*model.EmployeeEventReviewer) []WorkSurveySummary { return rs } + +type ResourceUtilization struct { + Date time.Time `json:"date"` + Staffed int `json:"staffed"` + Internal int `json:"internal"` + Available int `json:"available"` +} // @name ResourceUtilization + +func ToReSourceUtilizations(data []*model.ResourceUtilization) []ResourceUtilization { + rs := make([]ResourceUtilization, 0, len(data)) + + for _, v := range data { + rs = append(rs, ResourceUtilization{ + Date: v.Date, + Staffed: v.Staffed, + Internal: v.Internal, + Available: v.Available, + }) + } + + return rs +} diff --git a/pkg/view/employee.go b/pkg/view/employee.go index 242e5763b..56cff15a6 100644 --- a/pkg/view/employee.go +++ b/pkg/view/employee.go @@ -11,7 +11,9 @@ import ( // EmployeeData view for listing data type EmployeeData struct { - model.BaseModel + ID string `json:"id"` + CreatedAt time.Time `json:"createdAt"` + UpdatedAt *time.Time `json:"updatedAt"` // basic info FullName string `json:"fullName"` @@ -37,11 +39,11 @@ type EmployeeData struct { LinkedInName string `json:"linkedInName"` // working info - WorkingStatus model.WorkingStatus `json:"status"` - JoinedDate *time.Time `json:"joinedDate"` - LeftDate *time.Time `json:"leftDate"` + WorkingStatus WorkingStatus `json:"status"` + JoinedDate *time.Time `json:"joinedDate"` + LeftDate *time.Time `json:"leftDate"` - Seniority *model.Seniority `json:"seniority"` + Seniority *Seniority `json:"seniority"` LineManager *BasicEmployeeInfo `json:"lineManager"` ReferredBy *BasicEmployeeInfo `json:"referredBy"` Organizations []Organization `json:"organizations"` @@ -57,7 +59,9 @@ type EmployeeData struct { WiseRecipientEmail string `json:"wiseRecipientEmail"` WiseRecipientName string `json:"wiseRecipientName"` WiseCurrency string `json:"wiseCurrency"` -} +} // @name EmployeeData + +type WorkingStatus string // @name WorkingStatus type MMAScore struct { MasteryScore decimal.Decimal `json:"masteryScore"` @@ -67,14 +71,14 @@ type MMAScore struct { } type MenteeInfo struct { - ID string `json:"id"` - FullName string `json:"fullName"` - DisplayName string `json:"displayName"` - Avatar string `json:"avatar"` - Username string `json:"username"` - Seniority *model.Seniority `json:"seniority"` - Positions []model.Position `json:"positions"` -} + ID string `json:"id"` + FullName string `json:"fullName"` + DisplayName string `json:"displayName"` + Avatar string `json:"avatar"` + Username string `json:"username"` + Seniority *Seniority `json:"seniority"` + Positions []Position `json:"positions"` +} // @name MenteeInfo type SocialAccount struct { GithubID string `json:"githubID"` @@ -85,35 +89,38 @@ type SocialAccount struct { } type BaseSalary struct { - ID string `json:"id"` - EmployeeID string `json:"employee_id"` - ContractAmount int64 `json:"contract_amount"` - CompanyAccountAmount int64 `json:"company_account_amount"` - PersonalAccountAmount int64 `json:"personal_account_amount"` - InsuranceAmount model.VietnamDong `json:"insurance_amount"` - Type string `json:"type"` - Category string `json:"category"` - CurrencyID string `json:"currency_id"` - Currency *Currency `json:"currency"` - Batch int `json:"batch"` - EffectiveDate *time.Time `json:"effective_date"` -} + ID string `json:"id"` + EmployeeID string `json:"employee_id"` + ContractAmount int64 `json:"contract_amount"` + CompanyAccountAmount int64 `json:"company_account_amount"` + PersonalAccountAmount int64 `json:"personal_account_amount"` + InsuranceAmount VietnamDong `json:"insurance_amount"` + Type string `json:"type"` + Category string `json:"category"` + CurrencyID string `json:"currency_id"` + Currency *Currency `json:"currency"` + Batch int `json:"batch"` + EffectiveDate *time.Time `json:"effective_date"` +} // @name BaseSalary + +type VietnamDong int64 // @name VietnamDong func toMenteeInfo(employee model.Employee) *MenteeInfo { - positions := make([]model.Position, 0, len(employee.EmployeePositions)) - for _, v := range employee.EmployeePositions { - positions = append(positions, v.Position) - } - - return &MenteeInfo{ + rs := &MenteeInfo{ ID: employee.ID.String(), FullName: employee.FullName, DisplayName: employee.DisplayName, Avatar: employee.Avatar, Username: employee.Username, - Seniority: employee.Seniority, - Positions: positions, + Positions: ToEmployeePositions(employee.EmployeePositions), + } + + if employee.Seniority != nil { + s := ToSeniority(*employee.Seniority) + rs.Seniority = &s } + + return rs } type EmployeeProjectData struct { @@ -126,7 +133,7 @@ type EmployeeProjectData struct { Avatar string `json:"avatar"` StartDate *time.Time `json:"startDate"` EndDate *time.Time `json:"endDate"` -} +} // @name EmployeeProjectData func ToEmployeeProjectDetailData(pm *model.ProjectMember, userInfo *model.CurrentLoggedUserInfo) EmployeeProjectData { rs := EmployeeProjectData{ @@ -168,7 +175,9 @@ func ToEmployeeProjectData(pm *model.ProjectMember) EmployeeProjectData { } type UpdateGeneralInfoEmployeeData struct { - model.BaseModel + ID string `json:"id"` + CreatedAt time.Time `json:"createdAt"` + UpdatedAt *time.Time `json:"updatedAt"` // basic info FullName string `json:"fullName"` @@ -185,19 +194,23 @@ type UpdateGeneralInfoEmployeeData struct { Organizations []Organization `json:"organizations"` LineManager *BasicEmployeeInfo `json:"lineManager"` ReferredBy *BasicEmployeeInfo `json:"referredBy"` -} +} // @name UpdateGeneralInfoEmployeeData type UpdateSkillEmployeeData struct { - model.BaseModel + ID string `json:"id"` + CreatedAt time.Time `json:"createdAt"` + UpdatedAt *time.Time `json:"updatedAt"` - Seniority *model.Seniority `json:"seniority"` - Positions []model.Position `json:"positions"` - Stacks []model.Stack `json:"stacks"` - Chapters []model.Chapter `json:"chapters"` -} + Seniority *Seniority `json:"seniority"` + Positions []Position `json:"positions"` + Stacks []Stack `json:"stacks"` + Chapters []Chapter `json:"chapters"` +} // @name UpdateSkillEmployeeData type UpdatePersonalEmployeeData struct { - model.BaseModel + ID string `json:"id"` + CreatedAt time.Time `json:"createdAt"` + UpdatedAt *time.Time `json:"updatedAt"` PersonalEmail string `json:"personalEmail"` Address string `json:"address"` @@ -206,7 +219,7 @@ type UpdatePersonalEmployeeData struct { DateOfBirth *time.Time `json:"birthday"` Country string `json:"country"` City string `json:"city"` -} +} // @name UpdatePersonalEmployeeData type BasicEmployeeInfo struct { ID string `json:"id"` @@ -214,15 +227,15 @@ type BasicEmployeeInfo struct { DisplayName string `json:"displayName"` Avatar string `json:"avatar"` Username string `json:"username"` -} +} // @name BasicEmployeeInfo type UpdateEmployeeStatusResponse struct { Data EmployeeData `json:"data"` -} +} // @name UpdateEmployeeStatusResponse type EmployeeListDataResponse struct { Data []EmployeeData `json:"data"` -} +} // @name EmployeeListDataResponse type UpdataEmployeeStatusResponse struct { Data EmployeeData `json:"data"` @@ -230,26 +243,25 @@ type UpdataEmployeeStatusResponse struct { type UpdateSkillsEmployeeResponse struct { Data UpdateSkillEmployeeData `json:"data"` -} +} // @name UpdateSkillsEmployeeResponse type UpdatePersonalEmployeeResponse struct { Data UpdatePersonalEmployeeData `json:"data"` -} +} // @name UpdatePersonalEmployeeResponse type UpdateGeneralEmployeeResponse struct { Data UpdateGeneralInfoEmployeeData `json:"data"` -} +} // @name UpdateGeneralEmployeeResponse + type UpdateBaseSalaryResponse struct { Data BaseSalary `json:"data"` -} +} // @name UpdateBaseSalaryResponse func ToUpdatePersonalEmployeeData(employee *model.Employee) *UpdatePersonalEmployeeData { return &UpdatePersonalEmployeeData{ - BaseModel: model.BaseModel{ - ID: employee.ID, - CreatedAt: employee.CreatedAt, - UpdatedAt: employee.UpdatedAt, - }, + ID: employee.ID.String(), + CreatedAt: employee.CreatedAt, + UpdatedAt: employee.UpdatedAt, DateOfBirth: employee.DateOfBirth, Gender: employee.Gender, Address: employee.Address, @@ -266,36 +278,28 @@ func ToUpdateSkillEmployeeData(employee *model.Employee) *UpdateSkillEmployeeDat positions = append(positions, v.Position) } - stacks := make([]model.Stack, 0, len(employee.EmployeeStacks)) - for _, v := range employee.EmployeeStacks { - stacks = append(stacks, v.Stack) + rs := &UpdateSkillEmployeeData{ + ID: employee.ID.String(), + CreatedAt: employee.CreatedAt, + UpdatedAt: employee.UpdatedAt, + Positions: ToPositions(positions), + Stacks: ToEmployeeStacks(employee.EmployeeStacks), + Chapters: ToChapters(employee.EmployeeChapters), } - chapters := make([]model.Chapter, 0, len(employee.EmployeeChapters)) - for _, v := range employee.EmployeeChapters { - chapters = append(chapters, v.Chapter) + if employee.Seniority != nil { + s := ToSeniority(*employee.Seniority) + rs.Seniority = &s } - return &UpdateSkillEmployeeData{ - BaseModel: model.BaseModel{ - ID: employee.ID, - CreatedAt: employee.CreatedAt, - UpdatedAt: employee.UpdatedAt, - }, - Seniority: employee.Seniority, - Positions: positions, - Stacks: stacks, - Chapters: chapters, - } + return rs } func ToUpdateGeneralInfoEmployeeData(employee *model.Employee) *UpdateGeneralInfoEmployeeData { rs := &UpdateGeneralInfoEmployeeData{ - BaseModel: model.BaseModel{ - ID: employee.ID, - CreatedAt: employee.CreatedAt, - UpdatedAt: employee.UpdatedAt, - }, + ID: employee.ID.String(), + CreatedAt: employee.CreatedAt, + UpdatedAt: employee.UpdatedAt, FullName: employee.FullName, TeamEmail: employee.TeamEmail, PhoneNumber: employee.PhoneNumber, @@ -333,6 +337,10 @@ func ToUpdateGeneralInfoEmployeeData(employee *model.Employee) *UpdateGeneralInf return rs } +type EmployeeDataResponse struct { + Data *EmployeeData `json:"data"` +} // @name EmployeeDataResponse + // ToOneEmployeeData parse employee date to response data func ToOneEmployeeData(employee *model.Employee, userInfo *model.CurrentLoggedUserInfo) *EmployeeData { employeeProjects := make([]EmployeeProjectData, 0, len(employee.ProjectMembers)) @@ -375,12 +383,9 @@ func ToOneEmployeeData(employee *model.Employee, userInfo *model.CurrentLoggedUs } rs := &EmployeeData{ - BaseModel: model.BaseModel{ - ID: employee.ID, - CreatedAt: employee.CreatedAt, - UpdatedAt: employee.UpdatedAt, - }, - + ID: employee.ID.String(), + CreatedAt: employee.CreatedAt, + UpdatedAt: employee.UpdatedAt, FullName: employee.FullName, DisplayName: employee.DisplayName, TeamEmail: employee.TeamEmail, @@ -391,8 +396,7 @@ func ToOneEmployeeData(employee *model.Employee, userInfo *model.CurrentLoggedUs DateOfBirth: employee.DateOfBirth, Username: employee.Username, - WorkingStatus: employee.WorkingStatus, - Seniority: employee.Seniority, + WorkingStatus: WorkingStatus(employee.WorkingStatus.String()), Projects: employeeProjects, LineManager: lineManager, Organizations: ToOrganizations(employee.EmployeeOrganizations), @@ -450,7 +454,8 @@ func ToOneEmployeeData(employee *model.Employee, userInfo *model.CurrentLoggedUs } if employee.Seniority != nil { - rs.Seniority = employee.Seniority + s := ToSeniority(*employee.Seniority) + rs.Seniority = &s } return rs @@ -471,11 +476,9 @@ func ToEmployeeData(employee *model.Employee) *EmployeeData { } rs := &EmployeeData{ - BaseModel: model.BaseModel{ - ID: employee.ID, - CreatedAt: employee.CreatedAt, - UpdatedAt: employee.UpdatedAt, - }, + ID: employee.ID.String(), + CreatedAt: employee.CreatedAt, + UpdatedAt: employee.UpdatedAt, FullName: employee.FullName, DisplayName: employee.DisplayName, TeamEmail: employee.TeamEmail, @@ -489,8 +492,7 @@ func ToEmployeeData(employee *model.Employee) *EmployeeData { Horoscope: employee.Horoscope, DateOfBirth: employee.DateOfBirth, Username: employee.Username, - WorkingStatus: employee.WorkingStatus, - Seniority: employee.Seniority, + WorkingStatus: WorkingStatus(employee.WorkingStatus.String()), JoinedDate: employee.JoinedDate, LeftDate: employee.LeftDate, Organizations: ToOrganizations(employee.EmployeeOrganizations), @@ -534,7 +536,8 @@ func ToEmployeeData(employee *model.Employee) *EmployeeData { } if employee.Seniority != nil { - rs.Seniority = employee.Seniority + s := ToSeniority(*employee.Seniority) + rs.Seniority = &s } return rs @@ -551,11 +554,11 @@ func ToEmployeeListData(employees []*model.Employee, userInfo *model.CurrentLogg type EmployeeContentData struct { Url string `json:"url"` -} +} // @name EmployeeContentData type EmployeeContentDataResponse struct { Data *EmployeeContentData `json:"data"` -} +} // @name EmployeeContentDataResponse func ToEmployeeContentData(url string) *EmployeeContentData { return &EmployeeContentData{ @@ -575,7 +578,7 @@ func toBasicEmployeeInfo(employee model.Employee) *BasicEmployeeInfo { type LineManagersResponse struct { Data []BasicEmployeeInfo `json:"data"` -} +} // @name LineManagersResponse func ToBasicEmployees(employees []*model.Employee) []BasicEmployeeInfo { results := make([]BasicEmployeeInfo, 0, len(employees)) @@ -609,7 +612,7 @@ func ToBaseSalary(bs *model.BaseSalary) *BaseSalary { ContractAmount: bs.ContractAmount, CompanyAccountAmount: bs.CompanyAccountAmount, PersonalAccountAmount: bs.PersonalAccountAmount, - InsuranceAmount: bs.InsuranceAmount, + InsuranceAmount: VietnamDong(bs.InsuranceAmount), Type: bs.Type, Category: bs.Category, CurrencyID: bs.CurrencyID.String(), @@ -629,7 +632,7 @@ type EmployeeInvitationData struct { IsBasecampAccountCreated bool `json:"isBasecampAccountCreated"` IsTeamEmailCreated bool `json:"isTeamEmailCreated"` EmployeeData *InvitedEmployeeInfo `json:"employee"` -} +} // @name EmployeeInvitationData type InvitedEmployeeInfo struct { ID string `json:"id"` @@ -639,11 +642,11 @@ type InvitedEmployeeInfo struct { Username string `json:"username"` TeamEmail string `json:"teamEmail"` PersonalEmail string `json:"personalEmail"` -} +} // @name InvitedEmployeeInfo type EmployeeInvitationResponse struct { Data *EmployeeInvitationData `json:"data"` -} +} // @name EmployeeInvitationResponse func ToBasicEmployeeInvitationData(in *model.EmployeeInvitation) *EmployeeInvitationData { rs := &EmployeeInvitationData{ @@ -674,7 +677,7 @@ func ToBasicEmployeeInvitationData(in *model.EmployeeInvitation) *EmployeeInvita type EmployeeLocationListResponse struct { Data []EmployeeLocation `json:"data"` -} +} // @name EmployeeLocationListResponse type EmployeeLocation struct { DiscordID string `json:"discordID"` @@ -683,14 +686,15 @@ type EmployeeLocation struct { Avatar string `json:"avatar"` Chapters []Chapter `json:"chapters"` Address EmployeeAddress `json:"address"` -} +} // @name EmployeeLocation + type EmployeeAddress struct { Address string `json:"address"` Country string `json:"country"` City string `json:"city"` Lat string `json:"lat"` Long string `json:"long"` -} +} // @name EmployeeAddress func ToEmployeesWithLocation(in []*model.Employee) []EmployeeLocation { rs := make([]EmployeeLocation, len(in)) @@ -719,7 +723,9 @@ func ToEmployeesWithLocation(in []*model.Employee) []EmployeeLocation { // DiscordEmployeeData view for listing data type DiscordEmployeeData struct { - model.BaseModel + ID string `json:"id"` + CreatedAt time.Time `json:"createdAt"` + UpdatedAt *time.Time `json:"updatedAt"` // basic info FullName string `json:"fullName"` @@ -795,11 +801,9 @@ func ToDiscordEmployeeDetail(employee *model.Employee, userInfo *model.CurrentLo } rs := &DiscordEmployeeData{ - BaseModel: model.BaseModel{ - ID: employee.ID, - CreatedAt: employee.CreatedAt, - UpdatedAt: employee.UpdatedAt, - }, + ID: employee.ID.String(), + CreatedAt: employee.CreatedAt, + UpdatedAt: employee.UpdatedAt, FullName: employee.FullName, DisplayName: employee.DisplayName, diff --git a/pkg/view/feedback.go b/pkg/view/feedback.go index c5e6a75c9..3562c78db 100644 --- a/pkg/view/feedback.go +++ b/pkg/view/feedback.go @@ -24,7 +24,7 @@ type Feedback struct { IsRead bool `json:"isRead"` LastUpdated *time.Time `json:"lastUpdated"` Author *BasicEmployeeInfo `json:"author"` -} +} // @name Feedback func ToListFeedback(eTopics []*model.EmployeeEventTopic) []Feedback { var results = make([]Feedback, 0, len(eTopics)) @@ -61,7 +61,7 @@ func ToListFeedback(eTopics []*model.EmployeeEventTopic) []Feedback { type ListFeedbackResponse struct { Data []Feedback `json:"data"` -} +} // @name ListFeedbackResponse type QuestionAnswer struct { EventQuestionID string `json:"eventQuestionID"` @@ -71,7 +71,7 @@ type QuestionAnswer struct { Type string `json:"type"` Order int64 `json:"order"` Domain model.QuestionDomain `json:"domain"` -} +} // @name QuestionAnswer type FeedBackReviewDetail struct { Questions []QuestionAnswer `json:"questions"` @@ -92,11 +92,11 @@ type FeedbackDetail struct { Title string `json:"title"` Relationship string `json:"relationship"` Project *BasicProjectInfo `json:"project"` -} +} // @name FeedbackDetail type FeedbackDetailResponse struct { Data FeedbackDetail `json:"data"` -} +} // @name FeedbackDetailResponse type FeedbackDetailInfo struct { Status model.EventReviewerStatus @@ -152,11 +152,11 @@ type SubmitFeedback struct { Status string `json:"status"` Reviewer BasicEmployeeInfo `json:"reviewer"` Answers []*QuestionAnswer `json:"answers"` -} +} // @name SubmitFeedback type SubmitFeedbackResponse struct { Data SubmitFeedback `json:"data"` -} +} // @name SubmitFeedbackResponse func ToListSubmitFeedback(questions []*model.EmployeeEventQuestion, detailInfo FeedbackDetailInfo) SubmitFeedback { var rs SubmitFeedback @@ -236,12 +236,12 @@ func ToFeedbackReviewDetail(questions []*model.EmployeeEventQuestion, topic *mod type UnreadFeedbackCountResponse struct { Data UnreadFeedbackCountData `json:"data"` -} +} // @name UnreadFeedbackCountResponse type UnreadFeedbackCountData struct { Count int64 `json:"count"` ReviewerID string `json:"reviewerID"` -} +} // @name UnreadFeedbackCountData func ToUnreadFeedbackCountData(reviewerID string, count int64) UnreadFeedbackCountData { return UnreadFeedbackCountData{ diff --git a/pkg/view/invoice.go b/pkg/view/invoice.go index ada36b893..d4d961c9f 100644 --- a/pkg/view/invoice.go +++ b/pkg/view/invoice.go @@ -38,13 +38,13 @@ type Invoice struct { ConversionRate float64 `json:"conversionRate"` BankID string `json:"bankID"` ProjectID string `json:"projectID"` -} +} // @name Invoice type ClientInfo struct { ClientCompany string `json:"clientCompany"` ClientAddress string `json:"clientAddress"` Contacts []ClientContactInfo `json:"contacts"` -} +} // @name ClientInfo type ClientContactInfo struct { ID string `json:"id"` @@ -52,7 +52,7 @@ type ClientContactInfo struct { Role string `json:"-"` Emails []string `json:"emails"` IsMainContact bool `json:"isMainContact"` -} +} // @name ClientContactInfo type CompanyInfo struct { ID string `json:"id"` @@ -60,6 +60,26 @@ type CompanyInfo struct { Description string `json:"description"` RegistrationNumber string `json:"registrationNumber"` Info map[string]model.CompanyContactInfo `json:"info"` +} // @name CompanyInfo + +func ToCompanyInfo(c *model.CompanyInfo) *CompanyInfo { + if c == nil { + return nil + } + + companyContact := make(map[string]model.CompanyContactInfo) + err := json.Unmarshal(c.Info.Bytes, &companyContact) + if err != nil { + return nil + } + + return &CompanyInfo{ + ID: c.ID.String(), + Name: c.Name, + Description: c.Description, + RegistrationNumber: c.RegistrationNumber, + Info: companyContact, + } } type InvoiceItem struct { @@ -69,7 +89,7 @@ type InvoiceItem struct { Cost float64 `json:"cost"` Description string `json:"description"` IsExternal bool `json:"isExternal"` -} +} // @name InvoiceItem func toInvoiceItem(lineItems model.JSON) ([]InvoiceItem, error) { var items []InvoiceItem @@ -105,11 +125,11 @@ type ProjectInvoiceTemplate struct { Client ClientInfo `json:"client"` BankAccount BankAccount `json:"bankAccount"` CompanyInfo CompanyInfo `json:"companyInfo"` -} +} // @name ProjectInvoiceTemplate type InvoiceTemplateResponse struct { Data ProjectInvoiceTemplate `json:"data"` -} +} // @name InvoiceTemplateResponse func ToInvoiceInfo(invoice *model.Invoice) (*Invoice, error) { if invoice != nil { @@ -252,11 +272,15 @@ type InvoiceData struct { BankAccount BankAccount `json:"bankAccount"` CompanyInfo CompanyInfo `json:"companyInfo"` Client ClientInfo `json:"client"` -} +} // @name InvoiceData type InvoiceListResponse struct { - Data []InvoiceData `json:"data"` -} + Total int64 `json:"total"` + Page int64 `json:"page"` + Size int64 `json:"size"` + Sort string `json:"sort"` + Data []InvoiceData `json:"data"` +} // @name InvoiceListResponse func ToInvoiceListResponse(invoices []*model.Invoice) ([]InvoiceData, error) { rs := make([]InvoiceData, 0) diff --git a/pkg/view/metadata.go b/pkg/view/metadata.go index c550815ce..3d19dc136 100644 --- a/pkg/view/metadata.go +++ b/pkg/view/metadata.go @@ -8,39 +8,43 @@ type MetaData struct { ID string `json:"id"` Code string `json:"code"` Name string `json:"name"` -} +} // @name MetaData + +type MetadataResponse struct { + Data []MetaData `json:"data"` +} // @name MetaDataResponse type SeniorityResponse struct { Data []model.Seniority `json:"data"` -} +} // @name SeniorityResponse type ChapterResponse struct { Data []model.Chapter `json:"data"` -} +} // @name ChapterResponse type StackResponse struct { Data []model.Stack `json:"data"` -} +} // @name StackResponse type RolesResponse struct { Data []model.Role `json:"data"` -} +} // @name RolesResponse type PositionResponse struct { Data []model.Position `json:"data"` -} +} // @name PositionResponse type CountriesResponse struct { Data []Country `json:"data"` -} +} // @name CountriesResponse type CitiesResponse struct { Data []string `json:"data"` -} +} // @name CitiesResponse type OrganizationsResponse struct { Data []model.Organization `json:"data"` -} +} // @name OrganizationsResponse // Question model question for get list question api type Question struct { @@ -55,7 +59,7 @@ type Question struct { // GetQuestionResponse response for get question api type GetQuestionResponse struct { Data []Question `json:"data"` -} +} // @name GetQuestionResponse func ToListQuestion(questions []*model.Question) []*Question { var rs []*Question @@ -91,12 +95,34 @@ type Country struct { Name string `json:"name"` Code string `json:"code"` Cities []City `json:"cities"` -} +} // @name Country type City struct { Name string `json:"name"` Lat string `json:"lat"` Long string `json:"long"` +} // @name City + +func ToCountry(c *model.Country) *Country { + if c == nil { + return nil + } + + cities := make([]City, len(c.Cities)) + for i, city := range c.Cities { + cities[i] = City{ + Name: city.Name, + Lat: city.Lat, + Long: city.Long, + } + } + + return &Country{ + ID: c.ID.String(), + Name: c.Name, + Code: c.Code, + Cities: cities, + } } func ToCountryView(countries []*model.Country) ([]Country, error) { diff --git a/pkg/view/organizations.go b/pkg/view/organizations.go index baee8f434..daf76c3a3 100644 --- a/pkg/view/organizations.go +++ b/pkg/view/organizations.go @@ -7,6 +7,19 @@ type Organization struct { Code string `json:"code"` Name string `json:"name"` Avatar string `json:"avatar"` +} // @name Organization + +func ToOrganization(org *model.Organization) *Organization { + if org == nil { + return nil + } + + return &Organization{ + ID: org.ID.String(), + Code: org.Code, + Name: org.Name, + Avatar: org.Avatar, + } } func ToOrganizations(orgs []model.EmployeeOrganization) []Organization { diff --git a/pkg/view/pagination.go b/pkg/view/pagination.go new file mode 100644 index 000000000..ee38cba9f --- /dev/null +++ b/pkg/view/pagination.go @@ -0,0 +1,7 @@ +package view + +type Pagination struct { + Page int64 `json:"page" form:"page,default=0"` // page index + Size int64 `json:"size" form:"size"` // page size + Sort string `json:"sort" form:"sort" swaggerignore:"true"` // sort field +} // @name Pagination diff --git a/pkg/view/position.go b/pkg/view/position.go index 40e68b7ba..17af89daa 100644 --- a/pkg/view/position.go +++ b/pkg/view/position.go @@ -6,6 +6,18 @@ type Position struct { ID string `json:"id"` Code string `json:"code"` Name string `json:"name"` +} // @name Position + +func ToPosition(pos *model.Position) *Position { + if pos == nil { + return nil + } + + return &Position{ + ID: pos.ID.String(), + Code: pos.Code, + Name: pos.Name, + } } func ToPositions(pos []model.Position) []Position { diff --git a/pkg/view/profile.go b/pkg/view/profile.go index e00e8e691..f824ea760 100644 --- a/pkg/view/profile.go +++ b/pkg/view/profile.go @@ -7,7 +7,7 @@ import ( ) type ProfileData struct { - ID model.UUID `json:"id"` + ID string `json:"id"` FullName string `json:"fullName"` DisplayName string `json:"displayName"` Avatar string `json:"avatar"` @@ -34,10 +34,12 @@ type ProfileData struct { WiseRecipientEmail string `json:"wiseRecipientEmail"` WiseRecipientName string `json:"wiseRecipientName"` WiseCurrency string `json:"wiseCurrency"` -} +} // @name ProfileData type UpdateProfileInfoData struct { - model.BaseModel + ID string `json:"id"` + CreatedAt time.Time `json:"createdAt"` + UpdatedAt *time.Time `json:"updatedAt"` // basic info TeamEmail string `json:"teamEmail"` @@ -59,23 +61,21 @@ type UpdateProfileInfoData struct { WiseRecipientEmail string `json:"wiseRecipientEmail"` WiseRecipientName string `json:"wiseRecipientName"` WiseCurrency string `json:"wiseCurrency"` -} +} // @name UpdateProfileInfoData type ProfileDataResponse struct { Data ProfileData `json:"data"` -} +} // @name ProfileDataResponse type UpdateProfileInfoResponse struct { Data UpdateProfileInfoData `json:"data"` -} +} // @name UpdateProfileInfoResponse func ToUpdateProfileInfoData(employee *model.Employee) *UpdateProfileInfoData { rs := &UpdateProfileInfoData{ - BaseModel: model.BaseModel{ - ID: employee.ID, - CreatedAt: employee.CreatedAt, - UpdatedAt: employee.UpdatedAt, - }, + ID: employee.ID.String(), + CreatedAt: employee.CreatedAt, + UpdatedAt: employee.UpdatedAt, TeamEmail: employee.TeamEmail, PhoneNumber: employee.PhoneNumber, Username: employee.Username, @@ -127,7 +127,7 @@ func ToProfileData(employee *model.Employee) *ProfileData { } rs := &ProfileData{ - ID: employee.ID, + ID: employee.ID.String(), FullName: employee.FullName, DisplayName: employee.DisplayName, Avatar: employee.Avatar, diff --git a/pkg/view/project.go b/pkg/view/project.go index 8628e6cbc..846c1d52d 100644 --- a/pkg/view/project.go +++ b/pkg/view/project.go @@ -10,6 +10,268 @@ import ( "github.com/dwarvesf/fortress-api/pkg/utils/authutils" ) +type Project struct { + ID string `json:"id"` + CreatedAt time.Time `json:"createdAt"` + UpdatedAt *time.Time `json:"updatedAt"` + Name string `json:"name"` + CountryID string `json:"countryID"` + Type string `json:"type"` + StartDate *time.Time `json:"startDate"` + EndDate *time.Time `json:"end_date"` + Status string `json:"status"` + ProjectEmail string `json:"projectEmail"` + ClientEmail string `json:"clientEmail"` + Avatar string `json:"avatar"` + AllowsSendingSurvey bool `json:"allowsSendingSurvey"` + Code string `json:"code"` + Function string `json:"function"` + BankAccountID string `json:"bankAccountID"` + CompanyInfoID string `json:"companyInfoID"` + ClientID string `json:"clientID"` + OrganizationID string `json:"organizationID"` + AccountRating int `json:"accountRating"` + DeliveryRating int `json:"deliveryRating"` + LeadRating int `json:"leadRating"` + ImportantLevel string `json:"importantLevel"` + ProjectNotion *ProjectNotion `json:"projectNotion"` + Organization *Organization `json:"organization"` + BankAccount *BankAccount `json:"bankAccount"` + Country *Country `json:"country"` + Client *Client `json:"client"` + CompanyInfo *CompanyInfo `json:"companyInfo"` + Slots []ProjectSlot `json:"slots"` + Heads []*ProjectHead `json:"heads"` + ProjectMembers []ProjectMember `json:"projectMembers"` + ProjectStacks []Stack `json:"projectStacks"` + CommissionConfigs ProjectCommissionConfigs `json:"commissionConfigs"` + ProjectInfo *ProjectInfo `json:"projectInfo"` +} // @name Project + +func ToProjects(projects []model.Project) []Project { + rs := make([]Project, 0, len(projects)) + for _, project := range projects { + rs = append(rs, *ToProject(&project)) + } + + return rs +} + +func ToProject(project *model.Project) *Project { + if project == nil { + return nil + } + + return &Project{ + ID: project.ID.String(), + CreatedAt: project.CreatedAt, + UpdatedAt: project.UpdatedAt, + Name: project.Name, + CountryID: project.CountryID.String(), + Type: project.Type.String(), + StartDate: project.StartDate, + EndDate: project.EndDate, + Status: project.Status.String(), + ProjectEmail: project.ProjectEmail, + ClientEmail: project.ClientEmail, + Avatar: project.Avatar, + AllowsSendingSurvey: project.AllowsSendingSurvey, + Code: project.Code, + Function: project.Function.String(), + BankAccountID: project.BankAccountID.String(), + CompanyInfoID: project.CompanyInfoID.String(), + ClientID: project.ClientID.String(), + OrganizationID: project.OrganizationID.String(), + AccountRating: project.AccountRating, + DeliveryRating: project.DeliveryRating, + LeadRating: project.LeadRating, + ImportantLevel: project.ImportantLevel.String(), + ProjectNotion: ToProjectNotion(project.ProjectNotion), + Organization: ToOrganization(project.Organization), + BankAccount: ToBankAccount(project.BankAccount), + Country: ToCountry(project.Country), + Client: ToClient(project.Client), + CompanyInfo: ToCompanyInfo(project.CompanyInfo), + Slots: ToProjectSlotList(project.Slots), + Heads: ToProjectHeads(project.Heads), + ProjectMembers: ToProjectMembers(project.ProjectMembers), + ProjectStacks: ToProjectStacks(project.ProjectStacks), + CommissionConfigs: ToProjectCommissionConfigs(project.CommissionConfigs), + ProjectInfo: ToProjectInfo(project.ProjectInfo), + } +} + +type ProjectInfo struct { + ID string `json:"id"` + CreatedAt time.Time `json:"createdAt"` + UpdatedAt *time.Time `json:"updatedAt"` + ProjectID *string `json:"projectID"` + BasecampBucketID int64 `json:"basecampBucketID"` + BasecampScheduleID int64 `json:"basecampScheduleID"` + BasecampCampfireID int64 `json:"basecampCampfireID"` + BasecampTodolistID int64 `json:"basecampTodolistID"` + BasecampMessageBoardID int64 `json:"basecampMessageBoardID"` + BasecampSentryID int64 `json:"basecampSentryID"` + GitlabID int64 `json:"gitlabID"` + Repositories []byte `json:"repositories"` + Project *Project `json:"project"` +} // @name ProjectInfo + +func ToProjectInfo(projectInfo *model.ProjectInfo) *ProjectInfo { + if projectInfo == nil { + return nil + } + + var projectID *string + if projectInfo.ProjectID != nil { + id := projectInfo.ProjectID.String() + projectID = &id + } + + return &ProjectInfo{ + ID: projectInfo.ID.String(), + CreatedAt: projectInfo.CreatedAt, + UpdatedAt: projectInfo.UpdatedAt, + ProjectID: projectID, + BasecampBucketID: projectInfo.BasecampBucketID, + BasecampScheduleID: projectInfo.BasecampScheduleID, + BasecampCampfireID: projectInfo.BasecampCampfireID, + BasecampTodolistID: projectInfo.BasecampTodolistID, + BasecampMessageBoardID: projectInfo.BasecampMessageBoardID, + BasecampSentryID: projectInfo.BasecampSentryID, + GitlabID: projectInfo.GitlabID, + Repositories: projectInfo.Repositories, + Project: ToProject(projectInfo.Project), + } +} + +type ProjectCommissionConfigs []ProjectCommissionConfig // @name ProjectCommissionConfigs + +func ToProjectCommissionConfigs(configs []model.ProjectCommissionConfig) ProjectCommissionConfigs { + rs := make(ProjectCommissionConfigs, 0, len(configs)) + for _, config := range configs { + rs = append(rs, ToProjectCommissionConfig(&config)) + } + + return rs +} + +type ProjectCommissionConfig struct { + ID string `json:"id"` + CreatedAt time.Time `json:"createdAt"` + UpdatedAt *time.Time `json:"updatedAt"` + ProjectID string `json:"projectID"` + Position string `json:"position"` + CommissionRate decimal.Decimal `json:"commissionRate"` +} // @name ProjectCommissionConfig + +func ToProjectCommissionConfig(config *model.ProjectCommissionConfig) ProjectCommissionConfig { + if config == nil { + return ProjectCommissionConfig{} + } + + return ProjectCommissionConfig{ + ID: config.ID.String(), + CreatedAt: config.CreatedAt, + UpdatedAt: config.UpdatedAt, + ProjectID: config.ProjectID.String(), + Position: config.Position.String(), + CommissionRate: config.CommissionRate, + } +} + +type ProjectNotion struct { + ID string `json:"id"` + CreatedAt time.Time `json:"createdAt"` + UpdatedAt *time.Time `json:"updatedAt"` + ProjectID string `json:"projectID"` + AuditNotionID string `json:"auditNotionID"` + Project *Project `json:"project"` +} // @name ProjectNotion + +func ToProjectNotion(p *model.ProjectNotion) *ProjectNotion { + if p == nil { + return nil + } + + return &ProjectNotion{ + ID: p.ID.String(), + CreatedAt: p.CreatedAt, + UpdatedAt: p.UpdatedAt, + ProjectID: p.ProjectID.String(), + AuditNotionID: p.AuditNotionID.String(), + Project: ToProject(p.Project), + } +} + +type ProjectSlot struct { + ID string `json:"id"` + CreatedAt time.Time `json:"createdAt"` + UpdatedAt *time.Time `json:"updatedAt"` + ProjectID string `json:"projectID"` + SeniorityID string `json:"seniorityID"` + UpsellPersonID string `json:"upsellPersonID"` + DeploymentType string `json:"deploymentType"` + Status string `json:"status"` + Rate decimal.Decimal `json:"rate"` + Discount decimal.Decimal `json:"discount"` + Note string `json:"note"` + Seniority Seniority `json:"seniority"` + Project Project `json:"project"` + ProjectMember ProjectMember `json:"projectMember"` + ProjectSlotPositions []Position `json:"projectSlotPositions"` + UpsellPerson *EmployeeData `json:"upsellPerson"` +} // @name ProjectSlot + +func ToProjectSlot(slot *model.ProjectSlot) *ProjectSlot { + if slot == nil { + return nil + } + + project := ToProject(&slot.Project) + if project == nil { + // make sure project is not nil + project = &Project{} + } + + projectMember := ToProjectMember(&slot.ProjectMember) + if projectMember == nil { + // make sure project member is not nil + projectMember = &ProjectMember{} + } + + return &ProjectSlot{ + ID: slot.ID.String(), + CreatedAt: slot.CreatedAt, + UpdatedAt: slot.UpdatedAt, + ProjectID: slot.ProjectID.String(), + SeniorityID: slot.SeniorityID.String(), + UpsellPersonID: slot.UpsellPersonID.String(), + DeploymentType: slot.DeploymentType.String(), + Status: slot.Status.String(), + Rate: slot.Rate, + Discount: slot.Discount, + Note: slot.Note, + Seniority: ToSeniority(slot.Seniority), + Project: *project, + ProjectMember: *projectMember, + ProjectSlotPositions: ToProjectSlotPositions(slot.ProjectSlotPositions), + UpsellPerson: ToEmployeeData(slot.UpsellPerson), + } +} + +func ToProjectSlotList(slots []model.ProjectSlot) []ProjectSlot { + rs := make([]ProjectSlot, 0, len(slots)) + for _, slot := range slots { + projectSlot := ToProjectSlot(&slot) + if projectSlot != nil { + rs = append(rs, *projectSlot) + } + } + + return rs +} + type ProjectData struct { model.BaseModel @@ -53,6 +315,10 @@ type BasicClientInfo struct { } func ToBasicClientInfo(client *model.Client) *BasicClientInfo { + if client == nil { + return nil + } + return &BasicClientInfo{ ID: client.ID.String(), Name: client.Name, @@ -110,6 +376,39 @@ type ProjectMember struct { Seniority *model.Seniority `json:"seniority"` Positions []Position `json:"positions"` UpsellPerson *BasicEmployeeInfo `json:"upsellPerson"` +} // @name ProjectMember + +func ToProjectMembers(members []model.ProjectMember) []ProjectMember { + res := make([]ProjectMember, 0, len(members)) + for _, m := range members { + res = append(res, *ToProjectMember(&m)) + } + + return res +} + +func ToProjectMember(member *model.ProjectMember) *ProjectMember { + return &ProjectMember{ + ProjectMemberID: member.ID.String(), + ProjectSlotID: member.ProjectSlotID.String(), + EmployeeID: member.EmployeeID.String(), + FullName: member.Employee.FullName, + DisplayName: member.Employee.DisplayName, + Avatar: member.Employee.Avatar, + Username: member.Employee.Username, + Status: member.Status.String(), + IsLead: member.IsLead, + DeploymentType: member.DeploymentType.String(), + StartDate: member.StartDate, + EndDate: member.EndDate, + Rate: member.Rate, + Discount: member.Discount, + UpsellCommissionRate: member.UpsellCommissionRate, + Note: member.Note, + Seniority: member.Seniority, + Positions: ToProjectMemberPositions(member.ProjectMemberPositions), + UpsellPerson: toBasicEmployeeInfo(*member.UpsellPerson), + } } type ProjectHead struct { @@ -122,6 +421,16 @@ type ProjectHead struct { FinalCommissionRate decimal.Decimal `json:"finalCommissionRate"` } +func ToProjectHeads(heads []*model.ProjectHead) []*ProjectHead { + res := make([]*ProjectHead, 0, len(heads)) + for _, h := range heads { + ph := ToProjectHead(nil, h, nil) + res = append(res, &ph) + } + + return res +} + func ToProjectHead(userInfo *model.CurrentLoggedUserInfo, head *model.ProjectHead, commissionConfig map[string]decimal.Decimal) ProjectHead { res := ProjectHead{ EmployeeID: head.EmployeeID.String(), @@ -468,7 +777,7 @@ func ToCreateProjectDataResponse(userInfo *model.CurrentLoggedUserInfo, project } if project.Client != nil { - result.Client = toClient(project.Client) + result.Client = ToClient(project.Client) } if project.StartDate != nil { @@ -652,7 +961,7 @@ func ToUpdateProjectGeneralInfo(project *model.Project) UpdateProjectGeneralInfo } if project.Client != nil { - rs.Client = toClient(project.Client) + rs.Client = ToClient(project.Client) } return rs @@ -716,7 +1025,7 @@ type BasicProjectInfo struct { Status string `json:"status"` Code string `json:"code"` Avatar string `json:"avatar"` -} +} // @name BasicProjectInfo func toBasicProjectInfo(project model.Project) *BasicProjectInfo { return &BasicProjectInfo{ diff --git a/pkg/view/response.go b/pkg/view/response.go index ccbce85b9..e4ec9db1e 100644 --- a/pkg/view/response.go +++ b/pkg/view/response.go @@ -27,15 +27,15 @@ type Response[T any] struct { type ErrorResponse struct { Error string `json:"error"` ErrorDetails []ApiError `json:"errors"` -} +} // @name ErrorResponse type MessageResponse struct { Message string `json:"message"` -} +} // @name MessageResponse type ResponseString struct { Data string `json:"data"` -} +} // @name ResponseString func CreateResponse[T any](data T, paging *PaginationResponse, err error, payload any, message string) Response[T] { resp := Response[T]{ diff --git a/pkg/view/roles.go b/pkg/view/roles.go index 1112edae1..422c3b64e 100644 --- a/pkg/view/roles.go +++ b/pkg/view/roles.go @@ -6,7 +6,7 @@ type Role struct { ID string `json:"id"` Code string `json:"code"` Name string `json:"name"` -} +} // @name Role func ToEmployeeRoles(roles []model.EmployeeRole) []Role { rs := make([]Role, 0, len(roles)) diff --git a/pkg/view/seniority.go b/pkg/view/seniority.go index a423ee3c0..674b93c2e 100644 --- a/pkg/view/seniority.go +++ b/pkg/view/seniority.go @@ -6,7 +6,7 @@ type Seniority struct { ID string `json:"id"` Code string `json:"code"` Name string `json:"name"` -} +} // @name Seniority func ToSeniority(seniority model.Seniority) Seniority { return Seniority{ diff --git a/pkg/view/stack.go b/pkg/view/stack.go index 06812d795..5fcbdfc49 100644 --- a/pkg/view/stack.go +++ b/pkg/view/stack.go @@ -7,7 +7,7 @@ type Stack struct { Name string `json:"name"` Code string `json:"code"` Avatar string `json:"avatar"` -} +} // @name Stack func ToEmployeeStacks(stacks []model.EmployeeStack) []Stack { rs := make([]Stack, 0, len(stacks)) diff --git a/pkg/view/uuid.go b/pkg/view/uuid.go new file mode 100644 index 000000000..195ad4162 --- /dev/null +++ b/pkg/view/uuid.go @@ -0,0 +1,82 @@ +package view + +import ( + "database/sql/driver" + "errors" + + "github.com/dwarvesf/fortress-api/pkg/model" + uuid "github.com/satori/go.uuid" +) + +// UUID implement for go-pg convert uuid +type UUID [16]byte // @name UUID + +func ToModelUUIDs(ids []UUID) []model.UUID { + if len(ids) == 0 { + return nil + } + result := make([]model.UUID, 0, len(ids)) + for _, id := range ids { + result = append(result, model.UUID(id)) + } + return result +} + +// IsZero check uuid is zero +func (u *UUID) IsZero() bool { + if u == nil { + return true + } + for _, c := range u { + if c != 0 { + return false + } + } + return true +} + +func (u UUID) String() string { + if u.IsZero() { + return "" + } + return uuid.UUID(u).String() +} + +// MarshalJSON implement for json encoding +func (u UUID) MarshalJSON() ([]byte, error) { + if len(u) == 0 { + return []byte(`""`), nil + } + return []byte(`"` + u.String() + `"`), nil +} + +// UnmarshalJSON implement for json decoding +func (u *UUID) UnmarshalJSON(data []byte) error { + if len(data) == 0 || string(data) == `""` { + return nil + } + + if len(data) < 2 || data[0] != '"' || data[len(data)-1] != '"' { + return errors.New("invalid UUID format") + } + data = data[1 : len(data)-1] + uu, err := uuid.FromString(string(data)) + if err != nil { + return errors.New("invalid UUID format") + } + *u = UUID(uu) + return nil +} + +// Value . +func (u UUID) Value() (driver.Value, error) { + if u.IsZero() { + return nil, nil + } + return uuid.UUID(u).String(), nil +} + +func UUIDFromString(s string) (UUID, error) { + id, err := uuid.FromString(s) + return UUID(id), err +} diff --git a/pkg/view/uuid_test.go b/pkg/view/uuid_test.go new file mode 100644 index 000000000..d46540718 --- /dev/null +++ b/pkg/view/uuid_test.go @@ -0,0 +1,204 @@ +package view + +import ( + "database/sql/driver" + "errors" + "reflect" + "testing" + + uuid "github.com/satori/go.uuid" +) + +func TestUUIDFromString(t *testing.T) { + type args struct { + s string + } + tests := []struct { + name string + args args + want UUID + wantErr error + }{ + { + name: "correct uuid", + args: args{"a98484cb-cc66-4687-8e66-837e5997c427"}, + want: UUID(uuid.Must(uuid.FromString("a98484cb-cc66-4687-8e66-837e5997c427"))), + wantErr: nil, + }, + { + name: "correct uuid zero value", + args: args{"00000000-0000-0000-0000-000000000000"}, + want: UUID(uuid.Must(uuid.FromString("00000000-0000-0000-0000-000000000000"))), + wantErr: nil, + }, + { + name: "incorrect uuid by wrong character", + args: args{"a98484cb-cc66-4687-8e66-837e5997c42l"}, + wantErr: errors.New("encoding/hex: invalid byte: U+006C 'l'"), + }, + { + name: "incorrect uuid by invalid length", + args: args{"a98484cb-cc66-4687-8e66-837e5997c42"}, + wantErr: errors.New("uuid: incorrect UUID length: a98484cb-cc66-4687-8e66-837e5997c42"), + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got, err := UUIDFromString(tt.args.s) + if err != nil { + if tt.wantErr == nil { + t.Errorf("UUIDFromString() error = %v, wantErr %v", err, tt.wantErr) + return + } + + if tt.wantErr.Error() != err.Error() { + t.Errorf("UUIDFromString() error = %v, wantErr %v", err, tt.wantErr) + return + } + + return + } + + if !reflect.DeepEqual(got, tt.want) { + t.Errorf("UUIDFromString() = %v, want %v", got, tt.want) + } + }) + } +} + +func TestUUID_IsZero(t *testing.T) { + tests := []struct { + name string + u UUID + want bool + }{ + { + name: "zero uuid", + u: UUID(uuid.Must(uuid.FromString("00000000-0000-0000-0000-000000000000"))), + want: true, + }, + { + name: "normal uuid", + u: UUID(uuid.Must(uuid.FromString("c2186152-0e6e-437f-bf16-d0b291e98100"))), + want: false, + }, + { + name: "nil uuid", + u: UUID{}, + want: true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + if got := (&tt.u).IsZero(); got != tt.want { + t.Errorf("UUID.IsZero() = %v, want %v", got, tt.want) + } + }) + } +} + +func TestUUID_MarshalJSON(t *testing.T) { + tests := []struct { + name string + u UUID + want []byte + wantErr bool + }{ + { + name: "success marshal json", + u: UUID(uuid.Must(uuid.FromString("c2186152-0e6e-437f-bf16-d0b291e98100"))), + want: []byte("\"c2186152-0e6e-437f-bf16-d0b291e98100\""), + wantErr: false, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got, err := tt.u.MarshalJSON() + if (err != nil) != tt.wantErr { + t.Errorf("UUID.MarshalJSON() error = %v, wantErr %v", err, tt.wantErr) + return + } + if !reflect.DeepEqual(got, tt.want) { + t.Errorf("UUID.MarshalJSON() = %v, want %v", string(got), string(tt.want)) + } + }) + } +} + +func TestUUID_UnmarshalJSON(t *testing.T) { + type args struct { + data []byte + } + tests := []struct { + name string + u UUID + args args + wantErr bool + }{ + { + name: "success unmarshal json", + u: UUID{}, + args: args{[]byte("\"c2186152-0e6e-437f-bf16-d0b291e98100\"")}, + wantErr: false, + }, + { + name: "fail unmarshal json by length", + u: UUID{}, + args: args{[]byte("\"c2186152-0e6e-437f-bf16-d0b291e9810\"")}, + wantErr: true, + }, + { + name: "fail unmarshal json by wrong character", + u: UUID{}, + args: args{[]byte("\"c2186152-0e6e-437f-bf16-d0b291e981l\"")}, + wantErr: true, + }, + { + name: "fail unmarshal json by missing double quote character", + u: UUID{}, + args: args{[]byte("c2186152-0e6e-437f-bf16-d0b291e9810")}, + wantErr: true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + if err := (&tt.u).UnmarshalJSON(tt.args.data); (err != nil) != tt.wantErr { + t.Errorf("UUID.UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) + } + }) + } +} + +func TestUUID_Value(t *testing.T) { + tests := []struct { + name string + u UUID + want driver.Value + wantErr bool + }{ + { + name: "correct uuid", + u: UUID(uuid.Must(uuid.FromString("c2186152-0e6e-437f-bf16-d0b291e98100"))), + want: driver.Value("c2186152-0e6e-437f-bf16-d0b291e98100"), + wantErr: false, + }, + { + name: "zero uuid", + u: UUID(uuid.Must(uuid.FromString("00000000-0000-0000-0000-000000000000"))), + want: nil, + wantErr: false, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got, err := tt.u.Value() + if (err != nil) != tt.wantErr { + t.Errorf("UUID.Value() error = %v, wantErr %v", err, tt.wantErr) + return + } + if !reflect.DeepEqual(got, tt.want) { + t.Errorf("UUID.Value() = %v, want %v", got, tt.want) + } + }) + } +}