409 lines
10 KiB
JSON
409 lines
10 KiB
JSON
{
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"schemes": [
|
|
"https"
|
|
],
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"title": "JNX Admin-Dashboard API Documentation.",
|
|
"version": "1.0.0"
|
|
},
|
|
"host": "jannex",
|
|
"basePath": "/v1",
|
|
"paths": {
|
|
"/equipment/documentation/create": {
|
|
"post": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"equipment"
|
|
],
|
|
"summary": "Create a new equipment documentation",
|
|
"operationId": "equipmentCreateEquipmentDocumentation",
|
|
"parameters": [
|
|
{
|
|
"description": "You can create a new api key in your user profile",
|
|
"name": "X-Api-Key",
|
|
"in": "header"
|
|
},
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#/definitions/ApiCreateEquipmentDocumentationRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "New equipment documentation created successfully"
|
|
},
|
|
"400": {
|
|
"description": "Invalid request body"
|
|
},
|
|
"401": {
|
|
"description": "No permissions"
|
|
},
|
|
"500": {
|
|
"description": "Failed to create equipment documentation"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/equipment/documentation/edit": {
|
|
"post": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"equipment"
|
|
],
|
|
"summary": "Edit equipment documentation",
|
|
"operationId": "equipmentEditEquipmentDocumentation",
|
|
"parameters": [
|
|
{
|
|
"description": "You can create a new api key in your user profile",
|
|
"name": "X-Api-Key",
|
|
"in": "header"
|
|
},
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#/definitions/ApiEditEquipmentDocumentationRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Equipment documentation edited successfully"
|
|
},
|
|
"400": {
|
|
"description": "Invalid request body"
|
|
},
|
|
"401": {
|
|
"description": "No permissions"
|
|
},
|
|
"500": {
|
|
"description": "Failed to edit equipment documentation"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/equipment/documentation/{stockItemId}/{documentationId}": {
|
|
"get": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"equipment"
|
|
],
|
|
"summary": "Get equipment documentation",
|
|
"operationId": "equipmentGetEquipmentDocumentation",
|
|
"parameters": [
|
|
{
|
|
"description": "You can create a new api key in your user profile",
|
|
"name": "X-Api-Key",
|
|
"in": "header"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Stock item id",
|
|
"name": "stockItemId",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Documentation id",
|
|
"name": "documentationId",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Equipment documentation",
|
|
"schema": {
|
|
"$ref": "#/definitions/EquipmentDocumentation"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid request body"
|
|
},
|
|
"401": {
|
|
"description": "No permissions"
|
|
},
|
|
"500": {
|
|
"description": "Failed to get equipment documentation"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/equipment/documentations/{stockItemId}": {
|
|
"get": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"equipment"
|
|
],
|
|
"summary": "Get equipment documentations",
|
|
"operationId": "equipmentGetEquipmentDocumentations",
|
|
"parameters": [
|
|
{
|
|
"description": "You can create a new api key in your user profile",
|
|
"name": "X-Api-Key",
|
|
"in": "header"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Stock item id",
|
|
"name": "stockItemId",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Equipment documentations. Status 200 if equipment documentations found, status 404 if stock item not found on invex, status 401 if backend has no permissions to access invex",
|
|
"schema": {
|
|
"$ref": "#/definitions/ApiEquipmentDocumentationResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid request body"
|
|
},
|
|
"401": {
|
|
"description": "No permissions"
|
|
},
|
|
"500": {
|
|
"description": "Failed to get equipment documentations"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/equipment/thumbnail/{stockItemId}": {
|
|
"get": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"equipment"
|
|
],
|
|
"summary": "Get equipment thumbnail",
|
|
"operationId": "equipmentGetEquipmentThumbnail",
|
|
"parameters": [
|
|
{
|
|
"description": "You can create a new api key in your user profile",
|
|
"name": "X-Api-Key",
|
|
"in": "header"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Stock item id",
|
|
"name": "stockItemId",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Equipment thumbnail picture. Backend server is just proxying the request to invex server and returning the response"
|
|
},
|
|
"400": {
|
|
"description": "Invalid request body"
|
|
},
|
|
"401": {
|
|
"description": "No permissions"
|
|
},
|
|
"500": {
|
|
"description": "Failed to get equipment thumbnail"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/grouptasks/start": {
|
|
"post": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"grouptask"
|
|
],
|
|
"summary": "Start a new group task",
|
|
"operationId": "grouptaskStartGroupTask",
|
|
"parameters": [
|
|
{
|
|
"description": "You can create a new api key in your user profile",
|
|
"name": "X-Api-Key",
|
|
"in": "header"
|
|
},
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#/definitions/ApiGroupTaskRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "New group task started successfully"
|
|
},
|
|
"400": {
|
|
"description": "Invalid request body"
|
|
},
|
|
"401": {
|
|
"description": "No permissions"
|
|
},
|
|
"422": {
|
|
"description": "Global inputs are not complete or no group tasks in this category"
|
|
},
|
|
"500": {
|
|
"description": "Failed to start group task"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"ApiCreateEquipmentDocumentationRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"notes": {
|
|
"type": "object",
|
|
"x-go-name": "Notes"
|
|
},
|
|
"stockItemId": {
|
|
"type": "string",
|
|
"x-go-name": "StockItemId"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"x-go-name": "Title"
|
|
},
|
|
"type": {
|
|
"type": "integer",
|
|
"format": "uint8",
|
|
"x-go-name": "Type"
|
|
}
|
|
},
|
|
"x-go-package": "jannex/admin-dashboard-backend/modules/structs"
|
|
},
|
|
"ApiEditEquipmentDocumentationRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"documentationId": {
|
|
"type": "string",
|
|
"x-go-name": "DocumentationId"
|
|
},
|
|
"notes": {
|
|
"type": "object",
|
|
"x-go-name": "Notes"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"x-go-name": "Title"
|
|
},
|
|
"type": {
|
|
"type": "integer",
|
|
"format": "uint8",
|
|
"x-go-name": "Type"
|
|
}
|
|
},
|
|
"x-go-package": "jannex/admin-dashboard-backend/modules/structs"
|
|
},
|
|
"ApiEquipmentDocumentationResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"Documentations": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/EquipmentDocumentation"
|
|
}
|
|
},
|
|
"Status": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
}
|
|
},
|
|
"x-go-package": "jannex/admin-dashboard-backend/modules/structs"
|
|
},
|
|
"ApiGroupTaskRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"Category": {
|
|
"type": "string"
|
|
},
|
|
"Description": {
|
|
"type": "string"
|
|
},
|
|
"GlobalInputs": {
|
|
"type": "object"
|
|
},
|
|
"GroupId": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"x-go-package": "jannex/admin-dashboard-backend/modules/structs"
|
|
},
|
|
"EquipmentDocumentation": {
|
|
"type": "object",
|
|
"properties": {
|
|
"CreatedAt": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"CreatedByUserId": {
|
|
"type": "string"
|
|
},
|
|
"Id": {
|
|
"type": "string"
|
|
},
|
|
"Notes": {
|
|
"type": "string"
|
|
},
|
|
"StockItemId": {
|
|
"type": "string"
|
|
},
|
|
"Title": {
|
|
"type": "string"
|
|
},
|
|
"Type": {
|
|
"type": "integer",
|
|
"format": "uint8"
|
|
},
|
|
"UpdatedAt": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
}
|
|
},
|
|
"x-go-package": "jannex/admin-dashboard-backend/modules/structs"
|
|
}
|
|
}
|
|
} |