admin/swagger.json

5259 lines
192 KiB
JSON

{
"schemes": [
"http",
"https"
],
"swagger": "2.0",
"info": {
"description": "Beehive API for managing products, files, users and admin operations\n\n## Environments\n- **Local**: http://localhost:8090\n- **Stage**: https://apimznstg.aireview.ir\n\nChange the host in the swagger UI or API client to match your target environment.",
"title": "Beehive API",
"termsOfService": "http://swagger.io/terms/",
"contact": {
"name": "API Support",
"url": "http://www.swagger.io/support",
"email": "support@swagger.io"
},
"license": {
"name": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
},
"version": "1.0"
},
"host": "localhost:8090",
"basePath": "/",
"paths": {
"/api/v1/admin/admin-users": {
"get": {
"security": [
{
"AdminAuth": []
}
],
"description": "Retrieves all admin users with pagination support",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Get all admin users",
"parameters": [
{
"type": "string",
"description": "Bearer \u003ctoken\u003e",
"name": "Authorization",
"in": "header",
"required": true
},
{
"type": "integer",
"description": "Number of items per page",
"name": "limit",
"in": "query"
},
{
"type": "integer",
"description": "Page offset",
"name": "offset",
"in": "query"
}
],
"responses": {
"200": {
"description": "List of admin users",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/domain.AdminUserInfo"
}
}
},
"401": {
"description": "Unauthorized - invalid or missing JWT token",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"403": {
"description": "Forbidden - insufficient permissions",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
}
}
},
"post": {
"security": [
{
"AdminAuth": []
}
],
"description": "Creates a new admin user in the system with optional roles and permissions",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Create admin user",
"parameters": [
{
"type": "string",
"description": "Bearer \u003ctoken\u003e",
"name": "Authorization",
"in": "header",
"required": true
},
{
"description": "Admin user information including roles and permissions",
"name": "adminUser",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/domain.CreateAdminUserRequest"
}
}
],
"responses": {
"201": {
"description": "Admin user created successfully",
"schema": {
"$ref": "#/definitions/domain.AdminUserInfo"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"401": {
"description": "Unauthorized - invalid or missing JWT token",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"403": {
"description": "Forbidden - insufficient permissions",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
}
}
}
},
"/api/v1/admin/admin-users/{id}": {
"get": {
"security": [
{
"AdminAuth": []
}
],
"description": "Retrieves a specific admin user by their ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Get admin user by ID",
"parameters": [
{
"type": "string",
"description": "Bearer \u003ctoken\u003e",
"name": "Authorization",
"in": "header",
"required": true
},
{
"type": "string",
"description": "Admin user ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Admin user found",
"schema": {
"$ref": "#/definitions/domain.AdminUserInfo"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"401": {
"description": "Unauthorized - invalid or missing JWT token",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"403": {
"description": "Forbidden - insufficient permissions",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"404": {
"description": "Admin user not found",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
}
}
},
"put": {
"security": [
{
"AdminAuth": []
}
],
"description": "Updates an admin user in the system with optional roles and permissions (overwrites existing)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Update admin user",
"parameters": [
{
"type": "string",
"description": "Bearer \u003ctoken\u003e",
"name": "Authorization",
"in": "header",
"required": true
},
{
"type": "string",
"description": "Admin user ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Updated admin user information including roles and permissions",
"name": "adminUser",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/domain.UpdateAdminUserRequest"
}
}
],
"responses": {
"200": {
"description": "Admin user updated successfully",
"schema": {
"$ref": "#/definitions/domain.AdminUserInfo"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"403": {
"description": "Forbidden - insufficient permissions",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"404": {
"description": "Admin user not found",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
}
}
},
"delete": {
"security": [
{
"AdminAuth": []
}
],
"description": "Deletes an admin user from the system",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Delete admin user",
"parameters": [
{
"type": "string",
"description": "Bearer \u003ctoken\u003e",
"name": "Authorization",
"in": "header",
"required": true
},
{
"type": "string",
"description": "Admin user ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Admin user deleted successfully",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"403": {
"description": "Forbidden - insufficient permissions",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"404": {
"description": "Admin user not found",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
}
}
}
},
"/api/v1/admin/admin-users/{id}/permissions": {
"get": {
"security": [
{
"AdminAuth": []
}
],
"description": "Retrieves all permissions assigned to an admin user",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Get admin user permissions",
"parameters": [
{
"type": "string",
"description": "Bearer \u003ctoken\u003e",
"name": "Authorization",
"in": "header",
"required": true
},
{
"type": "string",
"description": "Admin user ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "List of permissions",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/domain.Permission"
}
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"403": {
"description": "Forbidden - insufficient permissions",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
}
}
}
},
"/api/v1/admin/admin-users/{id}/permissions/{permissionId}": {
"post": {
"security": [
{
"AdminAuth": []
}
],
"description": "Assigns a permission to an admin user",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Assign permission to admin user",
"parameters": [
{
"type": "string",
"description": "Bearer \u003ctoken\u003e",
"name": "Authorization",
"in": "header",
"required": true
},
{
"type": "string",
"description": "Admin user ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Permission ID",
"name": "permissionId",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Permission assigned successfully",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"403": {
"description": "Forbidden - insufficient permissions",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
}
}
},
"delete": {
"security": [
{
"AdminAuth": []
}
],
"description": "Removes a permission from an admin user",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Remove permission from admin user",
"parameters": [
{
"type": "string",
"description": "Bearer \u003ctoken\u003e",
"name": "Authorization",
"in": "header",
"required": true
},
{
"type": "string",
"description": "Admin user ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Permission ID",
"name": "permissionId",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Permission removed successfully",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"403": {
"description": "Forbidden - insufficient permissions",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
}
}
}
},
"/api/v1/admin/admin-users/{id}/roles": {
"get": {
"security": [
{
"AdminAuth": []
}
],
"description": "Retrieves all roles assigned to an admin user",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Get admin user roles",
"parameters": [
{
"type": "string",
"description": "Bearer \u003ctoken\u003e",
"name": "Authorization",
"in": "header",
"required": true
},
{
"type": "string",
"description": "Admin user ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "List of roles",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/domain.Role"
}
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"403": {
"description": "Forbidden - insufficient permissions",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
}
}
}
},
"/api/v1/admin/admin-users/{id}/roles/{roleId}": {
"post": {
"security": [
{
"AdminAuth": []
}
],
"description": "Assigns a role to an admin user",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Assign role to admin user",
"parameters": [
{
"type": "string",
"description": "Bearer \u003ctoken\u003e",
"name": "Authorization",
"in": "header",
"required": true
},
{
"type": "string",
"description": "Admin user ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Role ID",
"name": "roleId",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Role assigned successfully",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"403": {
"description": "Forbidden - insufficient permissions",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
}
}
},
"delete": {
"security": [
{
"AdminAuth": []
}
],
"description": "Removes a role from an admin user",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Remove role from admin user",
"parameters": [
{
"type": "string",
"description": "Bearer \u003ctoken\u003e",
"name": "Authorization",
"in": "header",
"required": true
},
{
"type": "string",
"description": "Admin user ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Role ID",
"name": "roleId",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Role removed successfully",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"403": {
"description": "Forbidden - insufficient permissions",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
}
}
}
},
"/api/v1/admin/auth/login": {
"post": {
"description": "Authenticates admin user with username and password, returns JWT tokens and user permissions",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin-auth"
],
"summary": "Admin login",
"parameters": [
{
"description": "Admin login payload",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/domain.AdminLoginRequest"
}
}
],
"responses": {
"200": {
"description": "Login successful with tokens and permissions",
"schema": {
"$ref": "#/definitions/domain.AdminLoginResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
}
}
}
},
"/api/v1/admin/files": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Get a paginated list of files with optional filtering",
"produces": [
"application/json"
],
"tags": [
"files"
],
"summary": "List files",
"parameters": [
{
"type": "integer",
"description": "Number of files to return (default: 10)",
"name": "limit",
"in": "query"
},
{
"type": "integer",
"description": "Number of files to skip (default: 0)",
"name": "offset",
"in": "query"
},
{
"type": "string",
"description": "Filter by file type (image/video)",
"name": "type",
"in": "query"
},
{
"type": "string",
"description": "Search text in file names",
"name": "search",
"in": "query"
},
{
"type": "integer",
"description": "Minimum file size in bytes",
"name": "min_size",
"in": "query"
},
{
"type": "integer",
"description": "Maximum file size in bytes",
"name": "max_size",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/domain.GetFilesResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_file_delivery_http.ErrorResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_file_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_file_delivery_http.ErrorResponse"
}
}
}
},
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Upload an image or video file with admin authentication",
"consumes": [
"multipart/form-data"
],
"produces": [
"application/json"
],
"tags": [
"files"
],
"summary": "Upload a new file",
"parameters": [
{
"type": "file",
"description": "File to upload",
"name": "file",
"in": "formData",
"required": true
},
{
"type": "string",
"description": "Display name for the file",
"name": "name",
"in": "formData"
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/domain.UploadFileResponse"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_file_delivery_http.ErrorResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_file_delivery_http.ErrorResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_file_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_file_delivery_http.ErrorResponse"
}
}
}
}
},
"/api/v1/admin/files/{id}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Get file information by ID",
"produces": [
"application/json"
],
"tags": [
"files"
],
"summary": "Get file by ID",
"parameters": [
{
"type": "string",
"description": "File ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/domain.FileInfo"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_file_delivery_http.ErrorResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_file_delivery_http.ErrorResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_file_delivery_http.ErrorResponse"
}
},
"404": {
"description": "File not found",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_file_delivery_http.ErrorResponse"
}
}
}
},
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "Update file information",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"files"
],
"summary": "Update file",
"parameters": [
{
"type": "string",
"description": "File ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Update file request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/domain.UpdateFileRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/domain.UpdateFileResponse"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_file_delivery_http.ErrorResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_file_delivery_http.ErrorResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_file_delivery_http.ErrorResponse"
}
},
"404": {
"description": "File not found",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_file_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_file_delivery_http.ErrorResponse"
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "Delete a file by ID",
"produces": [
"application/json"
],
"tags": [
"files"
],
"summary": "Delete file",
"parameters": [
{
"type": "string",
"description": "File ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/domain.DeleteFileResponse"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_file_delivery_http.ErrorResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_file_delivery_http.ErrorResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_file_delivery_http.ErrorResponse"
}
},
"404": {
"description": "File not found",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_file_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_file_delivery_http.ErrorResponse"
}
}
}
}
},
"/api/v1/admin/permissions": {
"get": {
"security": [
{
"AdminAuth": []
}
],
"description": "Retrieves all permissions from the system",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Get all permissions",
"parameters": [
{
"type": "string",
"description": "Bearer \u003ctoken\u003e",
"name": "Authorization",
"in": "header",
"required": true
}
],
"responses": {
"200": {
"description": "List of permissions",
"schema": {
"$ref": "#/definitions/domain.GetAllPermissionsResponse"
}
},
"403": {
"description": "Forbidden - insufficient permissions",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
}
}
},
"post": {
"security": [
{
"AdminAuth": []
}
],
"description": "Creates a new permission in the system",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Create permission",
"parameters": [
{
"type": "string",
"description": "Bearer \u003ctoken\u003e",
"name": "Authorization",
"in": "header",
"required": true
},
{
"description": "Permission information",
"name": "permission",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/domain.CreatePermissionRequest"
}
}
],
"responses": {
"201": {
"description": "Permission created successfully",
"schema": {
"$ref": "#/definitions/domain.CreatePermissionResponse"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"401": {
"description": "Unauthorized - invalid or missing JWT token",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"403": {
"description": "Forbidden - insufficient permissions",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
}
}
}
},
"/api/v1/admin/permissions/{id}": {
"get": {
"security": [
{
"AdminAuth": []
}
],
"description": "Retrieves a specific permission by its ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Get permission by ID",
"parameters": [
{
"type": "string",
"description": "Bearer \u003ctoken\u003e",
"name": "Authorization",
"in": "header",
"required": true
},
{
"type": "string",
"description": "Permission ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Permission found",
"schema": {
"$ref": "#/definitions/domain.GetPermissionByIDResponse"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"403": {
"description": "Forbidden - insufficient permissions",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"404": {
"description": "Permission not found",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
}
}
},
"put": {
"security": [
{
"AdminAuth": []
}
],
"description": "Updates an existing permission",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Update permission",
"parameters": [
{
"type": "string",
"description": "Bearer \u003ctoken\u003e",
"name": "Authorization",
"in": "header",
"required": true
},
{
"type": "string",
"description": "Permission ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Updated permission information",
"name": "permission",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/domain.UpdatePermissionRequest"
}
}
],
"responses": {
"200": {
"description": "Permission updated successfully",
"schema": {
"$ref": "#/definitions/domain.UpdatePermissionResponse"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"403": {
"description": "Forbidden - insufficient permissions",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"404": {
"description": "Permission not found",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
}
}
},
"delete": {
"security": [
{
"AdminAuth": []
}
],
"description": "Deletes a permission from the system",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Delete permission",
"parameters": [
{
"type": "string",
"description": "Bearer \u003ctoken\u003e",
"name": "Authorization",
"in": "header",
"required": true
},
{
"type": "string",
"description": "Permission ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Permission deleted successfully",
"schema": {
"$ref": "#/definitions/domain.DeletePermissionResponse"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"403": {
"description": "Forbidden - insufficient permissions",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
}
}
}
},
"/api/v1/admin/roles": {
"get": {
"security": [
{
"AdminAuth": []
}
],
"description": "Retrieves all roles from the system",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Get all roles",
"parameters": [
{
"type": "string",
"description": "Bearer \u003ctoken\u003e",
"name": "Authorization",
"in": "header",
"required": true
}
],
"responses": {
"200": {
"description": "List of roles",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/domain.Role"
}
}
},
"401": {
"description": "Unauthorized - invalid or missing JWT token",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"403": {
"description": "Forbidden - insufficient permissions",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
}
}
},
"post": {
"security": [
{
"AdminAuth": []
}
],
"description": "Creates a new role in the system",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Create role",
"parameters": [
{
"type": "string",
"description": "Bearer \u003ctoken\u003e",
"name": "Authorization",
"in": "header",
"required": true
},
{
"description": "Role information",
"name": "role",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/domain.CreateRoleRequest"
}
}
],
"responses": {
"201": {
"description": "Role created successfully",
"schema": {
"$ref": "#/definitions/domain.Role"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"401": {
"description": "Unauthorized - invalid or missing JWT token",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"403": {
"description": "Forbidden - insufficient permissions",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
}
}
}
},
"/api/v1/admin/roles/{id}": {
"get": {
"security": [
{
"AdminAuth": []
}
],
"description": "Retrieves a specific role by its ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Get role by ID",
"parameters": [
{
"type": "string",
"description": "Bearer \u003ctoken\u003e",
"name": "Authorization",
"in": "header",
"required": true
},
{
"type": "string",
"description": "Role ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Role found",
"schema": {
"$ref": "#/definitions/domain.Role"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"403": {
"description": "Forbidden - insufficient permissions",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"404": {
"description": "Role not found",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
}
}
},
"put": {
"security": [
{
"AdminAuth": []
}
],
"description": "Updates an existing role",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Update role",
"parameters": [
{
"type": "string",
"description": "Bearer \u003ctoken\u003e",
"name": "Authorization",
"in": "header",
"required": true
},
{
"type": "string",
"description": "Role ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Updated role information",
"name": "role",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/domain.UpdateRoleRequest"
}
}
],
"responses": {
"200": {
"description": "Role updated successfully",
"schema": {
"$ref": "#/definitions/domain.Role"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"403": {
"description": "Forbidden - insufficient permissions",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"404": {
"description": "Role not found",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
}
}
},
"delete": {
"security": [
{
"AdminAuth": []
}
],
"description": "Deletes a role from the system",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Delete role",
"parameters": [
{
"type": "string",
"description": "Bearer \u003ctoken\u003e",
"name": "Authorization",
"in": "header",
"required": true
},
{
"type": "string",
"description": "Role ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Role deleted successfully",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"403": {
"description": "Forbidden - insufficient permissions",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
}
}
}
},
"/api/v1/admin/roles/{id}/permissions": {
"get": {
"security": [
{
"AdminAuth": []
}
],
"description": "Retrieves all permissions assigned to a role",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Get role permissions",
"parameters": [
{
"type": "string",
"description": "Bearer \u003ctoken\u003e",
"name": "Authorization",
"in": "header",
"required": true
},
{
"type": "string",
"description": "Role ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "List of permissions",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/domain.Permission"
}
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"403": {
"description": "Forbidden - insufficient permissions",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
}
}
},
"put": {
"security": [
{
"AdminAuth": []
}
],
"description": "Assigns multiple permissions to a role, overwriting all existing permissions",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Assign permissions to role (bulk)",
"parameters": [
{
"type": "string",
"description": "Bearer \u003ctoken\u003e",
"name": "Authorization",
"in": "header",
"required": true
},
{
"type": "string",
"description": "Role ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Permission IDs to assign",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/domain.AssignPermissionsToRoleRequest"
}
}
],
"responses": {
"200": {
"description": "Permissions assigned successfully",
"schema": {
"$ref": "#/definitions/domain.AssignPermissionsToRoleResponse"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"403": {
"description": "Forbidden - insufficient permissions",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
}
}
}
},
"/api/v1/admin/roles/{id}/permissions/{permissionId}": {
"post": {
"security": [
{
"AdminAuth": []
}
],
"description": "Assigns a permission to a role",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Assign permission to role",
"parameters": [
{
"type": "string",
"description": "Bearer \u003ctoken\u003e",
"name": "Authorization",
"in": "header",
"required": true
},
{
"type": "string",
"description": "Role ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Permission ID",
"name": "permissionId",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Permission assigned successfully",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"403": {
"description": "Forbidden - insufficient permissions",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
}
}
},
"delete": {
"security": [
{
"AdminAuth": []
}
],
"description": "Removes a permission from a role",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Remove permission from role",
"parameters": [
{
"type": "string",
"description": "Bearer \u003ctoken\u003e",
"name": "Authorization",
"in": "header",
"required": true
},
{
"type": "string",
"description": "Role ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Permission ID",
"name": "permissionId",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Permission removed successfully",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"403": {
"description": "Forbidden - insufficient permissions",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse"
}
}
}
}
},
"/api/v1/auth/otp/send": {
"post": {
"description": "Sends an OTP code to the provided phone number for authentication",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"auth"
],
"summary": "Send OTP for user login/register",
"parameters": [
{
"description": "Send OTP payload",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/domain.SendOTPRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/domain.SendOTPResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_user_delivery_http.ErrorResponse"
}
},
"429": {
"description": "Too Many Requests",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_user_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_user_delivery_http.ErrorResponse"
}
}
}
}
},
"/api/v1/files/{serveKey}": {
"get": {
"description": "Download a file by its serve key and stream the actual file content",
"produces": [
"application/octet-stream"
],
"tags": [
"files"
],
"summary": "Download file",
"parameters": [
{
"type": "string",
"description": "File serve key",
"name": "serveKey",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "File content",
"schema": {
"type": "file"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_file_delivery_http.ErrorResponse"
}
},
"404": {
"description": "File not found",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_file_delivery_http.ErrorResponse"
}
}
}
}
},
"/api/v1/images": {
"get": {
"description": "Retrieves a paginated list of all images",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"images"
],
"summary": "Get all images",
"parameters": [
{
"type": "integer",
"description": "Number of images to return (default: 10)",
"name": "limit",
"in": "query"
},
{
"type": "integer",
"description": "Number of images to skip (default: 0)",
"name": "offset",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/domain.GetAllImagesResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
}
}
},
"post": {
"description": "Creates a new image",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"images"
],
"summary": "Create a new image",
"parameters": [
{
"description": "Image creation payload",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/http.CreateImageRequest"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_domain.Image"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
}
}
}
},
"/api/v1/product-options": {
"get": {
"description": "Retrieves a paginated list of all product options",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"product-options"
],
"summary": "Get all product options",
"parameters": [
{
"type": "integer",
"description": "Number of product options to return (default: 10)",
"name": "limit",
"in": "query"
},
{
"type": "integer",
"description": "Number of product options to skip (default: 0)",
"name": "offset",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/domain.GetAllProductOptionsResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
}
}
}
},
"/api/v1/product-options/{id}": {
"get": {
"description": "Retrieves a specific product option by its ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"product-options"
],
"summary": "Get product option by ID",
"parameters": [
{
"type": "integer",
"description": "Product Option ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/domain.GetProductOptionByIDResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
}
}
},
"delete": {
"description": "Deletes a product option by its ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"product-options"
],
"summary": "Delete a product option",
"parameters": [
{
"type": "integer",
"description": "Product Option ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/domain.DeleteProductOptionResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
}
}
}
},
"/api/v1/products": {
"get": {
"description": "Retrieves a paginated list of all products",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"products"
],
"summary": "Get all products",
"parameters": [
{
"type": "integer",
"description": "Number of products to return (default: 10)",
"name": "limit",
"in": "query"
},
{
"type": "integer",
"description": "Number of products to skip (default: 0)",
"name": "offset",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/domain.GetAllProductsResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
}
}
},
"post": {
"description": "Creates a new product with the provided information",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"products"
],
"summary": "Create a new product",
"parameters": [
{
"description": "Product creation payload",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/http.CreateProductRequest"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/domain.CreateProductResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
}
}
}
},
"/api/v1/products/categories": {
"get": {
"description": "Retrieves all product categories",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"categories"
],
"summary": "Get all product categories",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/domain.GetAllCategoriesResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
}
}
},
"post": {
"description": "Creates a new product category",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"categories"
],
"summary": "Create a new product category",
"parameters": [
{
"description": "Category creation payload",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_domain.CreateCategoryRequest"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/domain.CreateCategoryResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
}
}
}
},
"/api/v1/products/categories/{categoryId}": {
"put": {
"description": "Updates an existing product category",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"categories"
],
"summary": "Update product category",
"parameters": [
{
"type": "string",
"description": "Category ID",
"name": "categoryId",
"in": "path",
"required": true
},
{
"description": "Category update payload",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_domain.UpdateCategoryRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/domain.UpdateCategoryResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
}
}
},
"delete": {
"description": "Deletes a product category by its ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"categories"
],
"summary": "Delete product category",
"parameters": [
{
"type": "string",
"description": "Category ID",
"name": "categoryId",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/domain.DeleteCategoryResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
}
}
}
},
"/api/v1/products/category/{categoryId}": {
"get": {
"description": "Retrieves products filtered by category ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"products"
],
"summary": "Get products by category",
"parameters": [
{
"type": "string",
"description": "Category ID",
"name": "categoryId",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "Number of products to return (default: 10)",
"name": "limit",
"in": "query"
},
{
"type": "integer",
"description": "Number of products to skip (default: 0)",
"name": "offset",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/domain.GetProductsByCategoryResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
}
}
}
},
"/api/v1/products/filter": {
"get": {
"description": "Retrieves products with optional filters for type, category, search, and weight range",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"products"
],
"summary": "Get products with filters",
"parameters": [
{
"type": "integer",
"description": "Product type filter",
"name": "type",
"in": "query"
},
{
"type": "string",
"description": "Category ID filter",
"name": "categoryId",
"in": "query"
},
{
"type": "string",
"description": "Text search in name and description",
"name": "search",
"in": "query"
},
{
"type": "number",
"description": "Minimum weight filter",
"name": "minWeight",
"in": "query"
},
{
"type": "number",
"description": "Maximum weight filter",
"name": "maxWeight",
"in": "query"
},
{
"type": "integer",
"description": "Number of products to return (default: 10)",
"name": "limit",
"in": "query"
},
{
"type": "integer",
"description": "Number of products to skip (default: 0)",
"name": "offset",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/domain.GetProductsWithFiltersResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
}
}
}
},
"/api/v1/products/images/{imageId}": {
"put": {
"description": "Updates an existing image",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"images"
],
"summary": "Update image",
"parameters": [
{
"type": "string",
"description": "Image ID",
"name": "imageId",
"in": "path",
"required": true
},
{
"description": "Image update payload",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/http.UpdateImageRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_domain.Image"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
}
}
},
"delete": {
"description": "Deletes an existing image",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"images"
],
"summary": "Delete image",
"parameters": [
{
"type": "string",
"description": "Image ID",
"name": "imageId",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
}
}
}
},
"/api/v1/products/options": {
"post": {
"description": "Creates a new product option with the provided details",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"product-options"
],
"summary": "Create a new product option",
"parameters": [
{
"description": "Product option creation payload",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_domain.CreateProductOptionRequest"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/domain.CreateProductOptionResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
}
}
}
},
"/api/v1/products/options/{id}": {
"put": {
"description": "Updates an existing product option with the provided details",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"product-options"
],
"summary": "Update product option",
"parameters": [
{
"type": "string",
"description": "Product Option ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Product option update payload",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_domain.UpdateProductOptionRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/domain.UpdateProductOptionResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
}
}
}
},
"/api/v1/products/variants/{variantId}": {
"put": {
"description": "Updates an existing product variant",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"variants"
],
"summary": "Update product variant",
"parameters": [
{
"type": "string",
"description": "Variant ID",
"name": "variantId",
"in": "path",
"required": true
},
{
"description": "Variant update payload",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_domain.UpdateProductVariantRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/domain.UpdateProductVariantResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
}
}
},
"delete": {
"description": "Deletes a product variant by its ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"variants"
],
"summary": "Delete product variant",
"parameters": [
{
"type": "string",
"description": "Variant ID",
"name": "variantId",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/domain.DeleteProductVariantResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
}
}
}
},
"/api/v1/products/variants/{variantId}/assign-images": {
"post": {
"description": "Assigns an array of images to a specific product variant",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"images"
],
"summary": "Assign images to variant",
"parameters": [
{
"type": "string",
"description": "Variant ID",
"name": "variantId",
"in": "path",
"required": true
},
{
"description": "Image assignment payload",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/http.AssignImagesToVariantRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/http.AssignImagesToVariantResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
}
}
}
},
"/api/v1/products/{id}": {
"get": {
"description": "Retrieves a specific product by its ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"products"
],
"summary": "Get product by ID",
"parameters": [
{
"type": "string",
"description": "Product ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/domain.GetProductByIDResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
}
}
},
"put": {
"description": "Updates an existing product with the provided information",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"products"
],
"summary": "Update product",
"parameters": [
{
"type": "integer",
"description": "Product ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Product update payload",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/http.UpdateProductRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/domain.UpdateProductResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
}
}
},
"delete": {
"description": "Deletes a product by its ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"products"
],
"summary": "Delete product",
"parameters": [
{
"type": "string",
"description": "Product ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/domain.DeleteProductResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
}
}
}
},
"/api/v1/products/{id}/total-sold": {
"put": {
"description": "Sets the total sold count for a product for promotional purposes",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"products"
],
"summary": "Set product total sold count",
"parameters": [
{
"type": "integer",
"description": "Product ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Total sold update payload",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/http.SetTotalSoldRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/http.SetTotalSoldResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
}
}
}
},
"/api/v1/products/{productID}/recommended": {
"get": {
"description": "Retrieves recommended products based on the categories of the specified product",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"products"
],
"summary": "Get recommended products",
"parameters": [
{
"type": "string",
"description": "Product ID",
"name": "productID",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "Number of recommended products to return (default: 10)",
"name": "limit",
"in": "query"
},
{
"type": "integer",
"description": "Number of recommended products to skip (default: 0)",
"name": "offset",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/domain.GetRecommendedProductsResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
}
}
}
},
"/api/v1/products/{productId}/all-images": {
"get": {
"description": "Retrieves all images for a specific product and its variants",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"images"
],
"summary": "Get product and variants images",
"parameters": [
{
"type": "string",
"description": "Product ID",
"name": "productId",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/domain.GetProductAndVariantsImagesResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
}
}
}
},
"/api/v1/products/{productId}/assign-images": {
"post": {
"description": "Assigns an array of images to a specific product",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"images"
],
"summary": "Assign images to product",
"parameters": [
{
"type": "string",
"description": "Product ID",
"name": "productId",
"in": "path",
"required": true
},
{
"description": "Image assignment payload",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/http.AssignImagesToProductRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/http.AssignImagesToProductResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
}
}
}
},
"/api/v1/products/{productId}/images": {
"get": {
"description": "Retrieves all images for a specific product",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"images"
],
"summary": "Get product images",
"parameters": [
{
"type": "string",
"description": "Product ID",
"name": "productId",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_domain.Image"
}
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
}
}
}
},
"/api/v1/products/{productId}/variants": {
"get": {
"description": "Retrieves all variants for a specific product",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"variants"
],
"summary": "Get product variants",
"parameters": [
{
"type": "string",
"description": "Product ID",
"name": "productId",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/domain.GetProductVariantsByProductIDResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
}
}
},
"post": {
"description": "Creates a new product variant for a specific product",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"variants"
],
"summary": "Create a new product variant",
"parameters": [
{
"type": "string",
"description": "Product ID",
"name": "productId",
"in": "path",
"required": true
},
{
"description": "Variant creation payload",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_domain.CreateProductVariantRequest"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/domain.CreateProductVariantResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse"
}
}
}
}
},
"/api/v1/users/login": {
"post": {
"description": "Authenticates user with OTP or creates new account",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"auth"
],
"summary": "Login or register user",
"parameters": [
{
"description": "Login/Register payload",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/domain.LoginOrRegisterRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/domain.LoginOrRegisterResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_user_delivery_http.ErrorResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_user_delivery_http.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_user_delivery_http.ErrorResponse"
}
}
}
}
}
},
"definitions": {
"domain.AdminLoginRequest": {
"type": "object",
"properties": {
"password": {
"type": "string"
},
"username": {
"type": "string"
}
}
},
"domain.AdminLoginResponse": {
"type": "object",
"properties": {
"admin_user": {
"$ref": "#/definitions/domain.AdminUserInfo"
},
"permissions": {
"type": "array",
"items": {
"$ref": "#/definitions/domain.Permission"
}
},
"tokens": {
"$ref": "#/definitions/domain.TokenPair"
}
}
},
"domain.AdminUserInfo": {
"type": "object",
"properties": {
"created_at": {
"type": "string"
},
"first_name": {
"type": "string"
},
"id": {
"type": "integer"
},
"last_name": {
"type": "string"
},
"permissions": {
"type": "array",
"items": {
"$ref": "#/definitions/domain.Permission"
}
},
"roles": {
"type": "array",
"items": {
"$ref": "#/definitions/domain.Role"
}
},
"status": {
"$ref": "#/definitions/domain.Status"
},
"updated_at": {
"type": "string"
},
"username": {
"type": "string"
}
}
},
"domain.AssignPermissionsToRoleRequest": {
"type": "object",
"properties": {
"permission_ids": {
"type": "array",
"items": {
"type": "integer"
}
},
"role_id": {
"type": "integer"
}
}
},
"domain.AssignPermissionsToRoleResponse": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
}
},
"domain.CreateAdminUserRequest": {
"type": "object",
"properties": {
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"password": {
"type": "string"
},
"permissions": {
"type": "array",
"items": {
"type": "integer"
}
},
"roles": {
"type": "array",
"items": {
"type": "integer"
}
},
"status": {
"type": "string"
},
"username": {
"type": "string"
}
}
},
"domain.CreateCategoryResponse": {
"type": "object",
"properties": {
"category": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_domain.ProductCategory"
}
}
},
"domain.CreatePermissionRequest": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"title": {
"type": "string"
}
}
},
"domain.CreatePermissionResponse": {
"type": "object",
"properties": {
"permission": {
"$ref": "#/definitions/domain.Permission"
}
}
},
"domain.CreateProductOptionResponse": {
"type": "object",
"properties": {
"product_option": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_domain.ProductOption"
}
}
},
"domain.CreateProductResponse": {
"type": "object",
"properties": {
"product": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_domain.Product"
}
}
},
"domain.CreateProductVariantResponse": {
"type": "object",
"properties": {
"variant": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_domain.ProductVariant"
}
}
},
"domain.CreateRoleRequest": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"title": {
"type": "string"
}
}
},
"domain.DeleteCategoryResponse": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
}
},
"domain.DeleteFileResponse": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
}
},
"domain.DeletePermissionResponse": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
}
},
"domain.DeleteProductOptionResponse": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
}
},
"domain.DeleteProductResponse": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
}
},
"domain.DeleteProductVariantResponse": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
}
},
"domain.FileInfo": {
"type": "object",
"properties": {
"created_at": {
"type": "string"
},
"id": {
"type": "integer"
},
"mime_type": {
"type": "string"
},
"name": {
"type": "string"
},
"original_name": {
"type": "string"
},
"serve_key": {
"type": "string"
},
"size": {
"type": "integer"
},
"thumbnail_serve_key": {
"type": "string"
},
"thumbnail_url": {
"type": "string"
},
"type": {
"$ref": "#/definitions/domain.FileType"
},
"updated_at": {
"type": "string"
},
"url": {
"type": "string"
}
}
},
"domain.FileType": {
"type": "string",
"enum": [
"image",
"video"
],
"x-enum-varnames": [
"FileTypeImage",
"FileTypeVideo"
]
},
"domain.GetAllCategoriesResponse": {
"type": "object",
"properties": {
"categories": {
"type": "array",
"items": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_domain.ProductCategory"
}
}
}
},
"domain.GetAllImagesResponse": {
"type": "object",
"properties": {
"images": {
"type": "array",
"items": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_domain.Image"
}
},
"total": {
"type": "integer"
}
}
},
"domain.GetAllPermissionsResponse": {
"type": "object",
"properties": {
"permissions": {
"type": "array",
"items": {
"$ref": "#/definitions/domain.Permission"
}
}
}
},
"domain.GetAllProductOptionsResponse": {
"type": "object",
"properties": {
"product_options": {
"type": "array",
"items": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_domain.ProductOption"
}
},
"total": {
"type": "integer"
}
}
},
"domain.GetAllProductsResponse": {
"type": "object",
"properties": {
"products": {
"type": "array",
"items": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_domain.Product"
}
}
}
},
"domain.GetFilesResponse": {
"type": "object",
"properties": {
"files": {
"type": "array",
"items": {
"$ref": "#/definitions/domain.FileInfo"
}
},
"total": {
"type": "integer"
}
}
},
"domain.GetPermissionByIDResponse": {
"type": "object",
"properties": {
"permission": {
"$ref": "#/definitions/domain.Permission"
}
}
},
"domain.GetProductAndVariantsImagesResponse": {
"type": "object",
"properties": {
"images": {
"type": "array",
"items": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_domain.Image"
}
},
"product_id": {
"type": "integer"
},
"variants": {
"type": "array",
"items": {
"$ref": "#/definitions/domain.ProductVariantWithImages"
}
}
}
},
"domain.GetProductByIDResponse": {
"type": "object",
"properties": {
"product": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_domain.Product"
}
}
},
"domain.GetProductOptionByIDResponse": {
"type": "object",
"properties": {
"product_option": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_domain.ProductOption"
}
}
},
"domain.GetProductVariantsByProductIDResponse": {
"type": "object",
"properties": {
"variants": {
"type": "array",
"items": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_domain.ProductVariant"
}
}
}
},
"domain.GetProductsByCategoryResponse": {
"type": "object",
"properties": {
"products": {
"type": "array",
"items": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_domain.Product"
}
}
}
},
"domain.GetProductsWithFiltersResponse": {
"type": "object",
"properties": {
"products": {
"type": "array",
"items": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_domain.Product"
}
}
}
},
"domain.GetRecommendedProductsResponse": {
"type": "object",
"properties": {
"recommended_products": {
"type": "array",
"items": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_domain.Product"
}
}
}
},
"domain.LoginOrRegisterRequest": {
"type": "object",
"properties": {
"otp_code": {
"type": "string"
},
"phone_number": {
"type": "string"
}
}
},
"domain.LoginOrRegisterResponse": {
"type": "object",
"properties": {
"tokens": {
"$ref": "#/definitions/domain.TokenPair"
},
"user_info": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_user_domain.UserInfo"
}
}
},
"domain.Maintenance": {
"type": "object",
"properties": {
"content": {
"type": "string"
},
"description": {
"type": "string"
},
"image": {
"type": "string"
},
"title": {
"type": "string"
}
}
},
"domain.Option": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"meta_title": {
"type": "string"
},
"title": {
"type": "string"
}
}
},
"domain.Permission": {
"type": "object",
"properties": {
"created_at": {
"type": "string"
},
"description": {
"type": "string"
},
"id": {
"type": "integer"
},
"title": {
"type": "string"
},
"updated_at": {
"type": "string"
}
}
},
"domain.ProductVariantWithImages": {
"type": "object",
"properties": {
"attributes": {
"type": "object",
"additionalProperties": true
},
"color": {
"type": "string"
},
"created_at": {
"type": "string"
},
"fee_percentage": {
"type": "integer"
},
"id": {
"type": "integer"
},
"images": {
"type": "array",
"items": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_domain.Image"
}
},
"product_id": {
"type": "integer"
},
"profit_percentage": {
"type": "integer"
},
"size": {
"type": "string"
},
"updated_at": {
"type": "string"
},
"weight": {
"type": "number"
}
}
},
"domain.Role": {
"type": "object",
"properties": {
"created_at": {
"type": "string"
},
"description": {
"type": "string"
},
"id": {
"type": "integer"
},
"permissions": {
"type": "array",
"items": {
"$ref": "#/definitions/domain.Permission"
}
},
"title": {
"type": "string"
},
"updated_at": {
"type": "string"
}
}
},
"domain.SendOTPRequest": {
"type": "object",
"properties": {
"phone_number": {
"type": "string"
}
}
},
"domain.SendOTPResponse": {
"type": "object",
"properties": {
"remaining_time": {
"$ref": "#/definitions/time.Duration"
}
}
},
"domain.Status": {
"type": "string",
"enum": [
"active",
"deactive"
],
"x-enum-varnames": [
"StatusActive",
"StatusDeactive"
]
},
"domain.TokenPair": {
"type": "object",
"properties": {
"access_token": {
"type": "string"
},
"refresh_token": {
"type": "string"
}
}
},
"domain.UpdateAdminUserRequest": {
"type": "object",
"properties": {
"first_name": {
"type": "string"
},
"id": {
"type": "integer"
},
"last_name": {
"type": "string"
},
"password": {
"type": "string"
},
"permissions": {
"type": "array",
"items": {
"type": "integer"
}
},
"roles": {
"type": "array",
"items": {
"type": "integer"
}
},
"status": {
"type": "string"
},
"username": {
"type": "string"
}
}
},
"domain.UpdateCategoryResponse": {
"type": "object",
"properties": {
"category": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_domain.ProductCategory"
}
}
},
"domain.UpdateFileRequest": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
}
},
"domain.UpdateFileResponse": {
"type": "object",
"properties": {
"file": {
"$ref": "#/definitions/domain.FileInfo"
}
}
},
"domain.UpdatePermissionRequest": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"id": {
"type": "integer"
},
"title": {
"type": "string"
}
}
},
"domain.UpdatePermissionResponse": {
"type": "object",
"properties": {
"permission": {
"$ref": "#/definitions/domain.Permission"
}
}
},
"domain.UpdateProductOptionResponse": {
"type": "object",
"properties": {
"product_option": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_domain.ProductOption"
}
}
},
"domain.UpdateProductResponse": {
"type": "object",
"properties": {
"product": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_domain.Product"
}
}
},
"domain.UpdateProductVariantResponse": {
"type": "object",
"properties": {
"variant": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_domain.ProductVariant"
}
}
},
"domain.UpdateRoleRequest": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"id": {
"type": "integer"
},
"permissions": {
"type": "array",
"items": {
"type": "integer"
}
},
"title": {
"type": "string"
}
}
},
"domain.UploadFileResponse": {
"type": "object",
"properties": {
"file": {
"$ref": "#/definitions/domain.FileInfo"
}
}
},
"gitlab_com_mazane_beehive_mazane_application_admin_delivery_http.ErrorResponse": {
"type": "object",
"properties": {
"error": {
"type": "string"
}
}
},
"gitlab_com_mazane_beehive_mazane_application_file_delivery_http.ErrorResponse": {
"type": "object",
"properties": {
"error": {
"type": "string"
}
}
},
"gitlab_com_mazane_beehive_mazane_application_product_delivery_http.ErrorResponse": {
"type": "object",
"properties": {
"error": {
"type": "string"
}
}
},
"gitlab_com_mazane_beehive_mazane_application_product_domain.CreateCategoryRequest": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
}
},
"gitlab_com_mazane_beehive_mazane_application_product_domain.CreateProductOptionRequest": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"maintenance": {
"$ref": "#/definitions/domain.Maintenance"
},
"options": {
"type": "array",
"items": {
"$ref": "#/definitions/domain.Option"
}
},
"title": {
"type": "string"
}
}
},
"gitlab_com_mazane_beehive_mazane_application_product_domain.CreateProductVariantRequest": {
"type": "object",
"properties": {
"attributes": {
"type": "object",
"additionalProperties": true
},
"enabled": {
"type": "boolean"
},
"fee_percentage": {
"type": "integer"
},
"meta": {
"type": "object",
"additionalProperties": true
},
"product_id": {
"type": "integer"
},
"profit_percentage": {
"type": "integer"
},
"size": {
"type": "string"
},
"stock_limit": {
"type": "integer"
},
"stock_managed": {
"type": "boolean"
},
"stock_number": {
"type": "integer"
},
"weight": {
"type": "number"
}
}
},
"gitlab_com_mazane_beehive_mazane_application_product_domain.Image": {
"type": "object",
"properties": {
"created_at": {
"type": "string"
},
"file_type": {
"type": "string"
},
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"thumbnail_url": {
"type": "string"
},
"updated_at": {
"type": "string"
},
"url": {
"type": "string"
}
}
},
"gitlab_com_mazane_beehive_mazane_application_product_domain.Product": {
"type": "object",
"properties": {
"attributes": {
"type": "object",
"additionalProperties": true
},
"created_at": {
"type": "string"
},
"description": {
"type": "string"
},
"design_style": {
"type": "string"
},
"enabled": {
"type": "boolean"
},
"id": {
"type": "integer"
},
"images": {
"type": "array",
"items": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_domain.Image"
}
},
"name": {
"type": "string"
},
"product_categories": {
"type": "array",
"items": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_domain.ProductCategory"
}
},
"product_option": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_domain.ProductOption"
},
"product_option_id": {
"type": "integer"
},
"product_variants": {
"type": "array",
"items": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_domain.ProductVariant"
}
},
"total_sold": {
"type": "integer"
},
"type": {
"type": "integer"
},
"updated_at": {
"type": "string"
},
"weights": {
"type": "array",
"items": {
"type": "number"
}
}
}
},
"gitlab_com_mazane_beehive_mazane_application_product_domain.ProductCategory": {
"type": "object",
"properties": {
"created_at": {
"type": "string"
},
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"updated_at": {
"type": "string"
}
}
},
"gitlab_com_mazane_beehive_mazane_application_product_domain.ProductOption": {
"type": "object",
"properties": {
"created_at": {
"type": "string"
},
"description": {
"type": "string"
},
"id": {
"type": "integer"
},
"maintenance": {
"$ref": "#/definitions/domain.Maintenance"
},
"options": {
"type": "array",
"items": {
"$ref": "#/definitions/domain.Option"
}
},
"title": {
"type": "string"
},
"updated_at": {
"type": "string"
}
}
},
"gitlab_com_mazane_beehive_mazane_application_product_domain.ProductVariant": {
"type": "object",
"properties": {
"attributes": {
"type": "object",
"additionalProperties": true
},
"color": {
"type": "string"
},
"created_at": {
"type": "string"
},
"enabled": {
"type": "boolean"
},
"fee_amount": {
"type": "number"
},
"fee_percentage": {
"type": "integer"
},
"id": {
"type": "integer"
},
"images": {
"type": "array",
"items": {
"$ref": "#/definitions/gitlab_com_mazane_beehive_mazane_application_product_domain.Image"
}
},
"meta": {
"type": "object",
"additionalProperties": true
},
"price_amount": {
"description": "Pricing fields (calculated in response)",
"type": "number"
},
"product_id": {
"type": "integer"
},
"profit_amount": {
"type": "number"
},
"profit_percentage": {
"type": "integer"
},
"size": {
"type": "string"
},
"stock_limit": {
"type": "integer"
},
"stock_managed": {
"type": "boolean"
},
"stock_number": {
"type": "integer"
},
"tax_amount": {
"type": "number"
},
"tax_percentage": {
"type": "number"
},
"updated_at": {
"type": "string"
},
"weight": {
"type": "number"
}
}
},
"gitlab_com_mazane_beehive_mazane_application_product_domain.UpdateCategoryRequest": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
}
}
},
"gitlab_com_mazane_beehive_mazane_application_product_domain.UpdateProductOptionRequest": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"id": {
"type": "integer"
},
"maintenance": {
"$ref": "#/definitions/domain.Maintenance"
},
"options": {
"type": "array",
"items": {
"$ref": "#/definitions/domain.Option"
}
},
"title": {
"type": "string"
}
}
},
"gitlab_com_mazane_beehive_mazane_application_product_domain.UpdateProductVariantRequest": {
"type": "object",
"properties": {
"attributes": {
"type": "object",
"additionalProperties": true
},
"enabled": {
"type": "boolean"
},
"fee_percentage": {
"type": "integer"
},
"id": {
"type": "integer"
},
"meta": {
"type": "object",
"additionalProperties": true
},
"profit_percentage": {
"type": "integer"
},
"size": {
"type": "string"
},
"stock_limit": {
"type": "integer"
},
"stock_managed": {
"type": "boolean"
},
"stock_number": {
"type": "integer"
},
"weight": {
"type": "number"
}
}
},
"gitlab_com_mazane_beehive_mazane_application_user_delivery_http.ErrorResponse": {
"type": "object",
"properties": {
"error": {
"type": "string"
}
}
},
"gitlab_com_mazane_beehive_mazane_application_user_domain.UserInfo": {
"type": "object",
"properties": {
"avatar": {
"type": "string"
},
"email": {
"type": "string"
},
"first_name": {
"type": "string"
},
"id": {
"type": "integer"
},
"last_name": {
"type": "string"
},
"national_code": {
"type": "string"
},
"phone_number": {
"type": "string"
},
"verified": {
"type": "boolean"
}
}
},
"http.AssignImagesToProductRequest": {
"type": "object",
"properties": {
"image_ids": {
"type": "array",
"items": {
"type": "integer"
}
}
}
},
"http.AssignImagesToProductResponse": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
}
},
"http.AssignImagesToVariantRequest": {
"type": "object",
"properties": {
"image_ids": {
"type": "array",
"items": {
"type": "integer"
}
}
}
},
"http.AssignImagesToVariantResponse": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
}
},
"http.CreateImageRequest": {
"type": "object",
"properties": {
"file_type": {
"type": "string"
},
"name": {
"type": "string"
},
"thumbnail_url": {
"type": "string"
},
"url": {
"type": "string"
}
}
},
"http.CreateProductRequest": {
"type": "object",
"properties": {
"attributes": {
"type": "object",
"additionalProperties": true
},
"category_ids": {
"type": "array",
"items": {
"type": "integer"
}
},
"description": {
"type": "string"
},
"design_style": {
"type": "string"
},
"enabled": {
"type": "boolean"
},
"name": {
"type": "string"
},
"product_option_id": {
"type": "integer"
},
"total_sold": {
"type": "integer"
},
"type": {
"type": "integer"
},
"variants": {
"type": "array",
"items": {
"$ref": "#/definitions/http.CreateVariantRequest"
}
}
}
},
"http.CreateVariantRequest": {
"type": "object",
"properties": {
"attributes": {
"type": "object",
"additionalProperties": true
},
"enabled": {
"type": "boolean"
},
"fee_percentage": {
"type": "integer"
},
"meta": {
"type": "object",
"additionalProperties": true
},
"profit_percentage": {
"type": "integer"
},
"stock_limit": {
"type": "integer"
},
"stock_managed": {
"type": "boolean"
},
"stock_number": {
"type": "integer"
},
"weight": {
"type": "number"
}
}
},
"http.SetTotalSoldRequest": {
"type": "object",
"properties": {
"total_sold": {
"type": "integer"
}
}
},
"http.SetTotalSoldResponse": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
}
},
"http.UpdateImageRequest": {
"type": "object",
"properties": {
"file_type": {
"type": "string"
},
"name": {
"type": "string"
},
"thumbnail_url": {
"type": "string"
},
"url": {
"type": "string"
}
}
},
"http.UpdateProductRequest": {
"type": "object",
"properties": {
"attributes": {
"type": "object",
"additionalProperties": true
},
"category_ids": {
"type": "array",
"items": {
"type": "integer"
}
},
"description": {
"type": "string"
},
"design_style": {
"type": "string"
},
"enabled": {
"type": "boolean"
},
"name": {
"type": "string"
},
"product_option_id": {
"type": "integer"
},
"total_sold": {
"type": "integer"
},
"type": {
"type": "integer"
},
"variants": {
"type": "array",
"items": {
"$ref": "#/definitions/http.UpdateVariantRequest"
}
}
}
},
"http.UpdateVariantRequest": {
"type": "object",
"properties": {
"attributes": {
"type": "object",
"additionalProperties": true
},
"enabled": {
"type": "boolean"
},
"fee_percentage": {
"type": "integer"
},
"id": {
"type": "integer"
},
"meta": {
"type": "object",
"additionalProperties": true
},
"profit_percentage": {
"type": "integer"
},
"stock_limit": {
"type": "integer"
},
"stock_managed": {
"type": "boolean"
},
"stock_number": {
"type": "integer"
},
"weight": {
"type": "number"
}
}
},
"time.Duration": {
"type": "integer",
"enum": [
-9223372036854775808,
9223372036854775807,
1,
1000,
1000000,
1000000000,
60000000000,
3600000000000
],
"x-enum-varnames": [
"minDuration",
"maxDuration",
"Nanosecond",
"Microsecond",
"Millisecond",
"Second",
"Minute",
"Hour"
]
}
},
"securityDefinitions": {
"AdminAuth": {
"description": "Type \"Bearer\" followed by a space and JWT token for admin access.",
"type": "apiKey",
"name": "Authorization",
"in": "header"
},
"BearerAuth": {
"description": "Type \"Bearer\" followed by a space and JWT token.",
"type": "apiKey",
"name": "Authorization",
"in": "header"
}
}
}