diff --git a/backend/app/api/static/docs/docs.go b/backend/app/api/static/docs/docs.go index 0b6648be..4467084c 100644 --- a/backend/app/api/static/docs/docs.go +++ b/backend/app/api/static/docs/docs.go @@ -5,7 +5,7 @@ package docs import "github.com/swaggo/swag/v2" const docTemplate = `{ - "schemes": {{ marshal .Schemes }},"swagger":"2.0","info":{"description":"{{escape .Description}}","title":"{{.Title}}","contact":{"name":"Homebox Team","url":"https://discord.homebox.software"},"version":"{{.Version}}"},"host":"{{.Host}}","basePath":"{{.BasePath}}","paths":{"/v1/actions/create-missing-thumbnails":{"post":{"security":[{"Bearer":[]}],"description":"Creates thumbnails for items that are missing them","produces":["application/json"],"tags":["Actions"],"summary":"Create Missing Thumbnails","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/v1.ActionAmountResult"}}}}},"/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/entities/{id}/attachments":{"post":{"security":[{"Bearer":[]}],"consumes":["multipart/form-data"],"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"},{"type":"boolean","description":"Is this the primary attachment","name":"primary","in":"formData"},{"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/entities/{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.EntityAttachmentUpdate"}}],"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/entities/{id}/maintenance":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Item Maintenance"],"summary":"Get Maintenance Log","parameters":[{"type":"string","description":"Item ID","name":"id","in":"path","required":true},{"enum":["scheduled","completed","both"],"type":"string","x-enum-varnames":["MaintenanceFilterStatusScheduled","MaintenanceFilterStatusCompleted","MaintenanceFilterStatusBoth"],"name":"status","in":"query"}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/repo.MaintenanceEntryWithDetails"}}}}},"post":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Item Maintenance"],"summary":"Create Maintenance Entry","parameters":[{"type":"string","description":"Item ID","name":"id","in":"path","required":true},{"description":"Entry Data","name":"payload","in":"body","required":true,"schema":{"$ref":"#/definitions/repo.MaintenanceEntryCreate"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/repo.MaintenanceEntry"}}}}},"/v1/entitytype":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["EntityTypes"],"summary":"Query All Entity Types","responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/repo.EntityType"}}}}},"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["EntityTypes"],"summary":"Create Entity Type","parameters":[{"description":"Entity Type Data","name":"payload","in":"body","required":true,"schema":{"$ref":"#/definitions/repo.EntityTypeCreate"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/repo.EntityType"}}}}},"/v1/entitytype/{id}":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["EntityTypes"],"summary":"Get One Entity Type","parameters":[{"type":"string","description":"Entity Type ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/repo.EntityType"}}}},"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["EntityTypes"],"summary":"Update Entity Type","parameters":[{"type":"string","description":"Entity Type ID","name":"id","in":"path","required":true},{"description":"Entity Type Data","name":"payload","in":"body","required":true,"schema":{"$ref":"#/definitions/repo.EntityTypeUpdate"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/repo.EntityType"}}}},"delete":{"security":[{"Bearer":[]}],"tags":["EntityTypes"],"summary":"Delete Entity Type","parameters":[{"type":"string","description":"Entity Type ID","name":"id","in":"path","required":true},{"description":"Entity Type Delete Options","name":"payload","in":"body","required":true,"schema":{"$ref":"#/definitions/repo.EntityTypeDelete"}}],"responses":{"204":{"description":"No Content"}}}},"/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":"(Deprecated) Query All Items","deprecated":true,"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":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["Items"],"summary":"Create Item","deprecated":true,"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":"(Deprecated) Export Items","deprecated":true,"responses":{"200":{"description":"text/csv","schema":{"type":"string"}}}}},"/v1/items/fields":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Items"],"summary":"(Deprecated) Get All Custom Field Names","deprecated":true,"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"type":"string"}}}}}},"/v1/items/fields/values":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Items"],"summary":"(Deprecated) Get All Custom Field Values","deprecated":true,"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"type":"string"}}}}}},"/v1/items/import":{"post":{"security":[{"Bearer":[]}],"consumes":["multipart/form-data"],"produces":["application/json"],"tags":["Items"],"summary":"(Deprecated) Import Items","deprecated":true,"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":"(Deprecated) Get Item","deprecated":true,"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":"(Deprecated) Update Item","deprecated":true,"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":"(Deprecated) Delete Item","deprecated":true,"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":"(Deprecated) Update Item","deprecated":true,"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":[]}],"consumes":["multipart/form-data"],"produces":["application/json"],"tags":["Items Attachments"],"summary":"Create Item Attachment","deprecated":true,"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"},{"type":"boolean","description":"Is this the primary attachment","name":"primary","in":"formData"},{"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","deprecated":true,"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","deprecated":true,"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.EntityAttachmentUpdate"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/repo.ItemOut"}}}},"delete":{"security":[{"Bearer":[]}],"tags":["Items Attachments"],"summary":"Delete Item Attachment","deprecated":true,"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}/duplicate":{"post":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Items"],"summary":"Duplicate Item","parameters":[{"type":"string","description":"Item ID","name":"id","in":"path","required":true},{"description":"Duplicate Options","name":"payload","in":"body","required":true,"schema":{"$ref":"#/definitions/repo.DuplicateOptions"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/repo.ItemOut"}}}}},"/v1/items/{id}/maintenance":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Item Maintenance"],"summary":"Get Maintenance Log","deprecated":true,"parameters":[{"type":"string","description":"Item ID","name":"id","in":"path","required":true},{"enum":["scheduled","completed","both"],"type":"string","x-enum-varnames":["MaintenanceFilterStatusScheduled","MaintenanceFilterStatusCompleted","MaintenanceFilterStatusBoth"],"name":"status","in":"query"}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/repo.MaintenanceEntryWithDetails"}}}}},"post":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Item Maintenance"],"summary":"Create Maintenance Entry","deprecated":true,"parameters":[{"type":"string","description":"Item ID","name":"id","in":"path","required":true},{"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}/path":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Items"],"summary":"(Deprecated) Get the full path of an item","deprecated":true,"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/labelmaker/assets/{id}":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Items"],"summary":"Get Asset label","parameters":[{"type":"string","description":"Asset ID","name":"id","in":"path","required":true},{"type":"boolean","description":"Print this label, defaults to false","name":"print","in":"query"}],"responses":{"200":{"description":"image/png","schema":{"type":"string"}}}}},"/v1/labelmaker/item/{id}":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Items"],"summary":"Get Item label","parameters":[{"type":"string","description":"Item ID","name":"id","in":"path","required":true},{"type":"boolean","description":"Print this label, defaults to false","name":"print","in":"query"}],"responses":{"200":{"description":"image/png","schema":{"type":"string"}}}}},"/v1/labelmaker/location/{id}":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Locations"],"summary":"Get Location label","parameters":[{"type":"string","description":"Location ID","name":"id","in":"path","required":true},{"type":"boolean","description":"Print this label, defaults to false","name":"print","in":"query"}],"responses":{"200":{"description":"image/png","schema":{"type":"string"}}}}},"/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":"(Deprecated) Get All Locations","deprecated":true,"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":"(Deprecated) Create Location","deprecated":true,"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":"(Deprecated) Get Locations Tree","deprecated":true,"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":"(Deprecated) Get Location","deprecated":true,"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":"(Deprecated) Update Location","deprecated":true,"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":"(Deprecated) Delete Location","deprecated":true,"parameters":[{"type":"string","description":"Location ID","name":"id","in":"path","required":true}],"responses":{"204":{"description":"No Content"}}}},"/v1/maintenance":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Maintenance"],"summary":"Query All Maintenance","parameters":[{"enum":["scheduled","completed","both"],"type":"string","x-enum-varnames":["MaintenanceFilterStatusScheduled","MaintenanceFilterStatusCompleted","MaintenanceFilterStatusBoth"],"name":"status","in":"query"}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/repo.MaintenanceEntryWithDetails"}}}}}},"/v1/maintenance/{id}":{"put":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Maintenance"],"summary":"Update Maintenance Entry","parameters":[{"type":"string","description":"Maintenance ID","name":"id","in":"path","required":true},{"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","parameters":[{"type":"string","description":"Maintenance 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":"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/products/search-from-barcode":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Items"],"summary":"Search EAN from Barcode","parameters":[{"type":"string","description":"barcode to be searched","name":"data","in":"query"}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/repo.BarcodeProduct"}}}}}},"/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":[{"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":{"attachment.Type":{"type":"string","enum":["attachment","photo","manual","warranty","attachment","receipt","thumbnail"],"x-enum-varnames":["DefaultType","TypePhoto","TypeManual","TypeWarranty","TypeAttachment","TypeReceipt","TypeThumbnail"]},"authroles.Role":{"type":"string","enum":["user","admin","user","attachments"],"x-enum-varnames":["DefaultRole","RoleAdmin","RoleUser","RoleAttachments"]},"currencies.Currency":{"type":"object","properties":{"code":{"type":"string"},"local":{"type":"string"},"name":{"type":"string"},"symbol":{"type":"string"}}},"ent.Attachment":{"type":"object","properties":{"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the AttachmentQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.AttachmentEdges"}]},"id":{"description":"ID of the ent.","type":"string"},"mime_type":{"description":"MimeType holds the value of the \"mime_type\" field.","type":"string"},"path":{"description":"Path holds the value of the \"path\" field.","type":"string"},"primary":{"description":"Primary holds the value of the \"primary\" field.","type":"boolean"},"title":{"description":"Title holds the value of the \"title\" field.","type":"string"},"type":{"description":"Type holds the value of the \"type\" field.","allOf":[{"$ref":"#/definitions/attachment.Type"}]},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"}}},"ent.AttachmentEdges":{"type":"object","properties":{"entity":{"description":"Entity holds the value of the entity edge.","allOf":[{"$ref":"#/definitions/ent.Entity"}]},"thumbnail":{"description":"Thumbnail holds the value of the thumbnail edge.","allOf":[{"$ref":"#/definitions/ent.Attachment"}]}}},"ent.AuthRoles":{"type":"object","properties":{"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the AuthRolesQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.AuthRolesEdges"}]},"id":{"description":"ID of the ent.","type":"integer"},"role":{"description":"Role holds the value of the \"role\" field.","allOf":[{"$ref":"#/definitions/authroles.Role"}]}}},"ent.AuthRolesEdges":{"type":"object","properties":{"token":{"description":"Token holds the value of the token edge.","allOf":[{"$ref":"#/definitions/ent.AuthTokens"}]}}},"ent.AuthTokens":{"type":"object","properties":{"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the AuthTokensQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.AuthTokensEdges"}]},"expires_at":{"description":"ExpiresAt holds the value of the \"expires_at\" field.","type":"string"},"id":{"description":"ID of the ent.","type":"string"},"token":{"description":"Token holds the value of the \"token\" field.","type":"array","items":{"type":"integer"}},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"}}},"ent.AuthTokensEdges":{"type":"object","properties":{"roles":{"description":"Roles holds the value of the roles edge.","allOf":[{"$ref":"#/definitions/ent.AuthRoles"}]},"user":{"description":"User holds the value of the user edge.","allOf":[{"$ref":"#/definitions/ent.User"}]}}},"ent.Entity":{"type":"object","properties":{"archived":{"description":"Archived holds the value of the \"archived\" field.","type":"boolean"},"asset_id":{"description":"AssetID holds the value of the \"asset_id\" field.","type":"integer"},"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"description":{"description":"Description holds the value of the \"description\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the EntityQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.EntityEdges"}]},"id":{"description":"ID of the ent.","type":"string"},"import_ref":{"description":"ImportRef holds the value of the \"import_ref\" field.","type":"string"},"insured":{"description":"Insured holds the value of the \"insured\" field.","type":"boolean"},"lifetime_warranty":{"description":"LifetimeWarranty holds the value of the \"lifetime_warranty\" field.","type":"boolean"},"manufacturer":{"description":"Manufacturer holds the value of the \"manufacturer\" field.","type":"string"},"model_number":{"description":"ModelNumber holds the value of the \"model_number\" field.","type":"string"},"name":{"description":"Name holds the value of the \"name\" field.","type":"string"},"notes":{"description":"Notes holds the value of the \"notes\" field.","type":"string"},"purchase_from":{"description":"PurchaseFrom holds the value of the \"purchase_from\" field.","type":"string"},"purchase_price":{"description":"PurchasePrice holds the value of the \"purchase_price\" field.","type":"number"},"purchase_time":{"description":"PurchaseTime holds the value of the \"purchase_time\" field.","type":"string"},"quantity":{"description":"Quantity holds the value of the \"quantity\" field.","type":"integer"},"serial_number":{"description":"SerialNumber holds the value of the \"serial_number\" field.","type":"string"},"sold_notes":{"description":"SoldNotes holds the value of the \"sold_notes\" field.","type":"string"},"sold_price":{"description":"SoldPrice holds the value of the \"sold_price\" field.","type":"number"},"sold_time":{"description":"SoldTime holds the value of the \"sold_time\" field.","type":"string"},"sold_to":{"description":"SoldTo holds the value of the \"sold_to\" field.","type":"string"},"sync_child_entities_locations":{"description":"SyncChildEntitiesLocations holds the value of the \"sync_child_entities_locations\" field.","type":"boolean"},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"},"warranty_details":{"description":"WarrantyDetails holds the value of the \"warranty_details\" field.","type":"string"},"warranty_expires":{"description":"WarrantyExpires holds the value of the \"warranty_expires\" field.","type":"string"}}},"ent.EntityEdges":{"type":"object","properties":{"attachments":{"description":"Attachments holds the value of the attachments edge.","type":"array","items":{"$ref":"#/definitions/ent.Attachment"}},"children":{"description":"Children holds the value of the children edge.","type":"array","items":{"$ref":"#/definitions/ent.Entity"}},"entity":{"description":"Entity holds the value of the entity edge.","type":"array","items":{"$ref":"#/definitions/ent.Entity"}},"fields":{"description":"Fields holds the value of the fields edge.","type":"array","items":{"$ref":"#/definitions/ent.EntityField"}},"group":{"description":"Group holds the value of the group edge.","allOf":[{"$ref":"#/definitions/ent.Group"}]},"label":{"description":"Label holds the value of the label edge.","type":"array","items":{"$ref":"#/definitions/ent.Label"}},"location":{"description":"Location holds the value of the location edge.","allOf":[{"$ref":"#/definitions/ent.Entity"}]},"maintenance_entries":{"description":"MaintenanceEntries holds the value of the maintenance_entries edge.","type":"array","items":{"$ref":"#/definitions/ent.MaintenanceEntry"}},"parent":{"description":"Parent holds the value of the parent edge.","allOf":[{"$ref":"#/definitions/ent.Entity"}]},"type":{"description":"Type holds the value of the type edge.","allOf":[{"$ref":"#/definitions/ent.EntityType"}]}}},"ent.EntityField":{"type":"object","properties":{"boolean_value":{"description":"BooleanValue holds the value of the \"boolean_value\" field.","type":"boolean"},"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"description":{"description":"Description holds the value of the \"description\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the EntityFieldQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.EntityFieldEdges"}]},"id":{"description":"ID of the ent.","type":"string"},"name":{"description":"Name holds the value of the \"name\" field.","type":"string"},"number_value":{"description":"NumberValue holds the value of the \"number_value\" field.","type":"integer"},"text_value":{"description":"TextValue holds the value of the \"text_value\" field.","type":"string"},"time_value":{"description":"TimeValue holds the value of the \"time_value\" field.","type":"string"},"type":{"description":"Type holds the value of the \"type\" field.","allOf":[{"$ref":"#/definitions/entityfield.Type"}]},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"}}},"ent.EntityFieldEdges":{"type":"object","properties":{"entity":{"description":"Entity holds the value of the entity edge.","allOf":[{"$ref":"#/definitions/ent.Entity"}]}}},"ent.EntityType":{"type":"object","properties":{"color":{"description":"Color holds the value of the \"color\" field.","type":"string"},"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"description":{"description":"Description holds the value of the \"description\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the EntityTypeQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.EntityTypeEdges"}]},"icon":{"description":"Icon holds the value of the \"icon\" field.","type":"string"},"id":{"description":"ID of the ent.","type":"string"},"is_location":{"description":"IsLocation holds the value of the \"is_location\" field.","type":"boolean"},"name":{"description":"Name holds the value of the \"name\" field.","type":"string"},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"}}},"ent.EntityTypeEdges":{"type":"object","properties":{"entities":{"description":"Entities holds the value of the entities edge.","type":"array","items":{"$ref":"#/definitions/ent.Entity"}},"group":{"description":"Group holds the value of the group edge.","allOf":[{"$ref":"#/definitions/ent.Group"}]}}},"ent.Group":{"type":"object","properties":{"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"currency":{"description":"Currency holds the value of the \"currency\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the GroupQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.GroupEdges"}]},"id":{"description":"ID of the ent.","type":"string"},"name":{"description":"Name holds the value of the \"name\" field.","type":"string"},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"}}},"ent.GroupEdges":{"type":"object","properties":{"entities":{"description":"Entities holds the value of the entities edge.","type":"array","items":{"$ref":"#/definitions/ent.Entity"}},"entity_types":{"description":"EntityTypes holds the value of the entity_types edge.","type":"array","items":{"$ref":"#/definitions/ent.EntityType"}},"invitation_tokens":{"description":"InvitationTokens holds the value of the invitation_tokens edge.","type":"array","items":{"$ref":"#/definitions/ent.GroupInvitationToken"}},"labels":{"description":"Labels holds the value of the labels edge.","type":"array","items":{"$ref":"#/definitions/ent.Label"}},"notifiers":{"description":"Notifiers holds the value of the notifiers edge.","type":"array","items":{"$ref":"#/definitions/ent.Notifier"}},"users":{"description":"Users holds the value of the users edge.","type":"array","items":{"$ref":"#/definitions/ent.User"}}}},"ent.GroupInvitationToken":{"type":"object","properties":{"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the GroupInvitationTokenQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.GroupInvitationTokenEdges"}]},"expires_at":{"description":"ExpiresAt holds the value of the \"expires_at\" field.","type":"string"},"id":{"description":"ID of the ent.","type":"string"},"token":{"description":"Token holds the value of the \"token\" field.","type":"array","items":{"type":"integer"}},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"},"uses":{"description":"Uses holds the value of the \"uses\" field.","type":"integer"}}},"ent.GroupInvitationTokenEdges":{"type":"object","properties":{"group":{"description":"Group holds the value of the group edge.","allOf":[{"$ref":"#/definitions/ent.Group"}]}}},"ent.Label":{"type":"object","properties":{"color":{"description":"Color holds the value of the \"color\" field.","type":"string"},"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"description":{"description":"Description holds the value of the \"description\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the LabelQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.LabelEdges"}]},"id":{"description":"ID of the ent.","type":"string"},"name":{"description":"Name holds the value of the \"name\" field.","type":"string"},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"}}},"ent.LabelEdges":{"type":"object","properties":{"entities":{"description":"Entities holds the value of the entities edge.","type":"array","items":{"$ref":"#/definitions/ent.Entity"}},"group":{"description":"Group holds the value of the group edge.","allOf":[{"$ref":"#/definitions/ent.Group"}]}}},"ent.MaintenanceEntry":{"type":"object","properties":{"cost":{"description":"Cost holds the value of the \"cost\" field.","type":"number"},"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"date":{"description":"Date holds the value of the \"date\" field.","type":"string"},"description":{"description":"Description holds the value of the \"description\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the MaintenanceEntryQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.MaintenanceEntryEdges"}]},"entity_id":{"description":"EntityID holds the value of the \"entity_id\" field.","type":"string"},"id":{"description":"ID of the ent.","type":"string"},"name":{"description":"Name holds the value of the \"name\" field.","type":"string"},"scheduled_date":{"description":"ScheduledDate holds the value of the \"scheduled_date\" field.","type":"string"},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"}}},"ent.MaintenanceEntryEdges":{"type":"object","properties":{"entity":{"description":"Entity holds the value of the entity edge.","allOf":[{"$ref":"#/definitions/ent.Entity"}]}}},"ent.Notifier":{"type":"object","properties":{"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the NotifierQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.NotifierEdges"}]},"group_id":{"description":"GroupID holds the value of the \"group_id\" field.","type":"string"},"id":{"description":"ID of the ent.","type":"string"},"is_active":{"description":"IsActive holds the value of the \"is_active\" field.","type":"boolean"},"name":{"description":"Name holds the value of the \"name\" field.","type":"string"},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"},"user_id":{"description":"UserID holds the value of the \"user_id\" field.","type":"string"}}},"ent.NotifierEdges":{"type":"object","properties":{"group":{"description":"Group holds the value of the group edge.","allOf":[{"$ref":"#/definitions/ent.Group"}]},"user":{"description":"User holds the value of the user edge.","allOf":[{"$ref":"#/definitions/ent.User"}]}}},"ent.User":{"type":"object","properties":{"activated_on":{"description":"ActivatedOn holds the value of the \"activated_on\" field.","type":"string"},"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the UserQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.UserEdges"}]},"email":{"description":"Email holds the value of the \"email\" field.","type":"string"},"id":{"description":"ID of the ent.","type":"string"},"is_superuser":{"description":"IsSuperuser holds the value of the \"is_superuser\" field.","type":"boolean"},"name":{"description":"Name holds the value of the \"name\" field.","type":"string"},"role":{"description":"Role holds the value of the \"role\" field.","allOf":[{"$ref":"#/definitions/user.Role"}]},"superuser":{"description":"Superuser holds the value of the \"superuser\" field.","type":"boolean"},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"}}},"ent.UserEdges":{"type":"object","properties":{"auth_tokens":{"description":"AuthTokens holds the value of the auth_tokens edge.","type":"array","items":{"$ref":"#/definitions/ent.AuthTokens"}},"group":{"description":"Group holds the value of the group edge.","allOf":[{"$ref":"#/definitions/ent.Group"}]},"notifiers":{"description":"Notifiers holds the value of the notifiers edge.","type":"array","items":{"$ref":"#/definitions/ent.Notifier"}}}},"entityfield.Type":{"type":"string","enum":["text","number","boolean","time"],"x-enum-varnames":["TypeText","TypeNumber","TypeBoolean","TypeTime"]},"repo.BarcodeProduct":{"type":"object","properties":{"barcode":{"type":"string"},"imageBase64":{"type":"string"},"imageURL":{"type":"string"},"item":{"$ref":"#/definitions/repo.ItemCreate"},"manufacturer":{"type":"string"},"modelNumber":{"description":"Identifications","type":"string"},"notes":{"description":"Extras","type":"string"},"search_engine_name":{"type":"string"}}},"repo.DuplicateOptions":{"type":"object","properties":{"copyAttachments":{"type":"boolean"},"copyCustomFields":{"type":"boolean"},"copyMaintenance":{"type":"boolean"},"copyPrefix":{"type":"string"}}},"repo.EntityAttachment":{"type":"object","properties":{"createdAt":{"type":"string"},"id":{"type":"string"},"mimeType":{"type":"string"},"path":{"type":"string"},"primary":{"type":"boolean"},"thumbnail":{"$ref":"#/definitions/ent.Attachment"},"title":{"type":"string"},"type":{"type":"string"},"updatedAt":{"type":"string"}}},"repo.EntityAttachmentUpdate":{"type":"object","properties":{"primary":{"type":"boolean"},"title":{"type":"string"},"type":{"type":"string"}}},"repo.EntityType":{"type":"object","properties":{"color":{"type":"string"},"description":{"type":"string"},"icon":{"type":"string"},"isLocation":{"type":"boolean"},"name":{"type":"string"}}},"repo.EntityTypeCreate":{"type":"object","required":["isLocation","name"],"properties":{"color":{"type":"string"},"description":{"type":"string"},"icon":{"type":"string"},"isLocation":{"type":"boolean"},"name":{"type":"string"}}},"repo.EntityTypeDelete":{"type":"object","properties":{"replacementId":{"$ref":"#/definitions/uuid.NullUUID"}}},"repo.EntityTypeUpdate":{"type":"object","properties":{"color":{"type":"string"},"description":{"type":"string"},"icon":{"type":"string"},"name":{"type":"string","minLength":1}}},"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.ItemCreate":{"type":"object","required":["entityType","name"],"properties":{"description":{"type":"string","maxLength":1000},"entityType":{"type":"string"},"labelIds":{"type":"array","items":{"type":"string"}},"locationId":{"description":"Edges","type":"string"},"name":{"type":"string","maxLength":255,"minLength":1},"parentId":{"type":"string","x-nullable":true},"quantity":{"type":"integer"}}},"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.EntityAttachment"}},"createdAt":{"type":"string"},"description":{"type":"string"},"entityType":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/definitions/repo.ItemField"}},"id":{"type":"string"},"imageId":{"type":"string","x-nullable":true,"x-omitempty":true},"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":"number"},"purchaseTime":{"description":"Purchase","type":"string"},"quantity":{"type":"integer"},"serialNumber":{"type":"string"},"soldNotes":{"type":"string"},"soldPrice":{"type":"number"},"soldTime":{"description":"Sold","type":"string"},"soldTo":{"type":"string"},"syncChildItemsLocations":{"type":"boolean"},"thumbnailId":{"type":"string","x-nullable":true,"x-omitempty":true},"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"},"assetId":{"type":"string","example":"0"},"createdAt":{"type":"string"},"description":{"type":"string"},"entityType":{"type":"string"},"id":{"type":"string"},"imageId":{"type":"string","x-nullable":true,"x-omitempty":true},"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":"number"},"quantity":{"type":"integer"},"soldTime":{"description":"Sale details","type":"string"},"thumbnailId":{"type":"string","x-nullable":true,"x-omitempty":true},"updatedAt":{"type":"string"}}},"repo.ItemType":{"type":"string","enum":["location","item"],"x-enum-varnames":["ItemTypeLocation","ItemTypeItem"]},"repo.ItemUpdate":{"type":"object","required":["entityType","name"],"properties":{"archived":{"type":"boolean"},"assetId":{"type":"string"},"description":{"type":"string","maxLength":1000},"entityType":{"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","maxLength":255,"minLength":1},"notes":{"description":"Extras","type":"string"},"parentId":{"type":"string","x-nullable":true,"x-omitempty":true},"purchaseFrom":{"type":"string","maxLength":255},"purchasePrice":{"type":"number","x-nullable":true,"x-omitempty":true},"purchaseTime":{"description":"Purchase","type":"string"},"quantity":{"type":"integer"},"serialNumber":{"description":"Identifications","type":"string"},"soldNotes":{"type":"string"},"soldPrice":{"type":"number","x-nullable":true,"x-omitempty":true},"soldTime":{"description":"Sold","type":"string"},"soldTo":{"type":"string","maxLength":255},"syncChildItemsLocations":{"type":"boolean"},"warrantyDetails":{"type":"string"},"warrantyExpires":{"type":"string"}}},"repo.LabelCreate":{"type":"object","required":["name"],"properties":{"color":{"type":"string"},"description":{"type":"string","maxLength":1000},"name":{"type":"string","maxLength":255,"minLength":1}}},"repo.LabelOut":{"type":"object","properties":{"color":{"type":"string"},"createdAt":{"type":"string"},"description":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"updatedAt":{"type":"string"}}},"repo.LabelSummary":{"type":"object","properties":{"color":{"type":"string"},"createdAt":{"type":"string"},"description":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"updatedAt":{"type":"string"}}},"repo.LocationCreate":{"type":"object","required":["entityType"],"properties":{"description":{"type":"string"},"entityType":{"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"},"entityType":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"parent":{"$ref":"#/definitions/repo.LocationSummary"},"totalPrice":{"type":"number"},"updatedAt":{"type":"string"}}},"repo.LocationOutCount":{"type":"object","properties":{"createdAt":{"type":"string"},"description":{"type":"string"},"entityType":{"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"},"entityType":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"updatedAt":{"type":"string"}}},"repo.LocationUpdate":{"type":"object","required":["entityType"],"properties":{"description":{"type":"string"},"entityType":{"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.MaintenanceEntryWithDetails":{"type":"object","properties":{"completedDate":{"type":"string"},"cost":{"type":"string","example":"0"},"description":{"type":"string"},"id":{"type":"string"},"itemID":{"type":"string"},"itemName":{"type":"string"},"name":{"type":"string"},"scheduledDate":{"type":"string"}}},"repo.MaintenanceFilterStatus":{"type":"string","enum":["scheduled","completed","both"],"x-enum-varnames":["MaintenanceFilterStatusScheduled","MaintenanceFilterStatusCompleted","MaintenanceFilterStatusBoth"]},"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"},"url":{"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.Latest":{"type":"object","properties":{"date":{"type":"string"},"version":{"type":"string"}}},"services.UserRegistration":{"type":"object","properties":{"email":{"type":"string"},"name":{"type":"string"},"password":{"type":"string"},"token":{"type":"string"}}},"user.Role":{"type":"string","enum":["user","user","owner"],"x-enum-varnames":["DefaultRole","RoleUser","RoleOwner"]},"uuid.NullUUID":{"type":"object","properties":{"uuid":{"type":"string"},"valid":{"description":"Valid is true if UUID is not NULL","type":"boolean"}}},"v1.APISummary":{"type":"object","properties":{"allowRegistration":{"type":"boolean"},"build":{"$ref":"#/definitions/v1.Build"},"demo":{"type":"boolean"},"health":{"type":"boolean"},"labelPrinting":{"type":"boolean"},"latest":{"$ref":"#/definitions/services.Latest"},"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","example":"admin"},"stayLoggedIn":{"type":"boolean"},"username":{"type":"string","example":"admin@admin.com"}}},"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"}}}` + "schemes": {{ marshal .Schemes }},"swagger":"2.0","info":{"description":"{{escape .Description}}","title":"{{.Title}}","contact":{"name":"Homebox Team","url":"https://discord.homebox.software"},"version":"{{.Version}}"},"host":"{{.Host}}","basePath":"{{.BasePath}}","paths":{"/v1/actions/create-missing-thumbnails":{"post":{"security":[{"Bearer":[]}],"description":"Creates thumbnails for items that are missing them","produces":["application/json"],"tags":["Actions"],"summary":"Create Missing Thumbnails","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/v1.ActionAmountResult"}}}}},"/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/entities/{id}/attachments":{"post":{"security":[{"Bearer":[]}],"consumes":["multipart/form-data"],"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"},{"type":"boolean","description":"Is this the primary attachment","name":"primary","in":"formData"},{"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/entities/{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.EntityAttachmentUpdate"}}],"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/entities/{id}/maintenance":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Item Maintenance"],"summary":"Get Maintenance Log","parameters":[{"type":"string","description":"Item ID","name":"id","in":"path","required":true},{"enum":["scheduled","completed","both"],"type":"string","x-enum-varnames":["MaintenanceFilterStatusScheduled","MaintenanceFilterStatusCompleted","MaintenanceFilterStatusBoth"],"name":"status","in":"query"}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/repo.MaintenanceEntryWithDetails"}}}}},"post":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Item Maintenance"],"summary":"Create Maintenance Entry","parameters":[{"type":"string","description":"Item ID","name":"id","in":"path","required":true},{"description":"Entry Data","name":"payload","in":"body","required":true,"schema":{"$ref":"#/definitions/repo.MaintenanceEntryCreate"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/repo.MaintenanceEntry"}}}}},"/v1/entitytype":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["EntityTypes"],"summary":"Query All Entity Types","responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/repo.EntityType"}}}}},"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["EntityTypes"],"summary":"Create Entity Type","parameters":[{"description":"Entity Type Data","name":"payload","in":"body","required":true,"schema":{"$ref":"#/definitions/repo.EntityTypeCreate"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/repo.EntityType"}}}}},"/v1/entitytype/{id}":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["EntityTypes"],"summary":"Get One Entity Type","parameters":[{"type":"string","description":"Entity Type ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/repo.EntityType"}}}},"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["EntityTypes"],"summary":"Update Entity Type","parameters":[{"type":"string","description":"Entity Type ID","name":"id","in":"path","required":true},{"description":"Entity Type Data","name":"payload","in":"body","required":true,"schema":{"$ref":"#/definitions/repo.EntityTypeUpdate"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/repo.EntityType"}}}},"delete":{"security":[{"Bearer":[]}],"tags":["EntityTypes"],"summary":"Delete Entity Type","parameters":[{"type":"string","description":"Entity Type ID","name":"id","in":"path","required":true},{"description":"Entity Type Delete Options","name":"payload","in":"body","required":true,"schema":{"$ref":"#/definitions/repo.EntityTypeDelete"}}],"responses":{"204":{"description":"No Content"}}}},"/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":"(Deprecated) Query All Items","deprecated":true,"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":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["Items"],"summary":"Create Item","deprecated":true,"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":"(Deprecated) Export Items","deprecated":true,"responses":{"200":{"description":"text/csv","schema":{"type":"string"}}}}},"/v1/items/fields":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Items"],"summary":"(Deprecated) Get All Custom Field Names","deprecated":true,"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"type":"string"}}}}}},"/v1/items/fields/values":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Items"],"summary":"(Deprecated) Get All Custom Field Values","deprecated":true,"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"type":"string"}}}}}},"/v1/items/import":{"post":{"security":[{"Bearer":[]}],"consumes":["multipart/form-data"],"produces":["application/json"],"tags":["Items"],"summary":"(Deprecated) Import Items","deprecated":true,"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":"(Deprecated) Get Item","deprecated":true,"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":"(Deprecated) Update Item","deprecated":true,"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":"(Deprecated) Delete Item","deprecated":true,"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":"(Deprecated) Update Item","deprecated":true,"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":[]}],"consumes":["multipart/form-data"],"produces":["application/json"],"tags":["Items Attachments"],"summary":"Create Item Attachment","deprecated":true,"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"},{"type":"boolean","description":"Is this the primary attachment","name":"primary","in":"formData"},{"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","deprecated":true,"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","deprecated":true,"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.EntityAttachmentUpdate"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/repo.ItemOut"}}}},"delete":{"security":[{"Bearer":[]}],"tags":["Items Attachments"],"summary":"Delete Item Attachment","deprecated":true,"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}/duplicate":{"post":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Items"],"summary":"Duplicate Item","parameters":[{"type":"string","description":"Item ID","name":"id","in":"path","required":true},{"description":"Duplicate Options","name":"payload","in":"body","required":true,"schema":{"$ref":"#/definitions/repo.DuplicateOptions"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/repo.ItemOut"}}}}},"/v1/items/{id}/maintenance":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Item Maintenance"],"summary":"Get Maintenance Log","deprecated":true,"parameters":[{"type":"string","description":"Item ID","name":"id","in":"path","required":true},{"enum":["scheduled","completed","both"],"type":"string","x-enum-varnames":["MaintenanceFilterStatusScheduled","MaintenanceFilterStatusCompleted","MaintenanceFilterStatusBoth"],"name":"status","in":"query"}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/repo.MaintenanceEntryWithDetails"}}}}},"post":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Item Maintenance"],"summary":"Create Maintenance Entry","deprecated":true,"parameters":[{"type":"string","description":"Item ID","name":"id","in":"path","required":true},{"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}/path":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Items"],"summary":"(Deprecated) Get the full path of an item","deprecated":true,"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/labelmaker/assets/{id}":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Items"],"summary":"Get Asset label","parameters":[{"type":"string","description":"Asset ID","name":"id","in":"path","required":true},{"type":"boolean","description":"Print this label, defaults to false","name":"print","in":"query"}],"responses":{"200":{"description":"image/png","schema":{"type":"string"}}}}},"/v1/labelmaker/item/{id}":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Items"],"summary":"Get Item label","parameters":[{"type":"string","description":"Item ID","name":"id","in":"path","required":true},{"type":"boolean","description":"Print this label, defaults to false","name":"print","in":"query"}],"responses":{"200":{"description":"image/png","schema":{"type":"string"}}}}},"/v1/labelmaker/location/{id}":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Locations"],"summary":"Get Location label","parameters":[{"type":"string","description":"Location ID","name":"id","in":"path","required":true},{"type":"boolean","description":"Print this label, defaults to false","name":"print","in":"query"}],"responses":{"200":{"description":"image/png","schema":{"type":"string"}}}}},"/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":"(Deprecated) Get All Locations","deprecated":true,"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":"(Deprecated) Create Location","deprecated":true,"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":"(Deprecated) Get Locations Tree","deprecated":true,"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":"(Deprecated) Get Location","deprecated":true,"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":"(Deprecated) Update Location","deprecated":true,"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":"(Deprecated) Delete Location","deprecated":true,"parameters":[{"type":"string","description":"Location ID","name":"id","in":"path","required":true}],"responses":{"204":{"description":"No Content"}}}},"/v1/maintenance":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Maintenance"],"summary":"Query All Maintenance","parameters":[{"enum":["scheduled","completed","both"],"type":"string","x-enum-varnames":["MaintenanceFilterStatusScheduled","MaintenanceFilterStatusCompleted","MaintenanceFilterStatusBoth"],"name":"status","in":"query"}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/repo.MaintenanceEntryWithDetails"}}}}}},"/v1/maintenance/{id}":{"put":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Maintenance"],"summary":"Update Maintenance Entry","parameters":[{"type":"string","description":"Maintenance ID","name":"id","in":"path","required":true},{"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","parameters":[{"type":"string","description":"Maintenance 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":"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/products/search-from-barcode":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Items"],"summary":"Search EAN from Barcode","parameters":[{"type":"string","description":"barcode to be searched","name":"data","in":"query"}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/repo.BarcodeProduct"}}}}}},"/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":[{"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":{"attachment.Type":{"type":"string","enum":["attachment","photo","manual","warranty","attachment","receipt","thumbnail"],"x-enum-varnames":["DefaultType","TypePhoto","TypeManual","TypeWarranty","TypeAttachment","TypeReceipt","TypeThumbnail"]},"authroles.Role":{"type":"string","enum":["user","admin","user","attachments"],"x-enum-varnames":["DefaultRole","RoleAdmin","RoleUser","RoleAttachments"]},"currencies.Currency":{"type":"object","properties":{"code":{"type":"string"},"decimals":{"type":"integer"},"local":{"type":"string"},"name":{"type":"string"},"symbol":{"type":"string"}}},"ent.Attachment":{"type":"object","properties":{"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the AttachmentQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.AttachmentEdges"}]},"id":{"description":"ID of the ent.","type":"string"},"mime_type":{"description":"MimeType holds the value of the \"mime_type\" field.","type":"string"},"path":{"description":"Path holds the value of the \"path\" field.","type":"string"},"primary":{"description":"Primary holds the value of the \"primary\" field.","type":"boolean"},"title":{"description":"Title holds the value of the \"title\" field.","type":"string"},"type":{"description":"Type holds the value of the \"type\" field.","allOf":[{"$ref":"#/definitions/attachment.Type"}]},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"}}},"ent.AttachmentEdges":{"type":"object","properties":{"entity":{"description":"Entity holds the value of the entity edge.","allOf":[{"$ref":"#/definitions/ent.Entity"}]},"thumbnail":{"description":"Thumbnail holds the value of the thumbnail edge.","allOf":[{"$ref":"#/definitions/ent.Attachment"}]}}},"ent.AuthRoles":{"type":"object","properties":{"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the AuthRolesQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.AuthRolesEdges"}]},"id":{"description":"ID of the ent.","type":"integer"},"role":{"description":"Role holds the value of the \"role\" field.","allOf":[{"$ref":"#/definitions/authroles.Role"}]}}},"ent.AuthRolesEdges":{"type":"object","properties":{"token":{"description":"Token holds the value of the token edge.","allOf":[{"$ref":"#/definitions/ent.AuthTokens"}]}}},"ent.AuthTokens":{"type":"object","properties":{"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the AuthTokensQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.AuthTokensEdges"}]},"expires_at":{"description":"ExpiresAt holds the value of the \"expires_at\" field.","type":"string"},"id":{"description":"ID of the ent.","type":"string"},"token":{"description":"Token holds the value of the \"token\" field.","type":"array","items":{"type":"integer"}},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"}}},"ent.AuthTokensEdges":{"type":"object","properties":{"roles":{"description":"Roles holds the value of the roles edge.","allOf":[{"$ref":"#/definitions/ent.AuthRoles"}]},"user":{"description":"User holds the value of the user edge.","allOf":[{"$ref":"#/definitions/ent.User"}]}}},"ent.Entity":{"type":"object","properties":{"archived":{"description":"Archived holds the value of the \"archived\" field.","type":"boolean"},"asset_id":{"description":"AssetID holds the value of the \"asset_id\" field.","type":"integer"},"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"description":{"description":"Description holds the value of the \"description\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the EntityQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.EntityEdges"}]},"id":{"description":"ID of the ent.","type":"string"},"import_ref":{"description":"ImportRef holds the value of the \"import_ref\" field.","type":"string"},"insured":{"description":"Insured holds the value of the \"insured\" field.","type":"boolean"},"lifetime_warranty":{"description":"LifetimeWarranty holds the value of the \"lifetime_warranty\" field.","type":"boolean"},"manufacturer":{"description":"Manufacturer holds the value of the \"manufacturer\" field.","type":"string"},"model_number":{"description":"ModelNumber holds the value of the \"model_number\" field.","type":"string"},"name":{"description":"Name holds the value of the \"name\" field.","type":"string"},"notes":{"description":"Notes holds the value of the \"notes\" field.","type":"string"},"purchase_from":{"description":"PurchaseFrom holds the value of the \"purchase_from\" field.","type":"string"},"purchase_price":{"description":"PurchasePrice holds the value of the \"purchase_price\" field.","type":"number"},"purchase_time":{"description":"PurchaseTime holds the value of the \"purchase_time\" field.","type":"string"},"quantity":{"description":"Quantity holds the value of the \"quantity\" field.","type":"integer"},"serial_number":{"description":"SerialNumber holds the value of the \"serial_number\" field.","type":"string"},"sold_notes":{"description":"SoldNotes holds the value of the \"sold_notes\" field.","type":"string"},"sold_price":{"description":"SoldPrice holds the value of the \"sold_price\" field.","type":"number"},"sold_time":{"description":"SoldTime holds the value of the \"sold_time\" field.","type":"string"},"sold_to":{"description":"SoldTo holds the value of the \"sold_to\" field.","type":"string"},"sync_child_entities_locations":{"description":"SyncChildEntitiesLocations holds the value of the \"sync_child_entities_locations\" field.","type":"boolean"},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"},"warranty_details":{"description":"WarrantyDetails holds the value of the \"warranty_details\" field.","type":"string"},"warranty_expires":{"description":"WarrantyExpires holds the value of the \"warranty_expires\" field.","type":"string"}}},"ent.EntityEdges":{"type":"object","properties":{"attachments":{"description":"Attachments holds the value of the attachments edge.","type":"array","items":{"$ref":"#/definitions/ent.Attachment"}},"children":{"description":"Children holds the value of the children edge.","type":"array","items":{"$ref":"#/definitions/ent.Entity"}},"entity":{"description":"Entity holds the value of the entity edge.","type":"array","items":{"$ref":"#/definitions/ent.Entity"}},"fields":{"description":"Fields holds the value of the fields edge.","type":"array","items":{"$ref":"#/definitions/ent.EntityField"}},"group":{"description":"Group holds the value of the group edge.","allOf":[{"$ref":"#/definitions/ent.Group"}]},"label":{"description":"Label holds the value of the label edge.","type":"array","items":{"$ref":"#/definitions/ent.Label"}},"location":{"description":"Location holds the value of the location edge.","allOf":[{"$ref":"#/definitions/ent.Entity"}]},"maintenance_entries":{"description":"MaintenanceEntries holds the value of the maintenance_entries edge.","type":"array","items":{"$ref":"#/definitions/ent.MaintenanceEntry"}},"parent":{"description":"Parent holds the value of the parent edge.","allOf":[{"$ref":"#/definitions/ent.Entity"}]},"type":{"description":"Type holds the value of the type edge.","allOf":[{"$ref":"#/definitions/ent.EntityType"}]}}},"ent.EntityField":{"type":"object","properties":{"boolean_value":{"description":"BooleanValue holds the value of the \"boolean_value\" field.","type":"boolean"},"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"description":{"description":"Description holds the value of the \"description\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the EntityFieldQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.EntityFieldEdges"}]},"id":{"description":"ID of the ent.","type":"string"},"name":{"description":"Name holds the value of the \"name\" field.","type":"string"},"number_value":{"description":"NumberValue holds the value of the \"number_value\" field.","type":"integer"},"text_value":{"description":"TextValue holds the value of the \"text_value\" field.","type":"string"},"time_value":{"description":"TimeValue holds the value of the \"time_value\" field.","type":"string"},"type":{"description":"Type holds the value of the \"type\" field.","allOf":[{"$ref":"#/definitions/entityfield.Type"}]},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"}}},"ent.EntityFieldEdges":{"type":"object","properties":{"entity":{"description":"Entity holds the value of the entity edge.","allOf":[{"$ref":"#/definitions/ent.Entity"}]}}},"ent.EntityType":{"type":"object","properties":{"color":{"description":"Color holds the value of the \"color\" field.","type":"string"},"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"description":{"description":"Description holds the value of the \"description\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the EntityTypeQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.EntityTypeEdges"}]},"icon":{"description":"Icon holds the value of the \"icon\" field.","type":"string"},"id":{"description":"ID of the ent.","type":"string"},"is_location":{"description":"IsLocation holds the value of the \"is_location\" field.","type":"boolean"},"name":{"description":"Name holds the value of the \"name\" field.","type":"string"},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"}}},"ent.EntityTypeEdges":{"type":"object","properties":{"entities":{"description":"Entities holds the value of the entities edge.","type":"array","items":{"$ref":"#/definitions/ent.Entity"}},"group":{"description":"Group holds the value of the group edge.","allOf":[{"$ref":"#/definitions/ent.Group"}]}}},"ent.Group":{"type":"object","properties":{"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"currency":{"description":"Currency holds the value of the \"currency\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the GroupQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.GroupEdges"}]},"id":{"description":"ID of the ent.","type":"string"},"name":{"description":"Name holds the value of the \"name\" field.","type":"string"},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"}}},"ent.GroupEdges":{"type":"object","properties":{"entities":{"description":"Entities holds the value of the entities edge.","type":"array","items":{"$ref":"#/definitions/ent.Entity"}},"entity_types":{"description":"EntityTypes holds the value of the entity_types edge.","type":"array","items":{"$ref":"#/definitions/ent.EntityType"}},"invitation_tokens":{"description":"InvitationTokens holds the value of the invitation_tokens edge.","type":"array","items":{"$ref":"#/definitions/ent.GroupInvitationToken"}},"labels":{"description":"Labels holds the value of the labels edge.","type":"array","items":{"$ref":"#/definitions/ent.Label"}},"notifiers":{"description":"Notifiers holds the value of the notifiers edge.","type":"array","items":{"$ref":"#/definitions/ent.Notifier"}},"users":{"description":"Users holds the value of the users edge.","type":"array","items":{"$ref":"#/definitions/ent.User"}}}},"ent.GroupInvitationToken":{"type":"object","properties":{"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the GroupInvitationTokenQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.GroupInvitationTokenEdges"}]},"expires_at":{"description":"ExpiresAt holds the value of the \"expires_at\" field.","type":"string"},"id":{"description":"ID of the ent.","type":"string"},"token":{"description":"Token holds the value of the \"token\" field.","type":"array","items":{"type":"integer"}},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"},"uses":{"description":"Uses holds the value of the \"uses\" field.","type":"integer"}}},"ent.GroupInvitationTokenEdges":{"type":"object","properties":{"group":{"description":"Group holds the value of the group edge.","allOf":[{"$ref":"#/definitions/ent.Group"}]}}},"ent.Label":{"type":"object","properties":{"color":{"description":"Color holds the value of the \"color\" field.","type":"string"},"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"description":{"description":"Description holds the value of the \"description\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the LabelQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.LabelEdges"}]},"id":{"description":"ID of the ent.","type":"string"},"name":{"description":"Name holds the value of the \"name\" field.","type":"string"},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"}}},"ent.LabelEdges":{"type":"object","properties":{"entities":{"description":"Entities holds the value of the entities edge.","type":"array","items":{"$ref":"#/definitions/ent.Entity"}},"group":{"description":"Group holds the value of the group edge.","allOf":[{"$ref":"#/definitions/ent.Group"}]}}},"ent.MaintenanceEntry":{"type":"object","properties":{"cost":{"description":"Cost holds the value of the \"cost\" field.","type":"number"},"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"date":{"description":"Date holds the value of the \"date\" field.","type":"string"},"description":{"description":"Description holds the value of the \"description\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the MaintenanceEntryQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.MaintenanceEntryEdges"}]},"entity_id":{"description":"EntityID holds the value of the \"entity_id\" field.","type":"string"},"id":{"description":"ID of the ent.","type":"string"},"name":{"description":"Name holds the value of the \"name\" field.","type":"string"},"scheduled_date":{"description":"ScheduledDate holds the value of the \"scheduled_date\" field.","type":"string"},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"}}},"ent.MaintenanceEntryEdges":{"type":"object","properties":{"entity":{"description":"Entity holds the value of the entity edge.","allOf":[{"$ref":"#/definitions/ent.Entity"}]}}},"ent.Notifier":{"type":"object","properties":{"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the NotifierQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.NotifierEdges"}]},"group_id":{"description":"GroupID holds the value of the \"group_id\" field.","type":"string"},"id":{"description":"ID of the ent.","type":"string"},"is_active":{"description":"IsActive holds the value of the \"is_active\" field.","type":"boolean"},"name":{"description":"Name holds the value of the \"name\" field.","type":"string"},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"},"user_id":{"description":"UserID holds the value of the \"user_id\" field.","type":"string"}}},"ent.NotifierEdges":{"type":"object","properties":{"group":{"description":"Group holds the value of the group edge.","allOf":[{"$ref":"#/definitions/ent.Group"}]},"user":{"description":"User holds the value of the user edge.","allOf":[{"$ref":"#/definitions/ent.User"}]}}},"ent.User":{"type":"object","properties":{"activated_on":{"description":"ActivatedOn holds the value of the \"activated_on\" field.","type":"string"},"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the UserQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.UserEdges"}]},"email":{"description":"Email holds the value of the \"email\" field.","type":"string"},"id":{"description":"ID of the ent.","type":"string"},"is_superuser":{"description":"IsSuperuser holds the value of the \"is_superuser\" field.","type":"boolean"},"name":{"description":"Name holds the value of the \"name\" field.","type":"string"},"role":{"description":"Role holds the value of the \"role\" field.","allOf":[{"$ref":"#/definitions/user.Role"}]},"superuser":{"description":"Superuser holds the value of the \"superuser\" field.","type":"boolean"},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"}}},"ent.UserEdges":{"type":"object","properties":{"auth_tokens":{"description":"AuthTokens holds the value of the auth_tokens edge.","type":"array","items":{"$ref":"#/definitions/ent.AuthTokens"}},"group":{"description":"Group holds the value of the group edge.","allOf":[{"$ref":"#/definitions/ent.Group"}]},"notifiers":{"description":"Notifiers holds the value of the notifiers edge.","type":"array","items":{"$ref":"#/definitions/ent.Notifier"}}}},"entityfield.Type":{"type":"string","enum":["text","number","boolean","time"],"x-enum-varnames":["TypeText","TypeNumber","TypeBoolean","TypeTime"]},"repo.BarcodeProduct":{"type":"object","properties":{"barcode":{"type":"string"},"imageBase64":{"type":"string"},"imageURL":{"type":"string"},"item":{"$ref":"#/definitions/repo.ItemCreate"},"manufacturer":{"type":"string"},"modelNumber":{"description":"Identifications","type":"string"},"notes":{"description":"Extras","type":"string"},"search_engine_name":{"type":"string"}}},"repo.DuplicateOptions":{"type":"object","properties":{"copyAttachments":{"type":"boolean"},"copyCustomFields":{"type":"boolean"},"copyMaintenance":{"type":"boolean"},"copyPrefix":{"type":"string"}}},"repo.EntityAttachment":{"type":"object","properties":{"createdAt":{"type":"string"},"id":{"type":"string"},"mimeType":{"type":"string"},"path":{"type":"string"},"primary":{"type":"boolean"},"thumbnail":{"$ref":"#/definitions/ent.Attachment"},"title":{"type":"string"},"type":{"type":"string"},"updatedAt":{"type":"string"}}},"repo.EntityAttachmentUpdate":{"type":"object","properties":{"primary":{"type":"boolean"},"title":{"type":"string"},"type":{"type":"string"}}},"repo.EntityType":{"type":"object","properties":{"color":{"type":"string"},"description":{"type":"string"},"icon":{"type":"string"},"isLocation":{"type":"boolean"},"name":{"type":"string"}}},"repo.EntityTypeCreate":{"type":"object","required":["isLocation","name"],"properties":{"color":{"type":"string"},"description":{"type":"string"},"icon":{"type":"string"},"isLocation":{"type":"boolean"},"name":{"type":"string"}}},"repo.EntityTypeDelete":{"type":"object","properties":{"replacementId":{"$ref":"#/definitions/uuid.NullUUID"}}},"repo.EntityTypeUpdate":{"type":"object","properties":{"color":{"type":"string"},"description":{"type":"string"},"icon":{"type":"string"},"name":{"type":"string","minLength":1}}},"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.ItemCreate":{"type":"object","required":["entityType","name"],"properties":{"description":{"type":"string","maxLength":1000},"entityType":{"type":"string"},"labelIds":{"type":"array","items":{"type":"string"}},"locationId":{"description":"Edges","type":"string"},"name":{"type":"string","maxLength":255,"minLength":1},"parentId":{"type":"string","x-nullable":true},"quantity":{"type":"integer"}}},"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.EntityAttachment"}},"createdAt":{"type":"string"},"description":{"type":"string"},"entityType":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/definitions/repo.ItemField"}},"id":{"type":"string"},"imageId":{"type":"string","x-nullable":true,"x-omitempty":true},"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":"number"},"purchaseTime":{"description":"Purchase","type":"string"},"quantity":{"type":"integer"},"serialNumber":{"type":"string"},"soldNotes":{"type":"string"},"soldPrice":{"type":"number"},"soldTime":{"description":"Sold","type":"string"},"soldTo":{"type":"string"},"syncChildItemsLocations":{"type":"boolean"},"thumbnailId":{"type":"string","x-nullable":true,"x-omitempty":true},"updatedAt":{"type":"string"},"warrantyDetails":{"type":"string"},"warrantyExpires":{"type":"string"}}},"repo.ItemPatch":{"type":"object","properties":{"id":{"type":"string"},"labelIds":{"type":"array","items":{"type":"string"},"x-nullable":true,"x-omitempty":true},"locationId":{"type":"string","x-nullable":true,"x-omitempty":true},"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"},"assetId":{"type":"string","example":"0"},"createdAt":{"type":"string"},"description":{"type":"string"},"entityType":{"type":"string"},"id":{"type":"string"},"imageId":{"type":"string","x-nullable":true,"x-omitempty":true},"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":"number"},"quantity":{"type":"integer"},"soldTime":{"description":"Sale details","type":"string"},"thumbnailId":{"type":"string","x-nullable":true,"x-omitempty":true},"updatedAt":{"type":"string"}}},"repo.ItemType":{"type":"string","enum":["location","item","location","item"],"x-enum-varnames":["EntityTypeLocation","EntityTypeItem","ItemTypeLocation","ItemTypeItem"]},"repo.ItemUpdate":{"type":"object","required":["entityType","name"],"properties":{"archived":{"type":"boolean"},"assetId":{"type":"string"},"description":{"type":"string","maxLength":1000},"entityType":{"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","maxLength":255,"minLength":1},"notes":{"description":"Extras","type":"string"},"parentId":{"type":"string","x-nullable":true,"x-omitempty":true},"purchaseFrom":{"type":"string","maxLength":255},"purchasePrice":{"type":"number","x-nullable":true,"x-omitempty":true},"purchaseTime":{"description":"Purchase","type":"string"},"quantity":{"type":"integer"},"serialNumber":{"description":"Identifications","type":"string"},"soldNotes":{"type":"string"},"soldPrice":{"type":"number","x-nullable":true,"x-omitempty":true},"soldTime":{"description":"Sold","type":"string"},"soldTo":{"type":"string","maxLength":255},"syncChildItemsLocations":{"type":"boolean"},"warrantyDetails":{"type":"string"},"warrantyExpires":{"type":"string"}}},"repo.LabelCreate":{"type":"object","required":["name"],"properties":{"color":{"type":"string"},"description":{"type":"string","maxLength":1000},"name":{"type":"string","maxLength":255,"minLength":1}}},"repo.LabelOut":{"type":"object","properties":{"color":{"type":"string"},"createdAt":{"type":"string"},"description":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"updatedAt":{"type":"string"}}},"repo.LabelSummary":{"type":"object","properties":{"color":{"type":"string"},"createdAt":{"type":"string"},"description":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"updatedAt":{"type":"string"}}},"repo.LocationCreate":{"type":"object","required":["entityType"],"properties":{"description":{"type":"string"},"entityType":{"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"},"entityType":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"parent":{"$ref":"#/definitions/repo.LocationSummary"},"totalPrice":{"type":"number"},"updatedAt":{"type":"string"}}},"repo.LocationOutCount":{"type":"object","properties":{"createdAt":{"type":"string"},"description":{"type":"string"},"entityType":{"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"},"entityType":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"updatedAt":{"type":"string"}}},"repo.LocationUpdate":{"type":"object","required":["entityType"],"properties":{"description":{"type":"string"},"entityType":{"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.MaintenanceEntryWithDetails":{"type":"object","properties":{"completedDate":{"type":"string"},"cost":{"type":"string","example":"0"},"description":{"type":"string"},"id":{"type":"string"},"itemID":{"type":"string"},"itemName":{"type":"string"},"name":{"type":"string"},"scheduledDate":{"type":"string"}}},"repo.MaintenanceFilterStatus":{"type":"string","enum":["scheduled","completed","both"],"x-enum-varnames":["MaintenanceFilterStatusScheduled","MaintenanceFilterStatusCompleted","MaintenanceFilterStatusBoth"]},"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"},"url":{"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.Latest":{"type":"object","properties":{"date":{"type":"string"},"version":{"type":"string"}}},"services.UserRegistration":{"type":"object","properties":{"email":{"type":"string"},"name":{"type":"string"},"password":{"type":"string"},"token":{"type":"string"}}},"user.Role":{"type":"string","enum":["user","user","owner"],"x-enum-varnames":["DefaultRole","RoleUser","RoleOwner"]},"uuid.NullUUID":{"type":"object","properties":{"uuid":{"type":"string"},"valid":{"description":"Valid is true if UUID is not NULL","type":"boolean"}}},"v1.APISummary":{"type":"object","properties":{"allowRegistration":{"type":"boolean"},"build":{"$ref":"#/definitions/v1.Build"},"demo":{"type":"boolean"},"health":{"type":"boolean"},"labelPrinting":{"type":"boolean"},"latest":{"$ref":"#/definitions/services.Latest"},"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","example":"admin"},"stayLoggedIn":{"type":"boolean"},"username":{"type":"string","example":"admin@admin.com"}}},"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{ diff --git a/backend/app/api/static/docs/openapi-3.json b/backend/app/api/static/docs/openapi-3.json index 2ae3681d..ceb6d5dd 100644 --- a/backend/app/api/static/docs/openapi-3.json +++ b/backend/app/api/static/docs/openapi-3.json @@ -196,6 +196,456 @@ } } }, + "/v1/entities/{id}/attachments": { + "post": { + "security": [ + { + "Bearer": [] + } + ], + "tags": [ + "Items Attachments" + ], + "summary": "Create Item Attachment", + "parameters": [ + { + "description": "Item ID", + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/postV1Entities_id_attachments" + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/repo.ItemOut" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/validate.ErrorResponse" + } + } + } + } + } + } + }, + "/v1/entities/{id}/attachments/{attachment_id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "tags": [ + "Items Attachments" + ], + "summary": "Get Item Attachment", + "parameters": [ + { + "description": "Item ID", + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Attachment ID", + "name": "attachment_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/octet-stream": { + "schema": { + "$ref": "#/components/schemas/v1.ItemAttachmentToken" + } + } + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "tags": [ + "Items Attachments" + ], + "summary": "Update Item Attachment", + "parameters": [ + { + "description": "Item ID", + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Attachment ID", + "name": "attachment_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/repo.EntityAttachmentUpdate" + }, + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/repo.ItemOut" + } + } + } + } + } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "tags": [ + "Items Attachments" + ], + "summary": "Delete Item Attachment", + "parameters": [ + { + "description": "Item ID", + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Attachment ID", + "name": "attachment_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" + } + } + } + }, + "/v1/entities/{id}/maintenance": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "tags": [ + "Item Maintenance" + ], + "summary": "Get Maintenance Log", + "parameters": [ + { + "description": "Item ID", + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "x-enum-varnames": [ + "MaintenanceFilterStatusScheduled", + "MaintenanceFilterStatusCompleted", + "MaintenanceFilterStatusBoth" + ], + "name": "status", + "in": "query", + "schema": { + "type": "string", + "enum": [ + "scheduled", + "completed", + "both" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/repo.MaintenanceEntryWithDetails" + } + } + } + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "tags": [ + "Item Maintenance" + ], + "summary": "Create Maintenance Entry", + "parameters": [ + { + "description": "Item ID", + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/repo.MaintenanceEntryCreate" + }, + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/repo.MaintenanceEntry" + } + } + } + } + } + } + }, + "/v1/entitytype": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "tags": [ + "EntityTypes" + ], + "summary": "Query All Entity Types", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/repo.EntityType" + } + } + } + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "tags": [ + "EntityTypes" + ], + "summary": "Create Entity Type", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/repo.EntityTypeCreate" + } + } + }, + "description": "Entity Type Data", + "required": true + }, + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/repo.EntityType" + } + } + } + } + } + } + }, + "/v1/entitytype/{id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "tags": [ + "EntityTypes" + ], + "summary": "Get One Entity Type", + "parameters": [ + { + "description": "Entity Type ID", + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/repo.EntityType" + } + } + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "tags": [ + "EntityTypes" + ], + "summary": "Update Entity Type", + "parameters": [ + { + "description": "Entity Type ID", + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/repo.EntityTypeUpdate" + } + } + }, + "description": "Entity Type Data", + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/repo.EntityType" + } + } + } + } + } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "tags": [ + "EntityTypes" + ], + "summary": "Delete Entity Type", + "parameters": [ + { + "description": "Entity Type ID", + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/repo.EntityTypeDelete" + } + } + }, + "description": "Entity Type Delete Options", + "required": true + }, + "responses": { + "204": { + "description": "No Content" + } + } + } + }, "/v1/groups": { "get": { "security": [ @@ -425,7 +875,8 @@ "tags": [ "Items" ], - "summary": "Query All Items", + "summary": "(Deprecated) Query All Items", + "deprecated": true, "parameters": [ { "description": "search string", @@ -511,6 +962,7 @@ "Items" ], "summary": "Create Item", + "deprecated": true, "requestBody": { "content": { "application/json": { @@ -546,7 +998,8 @@ "tags": [ "Items" ], - "summary": "Export Items", + "summary": "(Deprecated) Export Items", + "deprecated": true, "responses": { "200": { "description": "text/csv", @@ -571,7 +1024,8 @@ "tags": [ "Items" ], - "summary": "Get All Custom Field Names", + "summary": "(Deprecated) Get All Custom Field Names", + "deprecated": true, "responses": { "200": { "description": "OK", @@ -599,7 +1053,8 @@ "tags": [ "Items" ], - "summary": "Get All Custom Field Values", + "summary": "(Deprecated) Get All Custom Field Values", + "deprecated": true, "responses": { "200": { "description": "OK", @@ -627,7 +1082,8 @@ "tags": [ "Items" ], - "summary": "Import Items", + "summary": "(Deprecated) Import Items", + "deprecated": true, "requestBody": { "content": { "multipart/form-data": { @@ -665,7 +1121,8 @@ "tags": [ "Items" ], - "summary": "Get Item", + "summary": "(Deprecated) Get Item", + "deprecated": true, "parameters": [ { "description": "Item ID", @@ -699,7 +1156,8 @@ "tags": [ "Items" ], - "summary": "Update Item", + "summary": "(Deprecated) Update Item", + "deprecated": true, "parameters": [ { "description": "Item ID", @@ -744,7 +1202,8 @@ "tags": [ "Items" ], - "summary": "Delete Item", + "summary": "(Deprecated) Delete Item", + "deprecated": true, "parameters": [ { "description": "Item ID", @@ -771,7 +1230,8 @@ "tags": [ "Items" ], - "summary": "Update Item", + "summary": "(Deprecated) Update Item", + "deprecated": true, "parameters": [ { "description": "Item ID", @@ -819,6 +1279,7 @@ "Items Attachments" ], "summary": "Create Item Attachment", + "deprecated": true, "parameters": [ { "description": "Item ID", @@ -831,37 +1292,7 @@ } ], "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "file": { - "description": "File attachment", - "type": "string", - "format": "binary" - }, - "type": { - "description": "Type of file", - "type": "string" - }, - "primary": { - "description": "Is this the primary attachment", - "type": "boolean" - }, - "name": { - "description": "name of the file including extension", - "type": "string" - } - }, - "required": [ - "file", - "name" - ] - } - } - }, - "required": true + "$ref": "#/components/requestBodies/postV1Entities_id_attachments" }, "responses": { "200": { @@ -898,6 +1329,7 @@ "Items Attachments" ], "summary": "Get Item Attachment", + "deprecated": true, "parameters": [ { "description": "Item ID", @@ -941,6 +1373,7 @@ "Items Attachments" ], "summary": "Update Item Attachment", + "deprecated": true, "parameters": [ { "description": "Item ID", @@ -962,15 +1395,7 @@ } ], "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/repo.ItemAttachmentUpdate" - } - } - }, - "description": "Attachment Update", - "required": true + "$ref": "#/components/requestBodies/repo.EntityAttachmentUpdate" }, "responses": { "200": { @@ -995,6 +1420,7 @@ "Items Attachments" ], "summary": "Delete Item Attachment", + "deprecated": true, "parameters": [ { "description": "Item ID", @@ -1080,6 +1506,7 @@ "Item Maintenance" ], "summary": "Get Maintenance Log", + "deprecated": true, "parameters": [ { "description": "Item ID", @@ -1134,6 +1561,7 @@ "Item Maintenance" ], "summary": "Create Maintenance Entry", + "deprecated": true, "parameters": [ { "description": "Item ID", @@ -1146,15 +1574,7 @@ } ], "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/repo.MaintenanceEntryCreate" - } - } - }, - "description": "Entry Data", - "required": true + "$ref": "#/components/requestBodies/repo.MaintenanceEntryCreate" }, "responses": { "201": { @@ -1180,7 +1600,8 @@ "tags": [ "Items" ], - "summary": "Get the full path of an item", + "summary": "(Deprecated) Get the full path of an item", + "deprecated": true, "parameters": [ { "description": "Item ID", @@ -1510,7 +1931,8 @@ "tags": [ "Locations" ], - "summary": "Get All Locations", + "summary": "(Deprecated) Get All Locations", + "deprecated": true, "parameters": [ { "description": "Filter locations with parents", @@ -1546,7 +1968,8 @@ "tags": [ "Locations" ], - "summary": "Create Location", + "summary": "(Deprecated) Create Location", + "deprecated": true, "requestBody": { "content": { "application/json": { @@ -1582,7 +2005,8 @@ "tags": [ "Locations" ], - "summary": "Get Locations Tree", + "summary": "(Deprecated) Get Locations Tree", + "deprecated": true, "parameters": [ { "description": "include items in response tree", @@ -1620,7 +2044,8 @@ "tags": [ "Locations" ], - "summary": "Get Location", + "summary": "(Deprecated) Get Location", + "deprecated": true, "parameters": [ { "description": "Location ID", @@ -1654,7 +2079,8 @@ "tags": [ "Locations" ], - "summary": "Update Location", + "summary": "(Deprecated) Update Location", + "deprecated": true, "parameters": [ { "description": "Location ID", @@ -1699,7 +2125,8 @@ "tags": [ "Locations" ], - "summary": "Delete Location", + "summary": "(Deprecated) Delete Location", + "deprecated": true, "parameters": [ { "description": "Location ID", @@ -2367,6 +2794,63 @@ } ], "components": { + "requestBodies": { + "postV1Entities_id_attachments": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "file": { + "description": "File attachment", + "type": "string", + "format": "binary" + }, + "type": { + "description": "Type of file", + "type": "string" + }, + "primary": { + "description": "Is this the primary attachment", + "type": "boolean" + }, + "name": { + "description": "name of the file including extension", + "type": "string" + } + }, + "required": [ + "file", + "name" + ] + } + } + }, + "required": true + }, + "repo.MaintenanceEntryCreate": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/repo.MaintenanceEntryCreate" + } + } + }, + "description": "Entry Data", + "required": true + }, + "repo.EntityAttachmentUpdate": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/repo.EntityAttachmentUpdate" + } + } + }, + "description": "Attachment Update", + "required": true + } + }, "securitySchemes": { "Bearer": { "description": "\"Type 'Bearer TOKEN' to correctly set the API Key\"", @@ -2484,11 +2968,11 @@ "ent.AttachmentEdges": { "type": "object", "properties": { - "item": { - "description": "Item holds the value of the item edge.", + "entity": { + "description": "Entity holds the value of the entity edge.", "allOf": [ { - "$ref": "#/components/schemas/ent.Item" + "$ref": "#/components/schemas/ent.Entity" } ] }, @@ -2597,140 +3081,7 @@ } } }, - "ent.Group": { - "type": "object", - "properties": { - "created_at": { - "description": "CreatedAt holds the value of the \"created_at\" field.", - "type": "string" - }, - "currency": { - "description": "Currency holds the value of the \"currency\" field.", - "type": "string" - }, - "edges": { - "description": "Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the GroupQuery when eager-loading is set.", - "allOf": [ - { - "$ref": "#/components/schemas/ent.GroupEdges" - } - ] - }, - "id": { - "description": "ID of the ent.", - "type": "string" - }, - "name": { - "description": "Name holds the value of the \"name\" field.", - "type": "string" - }, - "updated_at": { - "description": "UpdatedAt holds the value of the \"updated_at\" field.", - "type": "string" - } - } - }, - "ent.GroupEdges": { - "type": "object", - "properties": { - "invitation_tokens": { - "description": "InvitationTokens holds the value of the invitation_tokens edge.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ent.GroupInvitationToken" - } - }, - "items": { - "description": "Items holds the value of the items edge.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ent.Item" - } - }, - "labels": { - "description": "Labels holds the value of the labels edge.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ent.Label" - } - }, - "locations": { - "description": "Locations holds the value of the locations edge.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ent.Location" - } - }, - "notifiers": { - "description": "Notifiers holds the value of the notifiers edge.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ent.Notifier" - } - }, - "users": { - "description": "Users holds the value of the users edge.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ent.User" - } - } - } - }, - "ent.GroupInvitationToken": { - "type": "object", - "properties": { - "created_at": { - "description": "CreatedAt holds the value of the \"created_at\" field.", - "type": "string" - }, - "edges": { - "description": "Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the GroupInvitationTokenQuery when eager-loading is set.", - "allOf": [ - { - "$ref": "#/components/schemas/ent.GroupInvitationTokenEdges" - } - ] - }, - "expires_at": { - "description": "ExpiresAt holds the value of the \"expires_at\" field.", - "type": "string" - }, - "id": { - "description": "ID of the ent.", - "type": "string" - }, - "token": { - "description": "Token holds the value of the \"token\" field.", - "type": "array", - "items": { - "type": "integer" - } - }, - "updated_at": { - "description": "UpdatedAt holds the value of the \"updated_at\" field.", - "type": "string" - }, - "uses": { - "description": "Uses holds the value of the \"uses\" field.", - "type": "integer" - } - } - }, - "ent.GroupInvitationTokenEdges": { - "type": "object", - "properties": { - "group": { - "description": "Group holds the value of the group edge.", - "allOf": [ - { - "$ref": "#/components/schemas/ent.Group" - } - ] - } - } - }, - "ent.Item": { + "ent.Entity": { "type": "object", "properties": { "archived": { @@ -2750,10 +3101,10 @@ "type": "string" }, "edges": { - "description": "Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the ItemQuery when eager-loading is set.", + "description": "Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the EntityQuery when eager-loading is set.", "allOf": [ { - "$ref": "#/components/schemas/ent.ItemEdges" + "$ref": "#/components/schemas/ent.EntityEdges" } ] }, @@ -2825,8 +3176,8 @@ "description": "SoldTo holds the value of the \"sold_to\" field.", "type": "string" }, - "sync_child_items_locations": { - "description": "SyncChildItemsLocations holds the value of the \"sync_child_items_locations\" field.", + "sync_child_entities_locations": { + "description": "SyncChildEntitiesLocations holds the value of the \"sync_child_entities_locations\" field.", "type": "boolean" }, "updated_at": { @@ -2843,7 +3194,7 @@ } } }, - "ent.ItemEdges": { + "ent.EntityEdges": { "type": "object", "properties": { "attachments": { @@ -2857,14 +3208,21 @@ "description": "Children holds the value of the children edge.", "type": "array", "items": { - "$ref": "#/components/schemas/ent.Item" + "$ref": "#/components/schemas/ent.Entity" + } + }, + "entity": { + "description": "Entity holds the value of the entity edge.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ent.Entity" } }, "fields": { "description": "Fields holds the value of the fields edge.", "type": "array", "items": { - "$ref": "#/components/schemas/ent.ItemField" + "$ref": "#/components/schemas/ent.EntityField" } }, "group": { @@ -2886,7 +3244,7 @@ "description": "Location holds the value of the location edge.", "allOf": [ { - "$ref": "#/components/schemas/ent.Location" + "$ref": "#/components/schemas/ent.Entity" } ] }, @@ -2901,13 +3259,21 @@ "description": "Parent holds the value of the parent edge.", "allOf": [ { - "$ref": "#/components/schemas/ent.Item" + "$ref": "#/components/schemas/ent.Entity" + } + ] + }, + "type": { + "description": "Type holds the value of the type edge.", + "allOf": [ + { + "$ref": "#/components/schemas/ent.EntityType" } ] } } }, - "ent.ItemField": { + "ent.EntityField": { "type": "object", "properties": { "boolean_value": { @@ -2923,10 +3289,10 @@ "type": "string" }, "edges": { - "description": "Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the ItemFieldQuery when eager-loading is set.", + "description": "Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the EntityFieldQuery when eager-loading is set.", "allOf": [ { - "$ref": "#/components/schemas/ent.ItemFieldEdges" + "$ref": "#/components/schemas/ent.EntityFieldEdges" } ] }, @@ -2954,7 +3320,7 @@ "description": "Type holds the value of the \"type\" field.", "allOf": [ { - "$ref": "#/components/schemas/itemfield.Type" + "$ref": "#/components/schemas/entityfield.Type" } ] }, @@ -2964,14 +3330,212 @@ } } }, - "ent.ItemFieldEdges": { + "ent.EntityFieldEdges": { "type": "object", "properties": { - "item": { - "description": "Item holds the value of the item edge.", + "entity": { + "description": "Entity holds the value of the entity edge.", "allOf": [ { - "$ref": "#/components/schemas/ent.Item" + "$ref": "#/components/schemas/ent.Entity" + } + ] + } + } + }, + "ent.EntityType": { + "type": "object", + "properties": { + "color": { + "description": "Color holds the value of the \"color\" field.", + "type": "string" + }, + "created_at": { + "description": "CreatedAt holds the value of the \"created_at\" field.", + "type": "string" + }, + "description": { + "description": "Description holds the value of the \"description\" field.", + "type": "string" + }, + "edges": { + "description": "Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the EntityTypeQuery when eager-loading is set.", + "allOf": [ + { + "$ref": "#/components/schemas/ent.EntityTypeEdges" + } + ] + }, + "icon": { + "description": "Icon holds the value of the \"icon\" field.", + "type": "string" + }, + "id": { + "description": "ID of the ent.", + "type": "string" + }, + "is_location": { + "description": "IsLocation holds the value of the \"is_location\" field.", + "type": "boolean" + }, + "name": { + "description": "Name holds the value of the \"name\" field.", + "type": "string" + }, + "updated_at": { + "description": "UpdatedAt holds the value of the \"updated_at\" field.", + "type": "string" + } + } + }, + "ent.EntityTypeEdges": { + "type": "object", + "properties": { + "entities": { + "description": "Entities holds the value of the entities edge.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ent.Entity" + } + }, + "group": { + "description": "Group holds the value of the group edge.", + "allOf": [ + { + "$ref": "#/components/schemas/ent.Group" + } + ] + } + } + }, + "ent.Group": { + "type": "object", + "properties": { + "created_at": { + "description": "CreatedAt holds the value of the \"created_at\" field.", + "type": "string" + }, + "currency": { + "description": "Currency holds the value of the \"currency\" field.", + "type": "string" + }, + "edges": { + "description": "Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the GroupQuery when eager-loading is set.", + "allOf": [ + { + "$ref": "#/components/schemas/ent.GroupEdges" + } + ] + }, + "id": { + "description": "ID of the ent.", + "type": "string" + }, + "name": { + "description": "Name holds the value of the \"name\" field.", + "type": "string" + }, + "updated_at": { + "description": "UpdatedAt holds the value of the \"updated_at\" field.", + "type": "string" + } + } + }, + "ent.GroupEdges": { + "type": "object", + "properties": { + "entities": { + "description": "Entities holds the value of the entities edge.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ent.Entity" + } + }, + "entity_types": { + "description": "EntityTypes holds the value of the entity_types edge.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ent.EntityType" + } + }, + "invitation_tokens": { + "description": "InvitationTokens holds the value of the invitation_tokens edge.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ent.GroupInvitationToken" + } + }, + "labels": { + "description": "Labels holds the value of the labels edge.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ent.Label" + } + }, + "notifiers": { + "description": "Notifiers holds the value of the notifiers edge.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ent.Notifier" + } + }, + "users": { + "description": "Users holds the value of the users edge.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ent.User" + } + } + } + }, + "ent.GroupInvitationToken": { + "type": "object", + "properties": { + "created_at": { + "description": "CreatedAt holds the value of the \"created_at\" field.", + "type": "string" + }, + "edges": { + "description": "Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the GroupInvitationTokenQuery when eager-loading is set.", + "allOf": [ + { + "$ref": "#/components/schemas/ent.GroupInvitationTokenEdges" + } + ] + }, + "expires_at": { + "description": "ExpiresAt holds the value of the \"expires_at\" field.", + "type": "string" + }, + "id": { + "description": "ID of the ent.", + "type": "string" + }, + "token": { + "description": "Token holds the value of the \"token\" field.", + "type": "array", + "items": { + "type": "integer" + } + }, + "updated_at": { + "description": "UpdatedAt holds the value of the \"updated_at\" field.", + "type": "string" + }, + "uses": { + "description": "Uses holds the value of the \"uses\" field.", + "type": "integer" + } + } + }, + "ent.GroupInvitationTokenEdges": { + "type": "object", + "properties": { + "group": { + "description": "Group holds the value of the group edge.", + "allOf": [ + { + "$ref": "#/components/schemas/ent.Group" } ] } @@ -3017,64 +3581,11 @@ "ent.LabelEdges": { "type": "object", "properties": { - "group": { - "description": "Group holds the value of the group edge.", - "allOf": [ - { - "$ref": "#/components/schemas/ent.Group" - } - ] - }, - "items": { - "description": "Items holds the value of the items edge.", + "entities": { + "description": "Entities holds the value of the entities edge.", "type": "array", "items": { - "$ref": "#/components/schemas/ent.Item" - } - } - } - }, - "ent.Location": { - "type": "object", - "properties": { - "created_at": { - "description": "CreatedAt holds the value of the \"created_at\" field.", - "type": "string" - }, - "description": { - "description": "Description holds the value of the \"description\" field.", - "type": "string" - }, - "edges": { - "description": "Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the LocationQuery when eager-loading is set.", - "allOf": [ - { - "$ref": "#/components/schemas/ent.LocationEdges" - } - ] - }, - "id": { - "description": "ID of the ent.", - "type": "string" - }, - "name": { - "description": "Name holds the value of the \"name\" field.", - "type": "string" - }, - "updated_at": { - "description": "UpdatedAt holds the value of the \"updated_at\" field.", - "type": "string" - } - } - }, - "ent.LocationEdges": { - "type": "object", - "properties": { - "children": { - "description": "Children holds the value of the children edge.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ent.Location" + "$ref": "#/components/schemas/ent.Entity" } }, "group": { @@ -3084,21 +3595,6 @@ "$ref": "#/components/schemas/ent.Group" } ] - }, - "items": { - "description": "Items holds the value of the items edge.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ent.Item" - } - }, - "parent": { - "description": "Parent holds the value of the parent edge.", - "allOf": [ - { - "$ref": "#/components/schemas/ent.Location" - } - ] } } }, @@ -3129,12 +3625,12 @@ } ] }, - "id": { - "description": "ID of the ent.", + "entity_id": { + "description": "EntityID holds the value of the \"entity_id\" field.", "type": "string" }, - "item_id": { - "description": "ItemID holds the value of the \"item_id\" field.", + "id": { + "description": "ID of the ent.", "type": "string" }, "name": { @@ -3154,11 +3650,11 @@ "ent.MaintenanceEntryEdges": { "type": "object", "properties": { - "item": { - "description": "Item holds the value of the item edge.", + "entity": { + "description": "Entity holds the value of the entity edge.", "allOf": [ { - "$ref": "#/components/schemas/ent.Item" + "$ref": "#/components/schemas/ent.Entity" } ] } @@ -3306,7 +3802,7 @@ } } }, - "itemfield.Type": { + "entityfield.Type": { "type": "string", "enum": [ "text", @@ -3369,6 +3865,122 @@ } } }, + "repo.EntityAttachment": { + "type": "object", + "properties": { + "createdAt": { + "type": "string" + }, + "id": { + "type": "string" + }, + "mimeType": { + "type": "string" + }, + "path": { + "type": "string" + }, + "primary": { + "type": "boolean" + }, + "thumbnail": { + "$ref": "#/components/schemas/ent.Attachment" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + } + }, + "repo.EntityAttachmentUpdate": { + "type": "object", + "properties": { + "primary": { + "type": "boolean" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "repo.EntityType": { + "type": "object", + "properties": { + "color": { + "type": "string" + }, + "description": { + "type": "string" + }, + "icon": { + "type": "string" + }, + "isLocation": { + "type": "boolean" + }, + "name": { + "type": "string" + } + } + }, + "repo.EntityTypeCreate": { + "type": "object", + "required": [ + "isLocation", + "name" + ], + "properties": { + "color": { + "type": "string" + }, + "description": { + "type": "string" + }, + "icon": { + "type": "string" + }, + "isLocation": { + "type": "boolean" + }, + "name": { + "type": "string" + } + } + }, + "repo.EntityTypeDelete": { + "type": "object", + "properties": { + "replacementId": { + "$ref": "#/components/schemas/uuid.NullUUID" + } + } + }, + "repo.EntityTypeUpdate": { + "type": "object", + "properties": { + "color": { + "type": "string" + }, + "description": { + "type": "string" + }, + "icon": { + "type": "string" + }, + "name": { + "type": "string", + "minLength": 1 + } + } + }, "repo.Group": { "type": "object", "properties": { @@ -3423,55 +4035,10 @@ } } }, - "repo.ItemAttachment": { - "type": "object", - "properties": { - "createdAt": { - "type": "string" - }, - "id": { - "type": "string" - }, - "mimeType": { - "type": "string" - }, - "path": { - "type": "string" - }, - "primary": { - "type": "boolean" - }, - "thumbnail": { - "$ref": "#/components/schemas/ent.Attachment" - }, - "title": { - "type": "string" - }, - "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": [ + "entityType", "name" ], "properties": { @@ -3479,6 +4046,9 @@ "type": "string", "maxLength": 1000 }, + "entityType": { + "type": "string" + }, "labelIds": { "type": "array", "items": { @@ -3539,7 +4109,7 @@ "attachments": { "type": "array", "items": { - "$ref": "#/components/schemas/repo.ItemAttachment" + "$ref": "#/components/schemas/repo.EntityAttachment" } }, "createdAt": { @@ -3548,6 +4118,9 @@ "description": { "type": "string" }, + "entityType": { + "type": "string" + }, "fields": { "type": "array", "items": { @@ -3711,6 +4284,9 @@ "description": { "type": "string" }, + "entityType": { + "type": "string" + }, "id": { "type": "string" }, @@ -3764,10 +4340,14 @@ "repo.ItemType": { "type": "string", "enum": [ + "location", + "item", "location", "item" ], "x-enum-varnames": [ + "EntityTypeLocation", + "EntityTypeItem", "ItemTypeLocation", "ItemTypeItem" ] @@ -3775,6 +4355,7 @@ "repo.ItemUpdate": { "type": "object", "required": [ + "entityType", "name" ], "properties": { @@ -3788,6 +4369,9 @@ "type": "string", "maxLength": 1000 }, + "entityType": { + "type": "string" + }, "fields": { "type": "array", "items": { @@ -3949,10 +4533,16 @@ }, "repo.LocationCreate": { "type": "object", + "required": [ + "entityType" + ], "properties": { "description": { "type": "string" }, + "entityType": { + "type": "string" + }, "name": { "type": "string" }, @@ -3977,6 +4567,9 @@ "description": { "type": "string" }, + "entityType": { + "type": "string" + }, "id": { "type": "string" }, @@ -4003,6 +4596,9 @@ "description": { "type": "string" }, + "entityType": { + "type": "string" + }, "id": { "type": "string" }, @@ -4026,6 +4622,9 @@ "description": { "type": "string" }, + "entityType": { + "type": "string" + }, "id": { "type": "string" }, @@ -4039,10 +4638,16 @@ }, "repo.LocationUpdate": { "type": "object", + "required": [ + "entityType" + ], "properties": { "description": { "type": "string" }, + "entityType": { + "type": "string" + }, "id": { "type": "string" }, @@ -4405,6 +5010,18 @@ "RoleOwner" ] }, + "uuid.NullUUID": { + "type": "object", + "properties": { + "uuid": { + "type": "string" + }, + "valid": { + "description": "Valid is true if UUID is not NULL", + "type": "boolean" + } + } + }, "v1.APISummary": { "type": "object", "properties": { diff --git a/backend/app/api/static/docs/openapi-3.yaml b/backend/app/api/static/docs/openapi-3.yaml index bc56d4a2..baf6ad7f 100644 --- a/backend/app/api/static/docs/openapi-3.yaml +++ b/backend/app/api/static/docs/openapi-3.yaml @@ -115,6 +115,276 @@ paths: application/json: schema: $ref: "#/components/schemas/currencies.Currency" + "/v1/entities/{id}/attachments": + post: + security: + - Bearer: [] + tags: + - Items Attachments + summary: Create Item Attachment + parameters: + - description: Item ID + name: id + in: path + required: true + schema: + type: string + requestBody: + $ref: "#/components/requestBodies/postV1Entities_id_attachments" + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/repo.ItemOut" + "422": + description: Unprocessable Entity + content: + application/json: + schema: + $ref: "#/components/schemas/validate.ErrorResponse" + "/v1/entities/{id}/attachments/{attachment_id}": + get: + security: + - Bearer: [] + tags: + - Items Attachments + summary: Get Item Attachment + parameters: + - description: Item ID + name: id + in: path + required: true + schema: + type: string + - description: Attachment ID + name: attachment_id + in: path + required: true + schema: + type: string + responses: + "200": + description: OK + content: + application/octet-stream: + schema: + $ref: "#/components/schemas/v1.ItemAttachmentToken" + put: + security: + - Bearer: [] + tags: + - Items Attachments + summary: Update Item Attachment + parameters: + - description: Item ID + name: id + in: path + required: true + schema: + type: string + - description: Attachment ID + name: attachment_id + in: path + required: true + schema: + type: string + requestBody: + $ref: "#/components/requestBodies/repo.EntityAttachmentUpdate" + responses: + "200": + description: OK + content: + "*/*": + schema: + $ref: "#/components/schemas/repo.ItemOut" + delete: + security: + - Bearer: [] + tags: + - Items Attachments + summary: Delete Item Attachment + parameters: + - description: Item ID + name: id + in: path + required: true + schema: + type: string + - description: Attachment ID + name: attachment_id + in: path + required: true + schema: + type: string + responses: + "204": + description: No Content + "/v1/entities/{id}/maintenance": + get: + security: + - Bearer: [] + tags: + - Item Maintenance + summary: Get Maintenance Log + parameters: + - description: Item ID + name: id + in: path + required: true + schema: + type: string + - x-enum-varnames: + - MaintenanceFilterStatusScheduled + - MaintenanceFilterStatusCompleted + - MaintenanceFilterStatusBoth + name: status + in: query + schema: + type: string + enum: + - scheduled + - completed + - both + responses: + "200": + description: OK + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/repo.MaintenanceEntryWithDetails" + post: + security: + - Bearer: [] + tags: + - Item Maintenance + summary: Create Maintenance Entry + parameters: + - description: Item ID + name: id + in: path + required: true + schema: + type: string + requestBody: + $ref: "#/components/requestBodies/repo.MaintenanceEntryCreate" + responses: + "201": + description: Created + content: + application/json: + schema: + $ref: "#/components/schemas/repo.MaintenanceEntry" + /v1/entitytype: + get: + security: + - Bearer: [] + tags: + - EntityTypes + summary: Query All Entity Types + responses: + "200": + description: OK + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/repo.EntityType" + post: + security: + - Bearer: [] + tags: + - EntityTypes + summary: Create Entity Type + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/repo.EntityTypeCreate" + description: Entity Type Data + required: true + responses: + "201": + description: Created + content: + application/json: + schema: + $ref: "#/components/schemas/repo.EntityType" + "/v1/entitytype/{id}": + get: + security: + - Bearer: [] + tags: + - EntityTypes + summary: Get One Entity Type + parameters: + - description: Entity Type ID + name: id + in: path + required: true + schema: + type: string + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/repo.EntityType" + put: + security: + - Bearer: [] + tags: + - EntityTypes + summary: Update Entity Type + parameters: + - description: Entity Type ID + name: id + in: path + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/repo.EntityTypeUpdate" + description: Entity Type Data + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/repo.EntityType" + delete: + security: + - Bearer: [] + tags: + - EntityTypes + summary: Delete Entity Type + parameters: + - description: Entity Type ID + name: id + in: path + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/repo.EntityTypeDelete" + description: Entity Type Delete Options + required: true + responses: + "204": + description: No Content /v1/groups: get: security: @@ -247,7 +517,8 @@ paths: - Bearer: [] tags: - Items - summary: Query All Items + summary: (Deprecated) Query All Items + deprecated: true parameters: - description: search string name: q @@ -301,6 +572,7 @@ paths: tags: - Items summary: Create Item + deprecated: true requestBody: content: application/json: @@ -321,7 +593,8 @@ paths: - Bearer: [] tags: - Items - summary: Export Items + summary: (Deprecated) Export Items + deprecated: true responses: "200": description: text/csv @@ -335,7 +608,8 @@ paths: - Bearer: [] tags: - Items - summary: Get All Custom Field Names + summary: (Deprecated) Get All Custom Field Names + deprecated: true responses: "200": description: OK @@ -351,7 +625,8 @@ paths: - Bearer: [] tags: - Items - summary: Get All Custom Field Values + summary: (Deprecated) Get All Custom Field Values + deprecated: true responses: "200": description: OK @@ -367,7 +642,8 @@ paths: - Bearer: [] tags: - Items - summary: Import Items + summary: (Deprecated) Import Items + deprecated: true requestBody: content: multipart/form-data: @@ -390,7 +666,8 @@ paths: - Bearer: [] tags: - Items - summary: Get Item + summary: (Deprecated) Get Item + deprecated: true parameters: - description: Item ID name: id @@ -410,7 +687,8 @@ paths: - Bearer: [] tags: - Items - summary: Update Item + summary: (Deprecated) Update Item + deprecated: true parameters: - description: Item ID name: id @@ -437,7 +715,8 @@ paths: - Bearer: [] tags: - Items - summary: Delete Item + summary: (Deprecated) Delete Item + deprecated: true parameters: - description: Item ID name: id @@ -453,7 +732,8 @@ paths: - Bearer: [] tags: - Items - summary: Update Item + summary: (Deprecated) Update Item + deprecated: true parameters: - description: Item ID name: id @@ -482,6 +762,7 @@ paths: tags: - Items Attachments summary: Create Item Attachment + deprecated: true parameters: - description: Item ID name: id @@ -490,28 +771,7 @@ paths: schema: type: string requestBody: - content: - multipart/form-data: - schema: - type: object - properties: - file: - description: File attachment - type: string - format: binary - type: - description: Type of file - type: string - primary: - description: Is this the primary attachment - type: boolean - name: - description: name of the file including extension - type: string - required: - - file - - name - required: true + $ref: "#/components/requestBodies/postV1Entities_id_attachments" responses: "200": description: OK @@ -532,6 +792,7 @@ paths: tags: - Items Attachments summary: Get Item Attachment + deprecated: true parameters: - description: Item ID name: id @@ -558,6 +819,7 @@ paths: tags: - Items Attachments summary: Update Item Attachment + deprecated: true parameters: - description: Item ID name: id @@ -572,12 +834,7 @@ paths: schema: type: string requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/repo.ItemAttachmentUpdate" - description: Attachment Update - required: true + $ref: "#/components/requestBodies/repo.EntityAttachmentUpdate" responses: "200": description: OK @@ -591,6 +848,7 @@ paths: tags: - Items Attachments summary: Delete Item Attachment + deprecated: true parameters: - description: Item ID name: id @@ -642,6 +900,7 @@ paths: tags: - Item Maintenance summary: Get Maintenance Log + deprecated: true parameters: - description: Item ID name: id @@ -676,6 +935,7 @@ paths: tags: - Item Maintenance summary: Create Maintenance Entry + deprecated: true parameters: - description: Item ID name: id @@ -684,12 +944,7 @@ paths: schema: type: string requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/repo.MaintenanceEntryCreate" - description: Entry Data - required: true + $ref: "#/components/requestBodies/repo.MaintenanceEntryCreate" responses: "201": description: Created @@ -703,7 +958,8 @@ paths: - Bearer: [] tags: - Items - summary: Get the full path of an item + summary: (Deprecated) Get the full path of an item + deprecated: true parameters: - description: Item ID name: id @@ -897,7 +1153,8 @@ paths: - Bearer: [] tags: - Locations - summary: Get All Locations + summary: (Deprecated) Get All Locations + deprecated: true parameters: - description: Filter locations with parents name: filterChildren @@ -918,7 +1175,8 @@ paths: - Bearer: [] tags: - Locations - summary: Create Location + summary: (Deprecated) Create Location + deprecated: true requestBody: content: application/json: @@ -939,7 +1197,8 @@ paths: - Bearer: [] tags: - Locations - summary: Get Locations Tree + summary: (Deprecated) Get Locations Tree + deprecated: true parameters: - description: include items in response tree name: withItems @@ -961,7 +1220,8 @@ paths: - Bearer: [] tags: - Locations - summary: Get Location + summary: (Deprecated) Get Location + deprecated: true parameters: - description: Location ID name: id @@ -981,7 +1241,8 @@ paths: - Bearer: [] tags: - Locations - summary: Update Location + summary: (Deprecated) Update Location + deprecated: true parameters: - description: Location ID name: id @@ -1008,7 +1269,8 @@ paths: - Bearer: [] tags: - Locations - summary: Delete Location + summary: (Deprecated) Delete Location + deprecated: true parameters: - description: Location ID name: id @@ -1399,6 +1661,44 @@ servers: - url: https://demo.homebox.software/api - url: http://demo.homebox.software/api components: + requestBodies: + postV1Entities_id_attachments: + content: + multipart/form-data: + schema: + type: object + properties: + file: + description: File attachment + type: string + format: binary + type: + description: Type of file + type: string + primary: + description: Is this the primary attachment + type: boolean + name: + description: name of the file including extension + type: string + required: + - file + - name + required: true + repo.MaintenanceEntryCreate: + content: + application/json: + schema: + $ref: "#/components/schemas/repo.MaintenanceEntryCreate" + description: Entry Data + required: true + repo.EntityAttachmentUpdate: + content: + application/json: + schema: + $ref: "#/components/schemas/repo.EntityAttachmentUpdate" + description: Attachment Update + required: true securitySchemes: Bearer: description: "\"Type 'Bearer TOKEN' to correctly set the API Key\"" @@ -1487,10 +1787,10 @@ components: ent.AttachmentEdges: type: object properties: - item: - description: Item holds the value of the item edge. + entity: + description: Entity holds the value of the entity edge. allOf: - - $ref: "#/components/schemas/ent.Item" + - $ref: "#/components/schemas/ent.Entity" thumbnail: description: Thumbnail holds the value of the thumbnail edge. allOf: @@ -1557,102 +1857,7 @@ components: description: User holds the value of the user edge. allOf: - $ref: "#/components/schemas/ent.User" - ent.Group: - type: object - properties: - created_at: - description: CreatedAt holds the value of the "created_at" field. - type: string - currency: - description: Currency holds the value of the "currency" field. - type: string - edges: - description: >- - Edges holds the relations/edges for other nodes in the graph. - - The values are being populated by the GroupQuery when eager-loading is set. - allOf: - - $ref: "#/components/schemas/ent.GroupEdges" - id: - description: ID of the ent. - type: string - name: - description: Name holds the value of the "name" field. - type: string - updated_at: - description: UpdatedAt holds the value of the "updated_at" field. - type: string - ent.GroupEdges: - type: object - properties: - invitation_tokens: - description: InvitationTokens holds the value of the invitation_tokens edge. - type: array - items: - $ref: "#/components/schemas/ent.GroupInvitationToken" - items: - description: Items holds the value of the items edge. - type: array - items: - $ref: "#/components/schemas/ent.Item" - labels: - description: Labels holds the value of the labels edge. - type: array - items: - $ref: "#/components/schemas/ent.Label" - locations: - description: Locations holds the value of the locations edge. - type: array - items: - $ref: "#/components/schemas/ent.Location" - notifiers: - description: Notifiers holds the value of the notifiers edge. - type: array - items: - $ref: "#/components/schemas/ent.Notifier" - users: - description: Users holds the value of the users edge. - type: array - items: - $ref: "#/components/schemas/ent.User" - ent.GroupInvitationToken: - type: object - properties: - created_at: - description: CreatedAt holds the value of the "created_at" field. - type: string - edges: - description: >- - Edges holds the relations/edges for other nodes in the graph. - - The values are being populated by the GroupInvitationTokenQuery when eager-loading is set. - allOf: - - $ref: "#/components/schemas/ent.GroupInvitationTokenEdges" - expires_at: - description: ExpiresAt holds the value of the "expires_at" field. - type: string - id: - description: ID of the ent. - type: string - token: - description: Token holds the value of the "token" field. - type: array - items: - type: integer - updated_at: - description: UpdatedAt holds the value of the "updated_at" field. - type: string - uses: - description: Uses holds the value of the "uses" field. - type: integer - ent.GroupInvitationTokenEdges: - type: object - properties: - group: - description: Group holds the value of the group edge. - allOf: - - $ref: "#/components/schemas/ent.Group" - ent.Item: + ent.Entity: type: object properties: archived: @@ -1671,9 +1876,9 @@ components: description: >- Edges holds the relations/edges for other nodes in the graph. - The values are being populated by the ItemQuery when eager-loading is set. + The values are being populated by the EntityQuery when eager-loading is set. allOf: - - $ref: "#/components/schemas/ent.ItemEdges" + - $ref: "#/components/schemas/ent.EntityEdges" id: description: ID of the ent. type: string @@ -1725,9 +1930,9 @@ components: sold_to: description: SoldTo holds the value of the "sold_to" field. type: string - sync_child_items_locations: - description: SyncChildItemsLocations holds the value of the - "sync_child_items_locations" field. + sync_child_entities_locations: + description: SyncChildEntitiesLocations holds the value of the + "sync_child_entities_locations" field. type: boolean updated_at: description: UpdatedAt holds the value of the "updated_at" field. @@ -1738,7 +1943,7 @@ components: warranty_expires: description: WarrantyExpires holds the value of the "warranty_expires" field. type: string - ent.ItemEdges: + ent.EntityEdges: type: object properties: attachments: @@ -1750,12 +1955,17 @@ components: description: Children holds the value of the children edge. type: array items: - $ref: "#/components/schemas/ent.Item" + $ref: "#/components/schemas/ent.Entity" + entity: + description: Entity holds the value of the entity edge. + type: array + items: + $ref: "#/components/schemas/ent.Entity" fields: description: Fields holds the value of the fields edge. type: array items: - $ref: "#/components/schemas/ent.ItemField" + $ref: "#/components/schemas/ent.EntityField" group: description: Group holds the value of the group edge. allOf: @@ -1768,7 +1978,7 @@ components: location: description: Location holds the value of the location edge. allOf: - - $ref: "#/components/schemas/ent.Location" + - $ref: "#/components/schemas/ent.Entity" maintenance_entries: description: MaintenanceEntries holds the value of the maintenance_entries edge. type: array @@ -1777,8 +1987,12 @@ components: parent: description: Parent holds the value of the parent edge. allOf: - - $ref: "#/components/schemas/ent.Item" - ent.ItemField: + - $ref: "#/components/schemas/ent.Entity" + type: + description: Type holds the value of the type edge. + allOf: + - $ref: "#/components/schemas/ent.EntityType" + ent.EntityField: type: object properties: boolean_value: @@ -1794,9 +2008,9 @@ components: description: >- Edges holds the relations/edges for other nodes in the graph. - The values are being populated by the ItemFieldQuery when eager-loading is set. + The values are being populated by the EntityFieldQuery when eager-loading is set. allOf: - - $ref: "#/components/schemas/ent.ItemFieldEdges" + - $ref: "#/components/schemas/ent.EntityFieldEdges" id: description: ID of the ent. type: string @@ -1815,17 +2029,158 @@ components: type: description: Type holds the value of the "type" field. allOf: - - $ref: "#/components/schemas/itemfield.Type" + - $ref: "#/components/schemas/entityfield.Type" updated_at: description: UpdatedAt holds the value of the "updated_at" field. type: string - ent.ItemFieldEdges: + ent.EntityFieldEdges: type: object properties: - item: - description: Item holds the value of the item edge. + entity: + description: Entity holds the value of the entity edge. allOf: - - $ref: "#/components/schemas/ent.Item" + - $ref: "#/components/schemas/ent.Entity" + ent.EntityType: + type: object + properties: + color: + description: Color holds the value of the "color" field. + type: string + created_at: + description: CreatedAt holds the value of the "created_at" field. + type: string + description: + description: Description holds the value of the "description" field. + type: string + edges: + description: >- + Edges holds the relations/edges for other nodes in the graph. + + The values are being populated by the EntityTypeQuery when eager-loading is set. + allOf: + - $ref: "#/components/schemas/ent.EntityTypeEdges" + icon: + description: Icon holds the value of the "icon" field. + type: string + id: + description: ID of the ent. + type: string + is_location: + description: IsLocation holds the value of the "is_location" field. + type: boolean + name: + description: Name holds the value of the "name" field. + type: string + updated_at: + description: UpdatedAt holds the value of the "updated_at" field. + type: string + ent.EntityTypeEdges: + type: object + properties: + entities: + description: Entities holds the value of the entities edge. + type: array + items: + $ref: "#/components/schemas/ent.Entity" + group: + description: Group holds the value of the group edge. + allOf: + - $ref: "#/components/schemas/ent.Group" + ent.Group: + type: object + properties: + created_at: + description: CreatedAt holds the value of the "created_at" field. + type: string + currency: + description: Currency holds the value of the "currency" field. + type: string + edges: + description: >- + Edges holds the relations/edges for other nodes in the graph. + + The values are being populated by the GroupQuery when eager-loading is set. + allOf: + - $ref: "#/components/schemas/ent.GroupEdges" + id: + description: ID of the ent. + type: string + name: + description: Name holds the value of the "name" field. + type: string + updated_at: + description: UpdatedAt holds the value of the "updated_at" field. + type: string + ent.GroupEdges: + type: object + properties: + entities: + description: Entities holds the value of the entities edge. + type: array + items: + $ref: "#/components/schemas/ent.Entity" + entity_types: + description: EntityTypes holds the value of the entity_types edge. + type: array + items: + $ref: "#/components/schemas/ent.EntityType" + invitation_tokens: + description: InvitationTokens holds the value of the invitation_tokens edge. + type: array + items: + $ref: "#/components/schemas/ent.GroupInvitationToken" + labels: + description: Labels holds the value of the labels edge. + type: array + items: + $ref: "#/components/schemas/ent.Label" + notifiers: + description: Notifiers holds the value of the notifiers edge. + type: array + items: + $ref: "#/components/schemas/ent.Notifier" + users: + description: Users holds the value of the users edge. + type: array + items: + $ref: "#/components/schemas/ent.User" + ent.GroupInvitationToken: + type: object + properties: + created_at: + description: CreatedAt holds the value of the "created_at" field. + type: string + edges: + description: >- + Edges holds the relations/edges for other nodes in the graph. + + The values are being populated by the GroupInvitationTokenQuery when eager-loading is set. + allOf: + - $ref: "#/components/schemas/ent.GroupInvitationTokenEdges" + expires_at: + description: ExpiresAt holds the value of the "expires_at" field. + type: string + id: + description: ID of the ent. + type: string + token: + description: Token holds the value of the "token" field. + type: array + items: + type: integer + updated_at: + description: UpdatedAt holds the value of the "updated_at" field. + type: string + uses: + description: Uses holds the value of the "uses" field. + type: integer + ent.GroupInvitationTokenEdges: + type: object + properties: + group: + description: Group holds the value of the group edge. + allOf: + - $ref: "#/components/schemas/ent.Group" ent.Label: type: object properties: @@ -1857,61 +2212,15 @@ components: ent.LabelEdges: type: object properties: + entities: + description: Entities holds the value of the entities edge. + type: array + items: + $ref: "#/components/schemas/ent.Entity" group: description: Group holds the value of the group edge. allOf: - $ref: "#/components/schemas/ent.Group" - items: - description: Items holds the value of the items edge. - type: array - items: - $ref: "#/components/schemas/ent.Item" - ent.Location: - type: object - properties: - created_at: - description: CreatedAt holds the value of the "created_at" field. - type: string - description: - description: Description holds the value of the "description" field. - type: string - edges: - description: >- - Edges holds the relations/edges for other nodes in the graph. - - The values are being populated by the LocationQuery when eager-loading is set. - allOf: - - $ref: "#/components/schemas/ent.LocationEdges" - id: - description: ID of the ent. - type: string - name: - description: Name holds the value of the "name" field. - type: string - updated_at: - description: UpdatedAt holds the value of the "updated_at" field. - type: string - ent.LocationEdges: - type: object - properties: - children: - description: Children holds the value of the children edge. - type: array - items: - $ref: "#/components/schemas/ent.Location" - group: - description: Group holds the value of the group edge. - allOf: - - $ref: "#/components/schemas/ent.Group" - items: - description: Items holds the value of the items edge. - type: array - items: - $ref: "#/components/schemas/ent.Item" - parent: - description: Parent holds the value of the parent edge. - allOf: - - $ref: "#/components/schemas/ent.Location" ent.MaintenanceEntry: type: object properties: @@ -1934,12 +2243,12 @@ components: The values are being populated by the MaintenanceEntryQuery when eager-loading is set. allOf: - $ref: "#/components/schemas/ent.MaintenanceEntryEdges" + entity_id: + description: EntityID holds the value of the "entity_id" field. + type: string id: description: ID of the ent. type: string - item_id: - description: ItemID holds the value of the "item_id" field. - type: string name: description: Name holds the value of the "name" field. type: string @@ -1952,10 +2261,10 @@ components: ent.MaintenanceEntryEdges: type: object properties: - item: - description: Item holds the value of the item edge. + entity: + description: Entity holds the value of the entity edge. allOf: - - $ref: "#/components/schemas/ent.Item" + - $ref: "#/components/schemas/ent.Entity" ent.Notifier: type: object properties: @@ -2053,7 +2362,7 @@ components: type: array items: $ref: "#/components/schemas/ent.Notifier" - itemfield.Type: + entityfield.Type: type: string enum: - text @@ -2097,6 +2406,82 @@ components: type: boolean copyPrefix: type: string + repo.EntityAttachment: + type: object + properties: + createdAt: + type: string + id: + type: string + mimeType: + type: string + path: + type: string + primary: + type: boolean + thumbnail: + $ref: "#/components/schemas/ent.Attachment" + title: + type: string + type: + type: string + updatedAt: + type: string + repo.EntityAttachmentUpdate: + type: object + properties: + primary: + type: boolean + title: + type: string + type: + type: string + repo.EntityType: + type: object + properties: + color: + type: string + description: + type: string + icon: + type: string + isLocation: + type: boolean + name: + type: string + repo.EntityTypeCreate: + type: object + required: + - isLocation + - name + properties: + color: + type: string + description: + type: string + icon: + type: string + isLocation: + type: boolean + name: + type: string + repo.EntityTypeDelete: + type: object + properties: + replacementId: + $ref: "#/components/schemas/uuid.NullUUID" + repo.EntityTypeUpdate: + type: object + properties: + color: + type: string + description: + type: string + icon: + type: string + name: + type: string + minLength: 1 repo.Group: type: object properties: @@ -2132,44 +2517,17 @@ components: type: string name: type: string - repo.ItemAttachment: - type: object - properties: - createdAt: - type: string - id: - type: string - mimeType: - type: string - path: - type: string - primary: - type: boolean - thumbnail: - $ref: "#/components/schemas/ent.Attachment" - title: - type: string - 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: + - entityType - name properties: description: type: string maxLength: 1000 + entityType: + type: string labelIds: type: array items: @@ -2212,11 +2570,13 @@ components: attachments: type: array items: - $ref: "#/components/schemas/repo.ItemAttachment" + $ref: "#/components/schemas/repo.EntityAttachment" createdAt: type: string description: type: string + entityType: + type: string fields: type: array items: @@ -2328,6 +2688,8 @@ components: type: string description: type: string + entityType: + type: string id: type: string imageId: @@ -2366,12 +2728,17 @@ components: enum: - location - item + - location + - item x-enum-varnames: + - EntityTypeLocation + - EntityTypeItem - ItemTypeLocation - ItemTypeItem repo.ItemUpdate: type: object required: + - entityType - name properties: archived: @@ -2381,6 +2748,8 @@ components: description: type: string maxLength: 1000 + entityType: + type: string fields: type: array items: @@ -2493,9 +2862,13 @@ components: type: string repo.LocationCreate: type: object + required: + - entityType properties: description: type: string + entityType: + type: string name: type: string parentId: @@ -2512,6 +2885,8 @@ components: type: string description: type: string + entityType: + type: string id: type: string name: @@ -2529,6 +2904,8 @@ components: type: string description: type: string + entityType: + type: string id: type: string itemCount: @@ -2544,6 +2921,8 @@ components: type: string description: type: string + entityType: + type: string id: type: string name: @@ -2552,9 +2931,13 @@ components: type: string repo.LocationUpdate: type: object + required: + - entityType properties: description: type: string + entityType: + type: string id: type: string name: @@ -2796,6 +3179,14 @@ components: - DefaultRole - RoleUser - RoleOwner + uuid.NullUUID: + type: object + properties: + uuid: + type: string + valid: + description: Valid is true if UUID is not NULL + type: boolean v1.APISummary: type: object properties: diff --git a/backend/app/api/static/docs/swagger.json b/backend/app/api/static/docs/swagger.json index 3b8205d8..ff53834e 100644 --- a/backend/app/api/static/docs/swagger.json +++ b/backend/app/api/static/docs/swagger.json @@ -1 +1 @@ -{"schemes":["https","http"],"swagger":"2.0","info":{"description":"Track, Manage, and Organize your Things.","title":"Homebox API","contact":{"name":"Homebox Team","url":"https://discord.homebox.software"},"version":"1.0"},"host":"demo.homebox.software","basePath":"/api","paths":{"/v1/actions/create-missing-thumbnails":{"post":{"security":[{"Bearer":[]}],"description":"Creates thumbnails for items that are missing them","produces":["application/json"],"tags":["Actions"],"summary":"Create Missing Thumbnails","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/v1.ActionAmountResult"}}}}},"/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/entities/{id}/attachments":{"post":{"security":[{"Bearer":[]}],"consumes":["multipart/form-data"],"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"},{"type":"boolean","description":"Is this the primary attachment","name":"primary","in":"formData"},{"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/entities/{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.EntityAttachmentUpdate"}}],"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/entities/{id}/maintenance":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Item Maintenance"],"summary":"Get Maintenance Log","parameters":[{"type":"string","description":"Item ID","name":"id","in":"path","required":true},{"enum":["scheduled","completed","both"],"type":"string","x-enum-varnames":["MaintenanceFilterStatusScheduled","MaintenanceFilterStatusCompleted","MaintenanceFilterStatusBoth"],"name":"status","in":"query"}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/repo.MaintenanceEntryWithDetails"}}}}},"post":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Item Maintenance"],"summary":"Create Maintenance Entry","parameters":[{"type":"string","description":"Item ID","name":"id","in":"path","required":true},{"description":"Entry Data","name":"payload","in":"body","required":true,"schema":{"$ref":"#/definitions/repo.MaintenanceEntryCreate"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/repo.MaintenanceEntry"}}}}},"/v1/entitytype":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["EntityTypes"],"summary":"Query All Entity Types","responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/repo.EntityType"}}}}},"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["EntityTypes"],"summary":"Create Entity Type","parameters":[{"description":"Entity Type Data","name":"payload","in":"body","required":true,"schema":{"$ref":"#/definitions/repo.EntityTypeCreate"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/repo.EntityType"}}}}},"/v1/entitytype/{id}":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["EntityTypes"],"summary":"Get One Entity Type","parameters":[{"type":"string","description":"Entity Type ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/repo.EntityType"}}}},"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["EntityTypes"],"summary":"Update Entity Type","parameters":[{"type":"string","description":"Entity Type ID","name":"id","in":"path","required":true},{"description":"Entity Type Data","name":"payload","in":"body","required":true,"schema":{"$ref":"#/definitions/repo.EntityTypeUpdate"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/repo.EntityType"}}}},"delete":{"security":[{"Bearer":[]}],"tags":["EntityTypes"],"summary":"Delete Entity Type","parameters":[{"type":"string","description":"Entity Type ID","name":"id","in":"path","required":true},{"description":"Entity Type Delete Options","name":"payload","in":"body","required":true,"schema":{"$ref":"#/definitions/repo.EntityTypeDelete"}}],"responses":{"204":{"description":"No Content"}}}},"/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":"(Deprecated) Query All Items","deprecated":true,"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":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["Items"],"summary":"Create Item","deprecated":true,"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":"(Deprecated) Export Items","deprecated":true,"responses":{"200":{"description":"text/csv","schema":{"type":"string"}}}}},"/v1/items/fields":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Items"],"summary":"(Deprecated) Get All Custom Field Names","deprecated":true,"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"type":"string"}}}}}},"/v1/items/fields/values":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Items"],"summary":"(Deprecated) Get All Custom Field Values","deprecated":true,"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"type":"string"}}}}}},"/v1/items/import":{"post":{"security":[{"Bearer":[]}],"consumes":["multipart/form-data"],"produces":["application/json"],"tags":["Items"],"summary":"(Deprecated) Import Items","deprecated":true,"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":"(Deprecated) Get Item","deprecated":true,"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":"(Deprecated) Update Item","deprecated":true,"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":"(Deprecated) Delete Item","deprecated":true,"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":"(Deprecated) Update Item","deprecated":true,"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":[]}],"consumes":["multipart/form-data"],"produces":["application/json"],"tags":["Items Attachments"],"summary":"Create Item Attachment","deprecated":true,"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"},{"type":"boolean","description":"Is this the primary attachment","name":"primary","in":"formData"},{"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","deprecated":true,"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","deprecated":true,"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.EntityAttachmentUpdate"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/repo.ItemOut"}}}},"delete":{"security":[{"Bearer":[]}],"tags":["Items Attachments"],"summary":"Delete Item Attachment","deprecated":true,"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}/duplicate":{"post":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Items"],"summary":"Duplicate Item","parameters":[{"type":"string","description":"Item ID","name":"id","in":"path","required":true},{"description":"Duplicate Options","name":"payload","in":"body","required":true,"schema":{"$ref":"#/definitions/repo.DuplicateOptions"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/repo.ItemOut"}}}}},"/v1/items/{id}/maintenance":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Item Maintenance"],"summary":"Get Maintenance Log","deprecated":true,"parameters":[{"type":"string","description":"Item ID","name":"id","in":"path","required":true},{"enum":["scheduled","completed","both"],"type":"string","x-enum-varnames":["MaintenanceFilterStatusScheduled","MaintenanceFilterStatusCompleted","MaintenanceFilterStatusBoth"],"name":"status","in":"query"}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/repo.MaintenanceEntryWithDetails"}}}}},"post":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Item Maintenance"],"summary":"Create Maintenance Entry","deprecated":true,"parameters":[{"type":"string","description":"Item ID","name":"id","in":"path","required":true},{"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}/path":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Items"],"summary":"(Deprecated) Get the full path of an item","deprecated":true,"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/labelmaker/assets/{id}":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Items"],"summary":"Get Asset label","parameters":[{"type":"string","description":"Asset ID","name":"id","in":"path","required":true},{"type":"boolean","description":"Print this label, defaults to false","name":"print","in":"query"}],"responses":{"200":{"description":"image/png","schema":{"type":"string"}}}}},"/v1/labelmaker/item/{id}":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Items"],"summary":"Get Item label","parameters":[{"type":"string","description":"Item ID","name":"id","in":"path","required":true},{"type":"boolean","description":"Print this label, defaults to false","name":"print","in":"query"}],"responses":{"200":{"description":"image/png","schema":{"type":"string"}}}}},"/v1/labelmaker/location/{id}":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Locations"],"summary":"Get Location label","parameters":[{"type":"string","description":"Location ID","name":"id","in":"path","required":true},{"type":"boolean","description":"Print this label, defaults to false","name":"print","in":"query"}],"responses":{"200":{"description":"image/png","schema":{"type":"string"}}}}},"/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":"(Deprecated) Get All Locations","deprecated":true,"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":"(Deprecated) Create Location","deprecated":true,"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":"(Deprecated) Get Locations Tree","deprecated":true,"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":"(Deprecated) Get Location","deprecated":true,"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":"(Deprecated) Update Location","deprecated":true,"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":"(Deprecated) Delete Location","deprecated":true,"parameters":[{"type":"string","description":"Location ID","name":"id","in":"path","required":true}],"responses":{"204":{"description":"No Content"}}}},"/v1/maintenance":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Maintenance"],"summary":"Query All Maintenance","parameters":[{"enum":["scheduled","completed","both"],"type":"string","x-enum-varnames":["MaintenanceFilterStatusScheduled","MaintenanceFilterStatusCompleted","MaintenanceFilterStatusBoth"],"name":"status","in":"query"}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/repo.MaintenanceEntryWithDetails"}}}}}},"/v1/maintenance/{id}":{"put":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Maintenance"],"summary":"Update Maintenance Entry","parameters":[{"type":"string","description":"Maintenance ID","name":"id","in":"path","required":true},{"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","parameters":[{"type":"string","description":"Maintenance 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":"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/products/search-from-barcode":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Items"],"summary":"Search EAN from Barcode","parameters":[{"type":"string","description":"barcode to be searched","name":"data","in":"query"}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/repo.BarcodeProduct"}}}}}},"/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":[{"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":{"attachment.Type":{"type":"string","enum":["attachment","photo","manual","warranty","attachment","receipt","thumbnail"],"x-enum-varnames":["DefaultType","TypePhoto","TypeManual","TypeWarranty","TypeAttachment","TypeReceipt","TypeThumbnail"]},"authroles.Role":{"type":"string","enum":["user","admin","user","attachments"],"x-enum-varnames":["DefaultRole","RoleAdmin","RoleUser","RoleAttachments"]},"currencies.Currency":{"type":"object","properties":{"code":{"type":"string"},"local":{"type":"string"},"name":{"type":"string"},"symbol":{"type":"string"}}},"ent.Attachment":{"type":"object","properties":{"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the AttachmentQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.AttachmentEdges"}]},"id":{"description":"ID of the ent.","type":"string"},"mime_type":{"description":"MimeType holds the value of the \"mime_type\" field.","type":"string"},"path":{"description":"Path holds the value of the \"path\" field.","type":"string"},"primary":{"description":"Primary holds the value of the \"primary\" field.","type":"boolean"},"title":{"description":"Title holds the value of the \"title\" field.","type":"string"},"type":{"description":"Type holds the value of the \"type\" field.","allOf":[{"$ref":"#/definitions/attachment.Type"}]},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"}}},"ent.AttachmentEdges":{"type":"object","properties":{"entity":{"description":"Entity holds the value of the entity edge.","allOf":[{"$ref":"#/definitions/ent.Entity"}]},"thumbnail":{"description":"Thumbnail holds the value of the thumbnail edge.","allOf":[{"$ref":"#/definitions/ent.Attachment"}]}}},"ent.AuthRoles":{"type":"object","properties":{"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the AuthRolesQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.AuthRolesEdges"}]},"id":{"description":"ID of the ent.","type":"integer"},"role":{"description":"Role holds the value of the \"role\" field.","allOf":[{"$ref":"#/definitions/authroles.Role"}]}}},"ent.AuthRolesEdges":{"type":"object","properties":{"token":{"description":"Token holds the value of the token edge.","allOf":[{"$ref":"#/definitions/ent.AuthTokens"}]}}},"ent.AuthTokens":{"type":"object","properties":{"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the AuthTokensQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.AuthTokensEdges"}]},"expires_at":{"description":"ExpiresAt holds the value of the \"expires_at\" field.","type":"string"},"id":{"description":"ID of the ent.","type":"string"},"token":{"description":"Token holds the value of the \"token\" field.","type":"array","items":{"type":"integer"}},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"}}},"ent.AuthTokensEdges":{"type":"object","properties":{"roles":{"description":"Roles holds the value of the roles edge.","allOf":[{"$ref":"#/definitions/ent.AuthRoles"}]},"user":{"description":"User holds the value of the user edge.","allOf":[{"$ref":"#/definitions/ent.User"}]}}},"ent.Entity":{"type":"object","properties":{"archived":{"description":"Archived holds the value of the \"archived\" field.","type":"boolean"},"asset_id":{"description":"AssetID holds the value of the \"asset_id\" field.","type":"integer"},"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"description":{"description":"Description holds the value of the \"description\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the EntityQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.EntityEdges"}]},"id":{"description":"ID of the ent.","type":"string"},"import_ref":{"description":"ImportRef holds the value of the \"import_ref\" field.","type":"string"},"insured":{"description":"Insured holds the value of the \"insured\" field.","type":"boolean"},"lifetime_warranty":{"description":"LifetimeWarranty holds the value of the \"lifetime_warranty\" field.","type":"boolean"},"manufacturer":{"description":"Manufacturer holds the value of the \"manufacturer\" field.","type":"string"},"model_number":{"description":"ModelNumber holds the value of the \"model_number\" field.","type":"string"},"name":{"description":"Name holds the value of the \"name\" field.","type":"string"},"notes":{"description":"Notes holds the value of the \"notes\" field.","type":"string"},"purchase_from":{"description":"PurchaseFrom holds the value of the \"purchase_from\" field.","type":"string"},"purchase_price":{"description":"PurchasePrice holds the value of the \"purchase_price\" field.","type":"number"},"purchase_time":{"description":"PurchaseTime holds the value of the \"purchase_time\" field.","type":"string"},"quantity":{"description":"Quantity holds the value of the \"quantity\" field.","type":"integer"},"serial_number":{"description":"SerialNumber holds the value of the \"serial_number\" field.","type":"string"},"sold_notes":{"description":"SoldNotes holds the value of the \"sold_notes\" field.","type":"string"},"sold_price":{"description":"SoldPrice holds the value of the \"sold_price\" field.","type":"number"},"sold_time":{"description":"SoldTime holds the value of the \"sold_time\" field.","type":"string"},"sold_to":{"description":"SoldTo holds the value of the \"sold_to\" field.","type":"string"},"sync_child_entities_locations":{"description":"SyncChildEntitiesLocations holds the value of the \"sync_child_entities_locations\" field.","type":"boolean"},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"},"warranty_details":{"description":"WarrantyDetails holds the value of the \"warranty_details\" field.","type":"string"},"warranty_expires":{"description":"WarrantyExpires holds the value of the \"warranty_expires\" field.","type":"string"}}},"ent.EntityEdges":{"type":"object","properties":{"attachments":{"description":"Attachments holds the value of the attachments edge.","type":"array","items":{"$ref":"#/definitions/ent.Attachment"}},"children":{"description":"Children holds the value of the children edge.","type":"array","items":{"$ref":"#/definitions/ent.Entity"}},"entity":{"description":"Entity holds the value of the entity edge.","type":"array","items":{"$ref":"#/definitions/ent.Entity"}},"fields":{"description":"Fields holds the value of the fields edge.","type":"array","items":{"$ref":"#/definitions/ent.EntityField"}},"group":{"description":"Group holds the value of the group edge.","allOf":[{"$ref":"#/definitions/ent.Group"}]},"label":{"description":"Label holds the value of the label edge.","type":"array","items":{"$ref":"#/definitions/ent.Label"}},"location":{"description":"Location holds the value of the location edge.","allOf":[{"$ref":"#/definitions/ent.Entity"}]},"maintenance_entries":{"description":"MaintenanceEntries holds the value of the maintenance_entries edge.","type":"array","items":{"$ref":"#/definitions/ent.MaintenanceEntry"}},"parent":{"description":"Parent holds the value of the parent edge.","allOf":[{"$ref":"#/definitions/ent.Entity"}]},"type":{"description":"Type holds the value of the type edge.","allOf":[{"$ref":"#/definitions/ent.EntityType"}]}}},"ent.EntityField":{"type":"object","properties":{"boolean_value":{"description":"BooleanValue holds the value of the \"boolean_value\" field.","type":"boolean"},"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"description":{"description":"Description holds the value of the \"description\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the EntityFieldQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.EntityFieldEdges"}]},"id":{"description":"ID of the ent.","type":"string"},"name":{"description":"Name holds the value of the \"name\" field.","type":"string"},"number_value":{"description":"NumberValue holds the value of the \"number_value\" field.","type":"integer"},"text_value":{"description":"TextValue holds the value of the \"text_value\" field.","type":"string"},"time_value":{"description":"TimeValue holds the value of the \"time_value\" field.","type":"string"},"type":{"description":"Type holds the value of the \"type\" field.","allOf":[{"$ref":"#/definitions/entityfield.Type"}]},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"}}},"ent.EntityFieldEdges":{"type":"object","properties":{"entity":{"description":"Entity holds the value of the entity edge.","allOf":[{"$ref":"#/definitions/ent.Entity"}]}}},"ent.EntityType":{"type":"object","properties":{"color":{"description":"Color holds the value of the \"color\" field.","type":"string"},"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"description":{"description":"Description holds the value of the \"description\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the EntityTypeQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.EntityTypeEdges"}]},"icon":{"description":"Icon holds the value of the \"icon\" field.","type":"string"},"id":{"description":"ID of the ent.","type":"string"},"is_location":{"description":"IsLocation holds the value of the \"is_location\" field.","type":"boolean"},"name":{"description":"Name holds the value of the \"name\" field.","type":"string"},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"}}},"ent.EntityTypeEdges":{"type":"object","properties":{"entities":{"description":"Entities holds the value of the entities edge.","type":"array","items":{"$ref":"#/definitions/ent.Entity"}},"group":{"description":"Group holds the value of the group edge.","allOf":[{"$ref":"#/definitions/ent.Group"}]}}},"ent.Group":{"type":"object","properties":{"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"currency":{"description":"Currency holds the value of the \"currency\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the GroupQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.GroupEdges"}]},"id":{"description":"ID of the ent.","type":"string"},"name":{"description":"Name holds the value of the \"name\" field.","type":"string"},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"}}},"ent.GroupEdges":{"type":"object","properties":{"entities":{"description":"Entities holds the value of the entities edge.","type":"array","items":{"$ref":"#/definitions/ent.Entity"}},"entity_types":{"description":"EntityTypes holds the value of the entity_types edge.","type":"array","items":{"$ref":"#/definitions/ent.EntityType"}},"invitation_tokens":{"description":"InvitationTokens holds the value of the invitation_tokens edge.","type":"array","items":{"$ref":"#/definitions/ent.GroupInvitationToken"}},"labels":{"description":"Labels holds the value of the labels edge.","type":"array","items":{"$ref":"#/definitions/ent.Label"}},"notifiers":{"description":"Notifiers holds the value of the notifiers edge.","type":"array","items":{"$ref":"#/definitions/ent.Notifier"}},"users":{"description":"Users holds the value of the users edge.","type":"array","items":{"$ref":"#/definitions/ent.User"}}}},"ent.GroupInvitationToken":{"type":"object","properties":{"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the GroupInvitationTokenQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.GroupInvitationTokenEdges"}]},"expires_at":{"description":"ExpiresAt holds the value of the \"expires_at\" field.","type":"string"},"id":{"description":"ID of the ent.","type":"string"},"token":{"description":"Token holds the value of the \"token\" field.","type":"array","items":{"type":"integer"}},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"},"uses":{"description":"Uses holds the value of the \"uses\" field.","type":"integer"}}},"ent.GroupInvitationTokenEdges":{"type":"object","properties":{"group":{"description":"Group holds the value of the group edge.","allOf":[{"$ref":"#/definitions/ent.Group"}]}}},"ent.Label":{"type":"object","properties":{"color":{"description":"Color holds the value of the \"color\" field.","type":"string"},"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"description":{"description":"Description holds the value of the \"description\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the LabelQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.LabelEdges"}]},"id":{"description":"ID of the ent.","type":"string"},"name":{"description":"Name holds the value of the \"name\" field.","type":"string"},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"}}},"ent.LabelEdges":{"type":"object","properties":{"entities":{"description":"Entities holds the value of the entities edge.","type":"array","items":{"$ref":"#/definitions/ent.Entity"}},"group":{"description":"Group holds the value of the group edge.","allOf":[{"$ref":"#/definitions/ent.Group"}]}}},"ent.MaintenanceEntry":{"type":"object","properties":{"cost":{"description":"Cost holds the value of the \"cost\" field.","type":"number"},"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"date":{"description":"Date holds the value of the \"date\" field.","type":"string"},"description":{"description":"Description holds the value of the \"description\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the MaintenanceEntryQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.MaintenanceEntryEdges"}]},"entity_id":{"description":"EntityID holds the value of the \"entity_id\" field.","type":"string"},"id":{"description":"ID of the ent.","type":"string"},"name":{"description":"Name holds the value of the \"name\" field.","type":"string"},"scheduled_date":{"description":"ScheduledDate holds the value of the \"scheduled_date\" field.","type":"string"},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"}}},"ent.MaintenanceEntryEdges":{"type":"object","properties":{"entity":{"description":"Entity holds the value of the entity edge.","allOf":[{"$ref":"#/definitions/ent.Entity"}]}}},"ent.Notifier":{"type":"object","properties":{"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the NotifierQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.NotifierEdges"}]},"group_id":{"description":"GroupID holds the value of the \"group_id\" field.","type":"string"},"id":{"description":"ID of the ent.","type":"string"},"is_active":{"description":"IsActive holds the value of the \"is_active\" field.","type":"boolean"},"name":{"description":"Name holds the value of the \"name\" field.","type":"string"},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"},"user_id":{"description":"UserID holds the value of the \"user_id\" field.","type":"string"}}},"ent.NotifierEdges":{"type":"object","properties":{"group":{"description":"Group holds the value of the group edge.","allOf":[{"$ref":"#/definitions/ent.Group"}]},"user":{"description":"User holds the value of the user edge.","allOf":[{"$ref":"#/definitions/ent.User"}]}}},"ent.User":{"type":"object","properties":{"activated_on":{"description":"ActivatedOn holds the value of the \"activated_on\" field.","type":"string"},"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the UserQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.UserEdges"}]},"email":{"description":"Email holds the value of the \"email\" field.","type":"string"},"id":{"description":"ID of the ent.","type":"string"},"is_superuser":{"description":"IsSuperuser holds the value of the \"is_superuser\" field.","type":"boolean"},"name":{"description":"Name holds the value of the \"name\" field.","type":"string"},"role":{"description":"Role holds the value of the \"role\" field.","allOf":[{"$ref":"#/definitions/user.Role"}]},"superuser":{"description":"Superuser holds the value of the \"superuser\" field.","type":"boolean"},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"}}},"ent.UserEdges":{"type":"object","properties":{"auth_tokens":{"description":"AuthTokens holds the value of the auth_tokens edge.","type":"array","items":{"$ref":"#/definitions/ent.AuthTokens"}},"group":{"description":"Group holds the value of the group edge.","allOf":[{"$ref":"#/definitions/ent.Group"}]},"notifiers":{"description":"Notifiers holds the value of the notifiers edge.","type":"array","items":{"$ref":"#/definitions/ent.Notifier"}}}},"entityfield.Type":{"type":"string","enum":["text","number","boolean","time"],"x-enum-varnames":["TypeText","TypeNumber","TypeBoolean","TypeTime"]},"repo.BarcodeProduct":{"type":"object","properties":{"barcode":{"type":"string"},"imageBase64":{"type":"string"},"imageURL":{"type":"string"},"item":{"$ref":"#/definitions/repo.ItemCreate"},"manufacturer":{"type":"string"},"modelNumber":{"description":"Identifications","type":"string"},"notes":{"description":"Extras","type":"string"},"search_engine_name":{"type":"string"}}},"repo.DuplicateOptions":{"type":"object","properties":{"copyAttachments":{"type":"boolean"},"copyCustomFields":{"type":"boolean"},"copyMaintenance":{"type":"boolean"},"copyPrefix":{"type":"string"}}},"repo.EntityAttachment":{"type":"object","properties":{"createdAt":{"type":"string"},"id":{"type":"string"},"mimeType":{"type":"string"},"path":{"type":"string"},"primary":{"type":"boolean"},"thumbnail":{"$ref":"#/definitions/ent.Attachment"},"title":{"type":"string"},"type":{"type":"string"},"updatedAt":{"type":"string"}}},"repo.EntityAttachmentUpdate":{"type":"object","properties":{"primary":{"type":"boolean"},"title":{"type":"string"},"type":{"type":"string"}}},"repo.EntityType":{"type":"object","properties":{"color":{"type":"string"},"description":{"type":"string"},"icon":{"type":"string"},"isLocation":{"type":"boolean"},"name":{"type":"string"}}},"repo.EntityTypeCreate":{"type":"object","required":["isLocation","name"],"properties":{"color":{"type":"string"},"description":{"type":"string"},"icon":{"type":"string"},"isLocation":{"type":"boolean"},"name":{"type":"string"}}},"repo.EntityTypeDelete":{"type":"object","properties":{"replacementId":{"$ref":"#/definitions/uuid.NullUUID"}}},"repo.EntityTypeUpdate":{"type":"object","properties":{"color":{"type":"string"},"description":{"type":"string"},"icon":{"type":"string"},"name":{"type":"string","minLength":1}}},"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.ItemCreate":{"type":"object","required":["entityType","name"],"properties":{"description":{"type":"string","maxLength":1000},"entityType":{"type":"string"},"labelIds":{"type":"array","items":{"type":"string"}},"locationId":{"description":"Edges","type":"string"},"name":{"type":"string","maxLength":255,"minLength":1},"parentId":{"type":"string","x-nullable":true},"quantity":{"type":"integer"}}},"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.EntityAttachment"}},"createdAt":{"type":"string"},"description":{"type":"string"},"entityType":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/definitions/repo.ItemField"}},"id":{"type":"string"},"imageId":{"type":"string","x-nullable":true,"x-omitempty":true},"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":"number"},"purchaseTime":{"description":"Purchase","type":"string"},"quantity":{"type":"integer"},"serialNumber":{"type":"string"},"soldNotes":{"type":"string"},"soldPrice":{"type":"number"},"soldTime":{"description":"Sold","type":"string"},"soldTo":{"type":"string"},"syncChildItemsLocations":{"type":"boolean"},"thumbnailId":{"type":"string","x-nullable":true,"x-omitempty":true},"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"},"assetId":{"type":"string","example":"0"},"createdAt":{"type":"string"},"description":{"type":"string"},"entityType":{"type":"string"},"id":{"type":"string"},"imageId":{"type":"string","x-nullable":true,"x-omitempty":true},"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":"number"},"quantity":{"type":"integer"},"soldTime":{"description":"Sale details","type":"string"},"thumbnailId":{"type":"string","x-nullable":true,"x-omitempty":true},"updatedAt":{"type":"string"}}},"repo.ItemType":{"type":"string","enum":["location","item"],"x-enum-varnames":["ItemTypeLocation","ItemTypeItem"]},"repo.ItemUpdate":{"type":"object","required":["entityType","name"],"properties":{"archived":{"type":"boolean"},"assetId":{"type":"string"},"description":{"type":"string","maxLength":1000},"entityType":{"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","maxLength":255,"minLength":1},"notes":{"description":"Extras","type":"string"},"parentId":{"type":"string","x-nullable":true,"x-omitempty":true},"purchaseFrom":{"type":"string","maxLength":255},"purchasePrice":{"type":"number","x-nullable":true,"x-omitempty":true},"purchaseTime":{"description":"Purchase","type":"string"},"quantity":{"type":"integer"},"serialNumber":{"description":"Identifications","type":"string"},"soldNotes":{"type":"string"},"soldPrice":{"type":"number","x-nullable":true,"x-omitempty":true},"soldTime":{"description":"Sold","type":"string"},"soldTo":{"type":"string","maxLength":255},"syncChildItemsLocations":{"type":"boolean"},"warrantyDetails":{"type":"string"},"warrantyExpires":{"type":"string"}}},"repo.LabelCreate":{"type":"object","required":["name"],"properties":{"color":{"type":"string"},"description":{"type":"string","maxLength":1000},"name":{"type":"string","maxLength":255,"minLength":1}}},"repo.LabelOut":{"type":"object","properties":{"color":{"type":"string"},"createdAt":{"type":"string"},"description":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"updatedAt":{"type":"string"}}},"repo.LabelSummary":{"type":"object","properties":{"color":{"type":"string"},"createdAt":{"type":"string"},"description":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"updatedAt":{"type":"string"}}},"repo.LocationCreate":{"type":"object","required":["entityType"],"properties":{"description":{"type":"string"},"entityType":{"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"},"entityType":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"parent":{"$ref":"#/definitions/repo.LocationSummary"},"totalPrice":{"type":"number"},"updatedAt":{"type":"string"}}},"repo.LocationOutCount":{"type":"object","properties":{"createdAt":{"type":"string"},"description":{"type":"string"},"entityType":{"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"},"entityType":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"updatedAt":{"type":"string"}}},"repo.LocationUpdate":{"type":"object","required":["entityType"],"properties":{"description":{"type":"string"},"entityType":{"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.MaintenanceEntryWithDetails":{"type":"object","properties":{"completedDate":{"type":"string"},"cost":{"type":"string","example":"0"},"description":{"type":"string"},"id":{"type":"string"},"itemID":{"type":"string"},"itemName":{"type":"string"},"name":{"type":"string"},"scheduledDate":{"type":"string"}}},"repo.MaintenanceFilterStatus":{"type":"string","enum":["scheduled","completed","both"],"x-enum-varnames":["MaintenanceFilterStatusScheduled","MaintenanceFilterStatusCompleted","MaintenanceFilterStatusBoth"]},"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"},"url":{"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.Latest":{"type":"object","properties":{"date":{"type":"string"},"version":{"type":"string"}}},"services.UserRegistration":{"type":"object","properties":{"email":{"type":"string"},"name":{"type":"string"},"password":{"type":"string"},"token":{"type":"string"}}},"user.Role":{"type":"string","enum":["user","user","owner"],"x-enum-varnames":["DefaultRole","RoleUser","RoleOwner"]},"uuid.NullUUID":{"type":"object","properties":{"uuid":{"type":"string"},"valid":{"description":"Valid is true if UUID is not NULL","type":"boolean"}}},"v1.APISummary":{"type":"object","properties":{"allowRegistration":{"type":"boolean"},"build":{"$ref":"#/definitions/v1.Build"},"demo":{"type":"boolean"},"health":{"type":"boolean"},"labelPrinting":{"type":"boolean"},"latest":{"$ref":"#/definitions/services.Latest"},"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","example":"admin"},"stayLoggedIn":{"type":"boolean"},"username":{"type":"string","example":"admin@admin.com"}}},"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"}}} \ No newline at end of file +{"schemes":["https","http"],"swagger":"2.0","info":{"description":"Track, Manage, and Organize your Things.","title":"Homebox API","contact":{"name":"Homebox Team","url":"https://discord.homebox.software"},"version":"1.0"},"host":"demo.homebox.software","basePath":"/api","paths":{"/v1/actions/create-missing-thumbnails":{"post":{"security":[{"Bearer":[]}],"description":"Creates thumbnails for items that are missing them","produces":["application/json"],"tags":["Actions"],"summary":"Create Missing Thumbnails","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/v1.ActionAmountResult"}}}}},"/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/entities/{id}/attachments":{"post":{"security":[{"Bearer":[]}],"consumes":["multipart/form-data"],"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"},{"type":"boolean","description":"Is this the primary attachment","name":"primary","in":"formData"},{"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/entities/{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.EntityAttachmentUpdate"}}],"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/entities/{id}/maintenance":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Item Maintenance"],"summary":"Get Maintenance Log","parameters":[{"type":"string","description":"Item ID","name":"id","in":"path","required":true},{"enum":["scheduled","completed","both"],"type":"string","x-enum-varnames":["MaintenanceFilterStatusScheduled","MaintenanceFilterStatusCompleted","MaintenanceFilterStatusBoth"],"name":"status","in":"query"}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/repo.MaintenanceEntryWithDetails"}}}}},"post":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Item Maintenance"],"summary":"Create Maintenance Entry","parameters":[{"type":"string","description":"Item ID","name":"id","in":"path","required":true},{"description":"Entry Data","name":"payload","in":"body","required":true,"schema":{"$ref":"#/definitions/repo.MaintenanceEntryCreate"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/repo.MaintenanceEntry"}}}}},"/v1/entitytype":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["EntityTypes"],"summary":"Query All Entity Types","responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/repo.EntityType"}}}}},"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["EntityTypes"],"summary":"Create Entity Type","parameters":[{"description":"Entity Type Data","name":"payload","in":"body","required":true,"schema":{"$ref":"#/definitions/repo.EntityTypeCreate"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/repo.EntityType"}}}}},"/v1/entitytype/{id}":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["EntityTypes"],"summary":"Get One Entity Type","parameters":[{"type":"string","description":"Entity Type ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/repo.EntityType"}}}},"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["EntityTypes"],"summary":"Update Entity Type","parameters":[{"type":"string","description":"Entity Type ID","name":"id","in":"path","required":true},{"description":"Entity Type Data","name":"payload","in":"body","required":true,"schema":{"$ref":"#/definitions/repo.EntityTypeUpdate"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/repo.EntityType"}}}},"delete":{"security":[{"Bearer":[]}],"tags":["EntityTypes"],"summary":"Delete Entity Type","parameters":[{"type":"string","description":"Entity Type ID","name":"id","in":"path","required":true},{"description":"Entity Type Delete Options","name":"payload","in":"body","required":true,"schema":{"$ref":"#/definitions/repo.EntityTypeDelete"}}],"responses":{"204":{"description":"No Content"}}}},"/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":"(Deprecated) Query All Items","deprecated":true,"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":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["Items"],"summary":"Create Item","deprecated":true,"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":"(Deprecated) Export Items","deprecated":true,"responses":{"200":{"description":"text/csv","schema":{"type":"string"}}}}},"/v1/items/fields":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Items"],"summary":"(Deprecated) Get All Custom Field Names","deprecated":true,"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"type":"string"}}}}}},"/v1/items/fields/values":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Items"],"summary":"(Deprecated) Get All Custom Field Values","deprecated":true,"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"type":"string"}}}}}},"/v1/items/import":{"post":{"security":[{"Bearer":[]}],"consumes":["multipart/form-data"],"produces":["application/json"],"tags":["Items"],"summary":"(Deprecated) Import Items","deprecated":true,"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":"(Deprecated) Get Item","deprecated":true,"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":"(Deprecated) Update Item","deprecated":true,"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":"(Deprecated) Delete Item","deprecated":true,"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":"(Deprecated) Update Item","deprecated":true,"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":[]}],"consumes":["multipart/form-data"],"produces":["application/json"],"tags":["Items Attachments"],"summary":"Create Item Attachment","deprecated":true,"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"},{"type":"boolean","description":"Is this the primary attachment","name":"primary","in":"formData"},{"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","deprecated":true,"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","deprecated":true,"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.EntityAttachmentUpdate"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/repo.ItemOut"}}}},"delete":{"security":[{"Bearer":[]}],"tags":["Items Attachments"],"summary":"Delete Item Attachment","deprecated":true,"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}/duplicate":{"post":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Items"],"summary":"Duplicate Item","parameters":[{"type":"string","description":"Item ID","name":"id","in":"path","required":true},{"description":"Duplicate Options","name":"payload","in":"body","required":true,"schema":{"$ref":"#/definitions/repo.DuplicateOptions"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/repo.ItemOut"}}}}},"/v1/items/{id}/maintenance":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Item Maintenance"],"summary":"Get Maintenance Log","deprecated":true,"parameters":[{"type":"string","description":"Item ID","name":"id","in":"path","required":true},{"enum":["scheduled","completed","both"],"type":"string","x-enum-varnames":["MaintenanceFilterStatusScheduled","MaintenanceFilterStatusCompleted","MaintenanceFilterStatusBoth"],"name":"status","in":"query"}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/repo.MaintenanceEntryWithDetails"}}}}},"post":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Item Maintenance"],"summary":"Create Maintenance Entry","deprecated":true,"parameters":[{"type":"string","description":"Item ID","name":"id","in":"path","required":true},{"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}/path":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Items"],"summary":"(Deprecated) Get the full path of an item","deprecated":true,"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/labelmaker/assets/{id}":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Items"],"summary":"Get Asset label","parameters":[{"type":"string","description":"Asset ID","name":"id","in":"path","required":true},{"type":"boolean","description":"Print this label, defaults to false","name":"print","in":"query"}],"responses":{"200":{"description":"image/png","schema":{"type":"string"}}}}},"/v1/labelmaker/item/{id}":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Items"],"summary":"Get Item label","parameters":[{"type":"string","description":"Item ID","name":"id","in":"path","required":true},{"type":"boolean","description":"Print this label, defaults to false","name":"print","in":"query"}],"responses":{"200":{"description":"image/png","schema":{"type":"string"}}}}},"/v1/labelmaker/location/{id}":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Locations"],"summary":"Get Location label","parameters":[{"type":"string","description":"Location ID","name":"id","in":"path","required":true},{"type":"boolean","description":"Print this label, defaults to false","name":"print","in":"query"}],"responses":{"200":{"description":"image/png","schema":{"type":"string"}}}}},"/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":"(Deprecated) Get All Locations","deprecated":true,"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":"(Deprecated) Create Location","deprecated":true,"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":"(Deprecated) Get Locations Tree","deprecated":true,"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":"(Deprecated) Get Location","deprecated":true,"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":"(Deprecated) Update Location","deprecated":true,"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":"(Deprecated) Delete Location","deprecated":true,"parameters":[{"type":"string","description":"Location ID","name":"id","in":"path","required":true}],"responses":{"204":{"description":"No Content"}}}},"/v1/maintenance":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Maintenance"],"summary":"Query All Maintenance","parameters":[{"enum":["scheduled","completed","both"],"type":"string","x-enum-varnames":["MaintenanceFilterStatusScheduled","MaintenanceFilterStatusCompleted","MaintenanceFilterStatusBoth"],"name":"status","in":"query"}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/repo.MaintenanceEntryWithDetails"}}}}}},"/v1/maintenance/{id}":{"put":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Maintenance"],"summary":"Update Maintenance Entry","parameters":[{"type":"string","description":"Maintenance ID","name":"id","in":"path","required":true},{"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","parameters":[{"type":"string","description":"Maintenance 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":"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/products/search-from-barcode":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Items"],"summary":"Search EAN from Barcode","parameters":[{"type":"string","description":"barcode to be searched","name":"data","in":"query"}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/repo.BarcodeProduct"}}}}}},"/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":[{"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":{"attachment.Type":{"type":"string","enum":["attachment","photo","manual","warranty","attachment","receipt","thumbnail"],"x-enum-varnames":["DefaultType","TypePhoto","TypeManual","TypeWarranty","TypeAttachment","TypeReceipt","TypeThumbnail"]},"authroles.Role":{"type":"string","enum":["user","admin","user","attachments"],"x-enum-varnames":["DefaultRole","RoleAdmin","RoleUser","RoleAttachments"]},"currencies.Currency":{"type":"object","properties":{"code":{"type":"string"},"decimals":{"type":"integer"},"local":{"type":"string"},"name":{"type":"string"},"symbol":{"type":"string"}}},"ent.Attachment":{"type":"object","properties":{"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the AttachmentQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.AttachmentEdges"}]},"id":{"description":"ID of the ent.","type":"string"},"mime_type":{"description":"MimeType holds the value of the \"mime_type\" field.","type":"string"},"path":{"description":"Path holds the value of the \"path\" field.","type":"string"},"primary":{"description":"Primary holds the value of the \"primary\" field.","type":"boolean"},"title":{"description":"Title holds the value of the \"title\" field.","type":"string"},"type":{"description":"Type holds the value of the \"type\" field.","allOf":[{"$ref":"#/definitions/attachment.Type"}]},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"}}},"ent.AttachmentEdges":{"type":"object","properties":{"entity":{"description":"Entity holds the value of the entity edge.","allOf":[{"$ref":"#/definitions/ent.Entity"}]},"thumbnail":{"description":"Thumbnail holds the value of the thumbnail edge.","allOf":[{"$ref":"#/definitions/ent.Attachment"}]}}},"ent.AuthRoles":{"type":"object","properties":{"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the AuthRolesQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.AuthRolesEdges"}]},"id":{"description":"ID of the ent.","type":"integer"},"role":{"description":"Role holds the value of the \"role\" field.","allOf":[{"$ref":"#/definitions/authroles.Role"}]}}},"ent.AuthRolesEdges":{"type":"object","properties":{"token":{"description":"Token holds the value of the token edge.","allOf":[{"$ref":"#/definitions/ent.AuthTokens"}]}}},"ent.AuthTokens":{"type":"object","properties":{"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the AuthTokensQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.AuthTokensEdges"}]},"expires_at":{"description":"ExpiresAt holds the value of the \"expires_at\" field.","type":"string"},"id":{"description":"ID of the ent.","type":"string"},"token":{"description":"Token holds the value of the \"token\" field.","type":"array","items":{"type":"integer"}},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"}}},"ent.AuthTokensEdges":{"type":"object","properties":{"roles":{"description":"Roles holds the value of the roles edge.","allOf":[{"$ref":"#/definitions/ent.AuthRoles"}]},"user":{"description":"User holds the value of the user edge.","allOf":[{"$ref":"#/definitions/ent.User"}]}}},"ent.Entity":{"type":"object","properties":{"archived":{"description":"Archived holds the value of the \"archived\" field.","type":"boolean"},"asset_id":{"description":"AssetID holds the value of the \"asset_id\" field.","type":"integer"},"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"description":{"description":"Description holds the value of the \"description\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the EntityQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.EntityEdges"}]},"id":{"description":"ID of the ent.","type":"string"},"import_ref":{"description":"ImportRef holds the value of the \"import_ref\" field.","type":"string"},"insured":{"description":"Insured holds the value of the \"insured\" field.","type":"boolean"},"lifetime_warranty":{"description":"LifetimeWarranty holds the value of the \"lifetime_warranty\" field.","type":"boolean"},"manufacturer":{"description":"Manufacturer holds the value of the \"manufacturer\" field.","type":"string"},"model_number":{"description":"ModelNumber holds the value of the \"model_number\" field.","type":"string"},"name":{"description":"Name holds the value of the \"name\" field.","type":"string"},"notes":{"description":"Notes holds the value of the \"notes\" field.","type":"string"},"purchase_from":{"description":"PurchaseFrom holds the value of the \"purchase_from\" field.","type":"string"},"purchase_price":{"description":"PurchasePrice holds the value of the \"purchase_price\" field.","type":"number"},"purchase_time":{"description":"PurchaseTime holds the value of the \"purchase_time\" field.","type":"string"},"quantity":{"description":"Quantity holds the value of the \"quantity\" field.","type":"integer"},"serial_number":{"description":"SerialNumber holds the value of the \"serial_number\" field.","type":"string"},"sold_notes":{"description":"SoldNotes holds the value of the \"sold_notes\" field.","type":"string"},"sold_price":{"description":"SoldPrice holds the value of the \"sold_price\" field.","type":"number"},"sold_time":{"description":"SoldTime holds the value of the \"sold_time\" field.","type":"string"},"sold_to":{"description":"SoldTo holds the value of the \"sold_to\" field.","type":"string"},"sync_child_entities_locations":{"description":"SyncChildEntitiesLocations holds the value of the \"sync_child_entities_locations\" field.","type":"boolean"},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"},"warranty_details":{"description":"WarrantyDetails holds the value of the \"warranty_details\" field.","type":"string"},"warranty_expires":{"description":"WarrantyExpires holds the value of the \"warranty_expires\" field.","type":"string"}}},"ent.EntityEdges":{"type":"object","properties":{"attachments":{"description":"Attachments holds the value of the attachments edge.","type":"array","items":{"$ref":"#/definitions/ent.Attachment"}},"children":{"description":"Children holds the value of the children edge.","type":"array","items":{"$ref":"#/definitions/ent.Entity"}},"entity":{"description":"Entity holds the value of the entity edge.","type":"array","items":{"$ref":"#/definitions/ent.Entity"}},"fields":{"description":"Fields holds the value of the fields edge.","type":"array","items":{"$ref":"#/definitions/ent.EntityField"}},"group":{"description":"Group holds the value of the group edge.","allOf":[{"$ref":"#/definitions/ent.Group"}]},"label":{"description":"Label holds the value of the label edge.","type":"array","items":{"$ref":"#/definitions/ent.Label"}},"location":{"description":"Location holds the value of the location edge.","allOf":[{"$ref":"#/definitions/ent.Entity"}]},"maintenance_entries":{"description":"MaintenanceEntries holds the value of the maintenance_entries edge.","type":"array","items":{"$ref":"#/definitions/ent.MaintenanceEntry"}},"parent":{"description":"Parent holds the value of the parent edge.","allOf":[{"$ref":"#/definitions/ent.Entity"}]},"type":{"description":"Type holds the value of the type edge.","allOf":[{"$ref":"#/definitions/ent.EntityType"}]}}},"ent.EntityField":{"type":"object","properties":{"boolean_value":{"description":"BooleanValue holds the value of the \"boolean_value\" field.","type":"boolean"},"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"description":{"description":"Description holds the value of the \"description\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the EntityFieldQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.EntityFieldEdges"}]},"id":{"description":"ID of the ent.","type":"string"},"name":{"description":"Name holds the value of the \"name\" field.","type":"string"},"number_value":{"description":"NumberValue holds the value of the \"number_value\" field.","type":"integer"},"text_value":{"description":"TextValue holds the value of the \"text_value\" field.","type":"string"},"time_value":{"description":"TimeValue holds the value of the \"time_value\" field.","type":"string"},"type":{"description":"Type holds the value of the \"type\" field.","allOf":[{"$ref":"#/definitions/entityfield.Type"}]},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"}}},"ent.EntityFieldEdges":{"type":"object","properties":{"entity":{"description":"Entity holds the value of the entity edge.","allOf":[{"$ref":"#/definitions/ent.Entity"}]}}},"ent.EntityType":{"type":"object","properties":{"color":{"description":"Color holds the value of the \"color\" field.","type":"string"},"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"description":{"description":"Description holds the value of the \"description\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the EntityTypeQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.EntityTypeEdges"}]},"icon":{"description":"Icon holds the value of the \"icon\" field.","type":"string"},"id":{"description":"ID of the ent.","type":"string"},"is_location":{"description":"IsLocation holds the value of the \"is_location\" field.","type":"boolean"},"name":{"description":"Name holds the value of the \"name\" field.","type":"string"},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"}}},"ent.EntityTypeEdges":{"type":"object","properties":{"entities":{"description":"Entities holds the value of the entities edge.","type":"array","items":{"$ref":"#/definitions/ent.Entity"}},"group":{"description":"Group holds the value of the group edge.","allOf":[{"$ref":"#/definitions/ent.Group"}]}}},"ent.Group":{"type":"object","properties":{"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"currency":{"description":"Currency holds the value of the \"currency\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the GroupQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.GroupEdges"}]},"id":{"description":"ID of the ent.","type":"string"},"name":{"description":"Name holds the value of the \"name\" field.","type":"string"},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"}}},"ent.GroupEdges":{"type":"object","properties":{"entities":{"description":"Entities holds the value of the entities edge.","type":"array","items":{"$ref":"#/definitions/ent.Entity"}},"entity_types":{"description":"EntityTypes holds the value of the entity_types edge.","type":"array","items":{"$ref":"#/definitions/ent.EntityType"}},"invitation_tokens":{"description":"InvitationTokens holds the value of the invitation_tokens edge.","type":"array","items":{"$ref":"#/definitions/ent.GroupInvitationToken"}},"labels":{"description":"Labels holds the value of the labels edge.","type":"array","items":{"$ref":"#/definitions/ent.Label"}},"notifiers":{"description":"Notifiers holds the value of the notifiers edge.","type":"array","items":{"$ref":"#/definitions/ent.Notifier"}},"users":{"description":"Users holds the value of the users edge.","type":"array","items":{"$ref":"#/definitions/ent.User"}}}},"ent.GroupInvitationToken":{"type":"object","properties":{"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the GroupInvitationTokenQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.GroupInvitationTokenEdges"}]},"expires_at":{"description":"ExpiresAt holds the value of the \"expires_at\" field.","type":"string"},"id":{"description":"ID of the ent.","type":"string"},"token":{"description":"Token holds the value of the \"token\" field.","type":"array","items":{"type":"integer"}},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"},"uses":{"description":"Uses holds the value of the \"uses\" field.","type":"integer"}}},"ent.GroupInvitationTokenEdges":{"type":"object","properties":{"group":{"description":"Group holds the value of the group edge.","allOf":[{"$ref":"#/definitions/ent.Group"}]}}},"ent.Label":{"type":"object","properties":{"color":{"description":"Color holds the value of the \"color\" field.","type":"string"},"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"description":{"description":"Description holds the value of the \"description\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the LabelQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.LabelEdges"}]},"id":{"description":"ID of the ent.","type":"string"},"name":{"description":"Name holds the value of the \"name\" field.","type":"string"},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"}}},"ent.LabelEdges":{"type":"object","properties":{"entities":{"description":"Entities holds the value of the entities edge.","type":"array","items":{"$ref":"#/definitions/ent.Entity"}},"group":{"description":"Group holds the value of the group edge.","allOf":[{"$ref":"#/definitions/ent.Group"}]}}},"ent.MaintenanceEntry":{"type":"object","properties":{"cost":{"description":"Cost holds the value of the \"cost\" field.","type":"number"},"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"date":{"description":"Date holds the value of the \"date\" field.","type":"string"},"description":{"description":"Description holds the value of the \"description\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the MaintenanceEntryQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.MaintenanceEntryEdges"}]},"entity_id":{"description":"EntityID holds the value of the \"entity_id\" field.","type":"string"},"id":{"description":"ID of the ent.","type":"string"},"name":{"description":"Name holds the value of the \"name\" field.","type":"string"},"scheduled_date":{"description":"ScheduledDate holds the value of the \"scheduled_date\" field.","type":"string"},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"}}},"ent.MaintenanceEntryEdges":{"type":"object","properties":{"entity":{"description":"Entity holds the value of the entity edge.","allOf":[{"$ref":"#/definitions/ent.Entity"}]}}},"ent.Notifier":{"type":"object","properties":{"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the NotifierQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.NotifierEdges"}]},"group_id":{"description":"GroupID holds the value of the \"group_id\" field.","type":"string"},"id":{"description":"ID of the ent.","type":"string"},"is_active":{"description":"IsActive holds the value of the \"is_active\" field.","type":"boolean"},"name":{"description":"Name holds the value of the \"name\" field.","type":"string"},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"},"user_id":{"description":"UserID holds the value of the \"user_id\" field.","type":"string"}}},"ent.NotifierEdges":{"type":"object","properties":{"group":{"description":"Group holds the value of the group edge.","allOf":[{"$ref":"#/definitions/ent.Group"}]},"user":{"description":"User holds the value of the user edge.","allOf":[{"$ref":"#/definitions/ent.User"}]}}},"ent.User":{"type":"object","properties":{"activated_on":{"description":"ActivatedOn holds the value of the \"activated_on\" field.","type":"string"},"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the UserQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.UserEdges"}]},"email":{"description":"Email holds the value of the \"email\" field.","type":"string"},"id":{"description":"ID of the ent.","type":"string"},"is_superuser":{"description":"IsSuperuser holds the value of the \"is_superuser\" field.","type":"boolean"},"name":{"description":"Name holds the value of the \"name\" field.","type":"string"},"role":{"description":"Role holds the value of the \"role\" field.","allOf":[{"$ref":"#/definitions/user.Role"}]},"superuser":{"description":"Superuser holds the value of the \"superuser\" field.","type":"boolean"},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"}}},"ent.UserEdges":{"type":"object","properties":{"auth_tokens":{"description":"AuthTokens holds the value of the auth_tokens edge.","type":"array","items":{"$ref":"#/definitions/ent.AuthTokens"}},"group":{"description":"Group holds the value of the group edge.","allOf":[{"$ref":"#/definitions/ent.Group"}]},"notifiers":{"description":"Notifiers holds the value of the notifiers edge.","type":"array","items":{"$ref":"#/definitions/ent.Notifier"}}}},"entityfield.Type":{"type":"string","enum":["text","number","boolean","time"],"x-enum-varnames":["TypeText","TypeNumber","TypeBoolean","TypeTime"]},"repo.BarcodeProduct":{"type":"object","properties":{"barcode":{"type":"string"},"imageBase64":{"type":"string"},"imageURL":{"type":"string"},"item":{"$ref":"#/definitions/repo.ItemCreate"},"manufacturer":{"type":"string"},"modelNumber":{"description":"Identifications","type":"string"},"notes":{"description":"Extras","type":"string"},"search_engine_name":{"type":"string"}}},"repo.DuplicateOptions":{"type":"object","properties":{"copyAttachments":{"type":"boolean"},"copyCustomFields":{"type":"boolean"},"copyMaintenance":{"type":"boolean"},"copyPrefix":{"type":"string"}}},"repo.EntityAttachment":{"type":"object","properties":{"createdAt":{"type":"string"},"id":{"type":"string"},"mimeType":{"type":"string"},"path":{"type":"string"},"primary":{"type":"boolean"},"thumbnail":{"$ref":"#/definitions/ent.Attachment"},"title":{"type":"string"},"type":{"type":"string"},"updatedAt":{"type":"string"}}},"repo.EntityAttachmentUpdate":{"type":"object","properties":{"primary":{"type":"boolean"},"title":{"type":"string"},"type":{"type":"string"}}},"repo.EntityType":{"type":"object","properties":{"color":{"type":"string"},"description":{"type":"string"},"icon":{"type":"string"},"isLocation":{"type":"boolean"},"name":{"type":"string"}}},"repo.EntityTypeCreate":{"type":"object","required":["isLocation","name"],"properties":{"color":{"type":"string"},"description":{"type":"string"},"icon":{"type":"string"},"isLocation":{"type":"boolean"},"name":{"type":"string"}}},"repo.EntityTypeDelete":{"type":"object","properties":{"replacementId":{"$ref":"#/definitions/uuid.NullUUID"}}},"repo.EntityTypeUpdate":{"type":"object","properties":{"color":{"type":"string"},"description":{"type":"string"},"icon":{"type":"string"},"name":{"type":"string","minLength":1}}},"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.ItemCreate":{"type":"object","required":["entityType","name"],"properties":{"description":{"type":"string","maxLength":1000},"entityType":{"type":"string"},"labelIds":{"type":"array","items":{"type":"string"}},"locationId":{"description":"Edges","type":"string"},"name":{"type":"string","maxLength":255,"minLength":1},"parentId":{"type":"string","x-nullable":true},"quantity":{"type":"integer"}}},"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.EntityAttachment"}},"createdAt":{"type":"string"},"description":{"type":"string"},"entityType":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/definitions/repo.ItemField"}},"id":{"type":"string"},"imageId":{"type":"string","x-nullable":true,"x-omitempty":true},"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":"number"},"purchaseTime":{"description":"Purchase","type":"string"},"quantity":{"type":"integer"},"serialNumber":{"type":"string"},"soldNotes":{"type":"string"},"soldPrice":{"type":"number"},"soldTime":{"description":"Sold","type":"string"},"soldTo":{"type":"string"},"syncChildItemsLocations":{"type":"boolean"},"thumbnailId":{"type":"string","x-nullable":true,"x-omitempty":true},"updatedAt":{"type":"string"},"warrantyDetails":{"type":"string"},"warrantyExpires":{"type":"string"}}},"repo.ItemPatch":{"type":"object","properties":{"id":{"type":"string"},"labelIds":{"type":"array","items":{"type":"string"},"x-nullable":true,"x-omitempty":true},"locationId":{"type":"string","x-nullable":true,"x-omitempty":true},"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"},"assetId":{"type":"string","example":"0"},"createdAt":{"type":"string"},"description":{"type":"string"},"entityType":{"type":"string"},"id":{"type":"string"},"imageId":{"type":"string","x-nullable":true,"x-omitempty":true},"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":"number"},"quantity":{"type":"integer"},"soldTime":{"description":"Sale details","type":"string"},"thumbnailId":{"type":"string","x-nullable":true,"x-omitempty":true},"updatedAt":{"type":"string"}}},"repo.ItemType":{"type":"string","enum":["location","item","location","item"],"x-enum-varnames":["EntityTypeLocation","EntityTypeItem","ItemTypeLocation","ItemTypeItem"]},"repo.ItemUpdate":{"type":"object","required":["entityType","name"],"properties":{"archived":{"type":"boolean"},"assetId":{"type":"string"},"description":{"type":"string","maxLength":1000},"entityType":{"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","maxLength":255,"minLength":1},"notes":{"description":"Extras","type":"string"},"parentId":{"type":"string","x-nullable":true,"x-omitempty":true},"purchaseFrom":{"type":"string","maxLength":255},"purchasePrice":{"type":"number","x-nullable":true,"x-omitempty":true},"purchaseTime":{"description":"Purchase","type":"string"},"quantity":{"type":"integer"},"serialNumber":{"description":"Identifications","type":"string"},"soldNotes":{"type":"string"},"soldPrice":{"type":"number","x-nullable":true,"x-omitempty":true},"soldTime":{"description":"Sold","type":"string"},"soldTo":{"type":"string","maxLength":255},"syncChildItemsLocations":{"type":"boolean"},"warrantyDetails":{"type":"string"},"warrantyExpires":{"type":"string"}}},"repo.LabelCreate":{"type":"object","required":["name"],"properties":{"color":{"type":"string"},"description":{"type":"string","maxLength":1000},"name":{"type":"string","maxLength":255,"minLength":1}}},"repo.LabelOut":{"type":"object","properties":{"color":{"type":"string"},"createdAt":{"type":"string"},"description":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"updatedAt":{"type":"string"}}},"repo.LabelSummary":{"type":"object","properties":{"color":{"type":"string"},"createdAt":{"type":"string"},"description":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"updatedAt":{"type":"string"}}},"repo.LocationCreate":{"type":"object","required":["entityType"],"properties":{"description":{"type":"string"},"entityType":{"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"},"entityType":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"parent":{"$ref":"#/definitions/repo.LocationSummary"},"totalPrice":{"type":"number"},"updatedAt":{"type":"string"}}},"repo.LocationOutCount":{"type":"object","properties":{"createdAt":{"type":"string"},"description":{"type":"string"},"entityType":{"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"},"entityType":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"updatedAt":{"type":"string"}}},"repo.LocationUpdate":{"type":"object","required":["entityType"],"properties":{"description":{"type":"string"},"entityType":{"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.MaintenanceEntryWithDetails":{"type":"object","properties":{"completedDate":{"type":"string"},"cost":{"type":"string","example":"0"},"description":{"type":"string"},"id":{"type":"string"},"itemID":{"type":"string"},"itemName":{"type":"string"},"name":{"type":"string"},"scheduledDate":{"type":"string"}}},"repo.MaintenanceFilterStatus":{"type":"string","enum":["scheduled","completed","both"],"x-enum-varnames":["MaintenanceFilterStatusScheduled","MaintenanceFilterStatusCompleted","MaintenanceFilterStatusBoth"]},"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"},"url":{"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.Latest":{"type":"object","properties":{"date":{"type":"string"},"version":{"type":"string"}}},"services.UserRegistration":{"type":"object","properties":{"email":{"type":"string"},"name":{"type":"string"},"password":{"type":"string"},"token":{"type":"string"}}},"user.Role":{"type":"string","enum":["user","user","owner"],"x-enum-varnames":["DefaultRole","RoleUser","RoleOwner"]},"uuid.NullUUID":{"type":"object","properties":{"uuid":{"type":"string"},"valid":{"description":"Valid is true if UUID is not NULL","type":"boolean"}}},"v1.APISummary":{"type":"object","properties":{"allowRegistration":{"type":"boolean"},"build":{"$ref":"#/definitions/v1.Build"},"demo":{"type":"boolean"},"health":{"type":"boolean"},"labelPrinting":{"type":"boolean"},"latest":{"$ref":"#/definitions/services.Latest"},"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","example":"admin"},"stayLoggedIn":{"type":"boolean"},"username":{"type":"string","example":"admin@admin.com"}}},"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"}}} \ No newline at end of file diff --git a/backend/app/api/static/docs/swagger.yaml b/backend/app/api/static/docs/swagger.yaml index b45cee93..2e123553 100644 --- a/backend/app/api/static/docs/swagger.yaml +++ b/backend/app/api/static/docs/swagger.yaml @@ -1010,8 +1010,12 @@ definitions: enum: - location - item + - location + - item type: string x-enum-varnames: + - EntityTypeLocation + - EntityTypeItem - ItemTypeLocation - ItemTypeItem repo.ItemUpdate: diff --git a/docs/en/api/openapi-3.0.json b/docs/en/api/openapi-3.0.json index 2ae3681d..ceb6d5dd 100644 --- a/docs/en/api/openapi-3.0.json +++ b/docs/en/api/openapi-3.0.json @@ -196,6 +196,456 @@ } } }, + "/v1/entities/{id}/attachments": { + "post": { + "security": [ + { + "Bearer": [] + } + ], + "tags": [ + "Items Attachments" + ], + "summary": "Create Item Attachment", + "parameters": [ + { + "description": "Item ID", + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/postV1Entities_id_attachments" + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/repo.ItemOut" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/validate.ErrorResponse" + } + } + } + } + } + } + }, + "/v1/entities/{id}/attachments/{attachment_id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "tags": [ + "Items Attachments" + ], + "summary": "Get Item Attachment", + "parameters": [ + { + "description": "Item ID", + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Attachment ID", + "name": "attachment_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/octet-stream": { + "schema": { + "$ref": "#/components/schemas/v1.ItemAttachmentToken" + } + } + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "tags": [ + "Items Attachments" + ], + "summary": "Update Item Attachment", + "parameters": [ + { + "description": "Item ID", + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Attachment ID", + "name": "attachment_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/repo.EntityAttachmentUpdate" + }, + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/repo.ItemOut" + } + } + } + } + } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "tags": [ + "Items Attachments" + ], + "summary": "Delete Item Attachment", + "parameters": [ + { + "description": "Item ID", + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Attachment ID", + "name": "attachment_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" + } + } + } + }, + "/v1/entities/{id}/maintenance": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "tags": [ + "Item Maintenance" + ], + "summary": "Get Maintenance Log", + "parameters": [ + { + "description": "Item ID", + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "x-enum-varnames": [ + "MaintenanceFilterStatusScheduled", + "MaintenanceFilterStatusCompleted", + "MaintenanceFilterStatusBoth" + ], + "name": "status", + "in": "query", + "schema": { + "type": "string", + "enum": [ + "scheduled", + "completed", + "both" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/repo.MaintenanceEntryWithDetails" + } + } + } + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "tags": [ + "Item Maintenance" + ], + "summary": "Create Maintenance Entry", + "parameters": [ + { + "description": "Item ID", + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/repo.MaintenanceEntryCreate" + }, + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/repo.MaintenanceEntry" + } + } + } + } + } + } + }, + "/v1/entitytype": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "tags": [ + "EntityTypes" + ], + "summary": "Query All Entity Types", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/repo.EntityType" + } + } + } + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "tags": [ + "EntityTypes" + ], + "summary": "Create Entity Type", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/repo.EntityTypeCreate" + } + } + }, + "description": "Entity Type Data", + "required": true + }, + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/repo.EntityType" + } + } + } + } + } + } + }, + "/v1/entitytype/{id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "tags": [ + "EntityTypes" + ], + "summary": "Get One Entity Type", + "parameters": [ + { + "description": "Entity Type ID", + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/repo.EntityType" + } + } + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "tags": [ + "EntityTypes" + ], + "summary": "Update Entity Type", + "parameters": [ + { + "description": "Entity Type ID", + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/repo.EntityTypeUpdate" + } + } + }, + "description": "Entity Type Data", + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/repo.EntityType" + } + } + } + } + } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "tags": [ + "EntityTypes" + ], + "summary": "Delete Entity Type", + "parameters": [ + { + "description": "Entity Type ID", + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/repo.EntityTypeDelete" + } + } + }, + "description": "Entity Type Delete Options", + "required": true + }, + "responses": { + "204": { + "description": "No Content" + } + } + } + }, "/v1/groups": { "get": { "security": [ @@ -425,7 +875,8 @@ "tags": [ "Items" ], - "summary": "Query All Items", + "summary": "(Deprecated) Query All Items", + "deprecated": true, "parameters": [ { "description": "search string", @@ -511,6 +962,7 @@ "Items" ], "summary": "Create Item", + "deprecated": true, "requestBody": { "content": { "application/json": { @@ -546,7 +998,8 @@ "tags": [ "Items" ], - "summary": "Export Items", + "summary": "(Deprecated) Export Items", + "deprecated": true, "responses": { "200": { "description": "text/csv", @@ -571,7 +1024,8 @@ "tags": [ "Items" ], - "summary": "Get All Custom Field Names", + "summary": "(Deprecated) Get All Custom Field Names", + "deprecated": true, "responses": { "200": { "description": "OK", @@ -599,7 +1053,8 @@ "tags": [ "Items" ], - "summary": "Get All Custom Field Values", + "summary": "(Deprecated) Get All Custom Field Values", + "deprecated": true, "responses": { "200": { "description": "OK", @@ -627,7 +1082,8 @@ "tags": [ "Items" ], - "summary": "Import Items", + "summary": "(Deprecated) Import Items", + "deprecated": true, "requestBody": { "content": { "multipart/form-data": { @@ -665,7 +1121,8 @@ "tags": [ "Items" ], - "summary": "Get Item", + "summary": "(Deprecated) Get Item", + "deprecated": true, "parameters": [ { "description": "Item ID", @@ -699,7 +1156,8 @@ "tags": [ "Items" ], - "summary": "Update Item", + "summary": "(Deprecated) Update Item", + "deprecated": true, "parameters": [ { "description": "Item ID", @@ -744,7 +1202,8 @@ "tags": [ "Items" ], - "summary": "Delete Item", + "summary": "(Deprecated) Delete Item", + "deprecated": true, "parameters": [ { "description": "Item ID", @@ -771,7 +1230,8 @@ "tags": [ "Items" ], - "summary": "Update Item", + "summary": "(Deprecated) Update Item", + "deprecated": true, "parameters": [ { "description": "Item ID", @@ -819,6 +1279,7 @@ "Items Attachments" ], "summary": "Create Item Attachment", + "deprecated": true, "parameters": [ { "description": "Item ID", @@ -831,37 +1292,7 @@ } ], "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "file": { - "description": "File attachment", - "type": "string", - "format": "binary" - }, - "type": { - "description": "Type of file", - "type": "string" - }, - "primary": { - "description": "Is this the primary attachment", - "type": "boolean" - }, - "name": { - "description": "name of the file including extension", - "type": "string" - } - }, - "required": [ - "file", - "name" - ] - } - } - }, - "required": true + "$ref": "#/components/requestBodies/postV1Entities_id_attachments" }, "responses": { "200": { @@ -898,6 +1329,7 @@ "Items Attachments" ], "summary": "Get Item Attachment", + "deprecated": true, "parameters": [ { "description": "Item ID", @@ -941,6 +1373,7 @@ "Items Attachments" ], "summary": "Update Item Attachment", + "deprecated": true, "parameters": [ { "description": "Item ID", @@ -962,15 +1395,7 @@ } ], "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/repo.ItemAttachmentUpdate" - } - } - }, - "description": "Attachment Update", - "required": true + "$ref": "#/components/requestBodies/repo.EntityAttachmentUpdate" }, "responses": { "200": { @@ -995,6 +1420,7 @@ "Items Attachments" ], "summary": "Delete Item Attachment", + "deprecated": true, "parameters": [ { "description": "Item ID", @@ -1080,6 +1506,7 @@ "Item Maintenance" ], "summary": "Get Maintenance Log", + "deprecated": true, "parameters": [ { "description": "Item ID", @@ -1134,6 +1561,7 @@ "Item Maintenance" ], "summary": "Create Maintenance Entry", + "deprecated": true, "parameters": [ { "description": "Item ID", @@ -1146,15 +1574,7 @@ } ], "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/repo.MaintenanceEntryCreate" - } - } - }, - "description": "Entry Data", - "required": true + "$ref": "#/components/requestBodies/repo.MaintenanceEntryCreate" }, "responses": { "201": { @@ -1180,7 +1600,8 @@ "tags": [ "Items" ], - "summary": "Get the full path of an item", + "summary": "(Deprecated) Get the full path of an item", + "deprecated": true, "parameters": [ { "description": "Item ID", @@ -1510,7 +1931,8 @@ "tags": [ "Locations" ], - "summary": "Get All Locations", + "summary": "(Deprecated) Get All Locations", + "deprecated": true, "parameters": [ { "description": "Filter locations with parents", @@ -1546,7 +1968,8 @@ "tags": [ "Locations" ], - "summary": "Create Location", + "summary": "(Deprecated) Create Location", + "deprecated": true, "requestBody": { "content": { "application/json": { @@ -1582,7 +2005,8 @@ "tags": [ "Locations" ], - "summary": "Get Locations Tree", + "summary": "(Deprecated) Get Locations Tree", + "deprecated": true, "parameters": [ { "description": "include items in response tree", @@ -1620,7 +2044,8 @@ "tags": [ "Locations" ], - "summary": "Get Location", + "summary": "(Deprecated) Get Location", + "deprecated": true, "parameters": [ { "description": "Location ID", @@ -1654,7 +2079,8 @@ "tags": [ "Locations" ], - "summary": "Update Location", + "summary": "(Deprecated) Update Location", + "deprecated": true, "parameters": [ { "description": "Location ID", @@ -1699,7 +2125,8 @@ "tags": [ "Locations" ], - "summary": "Delete Location", + "summary": "(Deprecated) Delete Location", + "deprecated": true, "parameters": [ { "description": "Location ID", @@ -2367,6 +2794,63 @@ } ], "components": { + "requestBodies": { + "postV1Entities_id_attachments": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "file": { + "description": "File attachment", + "type": "string", + "format": "binary" + }, + "type": { + "description": "Type of file", + "type": "string" + }, + "primary": { + "description": "Is this the primary attachment", + "type": "boolean" + }, + "name": { + "description": "name of the file including extension", + "type": "string" + } + }, + "required": [ + "file", + "name" + ] + } + } + }, + "required": true + }, + "repo.MaintenanceEntryCreate": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/repo.MaintenanceEntryCreate" + } + } + }, + "description": "Entry Data", + "required": true + }, + "repo.EntityAttachmentUpdate": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/repo.EntityAttachmentUpdate" + } + } + }, + "description": "Attachment Update", + "required": true + } + }, "securitySchemes": { "Bearer": { "description": "\"Type 'Bearer TOKEN' to correctly set the API Key\"", @@ -2484,11 +2968,11 @@ "ent.AttachmentEdges": { "type": "object", "properties": { - "item": { - "description": "Item holds the value of the item edge.", + "entity": { + "description": "Entity holds the value of the entity edge.", "allOf": [ { - "$ref": "#/components/schemas/ent.Item" + "$ref": "#/components/schemas/ent.Entity" } ] }, @@ -2597,140 +3081,7 @@ } } }, - "ent.Group": { - "type": "object", - "properties": { - "created_at": { - "description": "CreatedAt holds the value of the \"created_at\" field.", - "type": "string" - }, - "currency": { - "description": "Currency holds the value of the \"currency\" field.", - "type": "string" - }, - "edges": { - "description": "Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the GroupQuery when eager-loading is set.", - "allOf": [ - { - "$ref": "#/components/schemas/ent.GroupEdges" - } - ] - }, - "id": { - "description": "ID of the ent.", - "type": "string" - }, - "name": { - "description": "Name holds the value of the \"name\" field.", - "type": "string" - }, - "updated_at": { - "description": "UpdatedAt holds the value of the \"updated_at\" field.", - "type": "string" - } - } - }, - "ent.GroupEdges": { - "type": "object", - "properties": { - "invitation_tokens": { - "description": "InvitationTokens holds the value of the invitation_tokens edge.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ent.GroupInvitationToken" - } - }, - "items": { - "description": "Items holds the value of the items edge.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ent.Item" - } - }, - "labels": { - "description": "Labels holds the value of the labels edge.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ent.Label" - } - }, - "locations": { - "description": "Locations holds the value of the locations edge.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ent.Location" - } - }, - "notifiers": { - "description": "Notifiers holds the value of the notifiers edge.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ent.Notifier" - } - }, - "users": { - "description": "Users holds the value of the users edge.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ent.User" - } - } - } - }, - "ent.GroupInvitationToken": { - "type": "object", - "properties": { - "created_at": { - "description": "CreatedAt holds the value of the \"created_at\" field.", - "type": "string" - }, - "edges": { - "description": "Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the GroupInvitationTokenQuery when eager-loading is set.", - "allOf": [ - { - "$ref": "#/components/schemas/ent.GroupInvitationTokenEdges" - } - ] - }, - "expires_at": { - "description": "ExpiresAt holds the value of the \"expires_at\" field.", - "type": "string" - }, - "id": { - "description": "ID of the ent.", - "type": "string" - }, - "token": { - "description": "Token holds the value of the \"token\" field.", - "type": "array", - "items": { - "type": "integer" - } - }, - "updated_at": { - "description": "UpdatedAt holds the value of the \"updated_at\" field.", - "type": "string" - }, - "uses": { - "description": "Uses holds the value of the \"uses\" field.", - "type": "integer" - } - } - }, - "ent.GroupInvitationTokenEdges": { - "type": "object", - "properties": { - "group": { - "description": "Group holds the value of the group edge.", - "allOf": [ - { - "$ref": "#/components/schemas/ent.Group" - } - ] - } - } - }, - "ent.Item": { + "ent.Entity": { "type": "object", "properties": { "archived": { @@ -2750,10 +3101,10 @@ "type": "string" }, "edges": { - "description": "Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the ItemQuery when eager-loading is set.", + "description": "Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the EntityQuery when eager-loading is set.", "allOf": [ { - "$ref": "#/components/schemas/ent.ItemEdges" + "$ref": "#/components/schemas/ent.EntityEdges" } ] }, @@ -2825,8 +3176,8 @@ "description": "SoldTo holds the value of the \"sold_to\" field.", "type": "string" }, - "sync_child_items_locations": { - "description": "SyncChildItemsLocations holds the value of the \"sync_child_items_locations\" field.", + "sync_child_entities_locations": { + "description": "SyncChildEntitiesLocations holds the value of the \"sync_child_entities_locations\" field.", "type": "boolean" }, "updated_at": { @@ -2843,7 +3194,7 @@ } } }, - "ent.ItemEdges": { + "ent.EntityEdges": { "type": "object", "properties": { "attachments": { @@ -2857,14 +3208,21 @@ "description": "Children holds the value of the children edge.", "type": "array", "items": { - "$ref": "#/components/schemas/ent.Item" + "$ref": "#/components/schemas/ent.Entity" + } + }, + "entity": { + "description": "Entity holds the value of the entity edge.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ent.Entity" } }, "fields": { "description": "Fields holds the value of the fields edge.", "type": "array", "items": { - "$ref": "#/components/schemas/ent.ItemField" + "$ref": "#/components/schemas/ent.EntityField" } }, "group": { @@ -2886,7 +3244,7 @@ "description": "Location holds the value of the location edge.", "allOf": [ { - "$ref": "#/components/schemas/ent.Location" + "$ref": "#/components/schemas/ent.Entity" } ] }, @@ -2901,13 +3259,21 @@ "description": "Parent holds the value of the parent edge.", "allOf": [ { - "$ref": "#/components/schemas/ent.Item" + "$ref": "#/components/schemas/ent.Entity" + } + ] + }, + "type": { + "description": "Type holds the value of the type edge.", + "allOf": [ + { + "$ref": "#/components/schemas/ent.EntityType" } ] } } }, - "ent.ItemField": { + "ent.EntityField": { "type": "object", "properties": { "boolean_value": { @@ -2923,10 +3289,10 @@ "type": "string" }, "edges": { - "description": "Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the ItemFieldQuery when eager-loading is set.", + "description": "Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the EntityFieldQuery when eager-loading is set.", "allOf": [ { - "$ref": "#/components/schemas/ent.ItemFieldEdges" + "$ref": "#/components/schemas/ent.EntityFieldEdges" } ] }, @@ -2954,7 +3320,7 @@ "description": "Type holds the value of the \"type\" field.", "allOf": [ { - "$ref": "#/components/schemas/itemfield.Type" + "$ref": "#/components/schemas/entityfield.Type" } ] }, @@ -2964,14 +3330,212 @@ } } }, - "ent.ItemFieldEdges": { + "ent.EntityFieldEdges": { "type": "object", "properties": { - "item": { - "description": "Item holds the value of the item edge.", + "entity": { + "description": "Entity holds the value of the entity edge.", "allOf": [ { - "$ref": "#/components/schemas/ent.Item" + "$ref": "#/components/schemas/ent.Entity" + } + ] + } + } + }, + "ent.EntityType": { + "type": "object", + "properties": { + "color": { + "description": "Color holds the value of the \"color\" field.", + "type": "string" + }, + "created_at": { + "description": "CreatedAt holds the value of the \"created_at\" field.", + "type": "string" + }, + "description": { + "description": "Description holds the value of the \"description\" field.", + "type": "string" + }, + "edges": { + "description": "Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the EntityTypeQuery when eager-loading is set.", + "allOf": [ + { + "$ref": "#/components/schemas/ent.EntityTypeEdges" + } + ] + }, + "icon": { + "description": "Icon holds the value of the \"icon\" field.", + "type": "string" + }, + "id": { + "description": "ID of the ent.", + "type": "string" + }, + "is_location": { + "description": "IsLocation holds the value of the \"is_location\" field.", + "type": "boolean" + }, + "name": { + "description": "Name holds the value of the \"name\" field.", + "type": "string" + }, + "updated_at": { + "description": "UpdatedAt holds the value of the \"updated_at\" field.", + "type": "string" + } + } + }, + "ent.EntityTypeEdges": { + "type": "object", + "properties": { + "entities": { + "description": "Entities holds the value of the entities edge.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ent.Entity" + } + }, + "group": { + "description": "Group holds the value of the group edge.", + "allOf": [ + { + "$ref": "#/components/schemas/ent.Group" + } + ] + } + } + }, + "ent.Group": { + "type": "object", + "properties": { + "created_at": { + "description": "CreatedAt holds the value of the \"created_at\" field.", + "type": "string" + }, + "currency": { + "description": "Currency holds the value of the \"currency\" field.", + "type": "string" + }, + "edges": { + "description": "Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the GroupQuery when eager-loading is set.", + "allOf": [ + { + "$ref": "#/components/schemas/ent.GroupEdges" + } + ] + }, + "id": { + "description": "ID of the ent.", + "type": "string" + }, + "name": { + "description": "Name holds the value of the \"name\" field.", + "type": "string" + }, + "updated_at": { + "description": "UpdatedAt holds the value of the \"updated_at\" field.", + "type": "string" + } + } + }, + "ent.GroupEdges": { + "type": "object", + "properties": { + "entities": { + "description": "Entities holds the value of the entities edge.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ent.Entity" + } + }, + "entity_types": { + "description": "EntityTypes holds the value of the entity_types edge.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ent.EntityType" + } + }, + "invitation_tokens": { + "description": "InvitationTokens holds the value of the invitation_tokens edge.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ent.GroupInvitationToken" + } + }, + "labels": { + "description": "Labels holds the value of the labels edge.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ent.Label" + } + }, + "notifiers": { + "description": "Notifiers holds the value of the notifiers edge.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ent.Notifier" + } + }, + "users": { + "description": "Users holds the value of the users edge.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ent.User" + } + } + } + }, + "ent.GroupInvitationToken": { + "type": "object", + "properties": { + "created_at": { + "description": "CreatedAt holds the value of the \"created_at\" field.", + "type": "string" + }, + "edges": { + "description": "Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the GroupInvitationTokenQuery when eager-loading is set.", + "allOf": [ + { + "$ref": "#/components/schemas/ent.GroupInvitationTokenEdges" + } + ] + }, + "expires_at": { + "description": "ExpiresAt holds the value of the \"expires_at\" field.", + "type": "string" + }, + "id": { + "description": "ID of the ent.", + "type": "string" + }, + "token": { + "description": "Token holds the value of the \"token\" field.", + "type": "array", + "items": { + "type": "integer" + } + }, + "updated_at": { + "description": "UpdatedAt holds the value of the \"updated_at\" field.", + "type": "string" + }, + "uses": { + "description": "Uses holds the value of the \"uses\" field.", + "type": "integer" + } + } + }, + "ent.GroupInvitationTokenEdges": { + "type": "object", + "properties": { + "group": { + "description": "Group holds the value of the group edge.", + "allOf": [ + { + "$ref": "#/components/schemas/ent.Group" } ] } @@ -3017,64 +3581,11 @@ "ent.LabelEdges": { "type": "object", "properties": { - "group": { - "description": "Group holds the value of the group edge.", - "allOf": [ - { - "$ref": "#/components/schemas/ent.Group" - } - ] - }, - "items": { - "description": "Items holds the value of the items edge.", + "entities": { + "description": "Entities holds the value of the entities edge.", "type": "array", "items": { - "$ref": "#/components/schemas/ent.Item" - } - } - } - }, - "ent.Location": { - "type": "object", - "properties": { - "created_at": { - "description": "CreatedAt holds the value of the \"created_at\" field.", - "type": "string" - }, - "description": { - "description": "Description holds the value of the \"description\" field.", - "type": "string" - }, - "edges": { - "description": "Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the LocationQuery when eager-loading is set.", - "allOf": [ - { - "$ref": "#/components/schemas/ent.LocationEdges" - } - ] - }, - "id": { - "description": "ID of the ent.", - "type": "string" - }, - "name": { - "description": "Name holds the value of the \"name\" field.", - "type": "string" - }, - "updated_at": { - "description": "UpdatedAt holds the value of the \"updated_at\" field.", - "type": "string" - } - } - }, - "ent.LocationEdges": { - "type": "object", - "properties": { - "children": { - "description": "Children holds the value of the children edge.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ent.Location" + "$ref": "#/components/schemas/ent.Entity" } }, "group": { @@ -3084,21 +3595,6 @@ "$ref": "#/components/schemas/ent.Group" } ] - }, - "items": { - "description": "Items holds the value of the items edge.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ent.Item" - } - }, - "parent": { - "description": "Parent holds the value of the parent edge.", - "allOf": [ - { - "$ref": "#/components/schemas/ent.Location" - } - ] } } }, @@ -3129,12 +3625,12 @@ } ] }, - "id": { - "description": "ID of the ent.", + "entity_id": { + "description": "EntityID holds the value of the \"entity_id\" field.", "type": "string" }, - "item_id": { - "description": "ItemID holds the value of the \"item_id\" field.", + "id": { + "description": "ID of the ent.", "type": "string" }, "name": { @@ -3154,11 +3650,11 @@ "ent.MaintenanceEntryEdges": { "type": "object", "properties": { - "item": { - "description": "Item holds the value of the item edge.", + "entity": { + "description": "Entity holds the value of the entity edge.", "allOf": [ { - "$ref": "#/components/schemas/ent.Item" + "$ref": "#/components/schemas/ent.Entity" } ] } @@ -3306,7 +3802,7 @@ } } }, - "itemfield.Type": { + "entityfield.Type": { "type": "string", "enum": [ "text", @@ -3369,6 +3865,122 @@ } } }, + "repo.EntityAttachment": { + "type": "object", + "properties": { + "createdAt": { + "type": "string" + }, + "id": { + "type": "string" + }, + "mimeType": { + "type": "string" + }, + "path": { + "type": "string" + }, + "primary": { + "type": "boolean" + }, + "thumbnail": { + "$ref": "#/components/schemas/ent.Attachment" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + } + }, + "repo.EntityAttachmentUpdate": { + "type": "object", + "properties": { + "primary": { + "type": "boolean" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "repo.EntityType": { + "type": "object", + "properties": { + "color": { + "type": "string" + }, + "description": { + "type": "string" + }, + "icon": { + "type": "string" + }, + "isLocation": { + "type": "boolean" + }, + "name": { + "type": "string" + } + } + }, + "repo.EntityTypeCreate": { + "type": "object", + "required": [ + "isLocation", + "name" + ], + "properties": { + "color": { + "type": "string" + }, + "description": { + "type": "string" + }, + "icon": { + "type": "string" + }, + "isLocation": { + "type": "boolean" + }, + "name": { + "type": "string" + } + } + }, + "repo.EntityTypeDelete": { + "type": "object", + "properties": { + "replacementId": { + "$ref": "#/components/schemas/uuid.NullUUID" + } + } + }, + "repo.EntityTypeUpdate": { + "type": "object", + "properties": { + "color": { + "type": "string" + }, + "description": { + "type": "string" + }, + "icon": { + "type": "string" + }, + "name": { + "type": "string", + "minLength": 1 + } + } + }, "repo.Group": { "type": "object", "properties": { @@ -3423,55 +4035,10 @@ } } }, - "repo.ItemAttachment": { - "type": "object", - "properties": { - "createdAt": { - "type": "string" - }, - "id": { - "type": "string" - }, - "mimeType": { - "type": "string" - }, - "path": { - "type": "string" - }, - "primary": { - "type": "boolean" - }, - "thumbnail": { - "$ref": "#/components/schemas/ent.Attachment" - }, - "title": { - "type": "string" - }, - "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": [ + "entityType", "name" ], "properties": { @@ -3479,6 +4046,9 @@ "type": "string", "maxLength": 1000 }, + "entityType": { + "type": "string" + }, "labelIds": { "type": "array", "items": { @@ -3539,7 +4109,7 @@ "attachments": { "type": "array", "items": { - "$ref": "#/components/schemas/repo.ItemAttachment" + "$ref": "#/components/schemas/repo.EntityAttachment" } }, "createdAt": { @@ -3548,6 +4118,9 @@ "description": { "type": "string" }, + "entityType": { + "type": "string" + }, "fields": { "type": "array", "items": { @@ -3711,6 +4284,9 @@ "description": { "type": "string" }, + "entityType": { + "type": "string" + }, "id": { "type": "string" }, @@ -3764,10 +4340,14 @@ "repo.ItemType": { "type": "string", "enum": [ + "location", + "item", "location", "item" ], "x-enum-varnames": [ + "EntityTypeLocation", + "EntityTypeItem", "ItemTypeLocation", "ItemTypeItem" ] @@ -3775,6 +4355,7 @@ "repo.ItemUpdate": { "type": "object", "required": [ + "entityType", "name" ], "properties": { @@ -3788,6 +4369,9 @@ "type": "string", "maxLength": 1000 }, + "entityType": { + "type": "string" + }, "fields": { "type": "array", "items": { @@ -3949,10 +4533,16 @@ }, "repo.LocationCreate": { "type": "object", + "required": [ + "entityType" + ], "properties": { "description": { "type": "string" }, + "entityType": { + "type": "string" + }, "name": { "type": "string" }, @@ -3977,6 +4567,9 @@ "description": { "type": "string" }, + "entityType": { + "type": "string" + }, "id": { "type": "string" }, @@ -4003,6 +4596,9 @@ "description": { "type": "string" }, + "entityType": { + "type": "string" + }, "id": { "type": "string" }, @@ -4026,6 +4622,9 @@ "description": { "type": "string" }, + "entityType": { + "type": "string" + }, "id": { "type": "string" }, @@ -4039,10 +4638,16 @@ }, "repo.LocationUpdate": { "type": "object", + "required": [ + "entityType" + ], "properties": { "description": { "type": "string" }, + "entityType": { + "type": "string" + }, "id": { "type": "string" }, @@ -4405,6 +5010,18 @@ "RoleOwner" ] }, + "uuid.NullUUID": { + "type": "object", + "properties": { + "uuid": { + "type": "string" + }, + "valid": { + "description": "Valid is true if UUID is not NULL", + "type": "boolean" + } + } + }, "v1.APISummary": { "type": "object", "properties": { diff --git a/docs/en/api/openapi-3.0.yaml b/docs/en/api/openapi-3.0.yaml index bc56d4a2..baf6ad7f 100644 --- a/docs/en/api/openapi-3.0.yaml +++ b/docs/en/api/openapi-3.0.yaml @@ -115,6 +115,276 @@ paths: application/json: schema: $ref: "#/components/schemas/currencies.Currency" + "/v1/entities/{id}/attachments": + post: + security: + - Bearer: [] + tags: + - Items Attachments + summary: Create Item Attachment + parameters: + - description: Item ID + name: id + in: path + required: true + schema: + type: string + requestBody: + $ref: "#/components/requestBodies/postV1Entities_id_attachments" + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/repo.ItemOut" + "422": + description: Unprocessable Entity + content: + application/json: + schema: + $ref: "#/components/schemas/validate.ErrorResponse" + "/v1/entities/{id}/attachments/{attachment_id}": + get: + security: + - Bearer: [] + tags: + - Items Attachments + summary: Get Item Attachment + parameters: + - description: Item ID + name: id + in: path + required: true + schema: + type: string + - description: Attachment ID + name: attachment_id + in: path + required: true + schema: + type: string + responses: + "200": + description: OK + content: + application/octet-stream: + schema: + $ref: "#/components/schemas/v1.ItemAttachmentToken" + put: + security: + - Bearer: [] + tags: + - Items Attachments + summary: Update Item Attachment + parameters: + - description: Item ID + name: id + in: path + required: true + schema: + type: string + - description: Attachment ID + name: attachment_id + in: path + required: true + schema: + type: string + requestBody: + $ref: "#/components/requestBodies/repo.EntityAttachmentUpdate" + responses: + "200": + description: OK + content: + "*/*": + schema: + $ref: "#/components/schemas/repo.ItemOut" + delete: + security: + - Bearer: [] + tags: + - Items Attachments + summary: Delete Item Attachment + parameters: + - description: Item ID + name: id + in: path + required: true + schema: + type: string + - description: Attachment ID + name: attachment_id + in: path + required: true + schema: + type: string + responses: + "204": + description: No Content + "/v1/entities/{id}/maintenance": + get: + security: + - Bearer: [] + tags: + - Item Maintenance + summary: Get Maintenance Log + parameters: + - description: Item ID + name: id + in: path + required: true + schema: + type: string + - x-enum-varnames: + - MaintenanceFilterStatusScheduled + - MaintenanceFilterStatusCompleted + - MaintenanceFilterStatusBoth + name: status + in: query + schema: + type: string + enum: + - scheduled + - completed + - both + responses: + "200": + description: OK + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/repo.MaintenanceEntryWithDetails" + post: + security: + - Bearer: [] + tags: + - Item Maintenance + summary: Create Maintenance Entry + parameters: + - description: Item ID + name: id + in: path + required: true + schema: + type: string + requestBody: + $ref: "#/components/requestBodies/repo.MaintenanceEntryCreate" + responses: + "201": + description: Created + content: + application/json: + schema: + $ref: "#/components/schemas/repo.MaintenanceEntry" + /v1/entitytype: + get: + security: + - Bearer: [] + tags: + - EntityTypes + summary: Query All Entity Types + responses: + "200": + description: OK + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/repo.EntityType" + post: + security: + - Bearer: [] + tags: + - EntityTypes + summary: Create Entity Type + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/repo.EntityTypeCreate" + description: Entity Type Data + required: true + responses: + "201": + description: Created + content: + application/json: + schema: + $ref: "#/components/schemas/repo.EntityType" + "/v1/entitytype/{id}": + get: + security: + - Bearer: [] + tags: + - EntityTypes + summary: Get One Entity Type + parameters: + - description: Entity Type ID + name: id + in: path + required: true + schema: + type: string + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/repo.EntityType" + put: + security: + - Bearer: [] + tags: + - EntityTypes + summary: Update Entity Type + parameters: + - description: Entity Type ID + name: id + in: path + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/repo.EntityTypeUpdate" + description: Entity Type Data + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/repo.EntityType" + delete: + security: + - Bearer: [] + tags: + - EntityTypes + summary: Delete Entity Type + parameters: + - description: Entity Type ID + name: id + in: path + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/repo.EntityTypeDelete" + description: Entity Type Delete Options + required: true + responses: + "204": + description: No Content /v1/groups: get: security: @@ -247,7 +517,8 @@ paths: - Bearer: [] tags: - Items - summary: Query All Items + summary: (Deprecated) Query All Items + deprecated: true parameters: - description: search string name: q @@ -301,6 +572,7 @@ paths: tags: - Items summary: Create Item + deprecated: true requestBody: content: application/json: @@ -321,7 +593,8 @@ paths: - Bearer: [] tags: - Items - summary: Export Items + summary: (Deprecated) Export Items + deprecated: true responses: "200": description: text/csv @@ -335,7 +608,8 @@ paths: - Bearer: [] tags: - Items - summary: Get All Custom Field Names + summary: (Deprecated) Get All Custom Field Names + deprecated: true responses: "200": description: OK @@ -351,7 +625,8 @@ paths: - Bearer: [] tags: - Items - summary: Get All Custom Field Values + summary: (Deprecated) Get All Custom Field Values + deprecated: true responses: "200": description: OK @@ -367,7 +642,8 @@ paths: - Bearer: [] tags: - Items - summary: Import Items + summary: (Deprecated) Import Items + deprecated: true requestBody: content: multipart/form-data: @@ -390,7 +666,8 @@ paths: - Bearer: [] tags: - Items - summary: Get Item + summary: (Deprecated) Get Item + deprecated: true parameters: - description: Item ID name: id @@ -410,7 +687,8 @@ paths: - Bearer: [] tags: - Items - summary: Update Item + summary: (Deprecated) Update Item + deprecated: true parameters: - description: Item ID name: id @@ -437,7 +715,8 @@ paths: - Bearer: [] tags: - Items - summary: Delete Item + summary: (Deprecated) Delete Item + deprecated: true parameters: - description: Item ID name: id @@ -453,7 +732,8 @@ paths: - Bearer: [] tags: - Items - summary: Update Item + summary: (Deprecated) Update Item + deprecated: true parameters: - description: Item ID name: id @@ -482,6 +762,7 @@ paths: tags: - Items Attachments summary: Create Item Attachment + deprecated: true parameters: - description: Item ID name: id @@ -490,28 +771,7 @@ paths: schema: type: string requestBody: - content: - multipart/form-data: - schema: - type: object - properties: - file: - description: File attachment - type: string - format: binary - type: - description: Type of file - type: string - primary: - description: Is this the primary attachment - type: boolean - name: - description: name of the file including extension - type: string - required: - - file - - name - required: true + $ref: "#/components/requestBodies/postV1Entities_id_attachments" responses: "200": description: OK @@ -532,6 +792,7 @@ paths: tags: - Items Attachments summary: Get Item Attachment + deprecated: true parameters: - description: Item ID name: id @@ -558,6 +819,7 @@ paths: tags: - Items Attachments summary: Update Item Attachment + deprecated: true parameters: - description: Item ID name: id @@ -572,12 +834,7 @@ paths: schema: type: string requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/repo.ItemAttachmentUpdate" - description: Attachment Update - required: true + $ref: "#/components/requestBodies/repo.EntityAttachmentUpdate" responses: "200": description: OK @@ -591,6 +848,7 @@ paths: tags: - Items Attachments summary: Delete Item Attachment + deprecated: true parameters: - description: Item ID name: id @@ -642,6 +900,7 @@ paths: tags: - Item Maintenance summary: Get Maintenance Log + deprecated: true parameters: - description: Item ID name: id @@ -676,6 +935,7 @@ paths: tags: - Item Maintenance summary: Create Maintenance Entry + deprecated: true parameters: - description: Item ID name: id @@ -684,12 +944,7 @@ paths: schema: type: string requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/repo.MaintenanceEntryCreate" - description: Entry Data - required: true + $ref: "#/components/requestBodies/repo.MaintenanceEntryCreate" responses: "201": description: Created @@ -703,7 +958,8 @@ paths: - Bearer: [] tags: - Items - summary: Get the full path of an item + summary: (Deprecated) Get the full path of an item + deprecated: true parameters: - description: Item ID name: id @@ -897,7 +1153,8 @@ paths: - Bearer: [] tags: - Locations - summary: Get All Locations + summary: (Deprecated) Get All Locations + deprecated: true parameters: - description: Filter locations with parents name: filterChildren @@ -918,7 +1175,8 @@ paths: - Bearer: [] tags: - Locations - summary: Create Location + summary: (Deprecated) Create Location + deprecated: true requestBody: content: application/json: @@ -939,7 +1197,8 @@ paths: - Bearer: [] tags: - Locations - summary: Get Locations Tree + summary: (Deprecated) Get Locations Tree + deprecated: true parameters: - description: include items in response tree name: withItems @@ -961,7 +1220,8 @@ paths: - Bearer: [] tags: - Locations - summary: Get Location + summary: (Deprecated) Get Location + deprecated: true parameters: - description: Location ID name: id @@ -981,7 +1241,8 @@ paths: - Bearer: [] tags: - Locations - summary: Update Location + summary: (Deprecated) Update Location + deprecated: true parameters: - description: Location ID name: id @@ -1008,7 +1269,8 @@ paths: - Bearer: [] tags: - Locations - summary: Delete Location + summary: (Deprecated) Delete Location + deprecated: true parameters: - description: Location ID name: id @@ -1399,6 +1661,44 @@ servers: - url: https://demo.homebox.software/api - url: http://demo.homebox.software/api components: + requestBodies: + postV1Entities_id_attachments: + content: + multipart/form-data: + schema: + type: object + properties: + file: + description: File attachment + type: string + format: binary + type: + description: Type of file + type: string + primary: + description: Is this the primary attachment + type: boolean + name: + description: name of the file including extension + type: string + required: + - file + - name + required: true + repo.MaintenanceEntryCreate: + content: + application/json: + schema: + $ref: "#/components/schemas/repo.MaintenanceEntryCreate" + description: Entry Data + required: true + repo.EntityAttachmentUpdate: + content: + application/json: + schema: + $ref: "#/components/schemas/repo.EntityAttachmentUpdate" + description: Attachment Update + required: true securitySchemes: Bearer: description: "\"Type 'Bearer TOKEN' to correctly set the API Key\"" @@ -1487,10 +1787,10 @@ components: ent.AttachmentEdges: type: object properties: - item: - description: Item holds the value of the item edge. + entity: + description: Entity holds the value of the entity edge. allOf: - - $ref: "#/components/schemas/ent.Item" + - $ref: "#/components/schemas/ent.Entity" thumbnail: description: Thumbnail holds the value of the thumbnail edge. allOf: @@ -1557,102 +1857,7 @@ components: description: User holds the value of the user edge. allOf: - $ref: "#/components/schemas/ent.User" - ent.Group: - type: object - properties: - created_at: - description: CreatedAt holds the value of the "created_at" field. - type: string - currency: - description: Currency holds the value of the "currency" field. - type: string - edges: - description: >- - Edges holds the relations/edges for other nodes in the graph. - - The values are being populated by the GroupQuery when eager-loading is set. - allOf: - - $ref: "#/components/schemas/ent.GroupEdges" - id: - description: ID of the ent. - type: string - name: - description: Name holds the value of the "name" field. - type: string - updated_at: - description: UpdatedAt holds the value of the "updated_at" field. - type: string - ent.GroupEdges: - type: object - properties: - invitation_tokens: - description: InvitationTokens holds the value of the invitation_tokens edge. - type: array - items: - $ref: "#/components/schemas/ent.GroupInvitationToken" - items: - description: Items holds the value of the items edge. - type: array - items: - $ref: "#/components/schemas/ent.Item" - labels: - description: Labels holds the value of the labels edge. - type: array - items: - $ref: "#/components/schemas/ent.Label" - locations: - description: Locations holds the value of the locations edge. - type: array - items: - $ref: "#/components/schemas/ent.Location" - notifiers: - description: Notifiers holds the value of the notifiers edge. - type: array - items: - $ref: "#/components/schemas/ent.Notifier" - users: - description: Users holds the value of the users edge. - type: array - items: - $ref: "#/components/schemas/ent.User" - ent.GroupInvitationToken: - type: object - properties: - created_at: - description: CreatedAt holds the value of the "created_at" field. - type: string - edges: - description: >- - Edges holds the relations/edges for other nodes in the graph. - - The values are being populated by the GroupInvitationTokenQuery when eager-loading is set. - allOf: - - $ref: "#/components/schemas/ent.GroupInvitationTokenEdges" - expires_at: - description: ExpiresAt holds the value of the "expires_at" field. - type: string - id: - description: ID of the ent. - type: string - token: - description: Token holds the value of the "token" field. - type: array - items: - type: integer - updated_at: - description: UpdatedAt holds the value of the "updated_at" field. - type: string - uses: - description: Uses holds the value of the "uses" field. - type: integer - ent.GroupInvitationTokenEdges: - type: object - properties: - group: - description: Group holds the value of the group edge. - allOf: - - $ref: "#/components/schemas/ent.Group" - ent.Item: + ent.Entity: type: object properties: archived: @@ -1671,9 +1876,9 @@ components: description: >- Edges holds the relations/edges for other nodes in the graph. - The values are being populated by the ItemQuery when eager-loading is set. + The values are being populated by the EntityQuery when eager-loading is set. allOf: - - $ref: "#/components/schemas/ent.ItemEdges" + - $ref: "#/components/schemas/ent.EntityEdges" id: description: ID of the ent. type: string @@ -1725,9 +1930,9 @@ components: sold_to: description: SoldTo holds the value of the "sold_to" field. type: string - sync_child_items_locations: - description: SyncChildItemsLocations holds the value of the - "sync_child_items_locations" field. + sync_child_entities_locations: + description: SyncChildEntitiesLocations holds the value of the + "sync_child_entities_locations" field. type: boolean updated_at: description: UpdatedAt holds the value of the "updated_at" field. @@ -1738,7 +1943,7 @@ components: warranty_expires: description: WarrantyExpires holds the value of the "warranty_expires" field. type: string - ent.ItemEdges: + ent.EntityEdges: type: object properties: attachments: @@ -1750,12 +1955,17 @@ components: description: Children holds the value of the children edge. type: array items: - $ref: "#/components/schemas/ent.Item" + $ref: "#/components/schemas/ent.Entity" + entity: + description: Entity holds the value of the entity edge. + type: array + items: + $ref: "#/components/schemas/ent.Entity" fields: description: Fields holds the value of the fields edge. type: array items: - $ref: "#/components/schemas/ent.ItemField" + $ref: "#/components/schemas/ent.EntityField" group: description: Group holds the value of the group edge. allOf: @@ -1768,7 +1978,7 @@ components: location: description: Location holds the value of the location edge. allOf: - - $ref: "#/components/schemas/ent.Location" + - $ref: "#/components/schemas/ent.Entity" maintenance_entries: description: MaintenanceEntries holds the value of the maintenance_entries edge. type: array @@ -1777,8 +1987,12 @@ components: parent: description: Parent holds the value of the parent edge. allOf: - - $ref: "#/components/schemas/ent.Item" - ent.ItemField: + - $ref: "#/components/schemas/ent.Entity" + type: + description: Type holds the value of the type edge. + allOf: + - $ref: "#/components/schemas/ent.EntityType" + ent.EntityField: type: object properties: boolean_value: @@ -1794,9 +2008,9 @@ components: description: >- Edges holds the relations/edges for other nodes in the graph. - The values are being populated by the ItemFieldQuery when eager-loading is set. + The values are being populated by the EntityFieldQuery when eager-loading is set. allOf: - - $ref: "#/components/schemas/ent.ItemFieldEdges" + - $ref: "#/components/schemas/ent.EntityFieldEdges" id: description: ID of the ent. type: string @@ -1815,17 +2029,158 @@ components: type: description: Type holds the value of the "type" field. allOf: - - $ref: "#/components/schemas/itemfield.Type" + - $ref: "#/components/schemas/entityfield.Type" updated_at: description: UpdatedAt holds the value of the "updated_at" field. type: string - ent.ItemFieldEdges: + ent.EntityFieldEdges: type: object properties: - item: - description: Item holds the value of the item edge. + entity: + description: Entity holds the value of the entity edge. allOf: - - $ref: "#/components/schemas/ent.Item" + - $ref: "#/components/schemas/ent.Entity" + ent.EntityType: + type: object + properties: + color: + description: Color holds the value of the "color" field. + type: string + created_at: + description: CreatedAt holds the value of the "created_at" field. + type: string + description: + description: Description holds the value of the "description" field. + type: string + edges: + description: >- + Edges holds the relations/edges for other nodes in the graph. + + The values are being populated by the EntityTypeQuery when eager-loading is set. + allOf: + - $ref: "#/components/schemas/ent.EntityTypeEdges" + icon: + description: Icon holds the value of the "icon" field. + type: string + id: + description: ID of the ent. + type: string + is_location: + description: IsLocation holds the value of the "is_location" field. + type: boolean + name: + description: Name holds the value of the "name" field. + type: string + updated_at: + description: UpdatedAt holds the value of the "updated_at" field. + type: string + ent.EntityTypeEdges: + type: object + properties: + entities: + description: Entities holds the value of the entities edge. + type: array + items: + $ref: "#/components/schemas/ent.Entity" + group: + description: Group holds the value of the group edge. + allOf: + - $ref: "#/components/schemas/ent.Group" + ent.Group: + type: object + properties: + created_at: + description: CreatedAt holds the value of the "created_at" field. + type: string + currency: + description: Currency holds the value of the "currency" field. + type: string + edges: + description: >- + Edges holds the relations/edges for other nodes in the graph. + + The values are being populated by the GroupQuery when eager-loading is set. + allOf: + - $ref: "#/components/schemas/ent.GroupEdges" + id: + description: ID of the ent. + type: string + name: + description: Name holds the value of the "name" field. + type: string + updated_at: + description: UpdatedAt holds the value of the "updated_at" field. + type: string + ent.GroupEdges: + type: object + properties: + entities: + description: Entities holds the value of the entities edge. + type: array + items: + $ref: "#/components/schemas/ent.Entity" + entity_types: + description: EntityTypes holds the value of the entity_types edge. + type: array + items: + $ref: "#/components/schemas/ent.EntityType" + invitation_tokens: + description: InvitationTokens holds the value of the invitation_tokens edge. + type: array + items: + $ref: "#/components/schemas/ent.GroupInvitationToken" + labels: + description: Labels holds the value of the labels edge. + type: array + items: + $ref: "#/components/schemas/ent.Label" + notifiers: + description: Notifiers holds the value of the notifiers edge. + type: array + items: + $ref: "#/components/schemas/ent.Notifier" + users: + description: Users holds the value of the users edge. + type: array + items: + $ref: "#/components/schemas/ent.User" + ent.GroupInvitationToken: + type: object + properties: + created_at: + description: CreatedAt holds the value of the "created_at" field. + type: string + edges: + description: >- + Edges holds the relations/edges for other nodes in the graph. + + The values are being populated by the GroupInvitationTokenQuery when eager-loading is set. + allOf: + - $ref: "#/components/schemas/ent.GroupInvitationTokenEdges" + expires_at: + description: ExpiresAt holds the value of the "expires_at" field. + type: string + id: + description: ID of the ent. + type: string + token: + description: Token holds the value of the "token" field. + type: array + items: + type: integer + updated_at: + description: UpdatedAt holds the value of the "updated_at" field. + type: string + uses: + description: Uses holds the value of the "uses" field. + type: integer + ent.GroupInvitationTokenEdges: + type: object + properties: + group: + description: Group holds the value of the group edge. + allOf: + - $ref: "#/components/schemas/ent.Group" ent.Label: type: object properties: @@ -1857,61 +2212,15 @@ components: ent.LabelEdges: type: object properties: + entities: + description: Entities holds the value of the entities edge. + type: array + items: + $ref: "#/components/schemas/ent.Entity" group: description: Group holds the value of the group edge. allOf: - $ref: "#/components/schemas/ent.Group" - items: - description: Items holds the value of the items edge. - type: array - items: - $ref: "#/components/schemas/ent.Item" - ent.Location: - type: object - properties: - created_at: - description: CreatedAt holds the value of the "created_at" field. - type: string - description: - description: Description holds the value of the "description" field. - type: string - edges: - description: >- - Edges holds the relations/edges for other nodes in the graph. - - The values are being populated by the LocationQuery when eager-loading is set. - allOf: - - $ref: "#/components/schemas/ent.LocationEdges" - id: - description: ID of the ent. - type: string - name: - description: Name holds the value of the "name" field. - type: string - updated_at: - description: UpdatedAt holds the value of the "updated_at" field. - type: string - ent.LocationEdges: - type: object - properties: - children: - description: Children holds the value of the children edge. - type: array - items: - $ref: "#/components/schemas/ent.Location" - group: - description: Group holds the value of the group edge. - allOf: - - $ref: "#/components/schemas/ent.Group" - items: - description: Items holds the value of the items edge. - type: array - items: - $ref: "#/components/schemas/ent.Item" - parent: - description: Parent holds the value of the parent edge. - allOf: - - $ref: "#/components/schemas/ent.Location" ent.MaintenanceEntry: type: object properties: @@ -1934,12 +2243,12 @@ components: The values are being populated by the MaintenanceEntryQuery when eager-loading is set. allOf: - $ref: "#/components/schemas/ent.MaintenanceEntryEdges" + entity_id: + description: EntityID holds the value of the "entity_id" field. + type: string id: description: ID of the ent. type: string - item_id: - description: ItemID holds the value of the "item_id" field. - type: string name: description: Name holds the value of the "name" field. type: string @@ -1952,10 +2261,10 @@ components: ent.MaintenanceEntryEdges: type: object properties: - item: - description: Item holds the value of the item edge. + entity: + description: Entity holds the value of the entity edge. allOf: - - $ref: "#/components/schemas/ent.Item" + - $ref: "#/components/schemas/ent.Entity" ent.Notifier: type: object properties: @@ -2053,7 +2362,7 @@ components: type: array items: $ref: "#/components/schemas/ent.Notifier" - itemfield.Type: + entityfield.Type: type: string enum: - text @@ -2097,6 +2406,82 @@ components: type: boolean copyPrefix: type: string + repo.EntityAttachment: + type: object + properties: + createdAt: + type: string + id: + type: string + mimeType: + type: string + path: + type: string + primary: + type: boolean + thumbnail: + $ref: "#/components/schemas/ent.Attachment" + title: + type: string + type: + type: string + updatedAt: + type: string + repo.EntityAttachmentUpdate: + type: object + properties: + primary: + type: boolean + title: + type: string + type: + type: string + repo.EntityType: + type: object + properties: + color: + type: string + description: + type: string + icon: + type: string + isLocation: + type: boolean + name: + type: string + repo.EntityTypeCreate: + type: object + required: + - isLocation + - name + properties: + color: + type: string + description: + type: string + icon: + type: string + isLocation: + type: boolean + name: + type: string + repo.EntityTypeDelete: + type: object + properties: + replacementId: + $ref: "#/components/schemas/uuid.NullUUID" + repo.EntityTypeUpdate: + type: object + properties: + color: + type: string + description: + type: string + icon: + type: string + name: + type: string + minLength: 1 repo.Group: type: object properties: @@ -2132,44 +2517,17 @@ components: type: string name: type: string - repo.ItemAttachment: - type: object - properties: - createdAt: - type: string - id: - type: string - mimeType: - type: string - path: - type: string - primary: - type: boolean - thumbnail: - $ref: "#/components/schemas/ent.Attachment" - title: - type: string - 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: + - entityType - name properties: description: type: string maxLength: 1000 + entityType: + type: string labelIds: type: array items: @@ -2212,11 +2570,13 @@ components: attachments: type: array items: - $ref: "#/components/schemas/repo.ItemAttachment" + $ref: "#/components/schemas/repo.EntityAttachment" createdAt: type: string description: type: string + entityType: + type: string fields: type: array items: @@ -2328,6 +2688,8 @@ components: type: string description: type: string + entityType: + type: string id: type: string imageId: @@ -2366,12 +2728,17 @@ components: enum: - location - item + - location + - item x-enum-varnames: + - EntityTypeLocation + - EntityTypeItem - ItemTypeLocation - ItemTypeItem repo.ItemUpdate: type: object required: + - entityType - name properties: archived: @@ -2381,6 +2748,8 @@ components: description: type: string maxLength: 1000 + entityType: + type: string fields: type: array items: @@ -2493,9 +2862,13 @@ components: type: string repo.LocationCreate: type: object + required: + - entityType properties: description: type: string + entityType: + type: string name: type: string parentId: @@ -2512,6 +2885,8 @@ components: type: string description: type: string + entityType: + type: string id: type: string name: @@ -2529,6 +2904,8 @@ components: type: string description: type: string + entityType: + type: string id: type: string itemCount: @@ -2544,6 +2921,8 @@ components: type: string description: type: string + entityType: + type: string id: type: string name: @@ -2552,9 +2931,13 @@ components: type: string repo.LocationUpdate: type: object + required: + - entityType properties: description: type: string + entityType: + type: string id: type: string name: @@ -2796,6 +3179,14 @@ components: - DefaultRole - RoleUser - RoleOwner + uuid.NullUUID: + type: object + properties: + uuid: + type: string + valid: + description: Valid is true if UUID is not NULL + type: boolean v1.APISummary: type: object properties: diff --git a/docs/en/api/swagger-2.0.json b/docs/en/api/swagger-2.0.json index 3fd96322..ff53834e 100644 --- a/docs/en/api/swagger-2.0.json +++ b/docs/en/api/swagger-2.0.json @@ -1,4390 +1 @@ -{ - "schemes": [ - "https", - "http" - ], - "swagger": "2.0", - "info": { - "description": "Track, Manage, and Organize your Things.", - "title": "Homebox API", - "contact": { - "name": "Homebox Team", - "url": "https://discord.homebox.software" - }, - "version": "1.0" - }, - "host": "demo.homebox.software", - "basePath": "/api", - "paths": { - "/v1/actions/create-missing-thumbnails": { - "post": { - "security": [ - { - "Bearer": [] - } - ], - "description": "Creates thumbnails for items that are missing them", - "produces": [ - "application/json" - ], - "tags": [ - "Actions" - ], - "summary": "Create Missing Thumbnails", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1.ActionAmountResult" - } - } - } - } - }, - "/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": [] - } - ], - "consumes": [ - "multipart/form-data" - ], - "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": [] - } - ], - "consumes": [ - "multipart/form-data" - ], - "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" - }, - { - "type": "boolean", - "description": "Is this the primary attachment", - "name": "primary", - "in": "formData" - }, - { - "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}/duplicate": { - "post": { - "security": [ - { - "Bearer": [] - } - ], - "produces": [ - "application/json" - ], - "tags": [ - "Items" - ], - "summary": "Duplicate Item", - "parameters": [ - { - "type": "string", - "description": "Item ID", - "name": "id", - "in": "path", - "required": true - }, - { - "description": "Duplicate Options", - "name": "payload", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/repo.DuplicateOptions" - } - } - ], - "responses": { - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/repo.ItemOut" - } - } - } - } - }, - "/v1/items/{id}/maintenance": { - "get": { - "security": [ - { - "Bearer": [] - } - ], - "produces": [ - "application/json" - ], - "tags": [ - "Item Maintenance" - ], - "summary": "Get Maintenance Log", - "parameters": [ - { - "type": "string", - "description": "Item ID", - "name": "id", - "in": "path", - "required": true - }, - { - "enum": [ - "scheduled", - "completed", - "both" - ], - "type": "string", - "x-enum-varnames": [ - "MaintenanceFilterStatusScheduled", - "MaintenanceFilterStatusCompleted", - "MaintenanceFilterStatusBoth" - ], - "name": "status", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/repo.MaintenanceEntryWithDetails" - } - } - } - } - }, - "post": { - "security": [ - { - "Bearer": [] - } - ], - "produces": [ - "application/json" - ], - "tags": [ - "Item Maintenance" - ], - "summary": "Create Maintenance Entry", - "parameters": [ - { - "type": "string", - "description": "Item ID", - "name": "id", - "in": "path", - "required": true - }, - { - "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}/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/labelmaker/assets/{id}": { - "get": { - "security": [ - { - "Bearer": [] - } - ], - "produces": [ - "application/json" - ], - "tags": [ - "Items" - ], - "summary": "Get Asset label", - "parameters": [ - { - "type": "string", - "description": "Asset ID", - "name": "id", - "in": "path", - "required": true - }, - { - "type": "boolean", - "description": "Print this label, defaults to false", - "name": "print", - "in": "query" - } - ], - "responses": { - "200": { - "description": "image/png", - "schema": { - "type": "string" - } - } - } - } - }, - "/v1/labelmaker/item/{id}": { - "get": { - "security": [ - { - "Bearer": [] - } - ], - "produces": [ - "application/json" - ], - "tags": [ - "Items" - ], - "summary": "Get Item label", - "parameters": [ - { - "type": "string", - "description": "Item ID", - "name": "id", - "in": "path", - "required": true - }, - { - "type": "boolean", - "description": "Print this label, defaults to false", - "name": "print", - "in": "query" - } - ], - "responses": { - "200": { - "description": "image/png", - "schema": { - "type": "string" - } - } - } - } - }, - "/v1/labelmaker/location/{id}": { - "get": { - "security": [ - { - "Bearer": [] - } - ], - "produces": [ - "application/json" - ], - "tags": [ - "Locations" - ], - "summary": "Get Location label", - "parameters": [ - { - "type": "string", - "description": "Location ID", - "name": "id", - "in": "path", - "required": true - }, - { - "type": "boolean", - "description": "Print this label, defaults to false", - "name": "print", - "in": "query" - } - ], - "responses": { - "200": { - "description": "image/png", - "schema": { - "type": "string" - } - } - } - } - }, - "/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/maintenance": { - "get": { - "security": [ - { - "Bearer": [] - } - ], - "produces": [ - "application/json" - ], - "tags": [ - "Maintenance" - ], - "summary": "Query All Maintenance", - "parameters": [ - { - "enum": [ - "scheduled", - "completed", - "both" - ], - "type": "string", - "x-enum-varnames": [ - "MaintenanceFilterStatusScheduled", - "MaintenanceFilterStatusCompleted", - "MaintenanceFilterStatusBoth" - ], - "name": "status", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/repo.MaintenanceEntryWithDetails" - } - } - } - } - } - }, - "/v1/maintenance/{id}": { - "put": { - "security": [ - { - "Bearer": [] - } - ], - "produces": [ - "application/json" - ], - "tags": [ - "Maintenance" - ], - "summary": "Update Maintenance Entry", - "parameters": [ - { - "type": "string", - "description": "Maintenance ID", - "name": "id", - "in": "path", - "required": true - }, - { - "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", - "parameters": [ - { - "type": "string", - "description": "Maintenance 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": "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/products/search-from-barcode": { - "get": { - "security": [ - { - "Bearer": [] - } - ], - "produces": [ - "application/json" - ], - "tags": [ - "Items" - ], - "summary": "Search EAN from Barcode", - "parameters": [ - { - "type": "string", - "description": "barcode to be searched", - "name": "data", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/repo.BarcodeProduct" - } - } - } - } - } - }, - "/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": [ - { - "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": { - "attachment.Type": { - "type": "string", - "enum": [ - "attachment", - "photo", - "manual", - "warranty", - "attachment", - "receipt", - "thumbnail" - ], - "x-enum-varnames": [ - "DefaultType", - "TypePhoto", - "TypeManual", - "TypeWarranty", - "TypeAttachment", - "TypeReceipt", - "TypeThumbnail" - ] - }, - "authroles.Role": { - "type": "string", - "enum": [ - "user", - "admin", - "user", - "attachments" - ], - "x-enum-varnames": [ - "DefaultRole", - "RoleAdmin", - "RoleUser", - "RoleAttachments" - ] - }, - "currencies.Currency": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "decimals": { - "type": "integer" - }, - "local": { - "type": "string" - }, - "name": { - "type": "string" - }, - "symbol": { - "type": "string" - } - } - }, - "ent.Attachment": { - "type": "object", - "properties": { - "created_at": { - "description": "CreatedAt holds the value of the \"created_at\" field.", - "type": "string" - }, - "edges": { - "description": "Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the AttachmentQuery when eager-loading is set.", - "allOf": [ - { - "$ref": "#/definitions/ent.AttachmentEdges" - } - ] - }, - "id": { - "description": "ID of the ent.", - "type": "string" - }, - "mime_type": { - "description": "MimeType holds the value of the \"mime_type\" field.", - "type": "string" - }, - "path": { - "description": "Path holds the value of the \"path\" field.", - "type": "string" - }, - "primary": { - "description": "Primary holds the value of the \"primary\" field.", - "type": "boolean" - }, - "title": { - "description": "Title holds the value of the \"title\" field.", - "type": "string" - }, - "type": { - "description": "Type holds the value of the \"type\" field.", - "allOf": [ - { - "$ref": "#/definitions/attachment.Type" - } - ] - }, - "updated_at": { - "description": "UpdatedAt holds the value of the \"updated_at\" field.", - "type": "string" - } - } - }, - "ent.AttachmentEdges": { - "type": "object", - "properties": { - "item": { - "description": "Item holds the value of the item edge.", - "allOf": [ - { - "$ref": "#/definitions/ent.Item" - } - ] - }, - "thumbnail": { - "description": "Thumbnail holds the value of the thumbnail edge.", - "allOf": [ - { - "$ref": "#/definitions/ent.Attachment" - } - ] - } - } - }, - "ent.AuthRoles": { - "type": "object", - "properties": { - "edges": { - "description": "Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the AuthRolesQuery when eager-loading is set.", - "allOf": [ - { - "$ref": "#/definitions/ent.AuthRolesEdges" - } - ] - }, - "id": { - "description": "ID of the ent.", - "type": "integer" - }, - "role": { - "description": "Role holds the value of the \"role\" field.", - "allOf": [ - { - "$ref": "#/definitions/authroles.Role" - } - ] - } - } - }, - "ent.AuthRolesEdges": { - "type": "object", - "properties": { - "token": { - "description": "Token holds the value of the token edge.", - "allOf": [ - { - "$ref": "#/definitions/ent.AuthTokens" - } - ] - } - } - }, - "ent.AuthTokens": { - "type": "object", - "properties": { - "created_at": { - "description": "CreatedAt holds the value of the \"created_at\" field.", - "type": "string" - }, - "edges": { - "description": "Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the AuthTokensQuery when eager-loading is set.", - "allOf": [ - { - "$ref": "#/definitions/ent.AuthTokensEdges" - } - ] - }, - "expires_at": { - "description": "ExpiresAt holds the value of the \"expires_at\" field.", - "type": "string" - }, - "id": { - "description": "ID of the ent.", - "type": "string" - }, - "token": { - "description": "Token holds the value of the \"token\" field.", - "type": "array", - "items": { - "type": "integer" - } - }, - "updated_at": { - "description": "UpdatedAt holds the value of the \"updated_at\" field.", - "type": "string" - } - } - }, - "ent.AuthTokensEdges": { - "type": "object", - "properties": { - "roles": { - "description": "Roles holds the value of the roles edge.", - "allOf": [ - { - "$ref": "#/definitions/ent.AuthRoles" - } - ] - }, - "user": { - "description": "User holds the value of the user edge.", - "allOf": [ - { - "$ref": "#/definitions/ent.User" - } - ] - } - } - }, - "ent.Group": { - "type": "object", - "properties": { - "created_at": { - "description": "CreatedAt holds the value of the \"created_at\" field.", - "type": "string" - }, - "currency": { - "description": "Currency holds the value of the \"currency\" field.", - "type": "string" - }, - "edges": { - "description": "Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the GroupQuery when eager-loading is set.", - "allOf": [ - { - "$ref": "#/definitions/ent.GroupEdges" - } - ] - }, - "id": { - "description": "ID of the ent.", - "type": "string" - }, - "name": { - "description": "Name holds the value of the \"name\" field.", - "type": "string" - }, - "updated_at": { - "description": "UpdatedAt holds the value of the \"updated_at\" field.", - "type": "string" - } - } - }, - "ent.GroupEdges": { - "type": "object", - "properties": { - "invitation_tokens": { - "description": "InvitationTokens holds the value of the invitation_tokens edge.", - "type": "array", - "items": { - "$ref": "#/definitions/ent.GroupInvitationToken" - } - }, - "items": { - "description": "Items holds the value of the items edge.", - "type": "array", - "items": { - "$ref": "#/definitions/ent.Item" - } - }, - "labels": { - "description": "Labels holds the value of the labels edge.", - "type": "array", - "items": { - "$ref": "#/definitions/ent.Label" - } - }, - "locations": { - "description": "Locations holds the value of the locations edge.", - "type": "array", - "items": { - "$ref": "#/definitions/ent.Location" - } - }, - "notifiers": { - "description": "Notifiers holds the value of the notifiers edge.", - "type": "array", - "items": { - "$ref": "#/definitions/ent.Notifier" - } - }, - "users": { - "description": "Users holds the value of the users edge.", - "type": "array", - "items": { - "$ref": "#/definitions/ent.User" - } - } - } - }, - "ent.GroupInvitationToken": { - "type": "object", - "properties": { - "created_at": { - "description": "CreatedAt holds the value of the \"created_at\" field.", - "type": "string" - }, - "edges": { - "description": "Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the GroupInvitationTokenQuery when eager-loading is set.", - "allOf": [ - { - "$ref": "#/definitions/ent.GroupInvitationTokenEdges" - } - ] - }, - "expires_at": { - "description": "ExpiresAt holds the value of the \"expires_at\" field.", - "type": "string" - }, - "id": { - "description": "ID of the ent.", - "type": "string" - }, - "token": { - "description": "Token holds the value of the \"token\" field.", - "type": "array", - "items": { - "type": "integer" - } - }, - "updated_at": { - "description": "UpdatedAt holds the value of the \"updated_at\" field.", - "type": "string" - }, - "uses": { - "description": "Uses holds the value of the \"uses\" field.", - "type": "integer" - } - } - }, - "ent.GroupInvitationTokenEdges": { - "type": "object", - "properties": { - "group": { - "description": "Group holds the value of the group edge.", - "allOf": [ - { - "$ref": "#/definitions/ent.Group" - } - ] - } - } - }, - "ent.Item": { - "type": "object", - "properties": { - "archived": { - "description": "Archived holds the value of the \"archived\" field.", - "type": "boolean" - }, - "asset_id": { - "description": "AssetID holds the value of the \"asset_id\" field.", - "type": "integer" - }, - "created_at": { - "description": "CreatedAt holds the value of the \"created_at\" field.", - "type": "string" - }, - "description": { - "description": "Description holds the value of the \"description\" field.", - "type": "string" - }, - "edges": { - "description": "Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the ItemQuery when eager-loading is set.", - "allOf": [ - { - "$ref": "#/definitions/ent.ItemEdges" - } - ] - }, - "id": { - "description": "ID of the ent.", - "type": "string" - }, - "import_ref": { - "description": "ImportRef holds the value of the \"import_ref\" field.", - "type": "string" - }, - "insured": { - "description": "Insured holds the value of the \"insured\" field.", - "type": "boolean" - }, - "lifetime_warranty": { - "description": "LifetimeWarranty holds the value of the \"lifetime_warranty\" field.", - "type": "boolean" - }, - "manufacturer": { - "description": "Manufacturer holds the value of the \"manufacturer\" field.", - "type": "string" - }, - "model_number": { - "description": "ModelNumber holds the value of the \"model_number\" field.", - "type": "string" - }, - "name": { - "description": "Name holds the value of the \"name\" field.", - "type": "string" - }, - "notes": { - "description": "Notes holds the value of the \"notes\" field.", - "type": "string" - }, - "purchase_from": { - "description": "PurchaseFrom holds the value of the \"purchase_from\" field.", - "type": "string" - }, - "purchase_price": { - "description": "PurchasePrice holds the value of the \"purchase_price\" field.", - "type": "number" - }, - "purchase_time": { - "description": "PurchaseTime holds the value of the \"purchase_time\" field.", - "type": "string" - }, - "quantity": { - "description": "Quantity holds the value of the \"quantity\" field.", - "type": "integer" - }, - "serial_number": { - "description": "SerialNumber holds the value of the \"serial_number\" field.", - "type": "string" - }, - "sold_notes": { - "description": "SoldNotes holds the value of the \"sold_notes\" field.", - "type": "string" - }, - "sold_price": { - "description": "SoldPrice holds the value of the \"sold_price\" field.", - "type": "number" - }, - "sold_time": { - "description": "SoldTime holds the value of the \"sold_time\" field.", - "type": "string" - }, - "sold_to": { - "description": "SoldTo holds the value of the \"sold_to\" field.", - "type": "string" - }, - "sync_child_items_locations": { - "description": "SyncChildItemsLocations holds the value of the \"sync_child_items_locations\" field.", - "type": "boolean" - }, - "updated_at": { - "description": "UpdatedAt holds the value of the \"updated_at\" field.", - "type": "string" - }, - "warranty_details": { - "description": "WarrantyDetails holds the value of the \"warranty_details\" field.", - "type": "string" - }, - "warranty_expires": { - "description": "WarrantyExpires holds the value of the \"warranty_expires\" field.", - "type": "string" - } - } - }, - "ent.ItemEdges": { - "type": "object", - "properties": { - "attachments": { - "description": "Attachments holds the value of the attachments edge.", - "type": "array", - "items": { - "$ref": "#/definitions/ent.Attachment" - } - }, - "children": { - "description": "Children holds the value of the children edge.", - "type": "array", - "items": { - "$ref": "#/definitions/ent.Item" - } - }, - "fields": { - "description": "Fields holds the value of the fields edge.", - "type": "array", - "items": { - "$ref": "#/definitions/ent.ItemField" - } - }, - "group": { - "description": "Group holds the value of the group edge.", - "allOf": [ - { - "$ref": "#/definitions/ent.Group" - } - ] - }, - "label": { - "description": "Label holds the value of the label edge.", - "type": "array", - "items": { - "$ref": "#/definitions/ent.Label" - } - }, - "location": { - "description": "Location holds the value of the location edge.", - "allOf": [ - { - "$ref": "#/definitions/ent.Location" - } - ] - }, - "maintenance_entries": { - "description": "MaintenanceEntries holds the value of the maintenance_entries edge.", - "type": "array", - "items": { - "$ref": "#/definitions/ent.MaintenanceEntry" - } - }, - "parent": { - "description": "Parent holds the value of the parent edge.", - "allOf": [ - { - "$ref": "#/definitions/ent.Item" - } - ] - } - } - }, - "ent.ItemField": { - "type": "object", - "properties": { - "boolean_value": { - "description": "BooleanValue holds the value of the \"boolean_value\" field.", - "type": "boolean" - }, - "created_at": { - "description": "CreatedAt holds the value of the \"created_at\" field.", - "type": "string" - }, - "description": { - "description": "Description holds the value of the \"description\" field.", - "type": "string" - }, - "edges": { - "description": "Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the ItemFieldQuery when eager-loading is set.", - "allOf": [ - { - "$ref": "#/definitions/ent.ItemFieldEdges" - } - ] - }, - "id": { - "description": "ID of the ent.", - "type": "string" - }, - "name": { - "description": "Name holds the value of the \"name\" field.", - "type": "string" - }, - "number_value": { - "description": "NumberValue holds the value of the \"number_value\" field.", - "type": "integer" - }, - "text_value": { - "description": "TextValue holds the value of the \"text_value\" field.", - "type": "string" - }, - "time_value": { - "description": "TimeValue holds the value of the \"time_value\" field.", - "type": "string" - }, - "type": { - "description": "Type holds the value of the \"type\" field.", - "allOf": [ - { - "$ref": "#/definitions/itemfield.Type" - } - ] - }, - "updated_at": { - "description": "UpdatedAt holds the value of the \"updated_at\" field.", - "type": "string" - } - } - }, - "ent.ItemFieldEdges": { - "type": "object", - "properties": { - "item": { - "description": "Item holds the value of the item edge.", - "allOf": [ - { - "$ref": "#/definitions/ent.Item" - } - ] - } - } - }, - "ent.Label": { - "type": "object", - "properties": { - "color": { - "description": "Color holds the value of the \"color\" field.", - "type": "string" - }, - "created_at": { - "description": "CreatedAt holds the value of the \"created_at\" field.", - "type": "string" - }, - "description": { - "description": "Description holds the value of the \"description\" field.", - "type": "string" - }, - "edges": { - "description": "Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the LabelQuery when eager-loading is set.", - "allOf": [ - { - "$ref": "#/definitions/ent.LabelEdges" - } - ] - }, - "id": { - "description": "ID of the ent.", - "type": "string" - }, - "name": { - "description": "Name holds the value of the \"name\" field.", - "type": "string" - }, - "updated_at": { - "description": "UpdatedAt holds the value of the \"updated_at\" field.", - "type": "string" - } - } - }, - "ent.LabelEdges": { - "type": "object", - "properties": { - "group": { - "description": "Group holds the value of the group edge.", - "allOf": [ - { - "$ref": "#/definitions/ent.Group" - } - ] - }, - "items": { - "description": "Items holds the value of the items edge.", - "type": "array", - "items": { - "$ref": "#/definitions/ent.Item" - } - } - } - }, - "ent.Location": { - "type": "object", - "properties": { - "created_at": { - "description": "CreatedAt holds the value of the \"created_at\" field.", - "type": "string" - }, - "description": { - "description": "Description holds the value of the \"description\" field.", - "type": "string" - }, - "edges": { - "description": "Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the LocationQuery when eager-loading is set.", - "allOf": [ - { - "$ref": "#/definitions/ent.LocationEdges" - } - ] - }, - "id": { - "description": "ID of the ent.", - "type": "string" - }, - "name": { - "description": "Name holds the value of the \"name\" field.", - "type": "string" - }, - "updated_at": { - "description": "UpdatedAt holds the value of the \"updated_at\" field.", - "type": "string" - } - } - }, - "ent.LocationEdges": { - "type": "object", - "properties": { - "children": { - "description": "Children holds the value of the children edge.", - "type": "array", - "items": { - "$ref": "#/definitions/ent.Location" - } - }, - "group": { - "description": "Group holds the value of the group edge.", - "allOf": [ - { - "$ref": "#/definitions/ent.Group" - } - ] - }, - "items": { - "description": "Items holds the value of the items edge.", - "type": "array", - "items": { - "$ref": "#/definitions/ent.Item" - } - }, - "parent": { - "description": "Parent holds the value of the parent edge.", - "allOf": [ - { - "$ref": "#/definitions/ent.Location" - } - ] - } - } - }, - "ent.MaintenanceEntry": { - "type": "object", - "properties": { - "cost": { - "description": "Cost holds the value of the \"cost\" field.", - "type": "number" - }, - "created_at": { - "description": "CreatedAt holds the value of the \"created_at\" field.", - "type": "string" - }, - "date": { - "description": "Date holds the value of the \"date\" field.", - "type": "string" - }, - "description": { - "description": "Description holds the value of the \"description\" field.", - "type": "string" - }, - "edges": { - "description": "Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the MaintenanceEntryQuery when eager-loading is set.", - "allOf": [ - { - "$ref": "#/definitions/ent.MaintenanceEntryEdges" - } - ] - }, - "id": { - "description": "ID of the ent.", - "type": "string" - }, - "item_id": { - "description": "ItemID holds the value of the \"item_id\" field.", - "type": "string" - }, - "name": { - "description": "Name holds the value of the \"name\" field.", - "type": "string" - }, - "scheduled_date": { - "description": "ScheduledDate holds the value of the \"scheduled_date\" field.", - "type": "string" - }, - "updated_at": { - "description": "UpdatedAt holds the value of the \"updated_at\" field.", - "type": "string" - } - } - }, - "ent.MaintenanceEntryEdges": { - "type": "object", - "properties": { - "item": { - "description": "Item holds the value of the item edge.", - "allOf": [ - { - "$ref": "#/definitions/ent.Item" - } - ] - } - } - }, - "ent.Notifier": { - "type": "object", - "properties": { - "created_at": { - "description": "CreatedAt holds the value of the \"created_at\" field.", - "type": "string" - }, - "edges": { - "description": "Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the NotifierQuery when eager-loading is set.", - "allOf": [ - { - "$ref": "#/definitions/ent.NotifierEdges" - } - ] - }, - "group_id": { - "description": "GroupID holds the value of the \"group_id\" field.", - "type": "string" - }, - "id": { - "description": "ID of the ent.", - "type": "string" - }, - "is_active": { - "description": "IsActive holds the value of the \"is_active\" field.", - "type": "boolean" - }, - "name": { - "description": "Name holds the value of the \"name\" field.", - "type": "string" - }, - "updated_at": { - "description": "UpdatedAt holds the value of the \"updated_at\" field.", - "type": "string" - }, - "user_id": { - "description": "UserID holds the value of the \"user_id\" field.", - "type": "string" - } - } - }, - "ent.NotifierEdges": { - "type": "object", - "properties": { - "group": { - "description": "Group holds the value of the group edge.", - "allOf": [ - { - "$ref": "#/definitions/ent.Group" - } - ] - }, - "user": { - "description": "User holds the value of the user edge.", - "allOf": [ - { - "$ref": "#/definitions/ent.User" - } - ] - } - } - }, - "ent.User": { - "type": "object", - "properties": { - "activated_on": { - "description": "ActivatedOn holds the value of the \"activated_on\" field.", - "type": "string" - }, - "created_at": { - "description": "CreatedAt holds the value of the \"created_at\" field.", - "type": "string" - }, - "edges": { - "description": "Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the UserQuery when eager-loading is set.", - "allOf": [ - { - "$ref": "#/definitions/ent.UserEdges" - } - ] - }, - "email": { - "description": "Email holds the value of the \"email\" field.", - "type": "string" - }, - "id": { - "description": "ID of the ent.", - "type": "string" - }, - "is_superuser": { - "description": "IsSuperuser holds the value of the \"is_superuser\" field.", - "type": "boolean" - }, - "name": { - "description": "Name holds the value of the \"name\" field.", - "type": "string" - }, - "role": { - "description": "Role holds the value of the \"role\" field.", - "allOf": [ - { - "$ref": "#/definitions/user.Role" - } - ] - }, - "superuser": { - "description": "Superuser holds the value of the \"superuser\" field.", - "type": "boolean" - }, - "updated_at": { - "description": "UpdatedAt holds the value of the \"updated_at\" field.", - "type": "string" - } - } - }, - "ent.UserEdges": { - "type": "object", - "properties": { - "auth_tokens": { - "description": "AuthTokens holds the value of the auth_tokens edge.", - "type": "array", - "items": { - "$ref": "#/definitions/ent.AuthTokens" - } - }, - "group": { - "description": "Group holds the value of the group edge.", - "allOf": [ - { - "$ref": "#/definitions/ent.Group" - } - ] - }, - "notifiers": { - "description": "Notifiers holds the value of the notifiers edge.", - "type": "array", - "items": { - "$ref": "#/definitions/ent.Notifier" - } - } - } - }, - "itemfield.Type": { - "type": "string", - "enum": [ - "text", - "number", - "boolean", - "time" - ], - "x-enum-varnames": [ - "TypeText", - "TypeNumber", - "TypeBoolean", - "TypeTime" - ] - }, - "repo.BarcodeProduct": { - "type": "object", - "properties": { - "barcode": { - "type": "string" - }, - "imageBase64": { - "type": "string" - }, - "imageURL": { - "type": "string" - }, - "item": { - "$ref": "#/definitions/repo.ItemCreate" - }, - "manufacturer": { - "type": "string" - }, - "modelNumber": { - "description": "Identifications", - "type": "string" - }, - "notes": { - "description": "Extras", - "type": "string" - }, - "search_engine_name": { - "type": "string" - } - } - }, - "repo.DuplicateOptions": { - "type": "object", - "properties": { - "copyAttachments": { - "type": "boolean" - }, - "copyCustomFields": { - "type": "boolean" - }, - "copyMaintenance": { - "type": "boolean" - }, - "copyPrefix": { - "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" - }, - "id": { - "type": "string" - }, - "mimeType": { - "type": "string" - }, - "path": { - "type": "string" - }, - "primary": { - "type": "boolean" - }, - "thumbnail": { - "$ref": "#/definitions/ent.Attachment" - }, - "title": { - "type": "string" - }, - "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 - }, - "quantity": { - "type": "integer" - } - } - }, - "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", - "x-nullable": true, - "x-omitempty": true - }, - "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": "number" - }, - "purchaseTime": { - "description": "Purchase", - "type": "string" - }, - "quantity": { - "type": "integer" - }, - "serialNumber": { - "type": "string" - }, - "soldNotes": { - "type": "string" - }, - "soldPrice": { - "type": "number" - }, - "soldTime": { - "description": "Sold", - "type": "string" - }, - "soldTo": { - "type": "string" - }, - "syncChildItemsLocations": { - "type": "boolean" - }, - "thumbnailId": { - "type": "string", - "x-nullable": true, - "x-omitempty": true - }, - "updatedAt": { - "type": "string" - }, - "warrantyDetails": { - "type": "string" - }, - "warrantyExpires": { - "type": "string" - } - } - }, - "repo.ItemPatch": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "labelIds": { - "type": "array", - "items": { - "type": "string" - }, - "x-nullable": true, - "x-omitempty": true - }, - "locationId": { - "type": "string", - "x-nullable": true, - "x-omitempty": true - }, - "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" - }, - "assetId": { - "type": "string", - "example": "0" - }, - "createdAt": { - "type": "string" - }, - "description": { - "type": "string" - }, - "id": { - "type": "string" - }, - "imageId": { - "type": "string", - "x-nullable": true, - "x-omitempty": true - }, - "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": "number" - }, - "quantity": { - "type": "integer" - }, - "soldTime": { - "description": "Sale details", - "type": "string" - }, - "thumbnailId": { - "type": "string", - "x-nullable": true, - "x-omitempty": true - }, - "updatedAt": { - "type": "string" - } - } - }, - "repo.ItemType": { - "type": "string", - "enum": [ - "location", - "item" - ], - "x-enum-varnames": [ - "ItemTypeLocation", - "ItemTypeItem" - ] - }, - "repo.ItemUpdate": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "archived": { - "type": "boolean" - }, - "assetId": { - "type": "string" - }, - "description": { - "type": "string", - "maxLength": 1000 - }, - "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", - "maxLength": 255, - "minLength": 1 - }, - "notes": { - "description": "Extras", - "type": "string" - }, - "parentId": { - "type": "string", - "x-nullable": true, - "x-omitempty": true - }, - "purchaseFrom": { - "type": "string", - "maxLength": 255 - }, - "purchasePrice": { - "type": "number", - "x-nullable": true, - "x-omitempty": true - }, - "purchaseTime": { - "description": "Purchase", - "type": "string" - }, - "quantity": { - "type": "integer" - }, - "serialNumber": { - "description": "Identifications", - "type": "string" - }, - "soldNotes": { - "type": "string" - }, - "soldPrice": { - "type": "number", - "x-nullable": true, - "x-omitempty": true - }, - "soldTime": { - "description": "Sold", - "type": "string" - }, - "soldTo": { - "type": "string", - "maxLength": 255 - }, - "syncChildItemsLocations": { - "type": "boolean" - }, - "warrantyDetails": { - "type": "string" - }, - "warrantyExpires": { - "type": "string" - } - } - }, - "repo.LabelCreate": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "color": { - "type": "string" - }, - "description": { - "type": "string", - "maxLength": 1000 - }, - "name": { - "type": "string", - "maxLength": 255, - "minLength": 1 - } - } - }, - "repo.LabelOut": { - "type": "object", - "properties": { - "color": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "description": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "updatedAt": { - "type": "string" - } - } - }, - "repo.LabelSummary": { - "type": "object", - "properties": { - "color": { - "type": "string" - }, - "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" - }, - "totalPrice": { - "type": "number" - }, - "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.MaintenanceEntryWithDetails": { - "type": "object", - "properties": { - "completedDate": { - "type": "string" - }, - "cost": { - "type": "string", - "example": "0" - }, - "description": { - "type": "string" - }, - "id": { - "type": "string" - }, - "itemID": { - "type": "string" - }, - "itemName": { - "type": "string" - }, - "name": { - "type": "string" - }, - "scheduledDate": { - "type": "string" - } - } - }, - "repo.MaintenanceFilterStatus": { - "type": "string", - "enum": [ - "scheduled", - "completed", - "both" - ], - "x-enum-varnames": [ - "MaintenanceFilterStatusScheduled", - "MaintenanceFilterStatusCompleted", - "MaintenanceFilterStatusBoth" - ] - }, - "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" - }, - "url": { - "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.Latest": { - "type": "object", - "properties": { - "date": { - "type": "string" - }, - "version": { - "type": "string" - } - } - }, - "services.UserRegistration": { - "type": "object", - "properties": { - "email": { - "type": "string" - }, - "name": { - "type": "string" - }, - "password": { - "type": "string" - }, - "token": { - "type": "string" - } - } - }, - "user.Role": { - "type": "string", - "enum": [ - "user", - "user", - "owner" - ], - "x-enum-varnames": [ - "DefaultRole", - "RoleUser", - "RoleOwner" - ] - }, - "v1.APISummary": { - "type": "object", - "properties": { - "allowRegistration": { - "type": "boolean" - }, - "build": { - "$ref": "#/definitions/v1.Build" - }, - "demo": { - "type": "boolean" - }, - "health": { - "type": "boolean" - }, - "labelPrinting": { - "type": "boolean" - }, - "latest": { - "$ref": "#/definitions/services.Latest" - }, - "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", - "example": "admin" - }, - "stayLoggedIn": { - "type": "boolean" - }, - "username": { - "type": "string", - "example": "admin@admin.com" - } - } - }, - "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" - } - } -} \ No newline at end of file +{"schemes":["https","http"],"swagger":"2.0","info":{"description":"Track, Manage, and Organize your Things.","title":"Homebox API","contact":{"name":"Homebox Team","url":"https://discord.homebox.software"},"version":"1.0"},"host":"demo.homebox.software","basePath":"/api","paths":{"/v1/actions/create-missing-thumbnails":{"post":{"security":[{"Bearer":[]}],"description":"Creates thumbnails for items that are missing them","produces":["application/json"],"tags":["Actions"],"summary":"Create Missing Thumbnails","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/v1.ActionAmountResult"}}}}},"/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/entities/{id}/attachments":{"post":{"security":[{"Bearer":[]}],"consumes":["multipart/form-data"],"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"},{"type":"boolean","description":"Is this the primary attachment","name":"primary","in":"formData"},{"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/entities/{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.EntityAttachmentUpdate"}}],"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/entities/{id}/maintenance":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Item Maintenance"],"summary":"Get Maintenance Log","parameters":[{"type":"string","description":"Item ID","name":"id","in":"path","required":true},{"enum":["scheduled","completed","both"],"type":"string","x-enum-varnames":["MaintenanceFilterStatusScheduled","MaintenanceFilterStatusCompleted","MaintenanceFilterStatusBoth"],"name":"status","in":"query"}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/repo.MaintenanceEntryWithDetails"}}}}},"post":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Item Maintenance"],"summary":"Create Maintenance Entry","parameters":[{"type":"string","description":"Item ID","name":"id","in":"path","required":true},{"description":"Entry Data","name":"payload","in":"body","required":true,"schema":{"$ref":"#/definitions/repo.MaintenanceEntryCreate"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/repo.MaintenanceEntry"}}}}},"/v1/entitytype":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["EntityTypes"],"summary":"Query All Entity Types","responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/repo.EntityType"}}}}},"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["EntityTypes"],"summary":"Create Entity Type","parameters":[{"description":"Entity Type Data","name":"payload","in":"body","required":true,"schema":{"$ref":"#/definitions/repo.EntityTypeCreate"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/repo.EntityType"}}}}},"/v1/entitytype/{id}":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["EntityTypes"],"summary":"Get One Entity Type","parameters":[{"type":"string","description":"Entity Type ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/repo.EntityType"}}}},"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["EntityTypes"],"summary":"Update Entity Type","parameters":[{"type":"string","description":"Entity Type ID","name":"id","in":"path","required":true},{"description":"Entity Type Data","name":"payload","in":"body","required":true,"schema":{"$ref":"#/definitions/repo.EntityTypeUpdate"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/repo.EntityType"}}}},"delete":{"security":[{"Bearer":[]}],"tags":["EntityTypes"],"summary":"Delete Entity Type","parameters":[{"type":"string","description":"Entity Type ID","name":"id","in":"path","required":true},{"description":"Entity Type Delete Options","name":"payload","in":"body","required":true,"schema":{"$ref":"#/definitions/repo.EntityTypeDelete"}}],"responses":{"204":{"description":"No Content"}}}},"/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":"(Deprecated) Query All Items","deprecated":true,"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":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["Items"],"summary":"Create Item","deprecated":true,"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":"(Deprecated) Export Items","deprecated":true,"responses":{"200":{"description":"text/csv","schema":{"type":"string"}}}}},"/v1/items/fields":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Items"],"summary":"(Deprecated) Get All Custom Field Names","deprecated":true,"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"type":"string"}}}}}},"/v1/items/fields/values":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Items"],"summary":"(Deprecated) Get All Custom Field Values","deprecated":true,"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"type":"string"}}}}}},"/v1/items/import":{"post":{"security":[{"Bearer":[]}],"consumes":["multipart/form-data"],"produces":["application/json"],"tags":["Items"],"summary":"(Deprecated) Import Items","deprecated":true,"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":"(Deprecated) Get Item","deprecated":true,"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":"(Deprecated) Update Item","deprecated":true,"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":"(Deprecated) Delete Item","deprecated":true,"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":"(Deprecated) Update Item","deprecated":true,"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":[]}],"consumes":["multipart/form-data"],"produces":["application/json"],"tags":["Items Attachments"],"summary":"Create Item Attachment","deprecated":true,"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"},{"type":"boolean","description":"Is this the primary attachment","name":"primary","in":"formData"},{"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","deprecated":true,"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","deprecated":true,"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.EntityAttachmentUpdate"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/repo.ItemOut"}}}},"delete":{"security":[{"Bearer":[]}],"tags":["Items Attachments"],"summary":"Delete Item Attachment","deprecated":true,"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}/duplicate":{"post":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Items"],"summary":"Duplicate Item","parameters":[{"type":"string","description":"Item ID","name":"id","in":"path","required":true},{"description":"Duplicate Options","name":"payload","in":"body","required":true,"schema":{"$ref":"#/definitions/repo.DuplicateOptions"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/repo.ItemOut"}}}}},"/v1/items/{id}/maintenance":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Item Maintenance"],"summary":"Get Maintenance Log","deprecated":true,"parameters":[{"type":"string","description":"Item ID","name":"id","in":"path","required":true},{"enum":["scheduled","completed","both"],"type":"string","x-enum-varnames":["MaintenanceFilterStatusScheduled","MaintenanceFilterStatusCompleted","MaintenanceFilterStatusBoth"],"name":"status","in":"query"}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/repo.MaintenanceEntryWithDetails"}}}}},"post":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Item Maintenance"],"summary":"Create Maintenance Entry","deprecated":true,"parameters":[{"type":"string","description":"Item ID","name":"id","in":"path","required":true},{"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}/path":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Items"],"summary":"(Deprecated) Get the full path of an item","deprecated":true,"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/labelmaker/assets/{id}":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Items"],"summary":"Get Asset label","parameters":[{"type":"string","description":"Asset ID","name":"id","in":"path","required":true},{"type":"boolean","description":"Print this label, defaults to false","name":"print","in":"query"}],"responses":{"200":{"description":"image/png","schema":{"type":"string"}}}}},"/v1/labelmaker/item/{id}":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Items"],"summary":"Get Item label","parameters":[{"type":"string","description":"Item ID","name":"id","in":"path","required":true},{"type":"boolean","description":"Print this label, defaults to false","name":"print","in":"query"}],"responses":{"200":{"description":"image/png","schema":{"type":"string"}}}}},"/v1/labelmaker/location/{id}":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Locations"],"summary":"Get Location label","parameters":[{"type":"string","description":"Location ID","name":"id","in":"path","required":true},{"type":"boolean","description":"Print this label, defaults to false","name":"print","in":"query"}],"responses":{"200":{"description":"image/png","schema":{"type":"string"}}}}},"/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":"(Deprecated) Get All Locations","deprecated":true,"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":"(Deprecated) Create Location","deprecated":true,"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":"(Deprecated) Get Locations Tree","deprecated":true,"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":"(Deprecated) Get Location","deprecated":true,"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":"(Deprecated) Update Location","deprecated":true,"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":"(Deprecated) Delete Location","deprecated":true,"parameters":[{"type":"string","description":"Location ID","name":"id","in":"path","required":true}],"responses":{"204":{"description":"No Content"}}}},"/v1/maintenance":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Maintenance"],"summary":"Query All Maintenance","parameters":[{"enum":["scheduled","completed","both"],"type":"string","x-enum-varnames":["MaintenanceFilterStatusScheduled","MaintenanceFilterStatusCompleted","MaintenanceFilterStatusBoth"],"name":"status","in":"query"}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/repo.MaintenanceEntryWithDetails"}}}}}},"/v1/maintenance/{id}":{"put":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Maintenance"],"summary":"Update Maintenance Entry","parameters":[{"type":"string","description":"Maintenance ID","name":"id","in":"path","required":true},{"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","parameters":[{"type":"string","description":"Maintenance 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":"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/products/search-from-barcode":{"get":{"security":[{"Bearer":[]}],"produces":["application/json"],"tags":["Items"],"summary":"Search EAN from Barcode","parameters":[{"type":"string","description":"barcode to be searched","name":"data","in":"query"}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/repo.BarcodeProduct"}}}}}},"/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":[{"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":{"attachment.Type":{"type":"string","enum":["attachment","photo","manual","warranty","attachment","receipt","thumbnail"],"x-enum-varnames":["DefaultType","TypePhoto","TypeManual","TypeWarranty","TypeAttachment","TypeReceipt","TypeThumbnail"]},"authroles.Role":{"type":"string","enum":["user","admin","user","attachments"],"x-enum-varnames":["DefaultRole","RoleAdmin","RoleUser","RoleAttachments"]},"currencies.Currency":{"type":"object","properties":{"code":{"type":"string"},"decimals":{"type":"integer"},"local":{"type":"string"},"name":{"type":"string"},"symbol":{"type":"string"}}},"ent.Attachment":{"type":"object","properties":{"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the AttachmentQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.AttachmentEdges"}]},"id":{"description":"ID of the ent.","type":"string"},"mime_type":{"description":"MimeType holds the value of the \"mime_type\" field.","type":"string"},"path":{"description":"Path holds the value of the \"path\" field.","type":"string"},"primary":{"description":"Primary holds the value of the \"primary\" field.","type":"boolean"},"title":{"description":"Title holds the value of the \"title\" field.","type":"string"},"type":{"description":"Type holds the value of the \"type\" field.","allOf":[{"$ref":"#/definitions/attachment.Type"}]},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"}}},"ent.AttachmentEdges":{"type":"object","properties":{"entity":{"description":"Entity holds the value of the entity edge.","allOf":[{"$ref":"#/definitions/ent.Entity"}]},"thumbnail":{"description":"Thumbnail holds the value of the thumbnail edge.","allOf":[{"$ref":"#/definitions/ent.Attachment"}]}}},"ent.AuthRoles":{"type":"object","properties":{"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the AuthRolesQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.AuthRolesEdges"}]},"id":{"description":"ID of the ent.","type":"integer"},"role":{"description":"Role holds the value of the \"role\" field.","allOf":[{"$ref":"#/definitions/authroles.Role"}]}}},"ent.AuthRolesEdges":{"type":"object","properties":{"token":{"description":"Token holds the value of the token edge.","allOf":[{"$ref":"#/definitions/ent.AuthTokens"}]}}},"ent.AuthTokens":{"type":"object","properties":{"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the AuthTokensQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.AuthTokensEdges"}]},"expires_at":{"description":"ExpiresAt holds the value of the \"expires_at\" field.","type":"string"},"id":{"description":"ID of the ent.","type":"string"},"token":{"description":"Token holds the value of the \"token\" field.","type":"array","items":{"type":"integer"}},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"}}},"ent.AuthTokensEdges":{"type":"object","properties":{"roles":{"description":"Roles holds the value of the roles edge.","allOf":[{"$ref":"#/definitions/ent.AuthRoles"}]},"user":{"description":"User holds the value of the user edge.","allOf":[{"$ref":"#/definitions/ent.User"}]}}},"ent.Entity":{"type":"object","properties":{"archived":{"description":"Archived holds the value of the \"archived\" field.","type":"boolean"},"asset_id":{"description":"AssetID holds the value of the \"asset_id\" field.","type":"integer"},"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"description":{"description":"Description holds the value of the \"description\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the EntityQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.EntityEdges"}]},"id":{"description":"ID of the ent.","type":"string"},"import_ref":{"description":"ImportRef holds the value of the \"import_ref\" field.","type":"string"},"insured":{"description":"Insured holds the value of the \"insured\" field.","type":"boolean"},"lifetime_warranty":{"description":"LifetimeWarranty holds the value of the \"lifetime_warranty\" field.","type":"boolean"},"manufacturer":{"description":"Manufacturer holds the value of the \"manufacturer\" field.","type":"string"},"model_number":{"description":"ModelNumber holds the value of the \"model_number\" field.","type":"string"},"name":{"description":"Name holds the value of the \"name\" field.","type":"string"},"notes":{"description":"Notes holds the value of the \"notes\" field.","type":"string"},"purchase_from":{"description":"PurchaseFrom holds the value of the \"purchase_from\" field.","type":"string"},"purchase_price":{"description":"PurchasePrice holds the value of the \"purchase_price\" field.","type":"number"},"purchase_time":{"description":"PurchaseTime holds the value of the \"purchase_time\" field.","type":"string"},"quantity":{"description":"Quantity holds the value of the \"quantity\" field.","type":"integer"},"serial_number":{"description":"SerialNumber holds the value of the \"serial_number\" field.","type":"string"},"sold_notes":{"description":"SoldNotes holds the value of the \"sold_notes\" field.","type":"string"},"sold_price":{"description":"SoldPrice holds the value of the \"sold_price\" field.","type":"number"},"sold_time":{"description":"SoldTime holds the value of the \"sold_time\" field.","type":"string"},"sold_to":{"description":"SoldTo holds the value of the \"sold_to\" field.","type":"string"},"sync_child_entities_locations":{"description":"SyncChildEntitiesLocations holds the value of the \"sync_child_entities_locations\" field.","type":"boolean"},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"},"warranty_details":{"description":"WarrantyDetails holds the value of the \"warranty_details\" field.","type":"string"},"warranty_expires":{"description":"WarrantyExpires holds the value of the \"warranty_expires\" field.","type":"string"}}},"ent.EntityEdges":{"type":"object","properties":{"attachments":{"description":"Attachments holds the value of the attachments edge.","type":"array","items":{"$ref":"#/definitions/ent.Attachment"}},"children":{"description":"Children holds the value of the children edge.","type":"array","items":{"$ref":"#/definitions/ent.Entity"}},"entity":{"description":"Entity holds the value of the entity edge.","type":"array","items":{"$ref":"#/definitions/ent.Entity"}},"fields":{"description":"Fields holds the value of the fields edge.","type":"array","items":{"$ref":"#/definitions/ent.EntityField"}},"group":{"description":"Group holds the value of the group edge.","allOf":[{"$ref":"#/definitions/ent.Group"}]},"label":{"description":"Label holds the value of the label edge.","type":"array","items":{"$ref":"#/definitions/ent.Label"}},"location":{"description":"Location holds the value of the location edge.","allOf":[{"$ref":"#/definitions/ent.Entity"}]},"maintenance_entries":{"description":"MaintenanceEntries holds the value of the maintenance_entries edge.","type":"array","items":{"$ref":"#/definitions/ent.MaintenanceEntry"}},"parent":{"description":"Parent holds the value of the parent edge.","allOf":[{"$ref":"#/definitions/ent.Entity"}]},"type":{"description":"Type holds the value of the type edge.","allOf":[{"$ref":"#/definitions/ent.EntityType"}]}}},"ent.EntityField":{"type":"object","properties":{"boolean_value":{"description":"BooleanValue holds the value of the \"boolean_value\" field.","type":"boolean"},"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"description":{"description":"Description holds the value of the \"description\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the EntityFieldQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.EntityFieldEdges"}]},"id":{"description":"ID of the ent.","type":"string"},"name":{"description":"Name holds the value of the \"name\" field.","type":"string"},"number_value":{"description":"NumberValue holds the value of the \"number_value\" field.","type":"integer"},"text_value":{"description":"TextValue holds the value of the \"text_value\" field.","type":"string"},"time_value":{"description":"TimeValue holds the value of the \"time_value\" field.","type":"string"},"type":{"description":"Type holds the value of the \"type\" field.","allOf":[{"$ref":"#/definitions/entityfield.Type"}]},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"}}},"ent.EntityFieldEdges":{"type":"object","properties":{"entity":{"description":"Entity holds the value of the entity edge.","allOf":[{"$ref":"#/definitions/ent.Entity"}]}}},"ent.EntityType":{"type":"object","properties":{"color":{"description":"Color holds the value of the \"color\" field.","type":"string"},"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"description":{"description":"Description holds the value of the \"description\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the EntityTypeQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.EntityTypeEdges"}]},"icon":{"description":"Icon holds the value of the \"icon\" field.","type":"string"},"id":{"description":"ID of the ent.","type":"string"},"is_location":{"description":"IsLocation holds the value of the \"is_location\" field.","type":"boolean"},"name":{"description":"Name holds the value of the \"name\" field.","type":"string"},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"}}},"ent.EntityTypeEdges":{"type":"object","properties":{"entities":{"description":"Entities holds the value of the entities edge.","type":"array","items":{"$ref":"#/definitions/ent.Entity"}},"group":{"description":"Group holds the value of the group edge.","allOf":[{"$ref":"#/definitions/ent.Group"}]}}},"ent.Group":{"type":"object","properties":{"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"currency":{"description":"Currency holds the value of the \"currency\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the GroupQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.GroupEdges"}]},"id":{"description":"ID of the ent.","type":"string"},"name":{"description":"Name holds the value of the \"name\" field.","type":"string"},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"}}},"ent.GroupEdges":{"type":"object","properties":{"entities":{"description":"Entities holds the value of the entities edge.","type":"array","items":{"$ref":"#/definitions/ent.Entity"}},"entity_types":{"description":"EntityTypes holds the value of the entity_types edge.","type":"array","items":{"$ref":"#/definitions/ent.EntityType"}},"invitation_tokens":{"description":"InvitationTokens holds the value of the invitation_tokens edge.","type":"array","items":{"$ref":"#/definitions/ent.GroupInvitationToken"}},"labels":{"description":"Labels holds the value of the labels edge.","type":"array","items":{"$ref":"#/definitions/ent.Label"}},"notifiers":{"description":"Notifiers holds the value of the notifiers edge.","type":"array","items":{"$ref":"#/definitions/ent.Notifier"}},"users":{"description":"Users holds the value of the users edge.","type":"array","items":{"$ref":"#/definitions/ent.User"}}}},"ent.GroupInvitationToken":{"type":"object","properties":{"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the GroupInvitationTokenQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.GroupInvitationTokenEdges"}]},"expires_at":{"description":"ExpiresAt holds the value of the \"expires_at\" field.","type":"string"},"id":{"description":"ID of the ent.","type":"string"},"token":{"description":"Token holds the value of the \"token\" field.","type":"array","items":{"type":"integer"}},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"},"uses":{"description":"Uses holds the value of the \"uses\" field.","type":"integer"}}},"ent.GroupInvitationTokenEdges":{"type":"object","properties":{"group":{"description":"Group holds the value of the group edge.","allOf":[{"$ref":"#/definitions/ent.Group"}]}}},"ent.Label":{"type":"object","properties":{"color":{"description":"Color holds the value of the \"color\" field.","type":"string"},"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"description":{"description":"Description holds the value of the \"description\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the LabelQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.LabelEdges"}]},"id":{"description":"ID of the ent.","type":"string"},"name":{"description":"Name holds the value of the \"name\" field.","type":"string"},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"}}},"ent.LabelEdges":{"type":"object","properties":{"entities":{"description":"Entities holds the value of the entities edge.","type":"array","items":{"$ref":"#/definitions/ent.Entity"}},"group":{"description":"Group holds the value of the group edge.","allOf":[{"$ref":"#/definitions/ent.Group"}]}}},"ent.MaintenanceEntry":{"type":"object","properties":{"cost":{"description":"Cost holds the value of the \"cost\" field.","type":"number"},"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"date":{"description":"Date holds the value of the \"date\" field.","type":"string"},"description":{"description":"Description holds the value of the \"description\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the MaintenanceEntryQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.MaintenanceEntryEdges"}]},"entity_id":{"description":"EntityID holds the value of the \"entity_id\" field.","type":"string"},"id":{"description":"ID of the ent.","type":"string"},"name":{"description":"Name holds the value of the \"name\" field.","type":"string"},"scheduled_date":{"description":"ScheduledDate holds the value of the \"scheduled_date\" field.","type":"string"},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"}}},"ent.MaintenanceEntryEdges":{"type":"object","properties":{"entity":{"description":"Entity holds the value of the entity edge.","allOf":[{"$ref":"#/definitions/ent.Entity"}]}}},"ent.Notifier":{"type":"object","properties":{"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the NotifierQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.NotifierEdges"}]},"group_id":{"description":"GroupID holds the value of the \"group_id\" field.","type":"string"},"id":{"description":"ID of the ent.","type":"string"},"is_active":{"description":"IsActive holds the value of the \"is_active\" field.","type":"boolean"},"name":{"description":"Name holds the value of the \"name\" field.","type":"string"},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"},"user_id":{"description":"UserID holds the value of the \"user_id\" field.","type":"string"}}},"ent.NotifierEdges":{"type":"object","properties":{"group":{"description":"Group holds the value of the group edge.","allOf":[{"$ref":"#/definitions/ent.Group"}]},"user":{"description":"User holds the value of the user edge.","allOf":[{"$ref":"#/definitions/ent.User"}]}}},"ent.User":{"type":"object","properties":{"activated_on":{"description":"ActivatedOn holds the value of the \"activated_on\" field.","type":"string"},"created_at":{"description":"CreatedAt holds the value of the \"created_at\" field.","type":"string"},"edges":{"description":"Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the UserQuery when eager-loading is set.","allOf":[{"$ref":"#/definitions/ent.UserEdges"}]},"email":{"description":"Email holds the value of the \"email\" field.","type":"string"},"id":{"description":"ID of the ent.","type":"string"},"is_superuser":{"description":"IsSuperuser holds the value of the \"is_superuser\" field.","type":"boolean"},"name":{"description":"Name holds the value of the \"name\" field.","type":"string"},"role":{"description":"Role holds the value of the \"role\" field.","allOf":[{"$ref":"#/definitions/user.Role"}]},"superuser":{"description":"Superuser holds the value of the \"superuser\" field.","type":"boolean"},"updated_at":{"description":"UpdatedAt holds the value of the \"updated_at\" field.","type":"string"}}},"ent.UserEdges":{"type":"object","properties":{"auth_tokens":{"description":"AuthTokens holds the value of the auth_tokens edge.","type":"array","items":{"$ref":"#/definitions/ent.AuthTokens"}},"group":{"description":"Group holds the value of the group edge.","allOf":[{"$ref":"#/definitions/ent.Group"}]},"notifiers":{"description":"Notifiers holds the value of the notifiers edge.","type":"array","items":{"$ref":"#/definitions/ent.Notifier"}}}},"entityfield.Type":{"type":"string","enum":["text","number","boolean","time"],"x-enum-varnames":["TypeText","TypeNumber","TypeBoolean","TypeTime"]},"repo.BarcodeProduct":{"type":"object","properties":{"barcode":{"type":"string"},"imageBase64":{"type":"string"},"imageURL":{"type":"string"},"item":{"$ref":"#/definitions/repo.ItemCreate"},"manufacturer":{"type":"string"},"modelNumber":{"description":"Identifications","type":"string"},"notes":{"description":"Extras","type":"string"},"search_engine_name":{"type":"string"}}},"repo.DuplicateOptions":{"type":"object","properties":{"copyAttachments":{"type":"boolean"},"copyCustomFields":{"type":"boolean"},"copyMaintenance":{"type":"boolean"},"copyPrefix":{"type":"string"}}},"repo.EntityAttachment":{"type":"object","properties":{"createdAt":{"type":"string"},"id":{"type":"string"},"mimeType":{"type":"string"},"path":{"type":"string"},"primary":{"type":"boolean"},"thumbnail":{"$ref":"#/definitions/ent.Attachment"},"title":{"type":"string"},"type":{"type":"string"},"updatedAt":{"type":"string"}}},"repo.EntityAttachmentUpdate":{"type":"object","properties":{"primary":{"type":"boolean"},"title":{"type":"string"},"type":{"type":"string"}}},"repo.EntityType":{"type":"object","properties":{"color":{"type":"string"},"description":{"type":"string"},"icon":{"type":"string"},"isLocation":{"type":"boolean"},"name":{"type":"string"}}},"repo.EntityTypeCreate":{"type":"object","required":["isLocation","name"],"properties":{"color":{"type":"string"},"description":{"type":"string"},"icon":{"type":"string"},"isLocation":{"type":"boolean"},"name":{"type":"string"}}},"repo.EntityTypeDelete":{"type":"object","properties":{"replacementId":{"$ref":"#/definitions/uuid.NullUUID"}}},"repo.EntityTypeUpdate":{"type":"object","properties":{"color":{"type":"string"},"description":{"type":"string"},"icon":{"type":"string"},"name":{"type":"string","minLength":1}}},"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.ItemCreate":{"type":"object","required":["entityType","name"],"properties":{"description":{"type":"string","maxLength":1000},"entityType":{"type":"string"},"labelIds":{"type":"array","items":{"type":"string"}},"locationId":{"description":"Edges","type":"string"},"name":{"type":"string","maxLength":255,"minLength":1},"parentId":{"type":"string","x-nullable":true},"quantity":{"type":"integer"}}},"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.EntityAttachment"}},"createdAt":{"type":"string"},"description":{"type":"string"},"entityType":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/definitions/repo.ItemField"}},"id":{"type":"string"},"imageId":{"type":"string","x-nullable":true,"x-omitempty":true},"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":"number"},"purchaseTime":{"description":"Purchase","type":"string"},"quantity":{"type":"integer"},"serialNumber":{"type":"string"},"soldNotes":{"type":"string"},"soldPrice":{"type":"number"},"soldTime":{"description":"Sold","type":"string"},"soldTo":{"type":"string"},"syncChildItemsLocations":{"type":"boolean"},"thumbnailId":{"type":"string","x-nullable":true,"x-omitempty":true},"updatedAt":{"type":"string"},"warrantyDetails":{"type":"string"},"warrantyExpires":{"type":"string"}}},"repo.ItemPatch":{"type":"object","properties":{"id":{"type":"string"},"labelIds":{"type":"array","items":{"type":"string"},"x-nullable":true,"x-omitempty":true},"locationId":{"type":"string","x-nullable":true,"x-omitempty":true},"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"},"assetId":{"type":"string","example":"0"},"createdAt":{"type":"string"},"description":{"type":"string"},"entityType":{"type":"string"},"id":{"type":"string"},"imageId":{"type":"string","x-nullable":true,"x-omitempty":true},"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":"number"},"quantity":{"type":"integer"},"soldTime":{"description":"Sale details","type":"string"},"thumbnailId":{"type":"string","x-nullable":true,"x-omitempty":true},"updatedAt":{"type":"string"}}},"repo.ItemType":{"type":"string","enum":["location","item","location","item"],"x-enum-varnames":["EntityTypeLocation","EntityTypeItem","ItemTypeLocation","ItemTypeItem"]},"repo.ItemUpdate":{"type":"object","required":["entityType","name"],"properties":{"archived":{"type":"boolean"},"assetId":{"type":"string"},"description":{"type":"string","maxLength":1000},"entityType":{"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","maxLength":255,"minLength":1},"notes":{"description":"Extras","type":"string"},"parentId":{"type":"string","x-nullable":true,"x-omitempty":true},"purchaseFrom":{"type":"string","maxLength":255},"purchasePrice":{"type":"number","x-nullable":true,"x-omitempty":true},"purchaseTime":{"description":"Purchase","type":"string"},"quantity":{"type":"integer"},"serialNumber":{"description":"Identifications","type":"string"},"soldNotes":{"type":"string"},"soldPrice":{"type":"number","x-nullable":true,"x-omitempty":true},"soldTime":{"description":"Sold","type":"string"},"soldTo":{"type":"string","maxLength":255},"syncChildItemsLocations":{"type":"boolean"},"warrantyDetails":{"type":"string"},"warrantyExpires":{"type":"string"}}},"repo.LabelCreate":{"type":"object","required":["name"],"properties":{"color":{"type":"string"},"description":{"type":"string","maxLength":1000},"name":{"type":"string","maxLength":255,"minLength":1}}},"repo.LabelOut":{"type":"object","properties":{"color":{"type":"string"},"createdAt":{"type":"string"},"description":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"updatedAt":{"type":"string"}}},"repo.LabelSummary":{"type":"object","properties":{"color":{"type":"string"},"createdAt":{"type":"string"},"description":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"updatedAt":{"type":"string"}}},"repo.LocationCreate":{"type":"object","required":["entityType"],"properties":{"description":{"type":"string"},"entityType":{"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"},"entityType":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"parent":{"$ref":"#/definitions/repo.LocationSummary"},"totalPrice":{"type":"number"},"updatedAt":{"type":"string"}}},"repo.LocationOutCount":{"type":"object","properties":{"createdAt":{"type":"string"},"description":{"type":"string"},"entityType":{"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"},"entityType":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"updatedAt":{"type":"string"}}},"repo.LocationUpdate":{"type":"object","required":["entityType"],"properties":{"description":{"type":"string"},"entityType":{"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.MaintenanceEntryWithDetails":{"type":"object","properties":{"completedDate":{"type":"string"},"cost":{"type":"string","example":"0"},"description":{"type":"string"},"id":{"type":"string"},"itemID":{"type":"string"},"itemName":{"type":"string"},"name":{"type":"string"},"scheduledDate":{"type":"string"}}},"repo.MaintenanceFilterStatus":{"type":"string","enum":["scheduled","completed","both"],"x-enum-varnames":["MaintenanceFilterStatusScheduled","MaintenanceFilterStatusCompleted","MaintenanceFilterStatusBoth"]},"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"},"url":{"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.Latest":{"type":"object","properties":{"date":{"type":"string"},"version":{"type":"string"}}},"services.UserRegistration":{"type":"object","properties":{"email":{"type":"string"},"name":{"type":"string"},"password":{"type":"string"},"token":{"type":"string"}}},"user.Role":{"type":"string","enum":["user","user","owner"],"x-enum-varnames":["DefaultRole","RoleUser","RoleOwner"]},"uuid.NullUUID":{"type":"object","properties":{"uuid":{"type":"string"},"valid":{"description":"Valid is true if UUID is not NULL","type":"boolean"}}},"v1.APISummary":{"type":"object","properties":{"allowRegistration":{"type":"boolean"},"build":{"$ref":"#/definitions/v1.Build"},"demo":{"type":"boolean"},"health":{"type":"boolean"},"labelPrinting":{"type":"boolean"},"latest":{"$ref":"#/definitions/services.Latest"},"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","example":"admin"},"stayLoggedIn":{"type":"boolean"},"username":{"type":"string","example":"admin@admin.com"}}},"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"}}} \ No newline at end of file diff --git a/docs/en/api/swagger-2.0.yaml b/docs/en/api/swagger-2.0.yaml index b45cee93..2e123553 100644 --- a/docs/en/api/swagger-2.0.yaml +++ b/docs/en/api/swagger-2.0.yaml @@ -1010,8 +1010,12 @@ definitions: enum: - location - item + - location + - item type: string x-enum-varnames: + - EntityTypeLocation + - EntityTypeItem - ItemTypeLocation - ItemTypeItem repo.ItemUpdate: diff --git a/frontend/lib/api/types/data-contracts.ts b/frontend/lib/api/types/data-contracts.ts index 15005f70..26c42120 100644 --- a/frontend/lib/api/types/data-contracts.ts +++ b/frontend/lib/api/types/data-contracts.ts @@ -24,11 +24,13 @@ export enum MaintenanceFilterStatus { } export enum ItemType { + EntityTypeLocation = "location", + EntityTypeItem = "item", ItemTypeLocation = "location", ItemTypeItem = "item", } -export enum ItemfieldType { +export enum EntityfieldType { TypeText = "text", TypeNumber = "number", TypeBoolean = "boolean", @@ -85,8 +87,8 @@ export interface EntAttachment { } export interface EntAttachmentEdges { - /** Item holds the value of the item edge. */ - item: EntItem; + /** Entity holds the value of the entity edge. */ + entity: EntEntity; /** Thumbnail holds the value of the thumbnail edge. */ thumbnail: EntAttachment; } @@ -133,65 +135,7 @@ export interface EntAuthTokensEdges { user: EntUser; } -export interface EntGroup { - /** CreatedAt holds the value of the "created_at" field. */ - created_at: string; - /** Currency holds the value of the "currency" field. */ - currency: string; - /** - * Edges holds the relations/edges for other nodes in the graph. - * The values are being populated by the GroupQuery when eager-loading is set. - */ - edges: EntGroupEdges; - /** ID of the ent. */ - id: string; - /** Name holds the value of the "name" field. */ - name: string; - /** UpdatedAt holds the value of the "updated_at" field. */ - updated_at: string; -} - -export interface EntGroupEdges { - /** InvitationTokens holds the value of the invitation_tokens edge. */ - invitation_tokens: EntGroupInvitationToken[]; - /** Items holds the value of the items edge. */ - items: EntItem[]; - /** Labels holds the value of the labels edge. */ - labels: EntLabel[]; - /** Locations holds the value of the locations edge. */ - locations: EntLocation[]; - /** Notifiers holds the value of the notifiers edge. */ - notifiers: EntNotifier[]; - /** Users holds the value of the users edge. */ - users: EntUser[]; -} - -export interface EntGroupInvitationToken { - /** CreatedAt holds the value of the "created_at" field. */ - created_at: string; - /** - * Edges holds the relations/edges for other nodes in the graph. - * The values are being populated by the GroupInvitationTokenQuery when eager-loading is set. - */ - edges: EntGroupInvitationTokenEdges; - /** ExpiresAt holds the value of the "expires_at" field. */ - expires_at: string; - /** ID of the ent. */ - id: string; - /** Token holds the value of the "token" field. */ - token: number[]; - /** UpdatedAt holds the value of the "updated_at" field. */ - updated_at: string; - /** Uses holds the value of the "uses" field. */ - uses: number; -} - -export interface EntGroupInvitationTokenEdges { - /** Group holds the value of the group edge. */ - group: EntGroup; -} - -export interface EntItem { +export interface EntEntity { /** Archived holds the value of the "archived" field. */ archived: boolean; /** AssetID holds the value of the "asset_id" field. */ @@ -202,9 +146,9 @@ export interface EntItem { description: string; /** * Edges holds the relations/edges for other nodes in the graph. - * The values are being populated by the ItemQuery when eager-loading is set. + * The values are being populated by the EntityQuery when eager-loading is set. */ - edges: EntItemEdges; + edges: EntEntityEdges; /** ID of the ent. */ id: string; /** ImportRef holds the value of the "import_ref" field. */ @@ -239,8 +183,8 @@ export interface EntItem { sold_time: string; /** SoldTo holds the value of the "sold_to" field. */ sold_to: string; - /** SyncChildItemsLocations holds the value of the "sync_child_items_locations" field. */ - sync_child_items_locations: boolean; + /** SyncChildEntitiesLocations holds the value of the "sync_child_entities_locations" field. */ + sync_child_entities_locations: boolean; /** UpdatedAt holds the value of the "updated_at" field. */ updated_at: string; /** WarrantyDetails holds the value of the "warranty_details" field. */ @@ -249,26 +193,30 @@ export interface EntItem { warranty_expires: string; } -export interface EntItemEdges { +export interface EntEntityEdges { /** Attachments holds the value of the attachments edge. */ attachments: EntAttachment[]; /** Children holds the value of the children edge. */ - children: EntItem[]; + children: EntEntity[]; + /** Entity holds the value of the entity edge. */ + entity: EntEntity[]; /** Fields holds the value of the fields edge. */ - fields: EntItemField[]; + fields: EntEntityField[]; /** Group holds the value of the group edge. */ group: EntGroup; /** Label holds the value of the label edge. */ label: EntLabel[]; /** Location holds the value of the location edge. */ - location: EntLocation; + location: EntEntity; /** MaintenanceEntries holds the value of the maintenance_entries edge. */ maintenance_entries: EntMaintenanceEntry[]; /** Parent holds the value of the parent edge. */ - parent: EntItem; + parent: EntEntity; + /** Type holds the value of the type edge. */ + type: EntEntityType; } -export interface EntItemField { +export interface EntEntityField { /** BooleanValue holds the value of the "boolean_value" field. */ boolean_value: boolean; /** CreatedAt holds the value of the "created_at" field. */ @@ -277,9 +225,9 @@ export interface EntItemField { description: string; /** * Edges holds the relations/edges for other nodes in the graph. - * The values are being populated by the ItemFieldQuery when eager-loading is set. + * The values are being populated by the EntityFieldQuery when eager-loading is set. */ - edges: EntItemFieldEdges; + edges: EntEntityFieldEdges; /** ID of the ent. */ id: string; /** Name holds the value of the "name" field. */ @@ -291,14 +239,103 @@ export interface EntItemField { /** TimeValue holds the value of the "time_value" field. */ time_value: string; /** Type holds the value of the "type" field. */ - type: ItemfieldType; + type: EntityfieldType; /** UpdatedAt holds the value of the "updated_at" field. */ updated_at: string; } -export interface EntItemFieldEdges { - /** Item holds the value of the item edge. */ - item: EntItem; +export interface EntEntityFieldEdges { + /** Entity holds the value of the entity edge. */ + entity: EntEntity; +} + +export interface EntEntityType { + /** Color holds the value of the "color" field. */ + color: string; + /** CreatedAt holds the value of the "created_at" field. */ + created_at: string; + /** Description holds the value of the "description" field. */ + description: string; + /** + * Edges holds the relations/edges for other nodes in the graph. + * The values are being populated by the EntityTypeQuery when eager-loading is set. + */ + edges: EntEntityTypeEdges; + /** Icon holds the value of the "icon" field. */ + icon: string; + /** ID of the ent. */ + id: string; + /** IsLocation holds the value of the "is_location" field. */ + is_location: boolean; + /** Name holds the value of the "name" field. */ + name: string; + /** UpdatedAt holds the value of the "updated_at" field. */ + updated_at: string; +} + +export interface EntEntityTypeEdges { + /** Entities holds the value of the entities edge. */ + entities: EntEntity[]; + /** Group holds the value of the group edge. */ + group: EntGroup; +} + +export interface EntGroup { + /** CreatedAt holds the value of the "created_at" field. */ + created_at: string; + /** Currency holds the value of the "currency" field. */ + currency: string; + /** + * Edges holds the relations/edges for other nodes in the graph. + * The values are being populated by the GroupQuery when eager-loading is set. + */ + edges: EntGroupEdges; + /** ID of the ent. */ + id: string; + /** Name holds the value of the "name" field. */ + name: string; + /** UpdatedAt holds the value of the "updated_at" field. */ + updated_at: string; +} + +export interface EntGroupEdges { + /** Entities holds the value of the entities edge. */ + entities: EntEntity[]; + /** EntityTypes holds the value of the entity_types edge. */ + entity_types: EntEntityType[]; + /** InvitationTokens holds the value of the invitation_tokens edge. */ + invitation_tokens: EntGroupInvitationToken[]; + /** Labels holds the value of the labels edge. */ + labels: EntLabel[]; + /** Notifiers holds the value of the notifiers edge. */ + notifiers: EntNotifier[]; + /** Users holds the value of the users edge. */ + users: EntUser[]; +} + +export interface EntGroupInvitationToken { + /** CreatedAt holds the value of the "created_at" field. */ + created_at: string; + /** + * Edges holds the relations/edges for other nodes in the graph. + * The values are being populated by the GroupInvitationTokenQuery when eager-loading is set. + */ + edges: EntGroupInvitationTokenEdges; + /** ExpiresAt holds the value of the "expires_at" field. */ + expires_at: string; + /** ID of the ent. */ + id: string; + /** Token holds the value of the "token" field. */ + token: number[]; + /** UpdatedAt holds the value of the "updated_at" field. */ + updated_at: string; + /** Uses holds the value of the "uses" field. */ + uses: number; +} + +export interface EntGroupInvitationTokenEdges { + /** Group holds the value of the group edge. */ + group: EntGroup; } export interface EntLabel { @@ -322,39 +359,10 @@ export interface EntLabel { } export interface EntLabelEdges { + /** Entities holds the value of the entities edge. */ + entities: EntEntity[]; /** Group holds the value of the group edge. */ group: EntGroup; - /** Items holds the value of the items edge. */ - items: EntItem[]; -} - -export interface EntLocation { - /** CreatedAt holds the value of the "created_at" field. */ - created_at: string; - /** Description holds the value of the "description" field. */ - description: string; - /** - * Edges holds the relations/edges for other nodes in the graph. - * The values are being populated by the LocationQuery when eager-loading is set. - */ - edges: EntLocationEdges; - /** ID of the ent. */ - id: string; - /** Name holds the value of the "name" field. */ - name: string; - /** UpdatedAt holds the value of the "updated_at" field. */ - updated_at: string; -} - -export interface EntLocationEdges { - /** Children holds the value of the children edge. */ - children: EntLocation[]; - /** Group holds the value of the group edge. */ - group: EntGroup; - /** Items holds the value of the items edge. */ - items: EntItem[]; - /** Parent holds the value of the parent edge. */ - parent: EntLocation; } export interface EntMaintenanceEntry { @@ -371,10 +379,10 @@ export interface EntMaintenanceEntry { * The values are being populated by the MaintenanceEntryQuery when eager-loading is set. */ edges: EntMaintenanceEntryEdges; + /** EntityID holds the value of the "entity_id" field. */ + entity_id: string; /** ID of the ent. */ id: string; - /** ItemID holds the value of the "item_id" field. */ - item_id: string; /** Name holds the value of the "name" field. */ name: string; /** ScheduledDate holds the value of the "scheduled_date" field. */ @@ -384,8 +392,8 @@ export interface EntMaintenanceEntry { } export interface EntMaintenanceEntryEdges { - /** Item holds the value of the item edge. */ - item: EntItem; + /** Entity holds the value of the entity edge. */ + entity: EntEntity; } export interface EntNotifier { @@ -472,6 +480,52 @@ export interface DuplicateOptions { copyPrefix: string; } +export interface EntityAttachment { + createdAt: Date | string; + id: string; + mimeType: string; + path: string; + primary: boolean; + thumbnail: EntAttachment; + title: string; + type: string; + updatedAt: Date | string; +} + +export interface EntityAttachmentUpdate { + primary: boolean; + title: string; + type: string; +} + +export interface EntityType { + color: string; + description: string; + icon: string; + isLocation: boolean; + name: string; +} + +export interface EntityTypeCreate { + color: string; + description: string; + icon: string; + isLocation: boolean; + name: string; +} + +export interface EntityTypeDelete { + replacementId: UuidNullUUID; +} + +export interface EntityTypeUpdate { + color: string; + description: string; + icon: string; + /** @minLength 1 */ + name: string; +} + export interface Group { createdAt: Date | string; currency: string; @@ -494,27 +548,10 @@ export interface GroupUpdate { name: string; } -export interface ItemAttachment { - createdAt: Date | string; - id: string; - mimeType: string; - path: string; - primary: boolean; - thumbnail: EntAttachment; - title: string; - type: string; - updatedAt: Date | string; -} - -export interface ItemAttachmentUpdate { - primary: boolean; - title: string; - type: string; -} - export interface ItemCreate { /** @maxLength 1000 */ description: string; + entityType: string; labelIds: string[]; /** Edges */ locationId: string; @@ -540,9 +577,10 @@ export interface ItemOut { archived: boolean; /** @example "0" */ assetId: string; - attachments: ItemAttachment[]; + attachments: EntityAttachment[]; createdAt: Date | string; description: string; + entityType: string; fields: ItemField[]; id: string; imageId?: string | null; @@ -595,6 +633,7 @@ export interface ItemSummary { assetId: string; createdAt: Date | string; description: string; + entityType: string; id: string; imageId?: string | null; insured: boolean; @@ -615,6 +654,7 @@ export interface ItemUpdate { assetId: string; /** @maxLength 1000 */ description: string; + entityType: string; fields: ItemField[]; id: string; insured: boolean; @@ -683,6 +723,7 @@ export interface LabelSummary { export interface LocationCreate { description: string; + entityType: string; name: string; parentId?: string | null; } @@ -691,6 +732,7 @@ export interface LocationOut { children: LocationSummary[]; createdAt: Date | string; description: string; + entityType: string; id: string; name: string; parent: LocationSummary; @@ -701,6 +743,7 @@ export interface LocationOut { export interface LocationOutCount { createdAt: Date | string; description: string; + entityType: string; id: string; itemCount: number; name: string; @@ -710,6 +753,7 @@ export interface LocationOutCount { export interface LocationSummary { createdAt: Date | string; description: string; + entityType: string; id: string; name: string; updatedAt: Date | string; @@ -717,6 +761,7 @@ export interface LocationSummary { export interface LocationUpdate { description: string; + entityType: string; id: string; name: string; parentId?: string | null; @@ -854,6 +899,12 @@ export interface UserRegistration { token: string; } +export interface UuidNullUUID { + uuid: string; + /** Valid is true if UUID is not NULL */ + valid: boolean; +} + export interface APISummary { allowRegistration: boolean; build: Build;