3533 lines
129 KiB
JSON
3533 lines
129 KiB
JSON
{
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"contact": {}
|
|
},
|
|
"paths": {
|
|
"/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/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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/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/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",
|
|
"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",
|
|
"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/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 existing admin user",
|
|
"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",
|
|
"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/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/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/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/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/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 details",
|
|
"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/domain.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/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/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/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 image by its ID",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"images"
|
|
],
|
|
"summary": "Delete image",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Image ID",
|
|
"name": "imageId",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": "No Content"
|
|
},
|
|
"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/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/{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 new details",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"products"
|
|
],
|
|
"summary": "Update product",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Product ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Product update payload",
|
|
"name": "request",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.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/{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/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"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"description": "Creates a new image for a specific product",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"images"
|
|
],
|
|
"summary": "Create a new product image",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Product ID",
|
|
"name": "productId",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Image creation payload",
|
|
"name": "request",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/http.CreateImageRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Created",
|
|
"schema": {
|
|
"$ref": "#/definitions/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/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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/users/otp/send": {
|
|
"post": {
|
|
"description": "Generates and sends an OTP code to the specified phone number",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"auth"
|
|
],
|
|
"summary": "Send OTP to phone number",
|
|
"parameters": [
|
|
{
|
|
"description": "Phone number",
|
|
"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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"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.CreateAdminUserRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"first_name": {
|
|
"type": "string"
|
|
},
|
|
"last_name": {
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"username": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.CreateCategoryRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.CreateCategoryResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"category": {
|
|
"$ref": "#/definitions/domain.ProductCategory"
|
|
}
|
|
}
|
|
},
|
|
"domain.CreatePermissionRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.CreatePermissionResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"permission": {
|
|
"$ref": "#/definitions/domain.Permission"
|
|
}
|
|
}
|
|
},
|
|
"domain.CreateProductRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"attributes": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
},
|
|
"category_ids": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"domain.CreateProductResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"product": {
|
|
"$ref": "#/definitions/domain.Product"
|
|
}
|
|
}
|
|
},
|
|
"domain.CreateProductVariantRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"attributes": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
},
|
|
"fee_percentage": {
|
|
"type": "integer"
|
|
},
|
|
"product_id": {
|
|
"type": "integer"
|
|
},
|
|
"profit_percentage": {
|
|
"type": "integer"
|
|
},
|
|
"weight": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
},
|
|
"domain.CreateProductVariantResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"variant": {
|
|
"$ref": "#/definitions/domain.ProductVariant"
|
|
}
|
|
}
|
|
},
|
|
"domain.CreateRoleRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.DeleteCategoryResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"message": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.DeletePermissionResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"message": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.DeleteProductResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"message": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.DeleteProductVariantResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"message": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.GetAllCategoriesResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"categories": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.ProductCategory"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"domain.GetAllPermissionsResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"permissions": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.Permission"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"domain.GetAllProductsResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"products": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.Product"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"domain.GetPermissionByIDResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"permission": {
|
|
"$ref": "#/definitions/domain.Permission"
|
|
}
|
|
}
|
|
},
|
|
"domain.GetProductByIDResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"product": {
|
|
"$ref": "#/definitions/domain.Product"
|
|
}
|
|
}
|
|
},
|
|
"domain.GetProductVariantsByProductIDResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"variants": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.ProductVariant"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"domain.GetProductsByCategoryResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"products": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.Product"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"domain.GetProductsWithFiltersResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"products": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.Product"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"domain.Image": {
|
|
"type": "object",
|
|
"properties": {
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
},
|
|
"url": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"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/domain.UserInfo"
|
|
}
|
|
}
|
|
},
|
|
"domain.Permission": {
|
|
"type": "object",
|
|
"properties": {
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.Product": {
|
|
"type": "object",
|
|
"properties": {
|
|
"attributes": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"images": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.Image"
|
|
}
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"product_categories": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.ProductCategory"
|
|
}
|
|
},
|
|
"product_variants": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.ProductVariant"
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "integer"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.ProductCategory": {
|
|
"type": "object",
|
|
"properties": {
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.ProductVariant": {
|
|
"type": "object",
|
|
"properties": {
|
|
"attributes": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"fee_percentage": {
|
|
"type": "integer"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"images": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.Image"
|
|
}
|
|
},
|
|
"product_id": {
|
|
"type": "integer"
|
|
},
|
|
"profit_percentage": {
|
|
"type": "integer"
|
|
},
|
|
"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"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"username": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.UpdateCategoryRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.UpdateCategoryResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"category": {
|
|
"$ref": "#/definitions/domain.ProductCategory"
|
|
}
|
|
}
|
|
},
|
|
"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.UpdateProductRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"attributes": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
},
|
|
"category_ids": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"domain.UpdateProductResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"product": {
|
|
"$ref": "#/definitions/domain.Product"
|
|
}
|
|
}
|
|
},
|
|
"domain.UpdateProductVariantRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"attributes": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
},
|
|
"fee_percentage": {
|
|
"type": "integer"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"profit_percentage": {
|
|
"type": "integer"
|
|
},
|
|
"weight": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
},
|
|
"domain.UpdateProductVariantResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"variant": {
|
|
"$ref": "#/definitions/domain.ProductVariant"
|
|
}
|
|
}
|
|
},
|
|
"domain.UpdateRoleRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"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"
|
|
}
|
|
}
|
|
},
|
|
"gitlab_com_mazane_beehive_mazane_application_admin_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_user_delivery_http.ErrorResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"error": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"http.CreateImageRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"url": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"http.UpdateImageRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"url": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"time.Duration": {
|
|
"type": "integer",
|
|
"enum": [
|
|
-9223372036854775808,
|
|
9223372036854775807,
|
|
1,
|
|
1000,
|
|
1000000,
|
|
1000000000,
|
|
60000000000,
|
|
3600000000000
|
|
],
|
|
"x-enum-varnames": [
|
|
"minDuration",
|
|
"maxDuration",
|
|
"Nanosecond",
|
|
"Microsecond",
|
|
"Millisecond",
|
|
"Second",
|
|
"Minute",
|
|
"Hour"
|
|
]
|
|
}
|
|
}
|
|
} |