mirror of
https://github.com/hay-kot/homebox.git
synced 2024-11-25 10:05:43 +00:00
c708b1759e
* fix template rendering * tidy * fix missing currencies and profile errors * endpoint for fullpath of an item * endpoint test * fix assertions
3017 lines
89 KiB
Go
3017 lines
89 KiB
Go
// Package docs Code generated by swaggo/swag. DO NOT EDIT
|
|
package docs
|
|
|
|
import "github.com/swaggo/swag"
|
|
|
|
const docTemplate = `{
|
|
"schemes": {{ marshal .Schemes }},
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"description": "{{escape .Description}}",
|
|
"title": "{{.Title}}",
|
|
"contact": {
|
|
"name": "Don't"
|
|
},
|
|
"version": "{{.Version}}"
|
|
},
|
|
"host": "{{.Host}}",
|
|
"basePath": "{{.BasePath}}",
|
|
"paths": {
|
|
"/v1/actions/ensure-asset-ids": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "Ensures all items in the database have an asset ID",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Actions"
|
|
],
|
|
"summary": "Ensure Asset IDs",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/v1.ActionAmountResult"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/actions/ensure-import-refs": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "Ensures all items in the database have an import ref",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Actions"
|
|
],
|
|
"summary": "Ensures Import Refs",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/v1.ActionAmountResult"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/actions/set-primary-photos": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "Sets the first photo of each item as the primary photo",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Actions"
|
|
],
|
|
"summary": "Set Primary Photos",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/v1.ActionAmountResult"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/actions/zero-item-time-fields": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "Resets all item date fields to the beginning of the day",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Actions"
|
|
],
|
|
"summary": "Zero Out Time Fields",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/v1.ActionAmountResult"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/assets/{id}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Items"
|
|
],
|
|
"summary": "Get Item by Asset ID",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Asset ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/repo.PaginationResult-repo_ItemSummary"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/currency": {
|
|
"get": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Base"
|
|
],
|
|
"summary": "Currency",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/currencies.Currency"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/groups": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Group"
|
|
],
|
|
"summary": "Get Group",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/repo.Group"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Group"
|
|
],
|
|
"summary": "Update Group",
|
|
"parameters": [
|
|
{
|
|
"description": "User Data",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/repo.GroupUpdate"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/repo.Group"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/groups/invitations": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Group"
|
|
],
|
|
"summary": "Create Group Invitation",
|
|
"parameters": [
|
|
{
|
|
"description": "User Data",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/v1.GroupInvitationCreate"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/v1.GroupInvitation"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/groups/statistics": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Statistics"
|
|
],
|
|
"summary": "Get Group Statistics",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/repo.GroupStatistics"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/groups/statistics/labels": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Statistics"
|
|
],
|
|
"summary": "Get Label Statistics",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/repo.TotalsByOrganizer"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/groups/statistics/locations": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Statistics"
|
|
],
|
|
"summary": "Get Location Statistics",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/repo.TotalsByOrganizer"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/groups/statistics/purchase-price": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Statistics"
|
|
],
|
|
"summary": "Get Purchase Price Statistics",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "start date",
|
|
"name": "start",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "end date",
|
|
"name": "end",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/repo.ValueOverTime"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/items": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Items"
|
|
],
|
|
"summary": "Query All Items",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "search string",
|
|
"name": "q",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "page number",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "items per page",
|
|
"name": "pageSize",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"collectionFormat": "multi",
|
|
"description": "label Ids",
|
|
"name": "labels",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"collectionFormat": "multi",
|
|
"description": "location Ids",
|
|
"name": "locations",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"collectionFormat": "multi",
|
|
"description": "parent Ids",
|
|
"name": "parentIds",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/repo.PaginationResult-repo_ItemSummary"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Items"
|
|
],
|
|
"summary": "Create Item",
|
|
"parameters": [
|
|
{
|
|
"description": "Item Data",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/repo.ItemCreate"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Created",
|
|
"schema": {
|
|
"$ref": "#/definitions/repo.ItemSummary"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/items/export": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"tags": [
|
|
"Items"
|
|
],
|
|
"summary": "Export Items",
|
|
"responses": {
|
|
"200": {
|
|
"description": "text/csv",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/items/fields": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Items"
|
|
],
|
|
"summary": "Get All Custom Field Names",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/items/fields/values": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Items"
|
|
],
|
|
"summary": "Get All Custom Field Values",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/items/import": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Items"
|
|
],
|
|
"summary": "Import Items",
|
|
"parameters": [
|
|
{
|
|
"type": "file",
|
|
"description": "Image to upload",
|
|
"name": "csv",
|
|
"in": "formData",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": "No Content"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/items/{id}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Items"
|
|
],
|
|
"summary": "Get Item",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Item ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/repo.ItemOut"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Items"
|
|
],
|
|
"summary": "Update Item",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Item ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Item Data",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/repo.ItemUpdate"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/repo.ItemOut"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Items"
|
|
],
|
|
"summary": "Delete Item",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Item ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": "No Content"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Items"
|
|
],
|
|
"summary": "Update Item",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Item ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Item Data",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/repo.ItemPatch"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/repo.ItemOut"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/items/{id}/attachments": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Items Attachments"
|
|
],
|
|
"summary": "Create Item Attachment",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Item ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "file",
|
|
"description": "File attachment",
|
|
"name": "file",
|
|
"in": "formData",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Type of file",
|
|
"name": "type",
|
|
"in": "formData",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "name of the file including extension",
|
|
"name": "name",
|
|
"in": "formData",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/repo.ItemOut"
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity",
|
|
"schema": {
|
|
"$ref": "#/definitions/validate.ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/items/{id}/attachments/{attachment_id}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/octet-stream"
|
|
],
|
|
"tags": [
|
|
"Items Attachments"
|
|
],
|
|
"summary": "Get Item Attachment",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Item ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Attachment ID",
|
|
"name": "attachment_id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/v1.ItemAttachmentToken"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"tags": [
|
|
"Items Attachments"
|
|
],
|
|
"summary": "Update Item Attachment",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Item ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Attachment ID",
|
|
"name": "attachment_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Attachment Update",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/repo.ItemAttachmentUpdate"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/repo.ItemOut"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"tags": [
|
|
"Items Attachments"
|
|
],
|
|
"summary": "Delete Item Attachment",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Item ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Attachment ID",
|
|
"name": "attachment_id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": "No Content"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/items/{id}/maintenance": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Maintenance"
|
|
],
|
|
"summary": "Get Maintenance Log",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/repo.MaintenanceLog"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Maintenance"
|
|
],
|
|
"summary": "Create Maintenance Entry",
|
|
"parameters": [
|
|
{
|
|
"description": "Entry Data",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/repo.MaintenanceEntryCreate"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Created",
|
|
"schema": {
|
|
"$ref": "#/definitions/repo.MaintenanceEntry"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/items/{id}/maintenance/{entry_id}": {
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Maintenance"
|
|
],
|
|
"summary": "Update Maintenance Entry",
|
|
"parameters": [
|
|
{
|
|
"description": "Entry Data",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/repo.MaintenanceEntryUpdate"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/repo.MaintenanceEntry"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Maintenance"
|
|
],
|
|
"summary": "Delete Maintenance Entry",
|
|
"responses": {
|
|
"204": {
|
|
"description": "No Content"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/items/{id}/path": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Items"
|
|
],
|
|
"summary": "Get the full path of an item",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Item ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/repo.ItemPath"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/labels": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Labels"
|
|
],
|
|
"summary": "Get All Labels",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/repo.LabelOut"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Labels"
|
|
],
|
|
"summary": "Create Label",
|
|
"parameters": [
|
|
{
|
|
"description": "Label Data",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/repo.LabelCreate"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/repo.LabelSummary"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/labels/{id}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Labels"
|
|
],
|
|
"summary": "Get Label",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Label ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/repo.LabelOut"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Labels"
|
|
],
|
|
"summary": "Update Label",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Label ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/repo.LabelOut"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Labels"
|
|
],
|
|
"summary": "Delete Label",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Label ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": "No Content"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/locations": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Locations"
|
|
],
|
|
"summary": "Get All Locations",
|
|
"parameters": [
|
|
{
|
|
"type": "boolean",
|
|
"description": "Filter locations with parents",
|
|
"name": "filterChildren",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/repo.LocationOutCount"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Locations"
|
|
],
|
|
"summary": "Create Location",
|
|
"parameters": [
|
|
{
|
|
"description": "Location Data",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/repo.LocationCreate"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/repo.LocationSummary"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/locations/tree": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Locations"
|
|
],
|
|
"summary": "Get Locations Tree",
|
|
"parameters": [
|
|
{
|
|
"type": "boolean",
|
|
"description": "include items in response tree",
|
|
"name": "withItems",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/repo.TreeItem"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/locations/{id}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Locations"
|
|
],
|
|
"summary": "Get Location",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Location ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/repo.LocationOut"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Locations"
|
|
],
|
|
"summary": "Update Location",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Location ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Location Data",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/repo.LocationUpdate"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/repo.LocationOut"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Locations"
|
|
],
|
|
"summary": "Delete Location",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Location ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": "No Content"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/notifiers": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Notifiers"
|
|
],
|
|
"summary": "Get Notifiers",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/repo.NotifierOut"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Notifiers"
|
|
],
|
|
"summary": "Create Notifier",
|
|
"parameters": [
|
|
{
|
|
"description": "Notifier Data",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/repo.NotifierCreate"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/repo.NotifierOut"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/notifiers/test": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Notifiers"
|
|
],
|
|
"summary": "Test Notifier",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Notifier ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "URL",
|
|
"name": "url",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": "No Content"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/notifiers/{id}": {
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"tags": [
|
|
"Notifiers"
|
|
],
|
|
"summary": "Update Notifier",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Notifier ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Notifier Data",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/repo.NotifierUpdate"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/repo.NotifierOut"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"tags": [
|
|
"Notifiers"
|
|
],
|
|
"summary": "Delete a Notifier",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Notifier ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": "No Content"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/qrcode": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Items"
|
|
],
|
|
"summary": "Create QR Code",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "data to be encoded into qrcode",
|
|
"name": "data",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "image/jpeg",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/reporting/bill-of-materials": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Reporting"
|
|
],
|
|
"summary": "Export Bill of Materials",
|
|
"responses": {
|
|
"200": {
|
|
"description": "text/csv",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/status": {
|
|
"get": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Base"
|
|
],
|
|
"summary": "Application Info",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/v1.APISummary"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/users/change-password": {
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"tags": [
|
|
"User"
|
|
],
|
|
"summary": "Change Password",
|
|
"parameters": [
|
|
{
|
|
"description": "Password Payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/v1.ChangePassword"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": "No Content"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/users/login": {
|
|
"post": {
|
|
"consumes": [
|
|
"application/x-www-form-urlencoded",
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Authentication"
|
|
],
|
|
"summary": "User Login",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"example": "admin@admin.com",
|
|
"description": "string",
|
|
"name": "username",
|
|
"in": "formData"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"example": "admin",
|
|
"description": "string",
|
|
"name": "password",
|
|
"in": "formData"
|
|
},
|
|
{
|
|
"description": "Login Data",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/v1.LoginForm"
|
|
}
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "auth provider",
|
|
"name": "provider",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/v1.TokenResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/users/logout": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"tags": [
|
|
"Authentication"
|
|
],
|
|
"summary": "User Logout",
|
|
"responses": {
|
|
"204": {
|
|
"description": "No Content"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/users/refresh": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "handleAuthRefresh returns a handler that will issue a new token from an existing token.\nThis does not validate that the user still exists within the database.",
|
|
"tags": [
|
|
"Authentication"
|
|
],
|
|
"summary": "User Token Refresh",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/users/register": {
|
|
"post": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"User"
|
|
],
|
|
"summary": "Register New User",
|
|
"parameters": [
|
|
{
|
|
"description": "User Data",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/services.UserRegistration"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": "No Content"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/users/self": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"User"
|
|
],
|
|
"summary": "Get User Self",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/v1.Wrapped"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"item": {
|
|
"$ref": "#/definitions/repo.UserOut"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"User"
|
|
],
|
|
"summary": "Update Account",
|
|
"parameters": [
|
|
{
|
|
"description": "User Data",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/repo.UserUpdate"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/v1.Wrapped"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"item": {
|
|
"$ref": "#/definitions/repo.UserUpdate"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"User"
|
|
],
|
|
"summary": "Delete Account",
|
|
"responses": {
|
|
"204": {
|
|
"description": "No Content"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"currencies.Currency": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": {
|
|
"type": "string"
|
|
},
|
|
"local": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"symbol": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"repo.DocumentOut": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"path": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"repo.Group": {
|
|
"type": "object",
|
|
"properties": {
|
|
"createdAt": {
|
|
"type": "string"
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"updatedAt": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"repo.GroupStatistics": {
|
|
"type": "object",
|
|
"properties": {
|
|
"totalItemPrice": {
|
|
"type": "number"
|
|
},
|
|
"totalItems": {
|
|
"type": "integer"
|
|
},
|
|
"totalLabels": {
|
|
"type": "integer"
|
|
},
|
|
"totalLocations": {
|
|
"type": "integer"
|
|
},
|
|
"totalUsers": {
|
|
"type": "integer"
|
|
},
|
|
"totalWithWarranty": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"repo.GroupUpdate": {
|
|
"type": "object",
|
|
"properties": {
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"repo.ItemAttachment": {
|
|
"type": "object",
|
|
"properties": {
|
|
"createdAt": {
|
|
"type": "string"
|
|
},
|
|
"document": {
|
|
"$ref": "#/definitions/repo.DocumentOut"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"primary": {
|
|
"type": "boolean"
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
},
|
|
"updatedAt": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"repo.ItemAttachmentUpdate": {
|
|
"type": "object",
|
|
"properties": {
|
|
"primary": {
|
|
"type": "boolean"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"repo.ItemCreate": {
|
|
"type": "object",
|
|
"required": [
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"description": {
|
|
"type": "string",
|
|
"maxLength": 1000
|
|
},
|
|
"labelIds": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"locationId": {
|
|
"description": "Edges",
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"maxLength": 255,
|
|
"minLength": 1
|
|
},
|
|
"parentId": {
|
|
"type": "string",
|
|
"x-nullable": true
|
|
}
|
|
}
|
|
},
|
|
"repo.ItemField": {
|
|
"type": "object",
|
|
"properties": {
|
|
"booleanValue": {
|
|
"type": "boolean"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"numberValue": {
|
|
"type": "integer"
|
|
},
|
|
"textValue": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"repo.ItemOut": {
|
|
"type": "object",
|
|
"properties": {
|
|
"archived": {
|
|
"type": "boolean"
|
|
},
|
|
"assetId": {
|
|
"type": "string",
|
|
"example": "0"
|
|
},
|
|
"attachments": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/repo.ItemAttachment"
|
|
}
|
|
},
|
|
"createdAt": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"fields": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/repo.ItemField"
|
|
}
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"imageId": {
|
|
"type": "string"
|
|
},
|
|
"insured": {
|
|
"type": "boolean"
|
|
},
|
|
"labels": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/repo.LabelSummary"
|
|
}
|
|
},
|
|
"lifetimeWarranty": {
|
|
"description": "Warranty",
|
|
"type": "boolean"
|
|
},
|
|
"location": {
|
|
"description": "Edges",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/repo.LocationSummary"
|
|
}
|
|
],
|
|
"x-nullable": true,
|
|
"x-omitempty": true
|
|
},
|
|
"manufacturer": {
|
|
"type": "string"
|
|
},
|
|
"modelNumber": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"notes": {
|
|
"description": "Extras",
|
|
"type": "string"
|
|
},
|
|
"parent": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/repo.ItemSummary"
|
|
}
|
|
],
|
|
"x-nullable": true,
|
|
"x-omitempty": true
|
|
},
|
|
"purchaseFrom": {
|
|
"type": "string"
|
|
},
|
|
"purchasePrice": {
|
|
"type": "string",
|
|
"example": "0"
|
|
},
|
|
"purchaseTime": {
|
|
"description": "Purchase",
|
|
"type": "string"
|
|
},
|
|
"quantity": {
|
|
"type": "integer"
|
|
},
|
|
"serialNumber": {
|
|
"type": "string"
|
|
},
|
|
"soldNotes": {
|
|
"type": "string"
|
|
},
|
|
"soldPrice": {
|
|
"type": "string",
|
|
"example": "0"
|
|
},
|
|
"soldTime": {
|
|
"description": "Sold",
|
|
"type": "string"
|
|
},
|
|
"soldTo": {
|
|
"type": "string"
|
|
},
|
|
"updatedAt": {
|
|
"type": "string"
|
|
},
|
|
"warrantyDetails": {
|
|
"type": "string"
|
|
},
|
|
"warrantyExpires": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"repo.ItemPatch": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"quantity": {
|
|
"type": "integer",
|
|
"x-nullable": true,
|
|
"x-omitempty": true
|
|
}
|
|
}
|
|
},
|
|
"repo.ItemPath": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"$ref": "#/definitions/repo.ItemType"
|
|
}
|
|
}
|
|
},
|
|
"repo.ItemSummary": {
|
|
"type": "object",
|
|
"properties": {
|
|
"archived": {
|
|
"type": "boolean"
|
|
},
|
|
"createdAt": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"imageId": {
|
|
"type": "string"
|
|
},
|
|
"insured": {
|
|
"type": "boolean"
|
|
},
|
|
"labels": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/repo.LabelSummary"
|
|
}
|
|
},
|
|
"location": {
|
|
"description": "Edges",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/repo.LocationSummary"
|
|
}
|
|
],
|
|
"x-nullable": true,
|
|
"x-omitempty": true
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"purchasePrice": {
|
|
"type": "string",
|
|
"example": "0"
|
|
},
|
|
"quantity": {
|
|
"type": "integer"
|
|
},
|
|
"updatedAt": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"repo.ItemType": {
|
|
"type": "string",
|
|
"enum": [
|
|
"location",
|
|
"item"
|
|
],
|
|
"x-enum-varnames": [
|
|
"ItemTypeLocation",
|
|
"ItemTypeItem"
|
|
]
|
|
},
|
|
"repo.ItemUpdate": {
|
|
"type": "object",
|
|
"properties": {
|
|
"archived": {
|
|
"type": "boolean"
|
|
},
|
|
"assetId": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"fields": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/repo.ItemField"
|
|
}
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"insured": {
|
|
"type": "boolean"
|
|
},
|
|
"labelIds": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"lifetimeWarranty": {
|
|
"description": "Warranty",
|
|
"type": "boolean"
|
|
},
|
|
"locationId": {
|
|
"description": "Edges",
|
|
"type": "string"
|
|
},
|
|
"manufacturer": {
|
|
"type": "string"
|
|
},
|
|
"modelNumber": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"notes": {
|
|
"description": "Extras",
|
|
"type": "string"
|
|
},
|
|
"parentId": {
|
|
"type": "string",
|
|
"x-nullable": true,
|
|
"x-omitempty": true
|
|
},
|
|
"purchaseFrom": {
|
|
"type": "string"
|
|
},
|
|
"purchasePrice": {
|
|
"type": "string",
|
|
"example": "0"
|
|
},
|
|
"purchaseTime": {
|
|
"description": "Purchase",
|
|
"type": "string"
|
|
},
|
|
"quantity": {
|
|
"type": "integer"
|
|
},
|
|
"serialNumber": {
|
|
"description": "Identifications",
|
|
"type": "string"
|
|
},
|
|
"soldNotes": {
|
|
"type": "string"
|
|
},
|
|
"soldPrice": {
|
|
"type": "string",
|
|
"example": "0"
|
|
},
|
|
"soldTime": {
|
|
"description": "Sold",
|
|
"type": "string"
|
|
},
|
|
"soldTo": {
|
|
"type": "string"
|
|
},
|
|
"warrantyDetails": {
|
|
"type": "string"
|
|
},
|
|
"warrantyExpires": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"repo.LabelCreate": {
|
|
"type": "object",
|
|
"required": [
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"color": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"maxLength": 255
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"maxLength": 255,
|
|
"minLength": 1
|
|
}
|
|
}
|
|
},
|
|
"repo.LabelOut": {
|
|
"type": "object",
|
|
"properties": {
|
|
"createdAt": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"updatedAt": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"repo.LabelSummary": {
|
|
"type": "object",
|
|
"properties": {
|
|
"createdAt": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"updatedAt": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"repo.LocationCreate": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"parentId": {
|
|
"type": "string",
|
|
"x-nullable": true
|
|
}
|
|
}
|
|
},
|
|
"repo.LocationOut": {
|
|
"type": "object",
|
|
"properties": {
|
|
"children": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/repo.LocationSummary"
|
|
}
|
|
},
|
|
"createdAt": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"parent": {
|
|
"$ref": "#/definitions/repo.LocationSummary"
|
|
},
|
|
"updatedAt": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"repo.LocationOutCount": {
|
|
"type": "object",
|
|
"properties": {
|
|
"createdAt": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"itemCount": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"updatedAt": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"repo.LocationSummary": {
|
|
"type": "object",
|
|
"properties": {
|
|
"createdAt": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"updatedAt": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"repo.LocationUpdate": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"parentId": {
|
|
"type": "string",
|
|
"x-nullable": true
|
|
}
|
|
}
|
|
},
|
|
"repo.MaintenanceEntry": {
|
|
"type": "object",
|
|
"properties": {
|
|
"completedDate": {
|
|
"type": "string"
|
|
},
|
|
"cost": {
|
|
"type": "string",
|
|
"example": "0"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"scheduledDate": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"repo.MaintenanceEntryCreate": {
|
|
"type": "object",
|
|
"required": [
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"completedDate": {
|
|
"type": "string"
|
|
},
|
|
"cost": {
|
|
"type": "string",
|
|
"example": "0"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"scheduledDate": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"repo.MaintenanceEntryUpdate": {
|
|
"type": "object",
|
|
"properties": {
|
|
"completedDate": {
|
|
"type": "string"
|
|
},
|
|
"cost": {
|
|
"type": "string",
|
|
"example": "0"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"scheduledDate": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"repo.MaintenanceLog": {
|
|
"type": "object",
|
|
"properties": {
|
|
"costAverage": {
|
|
"type": "number"
|
|
},
|
|
"costTotal": {
|
|
"type": "number"
|
|
},
|
|
"entries": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/repo.MaintenanceEntry"
|
|
}
|
|
},
|
|
"itemId": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"repo.NotifierCreate": {
|
|
"type": "object",
|
|
"required": [
|
|
"name",
|
|
"url"
|
|
],
|
|
"properties": {
|
|
"isActive": {
|
|
"type": "boolean"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"maxLength": 255,
|
|
"minLength": 1
|
|
},
|
|
"url": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"repo.NotifierOut": {
|
|
"type": "object",
|
|
"properties": {
|
|
"createdAt": {
|
|
"type": "string"
|
|
},
|
|
"groupId": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"isActive": {
|
|
"type": "boolean"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"updatedAt": {
|
|
"type": "string"
|
|
},
|
|
"userId": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"repo.NotifierUpdate": {
|
|
"type": "object",
|
|
"required": [
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"isActive": {
|
|
"type": "boolean"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"maxLength": 255,
|
|
"minLength": 1
|
|
},
|
|
"url": {
|
|
"type": "string",
|
|
"x-nullable": true
|
|
}
|
|
}
|
|
},
|
|
"repo.PaginationResult-repo_ItemSummary": {
|
|
"type": "object",
|
|
"properties": {
|
|
"items": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/repo.ItemSummary"
|
|
}
|
|
},
|
|
"page": {
|
|
"type": "integer"
|
|
},
|
|
"pageSize": {
|
|
"type": "integer"
|
|
},
|
|
"total": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"repo.TotalsByOrganizer": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"total": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
},
|
|
"repo.TreeItem": {
|
|
"type": "object",
|
|
"properties": {
|
|
"children": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/repo.TreeItem"
|
|
}
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"repo.UserOut": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"groupId": {
|
|
"type": "string"
|
|
},
|
|
"groupName": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"isOwner": {
|
|
"type": "boolean"
|
|
},
|
|
"isSuperuser": {
|
|
"type": "boolean"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"repo.UserUpdate": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"repo.ValueOverTime": {
|
|
"type": "object",
|
|
"properties": {
|
|
"end": {
|
|
"type": "string"
|
|
},
|
|
"entries": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/repo.ValueOverTimeEntry"
|
|
}
|
|
},
|
|
"start": {
|
|
"type": "string"
|
|
},
|
|
"valueAtEnd": {
|
|
"type": "number"
|
|
},
|
|
"valueAtStart": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
},
|
|
"repo.ValueOverTimeEntry": {
|
|
"type": "object",
|
|
"properties": {
|
|
"date": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"value": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
},
|
|
"services.UserRegistration": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"type": "string"
|
|
},
|
|
"token": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.APISummary": {
|
|
"type": "object",
|
|
"properties": {
|
|
"allowRegistration": {
|
|
"type": "boolean"
|
|
},
|
|
"build": {
|
|
"$ref": "#/definitions/v1.Build"
|
|
},
|
|
"demo": {
|
|
"type": "boolean"
|
|
},
|
|
"health": {
|
|
"type": "boolean"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"versions": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"v1.ActionAmountResult": {
|
|
"type": "object",
|
|
"properties": {
|
|
"completed": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"v1.Build": {
|
|
"type": "object",
|
|
"properties": {
|
|
"buildTime": {
|
|
"type": "string"
|
|
},
|
|
"commit": {
|
|
"type": "string"
|
|
},
|
|
"version": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.ChangePassword": {
|
|
"type": "object",
|
|
"properties": {
|
|
"current": {
|
|
"type": "string"
|
|
},
|
|
"new": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.GroupInvitation": {
|
|
"type": "object",
|
|
"properties": {
|
|
"expiresAt": {
|
|
"type": "string"
|
|
},
|
|
"token": {
|
|
"type": "string"
|
|
},
|
|
"uses": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"v1.GroupInvitationCreate": {
|
|
"type": "object",
|
|
"required": [
|
|
"uses"
|
|
],
|
|
"properties": {
|
|
"expiresAt": {
|
|
"type": "string"
|
|
},
|
|
"uses": {
|
|
"type": "integer",
|
|
"maximum": 100,
|
|
"minimum": 1
|
|
}
|
|
}
|
|
},
|
|
"v1.ItemAttachmentToken": {
|
|
"type": "object",
|
|
"properties": {
|
|
"token": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.LoginForm": {
|
|
"type": "object",
|
|
"properties": {
|
|
"password": {
|
|
"type": "string"
|
|
},
|
|
"stayLoggedIn": {
|
|
"type": "boolean"
|
|
},
|
|
"username": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.TokenResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"attachmentToken": {
|
|
"type": "string"
|
|
},
|
|
"expiresAt": {
|
|
"type": "string"
|
|
},
|
|
"token": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.Wrapped": {
|
|
"type": "object",
|
|
"properties": {
|
|
"item": {}
|
|
}
|
|
},
|
|
"validate.ErrorResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"error": {
|
|
"type": "string"
|
|
},
|
|
"fields": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"securityDefinitions": {
|
|
"Bearer": {
|
|
"description": "\"Type 'Bearer TOKEN' to correctly set the API Key\"",
|
|
"type": "apiKey",
|
|
"name": "Authorization",
|
|
"in": "header"
|
|
}
|
|
}
|
|
}`
|
|
|
|
// SwaggerInfo holds exported Swagger Info so clients can modify it
|
|
var SwaggerInfo = &swag.Spec{
|
|
Version: "1.0",
|
|
Host: "",
|
|
BasePath: "/api",
|
|
Schemes: []string{},
|
|
Title: "Homebox API",
|
|
Description: "Track, Manage, and Organize your Things.",
|
|
InfoInstanceName: "swagger",
|
|
SwaggerTemplate: docTemplate,
|
|
LeftDelim: "{{",
|
|
RightDelim: "}}",
|
|
}
|
|
|
|
func init() {
|
|
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
|
|
}
|