// 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/auth/logout": { "post": { "description": "Logout customer", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "auth" ], "summary": "Logout customer", "parameters": [ { "description": "Logout customer", "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.loginCustomerRes" } }, "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/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/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/handlers.loginAdminReq" } } ], "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/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/{user_name}/is-unique": { "get": { "description": "Returns whether the specified user_name is available (unique)", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Check if user_name is unique", "parameters": [ { "type": "string", "description": "User Name", "name": "user_name", "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/{tenant_slug}/admin-login": { "post": { "description": "Login customer", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "auth" ], "summary": "Login customer", "parameters": [ { "description": "Login admin", "name": "login", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.loginAdminReq" } } ], "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}/customer-login": { "post": { "description": "Login customer", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "auth" ], "summary": "Login customer", "parameters": [ { "description": "Login customer", "name": "login", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.loginCustomerReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.loginCustomerRes" } }, "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/customer-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.CustomerProfileRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/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/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/{tenant_slug}/user/{user_name}/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 Name", "name": "user_name", "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" } } } } } }, "definitions": { "domain.ErrorResponse": { "type": "object", "properties": { "error": { "type": "string" }, "message": { "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.OtpFor": { "type": "string", "enum": [ "reset", "register" ], "x-enum-varnames": [ "OtpReset", "OtpRegister" ] }, "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.RegisterUserReq": { "type": "object", "properties": { "age": { "type": "integer" }, "country": { "type": "string" }, "educationLevel": { "type": "string" }, "email": { "type": "string" }, "firstName": { "type": "string" }, "lastName": { "type": "string" }, "organizationID": { "$ref": "#/definitions/domain.ValidInt64" }, "otp": { "type": "string" }, "otpMedium": { "$ref": "#/definitions/domain.OtpMedium" }, "password": { "type": "string" }, "phoneNumber": { "type": "string" }, "preferredLanguage": { "type": "string" }, "region": { "type": "string" }, "role": { "type": "string" }, "userName": { "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.UserProfileResponse": { "type": "object", "properties": { "age": { "type": "integer" }, "country": { "type": "string" }, "created_at": { "type": "string" }, "education_level": { "type": "string" }, "email": { "type": "string" }, "email_verified": { "type": "boolean" }, "first_name": { "type": "string" }, "id": { "type": "integer" }, "last_login": { "type": "string" }, "last_name": { "type": "string" }, "organization_id": { "type": "integer" }, "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" }, "user_name": { "type": "string" } } }, "domain.UserStatus": { "type": "string", "enum": [ "PENDING", "ACTIVE", "SUSPENDED", "DEACTIVATED" ], "x-enum-varnames": [ "UserStatusPending", "UserStatusActive", "UserStatusSuspended", "UserStatusDeactivated" ] }, "domain.ValidInt64": { "type": "object", "properties": { "valid": { "type": "boolean" }, "value": { "type": "integer" } } }, "domain.VerifyOtpReq": { "type": "object", "required": [ "otp", "otp_for", "otp_medium" ], "properties": { "email": { "description": "Required if medium is email", "type": "string" }, "otp": { "type": "string" }, "otp_for": { "$ref": "#/definitions/domain.OtpFor" }, "otp_medium": { "enum": [ "email", "sms" ], "allOf": [ { "$ref": "#/definitions/domain.OtpMedium" } ] }, "phone_number": { "description": "Required if medium is SMS", "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": { "company_id": { "type": "integer", "example": 1 }, "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.CustomerProfileRes": { "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" }, "referral_code": { "type": "string" }, "role": { "$ref": "#/definitions/domain.Role" }, "suspended": { "type": "boolean" }, "suspended_at": { "type": "string" }, "updated_at": { "type": "string" } } }, "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", "required": [ "otp", "password" ], "properties": { "email": { "type": "string", "example": "john.doe@example.com" }, "otp": { "type": "string", "example": "123456" }, "password": { "type": "string", "minLength": 8, "example": "newpassword123" }, "phone_number": { "type": "string", "example": "1234567890" } } }, "handlers.SearchUserByNameOrPhoneReq": { "type": "object", "properties": { "query": { "type": "string" }, "role": { "$ref": "#/definitions/domain.Role" } } }, "handlers.loginAdminReq": { "type": "object", "required": [ "password" ], "properties": { "email": { "type": "string", "example": "john.doe@example.com" }, "password": { "type": "string", "example": "password123" }, "phone_number": { "type": "string", "example": "1234567890" } } }, "handlers.loginCustomerReq": { "type": "object", "required": [ "password", "user_name" ], "properties": { "password": { "type": "string", "example": "password123" }, "user_name": { "type": "string", "example": "johndoe" } } }, "handlers.loginCustomerRes": { "type": "object", "properties": { "access_token": { "type": "string" }, "refresh_token": { "type": "string" }, "role": { "type": "string" } } }, "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": { "company_id": { "type": "integer", "example": 1 }, "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) }