// Package docs Code generated by swaggo/swag. DO NOT EDIT package docs import "github.com/swaggo/swag" const docTemplate = `{ "schemes": {{ marshal .Schemes }}, "swagger": "2.0", "info": { "description": "{{escape .Description}}", "title": "{{.Title}}", "termsOfService": "http://swagger.io/terms/", "contact": { "name": "API Support", "url": "http://www.swagger.io/support", "email": "support@swagger.io" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" }, "version": "{{.Version}}" }, "host": "{{.Host}}", "basePath": "{{.BasePath}}", "paths": { "/api/v1/admin": { "get": { "description": "Get all Admins", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admin" ], "summary": "Get all Admins", "parameters": [ { "type": "integer", "description": "Page number", "name": "page", "in": "query" }, { "type": "integer", "description": "Page size", "name": "page_size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.AdminRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } }, "post": { "description": "Create Admin", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admin" ], "summary": "Create Admin", "parameters": [ { "description": "Create admin", "name": "manger", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.CreateAdminReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/admin/{id}": { "get": { "description": "Get a single admin by id", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admin" ], "summary": "Get admin by id", "parameters": [ { "type": "integer", "description": "User ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.AdminRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } }, "put": { "description": "Update Admin", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admin" ], "summary": "Update Admin", "parameters": [ { "description": "Update Admin", "name": "admin", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.updateAdminReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/assessment/questions": { "get": { "description": "Returns all active assessment questions with their options or answers", "produces": [ "application/json" ], "tags": [ "assessment-question" ], "summary": "List assessment questions", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/domain.QuestionWithDetails" } } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/domain.ErrorResponse" } } } }, "post": { "description": "Creates a new assessment question with options or short answer depending on question type", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "assessment-question" ], "summary": "Create assessment question", "parameters": [ { "description": "Create question payload", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/domain.CreateAssessmentQuestionInput" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/domain.Response" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/domain.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/domain.ErrorResponse" } } } } }, "/api/v1/assessment/questions/{id}": { "get": { "description": "Returns a single assessment question with its options or answer", "produces": [ "application/json" ], "tags": [ "assessment-question" ], "summary": "Get assessment question by ID", "parameters": [ { "type": "integer", "description": "Question ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.QuestionWithDetails" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/domain.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/domain.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/domain.ErrorResponse" } } } } }, "/api/v1/auth/google/callback": { "get": { "tags": [ "auth" ], "summary": "Google login callback", "responses": {} } }, "/api/v1/auth/google/login": { "get": { "tags": [ "auth" ], "summary": "Google login redirect", "responses": {} } }, "/api/v1/auth/logout": { "post": { "description": "Logout user", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "auth" ], "summary": "Logout user", "parameters": [ { "description": "Logout user", "name": "logout", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.logoutReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/auth/refresh": { "post": { "description": "Refresh token", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "auth" ], "summary": "Refresh token", "parameters": [ { "description": "tokens", "name": "refresh", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.refreshToken" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.loginUserRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/course-categories": { "get": { "description": "Returns all active course categories", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "courses" ], "summary": "List active course categories", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/domain.Response" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/domain.CourseCategory" } } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/domain.ErrorResponse" } } } }, "post": { "description": "Creates a new course category", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "courses" ], "summary": "Create course category", "parameters": [ { "description": "Course category payload", "name": "category", "in": "body", "required": true, "schema": { "$ref": "#/definitions/domain.CourseCategory" } } ], "responses": { "201": { "description": "Created", "schema": { "allOf": [ { "$ref": "#/definitions/domain.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/domain.CourseCategory" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/domain.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/domain.ErrorResponse" } } } } }, "/api/v1/course-categories/{category_id}/courses": { "get": { "description": "Returns courses under a given category", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "courses" ], "summary": "List courses by category", "parameters": [ { "type": "integer", "description": "Category ID", "name": "category_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/domain.Response" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/domain.Course" } } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/domain.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/domain.ErrorResponse" } } } } }, "/api/v1/course-categories/{id}": { "get": { "description": "Get course category by ID", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "courses" ], "summary": "Get course category", "parameters": [ { "type": "integer", "description": "Category ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/domain.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/domain.CourseCategory" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/domain.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/domain.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/domain.ErrorResponse" } } } }, "put": { "description": "Updates a course category", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "courses" ], "summary": "Update course category", "parameters": [ { "type": "integer", "description": "Category ID", "name": "id", "in": "path", "required": true }, { "description": "Course category payload", "name": "category", "in": "body", "required": true, "schema": { "$ref": "#/definitions/domain.CourseCategory" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/domain.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/domain.CourseCategory" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/domain.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/domain.ErrorResponse" } } } } }, "/api/v1/course-categories/{id}/deactivate": { "post": { "description": "Deactivates a course category", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "courses" ], "summary": "Deactivate course category", "parameters": [ { "type": "integer", "description": "Category ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.Response" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/domain.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/domain.ErrorResponse" } } } } }, "/api/v1/courses": { "get": { "description": "Returns all active courses", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "courses" ], "summary": "List active courses", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/domain.Response" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/domain.Course" } } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/domain.ErrorResponse" } } } }, "post": { "description": "Creates a new course", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "courses" ], "summary": "Create course", "parameters": [ { "description": "Course payload", "name": "course", "in": "body", "required": true, "schema": { "$ref": "#/definitions/domain.Course" } } ], "responses": { "201": { "description": "Created", "schema": { "allOf": [ { "$ref": "#/definitions/domain.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/domain.Course" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/domain.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/domain.ErrorResponse" } } } } }, "/api/v1/courses/{course_id}/programs": { "get": { "tags": [ "courses" ], "summary": "List programs by course", "parameters": [ { "type": "integer", "description": "Course ID", "name": "course_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/domain.Response" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/domain.Program" } } } } ] } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "courses" ], "summary": "Create program", "parameters": [ { "description": "Program payload", "name": "program", "in": "body", "required": true, "schema": { "$ref": "#/definitions/domain.Program" } } ], "responses": { "201": { "description": "Created", "schema": { "allOf": [ { "$ref": "#/definitions/domain.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/domain.Program" } } } ] } } } } }, "/api/v1/courses/{id}": { "get": { "description": "Get course by ID", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "courses" ], "summary": "Get course", "parameters": [ { "type": "integer", "description": "Course ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/domain.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/domain.Course" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/domain.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/domain.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/domain.ErrorResponse" } } } }, "put": { "description": "Updates a course", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "courses" ], "summary": "Update course", "parameters": [ { "type": "integer", "description": "Course ID", "name": "id", "in": "path", "required": true }, { "description": "Course payload", "name": "course", "in": "body", "required": true, "schema": { "$ref": "#/definitions/domain.Course" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/domain.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/domain.Course" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/domain.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/domain.ErrorResponse" } } } } }, "/api/v1/courses/{id}/deactivate": { "post": { "description": "Deactivates a course", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "courses" ], "summary": "Deactivate course", "parameters": [ { "type": "integer", "description": "Course ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.Response" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/domain.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/domain.ErrorResponse" } } } } }, "/api/v1/levels": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "courses" ], "summary": "Create level", "parameters": [ { "description": "Level payload", "name": "level", "in": "body", "required": true, "schema": { "$ref": "#/definitions/domain.Level" } } ], "responses": { "201": { "description": "Created", "schema": { "allOf": [ { "$ref": "#/definitions/domain.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/domain.Level" } } } ] } } } } }, "/api/v1/levels/{level_id}/modules": { "get": { "tags": [ "courses" ], "summary": "List modules by level", "parameters": [ { "type": "integer", "description": "Level ID", "name": "level_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/domain.Response" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/domain.Module" } } } } ] } } } } }, "/api/v1/logs": { "get": { "description": "Fetches application logs from MongoDB with pagination, level filtering, and search", "produces": [ "application/json" ], "tags": [ "Logs" ], "summary": "Retrieve application logs with filtering and pagination", "parameters": [ { "type": "string", "description": "Filter logs by level (debug, info, warn, error, dpanic, panic, fatal)", "name": "level", "in": "query" }, { "type": "string", "description": "Search term to match against message or fields", "name": "search", "in": "query" }, { "type": "integer", "default": 1, "description": "Page number for pagination (default: 1)", "name": "page", "in": "query" }, { "type": "integer", "default": 50, "description": "Number of items per page (default: 50, max: 100)", "name": "limit", "in": "query" } ], "responses": { "200": { "description": "Paginated list of application logs", "schema": { "$ref": "#/definitions/domain.LogResponse" } }, "400": { "description": "Invalid request parameters", "schema": { "$ref": "#/definitions/domain.ErrorResponse" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/domain.ErrorResponse" } } } } }, "/api/v1/module-videos": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "courses" ], "summary": "Create module video", "parameters": [ { "description": "Module video payload", "name": "video", "in": "body", "required": true, "schema": { "$ref": "#/definitions/domain.ModuleVideo" } } ], "responses": { "201": { "description": "Created", "schema": { "allOf": [ { "$ref": "#/definitions/domain.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/domain.ModuleVideo" } } } ] } } } } }, "/api/v1/modules": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "courses" ], "summary": "Create module", "parameters": [ { "description": "Module payload", "name": "module", "in": "body", "required": true, "schema": { "$ref": "#/definitions/domain.Module" } } ], "responses": { "201": { "description": "Created", "schema": { "allOf": [ { "$ref": "#/definitions/domain.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/domain.Module" } } } ] } } } } }, "/api/v1/practice-questions": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "courses" ], "summary": "Create practice question", "parameters": [ { "description": "Practice question payload", "name": "question", "in": "body", "required": true, "schema": { "$ref": "#/definitions/domain.PracticeQuestion" } } ], "responses": { "201": { "description": "Created", "schema": { "allOf": [ { "$ref": "#/definitions/domain.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/domain.PracticeQuestion" } } } ] } } } } }, "/api/v1/practices": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "courses" ], "summary": "Create practice", "parameters": [ { "description": "Practice payload", "name": "practice", "in": "body", "required": true, "schema": { "$ref": "#/definitions/domain.Practice" } } ], "responses": { "201": { "description": "Created", "schema": { "allOf": [ { "$ref": "#/definitions/domain.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/domain.Practice" } } } ] } } } } }, "/api/v1/sendSMS": { "post": { "description": "Sends an SMS message to a single phone number using AfroMessage", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Send single SMS via AfroMessage", "parameters": [ { "description": "Send SMS request", "name": "sendSMS", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.SendSingleAfroSMSReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/super-login": { "post": { "description": "Login super-admin", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "auth" ], "summary": "Login super-admin", "parameters": [ { "description": "Login super-admin", "name": "login", "in": "body", "required": true, "schema": { "$ref": "#/definitions/domain.LoginRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.LoginAdminRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/t-approver/{id}": { "get": { "description": "Get a single admin by id", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admin" ], "summary": "Get admin by id", "parameters": [ { "type": "integer", "description": "User ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.AdminRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } }, "put": { "description": "Update Admin", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admin" ], "summary": "Update Admin", "parameters": [ { "description": "Update Admin", "name": "admin", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.updateAdminReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/tenant": { "get": { "description": "Check if phone number or email exist", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Check if phone number or email exist", "parameters": [ { "description": "Check phone number or email exist", "name": "checkPhoneEmailExist", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.CheckPhoneEmailExistReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.CheckPhoneEmailExistRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/user": { "put": { "description": "Updates user profile information (partial updates supported)", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Update user profile", "parameters": [ { "type": "integer", "description": "User ID", "name": "user_id", "in": "path", "required": true }, { "description": "Update user payload", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/domain.UpdateUserReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.Response" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/domain.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/domain.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/domain.ErrorResponse" } } } } }, "/api/v1/user/delete/{id}": { "delete": { "description": "Delete a user by their ID", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Delete user by ID", "parameters": [ { "type": "integer", "description": "User ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/user/resetPassword": { "post": { "description": "Reset password", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Reset password", "parameters": [ { "description": "Reset password", "name": "resetPassword", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.ResetPasswordReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/user/search": { "post": { "description": "Search for user using name or phone", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Search for user using name or phone", "parameters": [ { "description": "Search for using his name or phone", "name": "searchUserByNameOrPhone", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.SearchUserByNameOrPhoneReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.UserProfileResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/user/sendResetCode": { "post": { "description": "Send reset code", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Send reset code", "parameters": [ { "description": "Send reset code", "name": "resetCode", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.ResetCodeReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/user/single/{id}": { "get": { "description": "Get a single user by id", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Get user by id", "parameters": [ { "type": "integer", "description": "User ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.UserProfileResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/user/verify-otp": { "post": { "description": "Verify OTP for registration or other actions", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Verify OTP", "parameters": [ { "description": "Verify OTP", "name": "verifyOtp", "in": "body", "required": true, "schema": { "$ref": "#/definitions/domain.VerifyOtpReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/user/{user_id}/is-pending": { "get": { "description": "Returns whether the specified user has a status of \"pending\"", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Check if user status is pending", "parameters": [ { "type": "string", "description": "User ID", "name": "user_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.Response" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/domain.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/domain.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/domain.ErrorResponse" } } } } }, "/api/v1/user/{user_id}/is-profile-completed": { "get": { "description": "Returns whether the specified user's profile is completed", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Check if user profile is completed", "parameters": [ { "type": "integer", "description": "User ID", "name": "user_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.Response" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/domain.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/domain.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/domain.ErrorResponse" } } } } }, "/api/v1/users": { "get": { "description": "Get users with optional filters", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Get all users", "parameters": [ { "type": "string", "description": "Role filter", "name": "role", "in": "query" }, { "type": "string", "description": "Search query", "name": "query", "in": "query" }, { "type": "integer", "description": "Page number", "name": "page", "in": "query" }, { "type": "integer", "description": "Page size", "name": "page_size", "in": "query" }, { "type": "string", "description": "Created before (RFC3339)", "name": "created_before", "in": "query" }, { "type": "string", "description": "Created after (RFC3339)", "name": "created_after", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/{tenant_slug}/admin-login": { "post": { "description": "Login user", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "auth" ], "summary": "Login user", "parameters": [ { "description": "Login admin", "name": "login", "in": "body", "required": true, "schema": { "$ref": "#/definitions/domain.LoginRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.LoginAdminRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/{tenant_slug}/otp/resend": { "post": { "description": "Resend OTP if the previous one is expired", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "otp" ], "summary": "Resend OTP", "parameters": [ { "description": "Resend OTP", "name": "resendOtp", "in": "body", "required": true, "schema": { "$ref": "#/definitions/domain.ResendOtpReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/{tenant_slug}/user-login": { "post": { "description": "Login user", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "auth" ], "summary": "Login user", "parameters": [ { "description": "Login user", "name": "login", "in": "body", "required": true, "schema": { "$ref": "#/definitions/domain.LoginRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.loginUserRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/{tenant_slug}/user/admin-profile": { "get": { "security": [ { "Bearer": [] } ], "description": "Get user profile", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Get user profile", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.AdminProfileRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/{tenant_slug}/user/checkPhoneEmailExist": { "post": { "description": "Check if phone number or email exist", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Check if phone number or email exist", "parameters": [ { "description": "Check phone number or email exist", "name": "checkPhoneEmailExist", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.CheckPhoneEmailExistReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.CheckPhoneEmailExistRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/{tenant_slug}/user/knowledge-level": { "put": { "description": "Updates the knowledge level of the specified user after initial assessment", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Update user's knowledge level", "parameters": [ { "type": "integer", "description": "User ID", "name": "user_id", "in": "path", "required": true }, { "description": "Knowledge level", "name": "knowledge_level", "in": "body", "required": true, "schema": { "$ref": "#/definitions/domain.UpdateKnowledgeLevelReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.Response" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/domain.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/domain.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/domain.ErrorResponse" } } } } }, "/api/v1/{tenant_slug}/user/register": { "post": { "description": "Register user", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Register user", "parameters": [ { "description": "Register user", "name": "registerUser", "in": "body", "required": true, "schema": { "$ref": "#/definitions/domain.RegisterUserReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/{tenant_slug}/user/resetPassword": { "post": { "description": "Reset tenant password", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Reset tenant password", "parameters": [ { "description": "Reset password", "name": "resetPassword", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.ResetPasswordReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/{tenant_slug}/user/sendRegisterCode": { "post": { "description": "Send register code", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Send register code", "parameters": [ { "description": "Send register code", "name": "registerCode", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.RegisterCodeReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/{tenant_slug}/user/sendResetCode": { "post": { "description": "Send reset code", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Send reset code", "parameters": [ { "description": "Send reset code", "name": "resetCode", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.ResetCodeReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/{tenant_slug}/user/user-profile": { "get": { "security": [ { "Bearer": [] } ], "description": "Get user profile", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Get user profile", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.UserProfileResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } } }, "definitions": { "domain.AgeGroup": { "type": "string", "enum": [ "UNDER_13", "13_17", "18_24", "25_34", "35_44", "45_54", "55_PLUS" ], "x-enum-varnames": [ "AgeUnder13", "Age13To17", "Age18To24", "Age25To34", "Age35To44", "Age45To54", "Age55Plus" ] }, "domain.AssessmentQuestion": { "type": "object", "properties": { "created_at": { "type": "string" }, "description": { "type": "string" }, "difficulty_level": { "type": "string" }, "id": { "type": "integer" }, "is_active": { "type": "boolean" }, "points": { "type": "integer" }, "question_type": { "type": "string" }, "title": { "type": "string" }, "updated_at": { "type": "string" } } }, "domain.Course": { "type": "object", "properties": { "categoryID": { "type": "integer", "format": "int64" }, "description": { "type": "string" }, "id": { "type": "integer", "format": "int64" }, "isActive": { "type": "boolean" }, "title": { "type": "string" } } }, "domain.CourseCategory": { "type": "object", "properties": { "createdAt": { "type": "string" }, "id": { "type": "integer", "format": "int64" }, "isActive": { "type": "boolean" }, "name": { "description": "\"Learning English\", \"Other Courses\"", "type": "string" } } }, "domain.CreateAssessmentQuestionInput": { "type": "object", "properties": { "correctAnswer": { "description": "Short Answer only", "type": "string" }, "description": { "type": "string" }, "difficultyLevel": { "type": "string" }, "isActive": { "type": "boolean" }, "options": { "description": "Multiple Choice only", "type": "array", "items": { "$ref": "#/definitions/domain.CreateQuestionOptionInput" } }, "points": { "type": "integer", "format": "int32" }, "questionType": { "$ref": "#/definitions/domain.QuestionType" }, "title": { "type": "string" } } }, "domain.CreateQuestionOptionInput": { "type": "object", "properties": { "isCorrect": { "type": "boolean" }, "order": { "type": "integer", "format": "int32" }, "text": { "type": "string" } } }, "domain.ErrorResponse": { "type": "object", "properties": { "error": { "type": "string" }, "message": { "type": "string" } } }, "domain.Level": { "type": "object", "properties": { "description": { "type": "string" }, "id": { "type": "integer", "format": "int64" }, "isActive": { "type": "boolean" }, "levelIndex": { "description": "1,2,3...", "type": "integer" }, "numberOfModules": { "type": "integer" }, "numberOfPractices": { "type": "integer" }, "numberOfVideos": { "type": "integer" }, "programID": { "type": "integer", "format": "int64" }, "title": { "description": "\"Beginner\", \"Level 1\"", "type": "string" } } }, "domain.LogEntry": { "type": "object", "properties": { "caller": { "type": "string" }, "env": { "type": "string" }, "fields": { "type": "object", "additionalProperties": true }, "level": { "type": "string" }, "message": { "type": "string" }, "service": { "type": "string" }, "stacktrace": { "type": "string" }, "timestamp": { "type": "string" } } }, "domain.LogResponse": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/domain.LogEntry" } }, "message": { "type": "string" }, "pagination": { "$ref": "#/definitions/domain.Pagination" } } }, "domain.LoginRequest": { "type": "object", "properties": { "email": { "type": "string" }, "otp_code": { "type": "string" }, "password": { "type": "string" }, "phone_number": { "type": "string" } } }, "domain.Module": { "type": "object", "properties": { "content": { "type": "string" }, "id": { "type": "integer", "format": "int64" }, "isActive": { "type": "boolean" }, "levelID": { "type": "integer", "format": "int64" }, "order": { "type": "integer" }, "title": { "type": "string" } } }, "domain.ModuleVideo": { "type": "object", "properties": { "description": { "type": "string" }, "duration": { "description": "seconds", "type": "integer" }, "id": { "type": "integer", "format": "int64" }, "instructorId": { "type": "string" }, "isActive": { "type": "boolean" }, "moduleID": { "type": "integer", "format": "int64" }, "publishSettings": { "$ref": "#/definitions/domain.PublishSettings" }, "resolution": { "description": "\"720p\", \"1080p\"", "type": "string" }, "thumbnail": { "type": "string" }, "title": { "type": "string" }, "videoURL": { "type": "string" } } }, "domain.OtpMedium": { "type": "string", "enum": [ "email", "sms" ], "x-enum-varnames": [ "OtpMediumEmail", "OtpMediumSms" ] }, "domain.Pagination": { "type": "object", "properties": { "current_page": { "type": "integer" }, "limit": { "type": "integer" }, "total": { "type": "integer" }, "total_pages": { "type": "integer" } } }, "domain.Practice": { "type": "object", "properties": { "bannerImage": { "type": "string" }, "description": { "type": "string" }, "id": { "type": "integer", "format": "int64" }, "isActive": { "type": "boolean" }, "ownerID": { "type": "integer", "format": "int64" }, "ownerType": { "description": "\"LEVEL\" | \"MODULE\"", "type": "string" }, "persona": { "type": "string" }, "title": { "type": "string" } } }, "domain.PracticeQuestion": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64" }, "practiceID": { "type": "integer", "format": "int64" }, "question": { "type": "string" }, "questionVoicePrompt": { "type": "string" }, "sampleAnswer": { "type": "string" }, "sampleAnswerVoicePrompt": { "type": "string" }, "tips": { "type": "string" }, "type": { "description": "MCQ, TRUE_FALSE, SHORT", "type": "string" } } }, "domain.Program": { "type": "object", "properties": { "courseID": { "type": "integer", "format": "int64" }, "description": { "type": "string" }, "id": { "type": "integer", "format": "int64" }, "isActive": { "type": "boolean" }, "order": { "description": "ordering inside course", "type": "integer" }, "thumbnail": { "type": "string" }, "title": { "type": "string" } } }, "domain.PublishSettings": { "type": "object", "properties": { "isPublished": { "type": "boolean" }, "publishDate": { "type": "string" }, "visibility": { "description": "\"public\", \"private\", \"unlisted\"", "type": "string" } } }, "domain.QuestionOption": { "type": "object", "properties": { "option_text": { "type": "string" }, "question_id": { "type": "integer" } } }, "domain.QuestionType": { "type": "string", "enum": [ "MULTIPLE_CHOICE", "TRUE_FALSE", "SHORT_ANSWER" ], "x-enum-varnames": [ "MultipleChoice", "TrueFalse", "ShortAnswer" ] }, "domain.QuestionWithDetails": { "type": "object", "properties": { "options": { "type": "array", "items": { "$ref": "#/definitions/domain.QuestionOption" } }, "question": { "$ref": "#/definitions/domain.AssessmentQuestion" } } }, "domain.RegisterUserReq": { "type": "object", "properties": { "email": { "type": "string" }, "otp_medium": { "$ref": "#/definitions/domain.OtpMedium" }, "password": { "type": "string" }, "phone_number": { "type": "string" }, "role": { "type": "string" } } }, "domain.ResendOtpReq": { "type": "object", "properties": { "email": { "type": "string" }, "phone_number": { "type": "string" } } }, "domain.Response": { "type": "object", "properties": { "data": {}, "message": { "type": "string" }, "metadata": {}, "status_code": { "type": "integer" }, "success": { "type": "boolean" } } }, "domain.Role": { "type": "string", "enum": [ "super_admin", "admin", "student", "instructor", "support" ], "x-enum-varnames": [ "RoleSuperAdmin", "RoleAdmin", "RoleStudent", "RoleInstructor", "RoleSupport" ] }, "domain.UpdateKnowledgeLevelReq": { "type": "object", "properties": { "knowledge_level": { "description": "BEGINNER, INTERMEDIATE, ADVANCED", "type": "string" }, "user_id": { "type": "integer" } } }, "domain.UpdateUserReq": { "type": "object", "properties": { "age_group": { "$ref": "#/definitions/domain.AgeGroup" }, "birth_day": { "description": "YYYY-MM-DD", "type": "string" }, "country": { "type": "string" }, "education_level": { "type": "string" }, "favourite_topic": { "type": "string" }, "first_name": { "type": "string" }, "gender": { "type": "string" }, "initial_assessment_completed": { "type": "boolean" }, "knowledge_level": { "type": "string" }, "language_challange": { "type": "string" }, "language_goal": { "type": "string" }, "last_name": { "type": "string" }, "learning_goal": { "type": "string" }, "nick_name": { "type": "string" }, "occupation": { "type": "string" }, "preferred_language": { "type": "string" }, "profile_completed": { "type": "boolean" }, "profile_picture_url": { "type": "string" }, "region": { "type": "string" } } }, "domain.UserProfileResponse": { "type": "object", "properties": { "age_group": { "type": "string" }, "birth_day": { "type": "string" }, "country": { "type": "string" }, "created_at": { "type": "string" }, "education_level": { "type": "string" }, "email": { "description": "UserName string ` + "`" + `json:\"user_name,omitempty\"` + "`" + `", "type": "string" }, "email_verified": { "type": "boolean" }, "favoutite_topic": { "type": "string" }, "first_name": { "type": "string" }, "gender": { "type": "string" }, "id": { "type": "integer" }, "initial_assessment_completed": { "description": "Profile fields", "type": "boolean" }, "language_challange": { "type": "string" }, "language_goal": { "type": "string" }, "last_login": { "type": "string" }, "last_name": { "type": "string" }, "learning_goal": { "type": "string" }, "nick_name": { "type": "string" }, "occupation": { "type": "string" }, "phone_number": { "type": "string" }, "phone_verified": { "type": "boolean" }, "preferred_language": { "type": "string" }, "profile_completed": { "type": "boolean" }, "profile_picture_url": { "type": "string" }, "region": { "type": "string" }, "role": { "$ref": "#/definitions/domain.Role" }, "status": { "$ref": "#/definitions/domain.UserStatus" }, "updated_at": { "type": "string" } } }, "domain.UserStatus": { "type": "string", "enum": [ "PENDING", "ACTIVE", "SUSPENDED", "DEACTIVATED" ], "x-enum-varnames": [ "UserStatusPending", "UserStatusActive", "UserStatusSuspended", "UserStatusDeactivated" ] }, "domain.VerifyOtpReq": { "type": "object", "required": [ "otp" ], "properties": { "email": { "type": "string" }, "otp": { "type": "string" }, "phone_number": { "type": "string" } } }, "handlers.AdminProfileRes": { "type": "object", "properties": { "created_at": { "type": "string" }, "email": { "type": "string" }, "email_verified": { "type": "boolean" }, "first_name": { "type": "string" }, "id": { "type": "integer" }, "last_login": { "type": "string" }, "last_name": { "type": "string" }, "phone_number": { "type": "string" }, "phone_verified": { "type": "boolean" }, "role": { "$ref": "#/definitions/domain.Role" }, "suspended": { "type": "boolean" }, "suspended_at": { "type": "string" }, "updated_at": { "type": "string" } } }, "handlers.AdminRes": { "type": "object", "properties": { "created_at": { "type": "string" }, "email": { "type": "string" }, "email_verified": { "type": "boolean" }, "first_name": { "type": "string" }, "id": { "type": "integer" }, "last_login": { "type": "string" }, "last_name": { "type": "string" }, "phone_number": { "type": "string" }, "phone_verified": { "type": "boolean" }, "role": { "$ref": "#/definitions/domain.Role" }, "suspended": { "type": "boolean" }, "suspended_at": { "type": "string" }, "updated_at": { "type": "string" } } }, "handlers.CheckPhoneEmailExistReq": { "type": "object", "properties": { "email": { "type": "string", "example": "john.doe@example.com" }, "phone_number": { "type": "string", "example": "1234567890" } } }, "handlers.CheckPhoneEmailExistRes": { "type": "object", "properties": { "email_exist": { "type": "boolean" }, "phone_number_exist": { "type": "boolean" } } }, "handlers.CreateAdminReq": { "type": "object", "properties": { "email": { "type": "string", "example": "john.doe@example.com" }, "first_name": { "type": "string", "example": "John" }, "last_name": { "type": "string", "example": "Doe" }, "password": { "type": "string", "example": "password123" }, "phone_number": { "type": "string", "example": "1234567890" } } }, "handlers.LoginAdminRes": { "type": "object", "properties": { "access_token": { "type": "string" }, "refresh_token": { "type": "string" }, "role": { "type": "string" } } }, "handlers.RegisterCodeReq": { "type": "object", "properties": { "email": { "type": "string", "example": "john.doe@example.com" }, "phone_number": { "type": "string", "example": "1234567890" } } }, "handlers.ResetCodeReq": { "type": "object", "properties": { "email": { "type": "string", "example": "john.doe@example.com" }, "phone_number": { "type": "string", "example": "1234567890" } } }, "handlers.ResetPasswordReq": { "type": "object" }, "handlers.SearchUserByNameOrPhoneReq": { "type": "object", "properties": { "query": { "type": "string" }, "role": { "$ref": "#/definitions/domain.Role" } } }, "handlers.SendSingleAfroSMSReq": { "type": "object", "required": [ "message", "recipient" ], "properties": { "message": { "type": "string", "example": "Hello world" }, "recipient": { "type": "string", "example": "+251912345678" } } }, "handlers.loginUserRes": { "type": "object", "properties": { "access_token": { "type": "string" }, "refresh_token": { "type": "string" }, "role": { "type": "string" }, "user_id": { "type": "integer" } } }, "handlers.logoutReq": { "type": "object", "required": [ "refresh_token" ], "properties": { "refresh_token": { "type": "string", "example": "\u003crefresh-token\u003e" } } }, "handlers.refreshToken": { "type": "object", "required": [ "access_token", "refresh_token" ], "properties": { "access_token": { "type": "string", "example": "\u003cjwt-token\u003e" }, "refresh_token": { "type": "string", "example": "\u003crefresh-token\u003e" } } }, "handlers.updateAdminReq": { "type": "object", "properties": { "first_name": { "type": "string", "example": "John" }, "last_name": { "type": "string", "example": "Doe" }, "suspended": { "type": "boolean", "example": false } } }, "response.APIResponse": { "type": "object", "properties": { "data": {}, "message": { "type": "string" }, "metadata": {}, "page": { "type": "integer" }, "status": { "$ref": "#/definitions/response.Status" }, "timestamp": { "type": "string" }, "total": { "type": "integer" } } }, "response.Status": { "type": "string", "enum": [ "error", "success" ], "x-enum-varnames": [ "Error", "Success" ] } }, "securityDefinitions": { "Bearer": { "type": "apiKey", "name": "Authorization", "in": "header" } } }` // SwaggerInfo holds exported Swagger Info so clients can modify it var SwaggerInfo = &swag.Spec{ Version: "1.0.1", Host: "", BasePath: "", Schemes: []string{}, Title: "Yimaru API", Description: "This is server for Yimaru.", InfoInstanceName: "swagger", SwaggerTemplate: docTemplate, LeftDelim: "{{", RightDelim: "}}", } func init() { swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo) }