mirror of
https://github.com/sysadminsmedia/homebox.git
synced 2025-12-21 13:23:14 +01:00
* feat: Add item templates feature (#435) Add ability to create and manage item templates for quick item creation. Templates store default values and custom fields that can be applied when creating new items. Backend changes: - New ItemTemplate and TemplateField Ent schemas - Template CRUD API endpoints - Create item from template endpoint Frontend changes: - Templates management page with create/edit/delete - Template selector in item creation modal - 'Use as Template' action on item detail page - Templates link in navigation menu * refactor: Improve template item creation with a single query - Add `CreateFromTemplate` method to ItemsRepository that creates items with all template data (including custom fields) in a single atomic transaction, replacing the previous two-phase create-then-update pattern - Fix `GetOne` to require group ID parameter so templates can only be accessed by users in the owning group (security fix) - Simplify `HandleItemTemplatesCreateItem` handler using the new transactional method * Refactor item template types and formatting Updated type annotations in CreateModal.vue to use specific ItemTemplate types instead of 'any'. Improved code formatting for template fields and manufacturer display. Also refactored warranty field logic in item details page for better readability. This resolves the linter issues as well that the bot in github keeps nagging at. * Add 'id' property to template fields Introduces an 'id' property to each field object in CreateModal.vue and item details page to support unique identification of fields. This change prepares the codebase for future enhancements that may require field-level identification. * Removed redundant SQL migrations. Removed redundant SQL migrations per @tankerkiller125's findings. * Updates to PR #1099. Regarding pull #1099. Fixed an issue causing some conflict with GUIDs and old rows in the migration files. * Add new fields and location edge to ItemTemplate Addresses recommendations from @tonyaellie. * Relocated add template button * Added more default fields to the template * Added translation of all strings (think so?) * Make oval buttons round * Added duplicate button to the template (this required a rewrite of the migration files, I made sure only 1 exists per DB type) * Added a Save as template button to a item detail view (this creates a template with all the current data of that item) * Changed all occurrences of space to gap and flex where applicable. * Made template selection persistent after item created. * Collapsible template info on creation view. * Updates to translation and fix for labels/locations I also added a test in here because I keep missing small function tests. That should prevent that from happening again. * Linted * Bring up to date with main, fix some lint/type check issues * In theory fix playwright tests * Fix defaults being unable to be nullable/empty (and thus limiting flexibility) * Last few fixes I think * Forgot to fix the golang tests --------- Co-authored-by: Matthew Kilgore <matthew@kilgore.dev>
3386 lines
80 KiB
YAML
3386 lines
80 KiB
YAML
basePath: /api
|
|
definitions:
|
|
attachment.Type:
|
|
enum:
|
|
- attachment
|
|
- photo
|
|
- manual
|
|
- warranty
|
|
- attachment
|
|
- receipt
|
|
- thumbnail
|
|
type: string
|
|
x-enum-varnames:
|
|
- DefaultType
|
|
- TypePhoto
|
|
- TypeManual
|
|
- TypeWarranty
|
|
- TypeAttachment
|
|
- TypeReceipt
|
|
- TypeThumbnail
|
|
authroles.Role:
|
|
enum:
|
|
- user
|
|
- admin
|
|
- user
|
|
- attachments
|
|
type: string
|
|
x-enum-varnames:
|
|
- DefaultRole
|
|
- RoleAdmin
|
|
- RoleUser
|
|
- RoleAttachments
|
|
currencies.Currency:
|
|
properties:
|
|
code:
|
|
type: string
|
|
decimals:
|
|
type: integer
|
|
local:
|
|
type: string
|
|
name:
|
|
type: string
|
|
symbol:
|
|
type: string
|
|
type: object
|
|
ent.Attachment:
|
|
properties:
|
|
created_at:
|
|
description: CreatedAt holds the value of the "created_at" field.
|
|
type: string
|
|
edges:
|
|
allOf:
|
|
- $ref: '#/definitions/ent.AttachmentEdges'
|
|
description: |-
|
|
Edges holds the relations/edges for other nodes in the graph.
|
|
The values are being populated by the AttachmentQuery when eager-loading is set.
|
|
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:
|
|
allOf:
|
|
- $ref: '#/definitions/attachment.Type'
|
|
description: Type holds the value of the "type" field.
|
|
updated_at:
|
|
description: UpdatedAt holds the value of the "updated_at" field.
|
|
type: string
|
|
type: object
|
|
ent.AttachmentEdges:
|
|
properties:
|
|
item:
|
|
allOf:
|
|
- $ref: '#/definitions/ent.Item'
|
|
description: Item holds the value of the item edge.
|
|
thumbnail:
|
|
allOf:
|
|
- $ref: '#/definitions/ent.Attachment'
|
|
description: Thumbnail holds the value of the thumbnail edge.
|
|
type: object
|
|
ent.AuthRoles:
|
|
properties:
|
|
edges:
|
|
allOf:
|
|
- $ref: '#/definitions/ent.AuthRolesEdges'
|
|
description: |-
|
|
Edges holds the relations/edges for other nodes in the graph.
|
|
The values are being populated by the AuthRolesQuery when eager-loading is set.
|
|
id:
|
|
description: ID of the ent.
|
|
type: integer
|
|
role:
|
|
allOf:
|
|
- $ref: '#/definitions/authroles.Role'
|
|
description: Role holds the value of the "role" field.
|
|
type: object
|
|
ent.AuthRolesEdges:
|
|
properties:
|
|
token:
|
|
allOf:
|
|
- $ref: '#/definitions/ent.AuthTokens'
|
|
description: Token holds the value of the token edge.
|
|
type: object
|
|
ent.AuthTokens:
|
|
properties:
|
|
created_at:
|
|
description: CreatedAt holds the value of the "created_at" field.
|
|
type: string
|
|
edges:
|
|
allOf:
|
|
- $ref: '#/definitions/ent.AuthTokensEdges'
|
|
description: |-
|
|
Edges holds the relations/edges for other nodes in the graph.
|
|
The values are being populated by the AuthTokensQuery when eager-loading is set.
|
|
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.
|
|
items:
|
|
type: integer
|
|
type: array
|
|
updated_at:
|
|
description: UpdatedAt holds the value of the "updated_at" field.
|
|
type: string
|
|
type: object
|
|
ent.AuthTokensEdges:
|
|
properties:
|
|
roles:
|
|
allOf:
|
|
- $ref: '#/definitions/ent.AuthRoles'
|
|
description: Roles holds the value of the roles edge.
|
|
user:
|
|
allOf:
|
|
- $ref: '#/definitions/ent.User'
|
|
description: User holds the value of the user edge.
|
|
type: object
|
|
ent.Group:
|
|
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:
|
|
allOf:
|
|
- $ref: '#/definitions/ent.GroupEdges'
|
|
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.
|
|
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
|
|
type: object
|
|
ent.GroupEdges:
|
|
properties:
|
|
invitation_tokens:
|
|
description: InvitationTokens holds the value of the invitation_tokens edge.
|
|
items:
|
|
$ref: '#/definitions/ent.GroupInvitationToken'
|
|
type: array
|
|
item_templates:
|
|
description: ItemTemplates holds the value of the item_templates edge.
|
|
items:
|
|
$ref: '#/definitions/ent.ItemTemplate'
|
|
type: array
|
|
items:
|
|
description: Items holds the value of the items edge.
|
|
items:
|
|
$ref: '#/definitions/ent.Item'
|
|
type: array
|
|
labels:
|
|
description: Labels holds the value of the labels edge.
|
|
items:
|
|
$ref: '#/definitions/ent.Label'
|
|
type: array
|
|
locations:
|
|
description: Locations holds the value of the locations edge.
|
|
items:
|
|
$ref: '#/definitions/ent.Location'
|
|
type: array
|
|
notifiers:
|
|
description: Notifiers holds the value of the notifiers edge.
|
|
items:
|
|
$ref: '#/definitions/ent.Notifier'
|
|
type: array
|
|
users:
|
|
description: Users holds the value of the users edge.
|
|
items:
|
|
$ref: '#/definitions/ent.User'
|
|
type: array
|
|
type: object
|
|
ent.GroupInvitationToken:
|
|
properties:
|
|
created_at:
|
|
description: CreatedAt holds the value of the "created_at" field.
|
|
type: string
|
|
edges:
|
|
allOf:
|
|
- $ref: '#/definitions/ent.GroupInvitationTokenEdges'
|
|
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.
|
|
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.
|
|
items:
|
|
type: integer
|
|
type: array
|
|
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
|
|
type: object
|
|
ent.GroupInvitationTokenEdges:
|
|
properties:
|
|
group:
|
|
allOf:
|
|
- $ref: '#/definitions/ent.Group'
|
|
description: Group holds the value of the group edge.
|
|
type: object
|
|
ent.Item:
|
|
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:
|
|
allOf:
|
|
- $ref: '#/definitions/ent.ItemEdges'
|
|
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.
|
|
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
|
|
type: object
|
|
ent.ItemEdges:
|
|
properties:
|
|
attachments:
|
|
description: Attachments holds the value of the attachments edge.
|
|
items:
|
|
$ref: '#/definitions/ent.Attachment'
|
|
type: array
|
|
children:
|
|
description: Children holds the value of the children edge.
|
|
items:
|
|
$ref: '#/definitions/ent.Item'
|
|
type: array
|
|
fields:
|
|
description: Fields holds the value of the fields edge.
|
|
items:
|
|
$ref: '#/definitions/ent.ItemField'
|
|
type: array
|
|
group:
|
|
allOf:
|
|
- $ref: '#/definitions/ent.Group'
|
|
description: Group holds the value of the group edge.
|
|
label:
|
|
description: Label holds the value of the label edge.
|
|
items:
|
|
$ref: '#/definitions/ent.Label'
|
|
type: array
|
|
location:
|
|
allOf:
|
|
- $ref: '#/definitions/ent.Location'
|
|
description: Location holds the value of the location edge.
|
|
maintenance_entries:
|
|
description: MaintenanceEntries holds the value of the maintenance_entries
|
|
edge.
|
|
items:
|
|
$ref: '#/definitions/ent.MaintenanceEntry'
|
|
type: array
|
|
parent:
|
|
allOf:
|
|
- $ref: '#/definitions/ent.Item'
|
|
description: Parent holds the value of the parent edge.
|
|
type: object
|
|
ent.ItemField:
|
|
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:
|
|
allOf:
|
|
- $ref: '#/definitions/ent.ItemFieldEdges'
|
|
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.
|
|
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:
|
|
allOf:
|
|
- $ref: '#/definitions/itemfield.Type'
|
|
description: Type holds the value of the "type" field.
|
|
updated_at:
|
|
description: UpdatedAt holds the value of the "updated_at" field.
|
|
type: string
|
|
type: object
|
|
ent.ItemFieldEdges:
|
|
properties:
|
|
item:
|
|
allOf:
|
|
- $ref: '#/definitions/ent.Item'
|
|
description: Item holds the value of the item edge.
|
|
type: object
|
|
ent.ItemTemplate:
|
|
properties:
|
|
created_at:
|
|
description: CreatedAt holds the value of the "created_at" field.
|
|
type: string
|
|
default_description:
|
|
description: Default description for items created from this template
|
|
type: string
|
|
default_insured:
|
|
description: DefaultInsured holds the value of the "default_insured" field.
|
|
type: boolean
|
|
default_label_ids:
|
|
description: Default label IDs for items created from this template
|
|
items:
|
|
type: string
|
|
type: array
|
|
default_lifetime_warranty:
|
|
description: DefaultLifetimeWarranty holds the value of the "default_lifetime_warranty"
|
|
field.
|
|
type: boolean
|
|
default_manufacturer:
|
|
description: DefaultManufacturer holds the value of the "default_manufacturer"
|
|
field.
|
|
type: string
|
|
default_model_number:
|
|
description: Default model number for items created from this template
|
|
type: string
|
|
default_name:
|
|
description: Default name template for items (can use placeholders)
|
|
type: string
|
|
default_quantity:
|
|
description: DefaultQuantity holds the value of the "default_quantity" field.
|
|
type: integer
|
|
default_warranty_details:
|
|
description: DefaultWarrantyDetails holds the value of the "default_warranty_details"
|
|
field.
|
|
type: string
|
|
description:
|
|
description: Description holds the value of the "description" field.
|
|
type: string
|
|
edges:
|
|
allOf:
|
|
- $ref: '#/definitions/ent.ItemTemplateEdges'
|
|
description: |-
|
|
Edges holds the relations/edges for other nodes in the graph.
|
|
The values are being populated by the ItemTemplateQuery when eager-loading is set.
|
|
id:
|
|
description: ID of the ent.
|
|
type: string
|
|
include_purchase_fields:
|
|
description: Whether to include purchase fields in items created from this
|
|
template
|
|
type: boolean
|
|
include_sold_fields:
|
|
description: Whether to include sold fields in items created from this template
|
|
type: boolean
|
|
include_warranty_fields:
|
|
description: Whether to include warranty fields in items created from this
|
|
template
|
|
type: boolean
|
|
name:
|
|
description: Name holds the value of the "name" field.
|
|
type: string
|
|
notes:
|
|
description: Notes holds the value of the "notes" field.
|
|
type: string
|
|
updated_at:
|
|
description: UpdatedAt holds the value of the "updated_at" field.
|
|
type: string
|
|
type: object
|
|
ent.ItemTemplateEdges:
|
|
properties:
|
|
fields:
|
|
description: Fields holds the value of the fields edge.
|
|
items:
|
|
$ref: '#/definitions/ent.TemplateField'
|
|
type: array
|
|
group:
|
|
allOf:
|
|
- $ref: '#/definitions/ent.Group'
|
|
description: Group holds the value of the group edge.
|
|
location:
|
|
allOf:
|
|
- $ref: '#/definitions/ent.Location'
|
|
description: Location holds the value of the location edge.
|
|
type: object
|
|
ent.Label:
|
|
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:
|
|
allOf:
|
|
- $ref: '#/definitions/ent.LabelEdges'
|
|
description: |-
|
|
Edges holds the relations/edges for other nodes in the graph.
|
|
The values are being populated by the LabelQuery when eager-loading is set.
|
|
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
|
|
type: object
|
|
ent.LabelEdges:
|
|
properties:
|
|
group:
|
|
allOf:
|
|
- $ref: '#/definitions/ent.Group'
|
|
description: Group holds the value of the group edge.
|
|
items:
|
|
description: Items holds the value of the items edge.
|
|
items:
|
|
$ref: '#/definitions/ent.Item'
|
|
type: array
|
|
type: object
|
|
ent.Location:
|
|
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:
|
|
allOf:
|
|
- $ref: '#/definitions/ent.LocationEdges'
|
|
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.
|
|
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
|
|
type: object
|
|
ent.LocationEdges:
|
|
properties:
|
|
children:
|
|
description: Children holds the value of the children edge.
|
|
items:
|
|
$ref: '#/definitions/ent.Location'
|
|
type: array
|
|
group:
|
|
allOf:
|
|
- $ref: '#/definitions/ent.Group'
|
|
description: Group holds the value of the group edge.
|
|
items:
|
|
description: Items holds the value of the items edge.
|
|
items:
|
|
$ref: '#/definitions/ent.Item'
|
|
type: array
|
|
parent:
|
|
allOf:
|
|
- $ref: '#/definitions/ent.Location'
|
|
description: Parent holds the value of the parent edge.
|
|
type: object
|
|
ent.MaintenanceEntry:
|
|
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:
|
|
allOf:
|
|
- $ref: '#/definitions/ent.MaintenanceEntryEdges'
|
|
description: |-
|
|
Edges holds the relations/edges for other nodes in the graph.
|
|
The values are being populated by the MaintenanceEntryQuery when eager-loading is set.
|
|
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
|
|
type: object
|
|
ent.MaintenanceEntryEdges:
|
|
properties:
|
|
item:
|
|
allOf:
|
|
- $ref: '#/definitions/ent.Item'
|
|
description: Item holds the value of the item edge.
|
|
type: object
|
|
ent.Notifier:
|
|
properties:
|
|
created_at:
|
|
description: CreatedAt holds the value of the "created_at" field.
|
|
type: string
|
|
edges:
|
|
allOf:
|
|
- $ref: '#/definitions/ent.NotifierEdges'
|
|
description: |-
|
|
Edges holds the relations/edges for other nodes in the graph.
|
|
The values are being populated by the NotifierQuery when eager-loading is set.
|
|
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
|
|
type: object
|
|
ent.NotifierEdges:
|
|
properties:
|
|
group:
|
|
allOf:
|
|
- $ref: '#/definitions/ent.Group'
|
|
description: Group holds the value of the group edge.
|
|
user:
|
|
allOf:
|
|
- $ref: '#/definitions/ent.User'
|
|
description: User holds the value of the user edge.
|
|
type: object
|
|
ent.TemplateField:
|
|
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:
|
|
allOf:
|
|
- $ref: '#/definitions/ent.TemplateFieldEdges'
|
|
description: |-
|
|
Edges holds the relations/edges for other nodes in the graph.
|
|
The values are being populated by the TemplateFieldQuery when eager-loading is set.
|
|
id:
|
|
description: ID of the ent.
|
|
type: string
|
|
name:
|
|
description: Name holds the value of the "name" field.
|
|
type: string
|
|
text_value:
|
|
description: TextValue holds the value of the "text_value" field.
|
|
type: string
|
|
type:
|
|
allOf:
|
|
- $ref: '#/definitions/templatefield.Type'
|
|
description: Type holds the value of the "type" field.
|
|
updated_at:
|
|
description: UpdatedAt holds the value of the "updated_at" field.
|
|
type: string
|
|
type: object
|
|
ent.TemplateFieldEdges:
|
|
properties:
|
|
item_template:
|
|
allOf:
|
|
- $ref: '#/definitions/ent.ItemTemplate'
|
|
description: ItemTemplate holds the value of the item_template edge.
|
|
type: object
|
|
ent.User:
|
|
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:
|
|
allOf:
|
|
- $ref: '#/definitions/ent.UserEdges'
|
|
description: |-
|
|
Edges holds the relations/edges for other nodes in the graph.
|
|
The values are being populated by the UserQuery when eager-loading is set.
|
|
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
|
|
oidc_issuer:
|
|
description: OidcIssuer holds the value of the "oidc_issuer" field.
|
|
type: string
|
|
oidc_subject:
|
|
description: OidcSubject holds the value of the "oidc_subject" field.
|
|
type: string
|
|
role:
|
|
allOf:
|
|
- $ref: '#/definitions/user.Role'
|
|
description: Role holds the value of the "role" field.
|
|
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
|
|
type: object
|
|
ent.UserEdges:
|
|
properties:
|
|
auth_tokens:
|
|
description: AuthTokens holds the value of the auth_tokens edge.
|
|
items:
|
|
$ref: '#/definitions/ent.AuthTokens'
|
|
type: array
|
|
group:
|
|
allOf:
|
|
- $ref: '#/definitions/ent.Group'
|
|
description: Group holds the value of the group edge.
|
|
notifiers:
|
|
description: Notifiers holds the value of the notifiers edge.
|
|
items:
|
|
$ref: '#/definitions/ent.Notifier'
|
|
type: array
|
|
type: object
|
|
itemfield.Type:
|
|
enum:
|
|
- text
|
|
- number
|
|
- boolean
|
|
- time
|
|
type: string
|
|
x-enum-varnames:
|
|
- TypeText
|
|
- TypeNumber
|
|
- TypeBoolean
|
|
- TypeTime
|
|
repo.BarcodeProduct:
|
|
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
|
|
type: object
|
|
repo.DuplicateOptions:
|
|
properties:
|
|
copyAttachments:
|
|
type: boolean
|
|
copyCustomFields:
|
|
type: boolean
|
|
copyMaintenance:
|
|
type: boolean
|
|
copyPrefix:
|
|
type: string
|
|
type: object
|
|
repo.Group:
|
|
properties:
|
|
createdAt:
|
|
type: string
|
|
currency:
|
|
type: string
|
|
id:
|
|
type: string
|
|
name:
|
|
type: string
|
|
updatedAt:
|
|
type: string
|
|
type: object
|
|
repo.GroupStatistics:
|
|
properties:
|
|
totalItemPrice:
|
|
type: number
|
|
totalItems:
|
|
type: integer
|
|
totalLabels:
|
|
type: integer
|
|
totalLocations:
|
|
type: integer
|
|
totalUsers:
|
|
type: integer
|
|
totalWithWarranty:
|
|
type: integer
|
|
type: object
|
|
repo.GroupUpdate:
|
|
properties:
|
|
currency:
|
|
type: string
|
|
name:
|
|
type: string
|
|
type: object
|
|
repo.ItemAttachment:
|
|
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
|
|
type: object
|
|
repo.ItemAttachmentUpdate:
|
|
properties:
|
|
primary:
|
|
type: boolean
|
|
title:
|
|
type: string
|
|
type:
|
|
type: string
|
|
type: object
|
|
repo.ItemCreate:
|
|
properties:
|
|
description:
|
|
maxLength: 1000
|
|
type: string
|
|
labelIds:
|
|
items:
|
|
type: string
|
|
type: array
|
|
locationId:
|
|
description: Edges
|
|
type: string
|
|
name:
|
|
maxLength: 255
|
|
minLength: 1
|
|
type: string
|
|
parentId:
|
|
type: string
|
|
x-nullable: true
|
|
quantity:
|
|
type: integer
|
|
required:
|
|
- name
|
|
type: object
|
|
repo.ItemField:
|
|
properties:
|
|
booleanValue:
|
|
type: boolean
|
|
id:
|
|
type: string
|
|
name:
|
|
type: string
|
|
numberValue:
|
|
type: integer
|
|
textValue:
|
|
type: string
|
|
type:
|
|
type: string
|
|
type: object
|
|
repo.ItemOut:
|
|
properties:
|
|
archived:
|
|
type: boolean
|
|
assetId:
|
|
example: "0"
|
|
type: string
|
|
attachments:
|
|
items:
|
|
$ref: '#/definitions/repo.ItemAttachment'
|
|
type: array
|
|
createdAt:
|
|
type: string
|
|
description:
|
|
type: string
|
|
fields:
|
|
items:
|
|
$ref: '#/definitions/repo.ItemField'
|
|
type: array
|
|
id:
|
|
type: string
|
|
imageId:
|
|
type: string
|
|
x-nullable: true
|
|
x-omitempty: true
|
|
insured:
|
|
type: boolean
|
|
labels:
|
|
items:
|
|
$ref: '#/definitions/repo.LabelSummary'
|
|
type: array
|
|
lifetimeWarranty:
|
|
description: Warranty
|
|
type: boolean
|
|
location:
|
|
allOf:
|
|
- $ref: '#/definitions/repo.LocationSummary'
|
|
description: Edges
|
|
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
|
|
type: object
|
|
repo.ItemPatch:
|
|
properties:
|
|
id:
|
|
type: string
|
|
labelIds:
|
|
items:
|
|
type: string
|
|
type: array
|
|
x-nullable: true
|
|
x-omitempty: true
|
|
locationId:
|
|
type: string
|
|
x-nullable: true
|
|
x-omitempty: true
|
|
quantity:
|
|
type: integer
|
|
x-nullable: true
|
|
x-omitempty: true
|
|
type: object
|
|
repo.ItemPath:
|
|
properties:
|
|
id:
|
|
type: string
|
|
name:
|
|
type: string
|
|
type:
|
|
$ref: '#/definitions/repo.ItemType'
|
|
type: object
|
|
repo.ItemSummary:
|
|
properties:
|
|
archived:
|
|
type: boolean
|
|
assetId:
|
|
example: "0"
|
|
type: string
|
|
createdAt:
|
|
type: string
|
|
description:
|
|
type: string
|
|
id:
|
|
type: string
|
|
imageId:
|
|
type: string
|
|
x-nullable: true
|
|
x-omitempty: true
|
|
insured:
|
|
type: boolean
|
|
labels:
|
|
items:
|
|
$ref: '#/definitions/repo.LabelSummary'
|
|
type: array
|
|
location:
|
|
allOf:
|
|
- $ref: '#/definitions/repo.LocationSummary'
|
|
description: Edges
|
|
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
|
|
type: object
|
|
repo.ItemTemplateCreate:
|
|
properties:
|
|
defaultDescription:
|
|
maxLength: 1000
|
|
type: string
|
|
x-nullable: true
|
|
defaultInsured:
|
|
type: boolean
|
|
defaultLabelIds:
|
|
items:
|
|
type: string
|
|
type: array
|
|
x-nullable: true
|
|
defaultLifetimeWarranty:
|
|
type: boolean
|
|
defaultLocationId:
|
|
description: Default location and labels
|
|
type: string
|
|
x-nullable: true
|
|
defaultManufacturer:
|
|
maxLength: 255
|
|
type: string
|
|
x-nullable: true
|
|
defaultModelNumber:
|
|
maxLength: 255
|
|
type: string
|
|
x-nullable: true
|
|
defaultName:
|
|
maxLength: 255
|
|
type: string
|
|
x-nullable: true
|
|
defaultQuantity:
|
|
description: Default values for items
|
|
type: integer
|
|
x-nullable: true
|
|
defaultWarrantyDetails:
|
|
maxLength: 1000
|
|
type: string
|
|
x-nullable: true
|
|
description:
|
|
maxLength: 1000
|
|
type: string
|
|
fields:
|
|
description: Custom fields
|
|
items:
|
|
$ref: '#/definitions/repo.TemplateField'
|
|
type: array
|
|
includePurchaseFields:
|
|
type: boolean
|
|
includeSoldFields:
|
|
type: boolean
|
|
includeWarrantyFields:
|
|
description: Metadata flags
|
|
type: boolean
|
|
name:
|
|
maxLength: 255
|
|
minLength: 1
|
|
type: string
|
|
notes:
|
|
maxLength: 1000
|
|
type: string
|
|
required:
|
|
- name
|
|
type: object
|
|
repo.ItemTemplateOut:
|
|
properties:
|
|
createdAt:
|
|
type: string
|
|
defaultDescription:
|
|
type: string
|
|
defaultInsured:
|
|
type: boolean
|
|
defaultLabels:
|
|
items:
|
|
$ref: '#/definitions/repo.TemplateLabelSummary'
|
|
type: array
|
|
defaultLifetimeWarranty:
|
|
type: boolean
|
|
defaultLocation:
|
|
allOf:
|
|
- $ref: '#/definitions/repo.TemplateLocationSummary'
|
|
description: Default location and labels
|
|
defaultManufacturer:
|
|
type: string
|
|
defaultModelNumber:
|
|
type: string
|
|
defaultName:
|
|
type: string
|
|
defaultQuantity:
|
|
description: Default values for items
|
|
type: integer
|
|
defaultWarrantyDetails:
|
|
type: string
|
|
description:
|
|
type: string
|
|
fields:
|
|
description: Custom fields
|
|
items:
|
|
$ref: '#/definitions/repo.TemplateField'
|
|
type: array
|
|
id:
|
|
type: string
|
|
includePurchaseFields:
|
|
type: boolean
|
|
includeSoldFields:
|
|
type: boolean
|
|
includeWarrantyFields:
|
|
description: Metadata flags
|
|
type: boolean
|
|
name:
|
|
type: string
|
|
notes:
|
|
type: string
|
|
updatedAt:
|
|
type: string
|
|
type: object
|
|
repo.ItemTemplateSummary:
|
|
properties:
|
|
createdAt:
|
|
type: string
|
|
description:
|
|
type: string
|
|
id:
|
|
type: string
|
|
name:
|
|
type: string
|
|
updatedAt:
|
|
type: string
|
|
type: object
|
|
repo.ItemTemplateUpdate:
|
|
properties:
|
|
defaultDescription:
|
|
maxLength: 1000
|
|
type: string
|
|
x-nullable: true
|
|
defaultInsured:
|
|
type: boolean
|
|
defaultLabelIds:
|
|
items:
|
|
type: string
|
|
type: array
|
|
x-nullable: true
|
|
defaultLifetimeWarranty:
|
|
type: boolean
|
|
defaultLocationId:
|
|
description: Default location and labels
|
|
type: string
|
|
x-nullable: true
|
|
defaultManufacturer:
|
|
maxLength: 255
|
|
type: string
|
|
x-nullable: true
|
|
defaultModelNumber:
|
|
maxLength: 255
|
|
type: string
|
|
x-nullable: true
|
|
defaultName:
|
|
maxLength: 255
|
|
type: string
|
|
x-nullable: true
|
|
defaultQuantity:
|
|
description: Default values for items
|
|
type: integer
|
|
x-nullable: true
|
|
defaultWarrantyDetails:
|
|
maxLength: 1000
|
|
type: string
|
|
x-nullable: true
|
|
description:
|
|
maxLength: 1000
|
|
type: string
|
|
fields:
|
|
description: Custom fields
|
|
items:
|
|
$ref: '#/definitions/repo.TemplateField'
|
|
type: array
|
|
id:
|
|
type: string
|
|
includePurchaseFields:
|
|
type: boolean
|
|
includeSoldFields:
|
|
type: boolean
|
|
includeWarrantyFields:
|
|
description: Metadata flags
|
|
type: boolean
|
|
name:
|
|
maxLength: 255
|
|
minLength: 1
|
|
type: string
|
|
notes:
|
|
maxLength: 1000
|
|
type: string
|
|
required:
|
|
- name
|
|
type: object
|
|
repo.ItemType:
|
|
enum:
|
|
- location
|
|
- item
|
|
type: string
|
|
x-enum-varnames:
|
|
- ItemTypeLocation
|
|
- ItemTypeItem
|
|
repo.ItemUpdate:
|
|
properties:
|
|
archived:
|
|
type: boolean
|
|
assetId:
|
|
type: string
|
|
description:
|
|
maxLength: 1000
|
|
type: string
|
|
fields:
|
|
items:
|
|
$ref: '#/definitions/repo.ItemField'
|
|
type: array
|
|
id:
|
|
type: string
|
|
insured:
|
|
type: boolean
|
|
labelIds:
|
|
items:
|
|
type: string
|
|
type: array
|
|
lifetimeWarranty:
|
|
description: Warranty
|
|
type: boolean
|
|
locationId:
|
|
description: Edges
|
|
type: string
|
|
manufacturer:
|
|
type: string
|
|
modelNumber:
|
|
type: string
|
|
name:
|
|
maxLength: 255
|
|
minLength: 1
|
|
type: string
|
|
notes:
|
|
description: Extras
|
|
type: string
|
|
parentId:
|
|
type: string
|
|
x-nullable: true
|
|
x-omitempty: true
|
|
purchaseFrom:
|
|
maxLength: 255
|
|
type: string
|
|
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:
|
|
maxLength: 255
|
|
type: string
|
|
syncChildItemsLocations:
|
|
type: boolean
|
|
warrantyDetails:
|
|
type: string
|
|
warrantyExpires:
|
|
type: string
|
|
required:
|
|
- name
|
|
type: object
|
|
repo.LabelCreate:
|
|
properties:
|
|
color:
|
|
type: string
|
|
description:
|
|
maxLength: 1000
|
|
type: string
|
|
name:
|
|
maxLength: 255
|
|
minLength: 1
|
|
type: string
|
|
required:
|
|
- name
|
|
type: object
|
|
repo.LabelOut:
|
|
properties:
|
|
color:
|
|
type: string
|
|
createdAt:
|
|
type: string
|
|
description:
|
|
type: string
|
|
id:
|
|
type: string
|
|
name:
|
|
type: string
|
|
updatedAt:
|
|
type: string
|
|
type: object
|
|
repo.LabelSummary:
|
|
properties:
|
|
color:
|
|
type: string
|
|
createdAt:
|
|
type: string
|
|
description:
|
|
type: string
|
|
id:
|
|
type: string
|
|
name:
|
|
type: string
|
|
updatedAt:
|
|
type: string
|
|
type: object
|
|
repo.LocationCreate:
|
|
properties:
|
|
description:
|
|
type: string
|
|
name:
|
|
type: string
|
|
parentId:
|
|
type: string
|
|
x-nullable: true
|
|
type: object
|
|
repo.LocationOut:
|
|
properties:
|
|
children:
|
|
items:
|
|
$ref: '#/definitions/repo.LocationSummary'
|
|
type: array
|
|
createdAt:
|
|
type: string
|
|
description:
|
|
type: string
|
|
id:
|
|
type: string
|
|
name:
|
|
type: string
|
|
parent:
|
|
$ref: '#/definitions/repo.LocationSummary'
|
|
totalPrice:
|
|
type: number
|
|
updatedAt:
|
|
type: string
|
|
type: object
|
|
repo.LocationOutCount:
|
|
properties:
|
|
createdAt:
|
|
type: string
|
|
description:
|
|
type: string
|
|
id:
|
|
type: string
|
|
itemCount:
|
|
type: integer
|
|
name:
|
|
type: string
|
|
updatedAt:
|
|
type: string
|
|
type: object
|
|
repo.LocationSummary:
|
|
properties:
|
|
createdAt:
|
|
type: string
|
|
description:
|
|
type: string
|
|
id:
|
|
type: string
|
|
name:
|
|
type: string
|
|
updatedAt:
|
|
type: string
|
|
type: object
|
|
repo.LocationUpdate:
|
|
properties:
|
|
description:
|
|
type: string
|
|
id:
|
|
type: string
|
|
name:
|
|
type: string
|
|
parentId:
|
|
type: string
|
|
x-nullable: true
|
|
type: object
|
|
repo.MaintenanceEntry:
|
|
properties:
|
|
completedDate:
|
|
type: string
|
|
cost:
|
|
example: "0"
|
|
type: string
|
|
description:
|
|
type: string
|
|
id:
|
|
type: string
|
|
name:
|
|
type: string
|
|
scheduledDate:
|
|
type: string
|
|
type: object
|
|
repo.MaintenanceEntryCreate:
|
|
properties:
|
|
completedDate:
|
|
type: string
|
|
cost:
|
|
example: "0"
|
|
type: string
|
|
description:
|
|
type: string
|
|
name:
|
|
type: string
|
|
scheduledDate:
|
|
type: string
|
|
required:
|
|
- name
|
|
type: object
|
|
repo.MaintenanceEntryUpdate:
|
|
properties:
|
|
completedDate:
|
|
type: string
|
|
cost:
|
|
example: "0"
|
|
type: string
|
|
description:
|
|
type: string
|
|
name:
|
|
type: string
|
|
scheduledDate:
|
|
type: string
|
|
type: object
|
|
repo.MaintenanceEntryWithDetails:
|
|
properties:
|
|
completedDate:
|
|
type: string
|
|
cost:
|
|
example: "0"
|
|
type: string
|
|
description:
|
|
type: string
|
|
id:
|
|
type: string
|
|
itemID:
|
|
type: string
|
|
itemName:
|
|
type: string
|
|
name:
|
|
type: string
|
|
scheduledDate:
|
|
type: string
|
|
type: object
|
|
repo.MaintenanceFilterStatus:
|
|
enum:
|
|
- scheduled
|
|
- completed
|
|
- both
|
|
type: string
|
|
x-enum-varnames:
|
|
- MaintenanceFilterStatusScheduled
|
|
- MaintenanceFilterStatusCompleted
|
|
- MaintenanceFilterStatusBoth
|
|
repo.NotifierCreate:
|
|
properties:
|
|
isActive:
|
|
type: boolean
|
|
name:
|
|
maxLength: 255
|
|
minLength: 1
|
|
type: string
|
|
url:
|
|
type: string
|
|
required:
|
|
- name
|
|
- url
|
|
type: object
|
|
repo.NotifierOut:
|
|
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
|
|
type: object
|
|
repo.NotifierUpdate:
|
|
properties:
|
|
isActive:
|
|
type: boolean
|
|
name:
|
|
maxLength: 255
|
|
minLength: 1
|
|
type: string
|
|
url:
|
|
type: string
|
|
x-nullable: true
|
|
required:
|
|
- name
|
|
type: object
|
|
repo.PaginationResult-repo_ItemSummary:
|
|
properties:
|
|
items:
|
|
items:
|
|
$ref: '#/definitions/repo.ItemSummary'
|
|
type: array
|
|
page:
|
|
type: integer
|
|
pageSize:
|
|
type: integer
|
|
total:
|
|
type: integer
|
|
type: object
|
|
repo.TemplateField:
|
|
properties:
|
|
id:
|
|
type: string
|
|
name:
|
|
type: string
|
|
textValue:
|
|
type: string
|
|
type:
|
|
type: string
|
|
type: object
|
|
repo.TemplateLabelSummary:
|
|
properties:
|
|
id:
|
|
type: string
|
|
name:
|
|
type: string
|
|
type: object
|
|
repo.TemplateLocationSummary:
|
|
properties:
|
|
id:
|
|
type: string
|
|
name:
|
|
type: string
|
|
type: object
|
|
repo.TotalsByOrganizer:
|
|
properties:
|
|
id:
|
|
type: string
|
|
name:
|
|
type: string
|
|
total:
|
|
type: number
|
|
type: object
|
|
repo.TreeItem:
|
|
properties:
|
|
children:
|
|
items:
|
|
$ref: '#/definitions/repo.TreeItem'
|
|
type: array
|
|
id:
|
|
type: string
|
|
name:
|
|
type: string
|
|
type:
|
|
type: string
|
|
type: object
|
|
repo.UserOut:
|
|
properties:
|
|
email:
|
|
type: string
|
|
groupId:
|
|
type: string
|
|
groupName:
|
|
type: string
|
|
id:
|
|
type: string
|
|
isOwner:
|
|
type: boolean
|
|
isSuperuser:
|
|
type: boolean
|
|
name:
|
|
type: string
|
|
oidcIssuer:
|
|
type: string
|
|
oidcSubject:
|
|
type: string
|
|
type: object
|
|
repo.UserUpdate:
|
|
properties:
|
|
email:
|
|
type: string
|
|
name:
|
|
type: string
|
|
type: object
|
|
repo.ValueOverTime:
|
|
properties:
|
|
end:
|
|
type: string
|
|
entries:
|
|
items:
|
|
$ref: '#/definitions/repo.ValueOverTimeEntry'
|
|
type: array
|
|
start:
|
|
type: string
|
|
valueAtEnd:
|
|
type: number
|
|
valueAtStart:
|
|
type: number
|
|
type: object
|
|
repo.ValueOverTimeEntry:
|
|
properties:
|
|
date:
|
|
type: string
|
|
name:
|
|
type: string
|
|
value:
|
|
type: number
|
|
type: object
|
|
services.Latest:
|
|
properties:
|
|
date:
|
|
type: string
|
|
version:
|
|
type: string
|
|
type: object
|
|
services.UserRegistration:
|
|
properties:
|
|
email:
|
|
type: string
|
|
name:
|
|
type: string
|
|
password:
|
|
type: string
|
|
token:
|
|
type: string
|
|
type: object
|
|
templatefield.Type:
|
|
enum:
|
|
- text
|
|
type: string
|
|
x-enum-varnames:
|
|
- TypeText
|
|
user.Role:
|
|
enum:
|
|
- user
|
|
- user
|
|
- owner
|
|
type: string
|
|
x-enum-varnames:
|
|
- DefaultRole
|
|
- RoleUser
|
|
- RoleOwner
|
|
v1.APISummary:
|
|
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
|
|
oidc:
|
|
$ref: '#/definitions/v1.OIDCStatus'
|
|
title:
|
|
type: string
|
|
versions:
|
|
items:
|
|
type: string
|
|
type: array
|
|
type: object
|
|
v1.ActionAmountResult:
|
|
properties:
|
|
completed:
|
|
type: integer
|
|
type: object
|
|
v1.Build:
|
|
properties:
|
|
buildTime:
|
|
type: string
|
|
commit:
|
|
type: string
|
|
version:
|
|
type: string
|
|
type: object
|
|
v1.ChangePassword:
|
|
properties:
|
|
current:
|
|
type: string
|
|
new:
|
|
type: string
|
|
type: object
|
|
v1.GroupInvitation:
|
|
properties:
|
|
expiresAt:
|
|
type: string
|
|
token:
|
|
type: string
|
|
uses:
|
|
type: integer
|
|
type: object
|
|
v1.GroupInvitationCreate:
|
|
properties:
|
|
expiresAt:
|
|
type: string
|
|
uses:
|
|
maximum: 100
|
|
minimum: 1
|
|
type: integer
|
|
required:
|
|
- uses
|
|
type: object
|
|
v1.ItemAttachmentToken:
|
|
properties:
|
|
token:
|
|
type: string
|
|
type: object
|
|
v1.ItemTemplateCreateItemRequest:
|
|
properties:
|
|
description:
|
|
maxLength: 1000
|
|
type: string
|
|
labelIds:
|
|
items:
|
|
type: string
|
|
type: array
|
|
locationId:
|
|
type: string
|
|
name:
|
|
maxLength: 255
|
|
minLength: 1
|
|
type: string
|
|
quantity:
|
|
type: integer
|
|
required:
|
|
- locationId
|
|
- name
|
|
type: object
|
|
v1.LoginForm:
|
|
properties:
|
|
password:
|
|
example: admin
|
|
type: string
|
|
stayLoggedIn:
|
|
type: boolean
|
|
username:
|
|
example: admin@admin.com
|
|
type: string
|
|
type: object
|
|
v1.OIDCStatus:
|
|
properties:
|
|
allowLocal:
|
|
type: boolean
|
|
autoRedirect:
|
|
type: boolean
|
|
buttonText:
|
|
type: string
|
|
enabled:
|
|
type: boolean
|
|
type: object
|
|
v1.TokenResponse:
|
|
properties:
|
|
attachmentToken:
|
|
type: string
|
|
expiresAt:
|
|
type: string
|
|
token:
|
|
type: string
|
|
type: object
|
|
v1.Wrapped:
|
|
properties:
|
|
item: {}
|
|
type: object
|
|
validate.ErrorResponse:
|
|
properties:
|
|
error:
|
|
type: string
|
|
fields:
|
|
type: string
|
|
type: object
|
|
host: demo.homebox.software
|
|
info:
|
|
contact:
|
|
name: Homebox Team
|
|
url: https://discord.homebox.software
|
|
description: Track, Manage, and Organize your Things.
|
|
title: Homebox API
|
|
version: "1.0"
|
|
paths:
|
|
/v1/actions/create-missing-thumbnails:
|
|
post:
|
|
description: Creates thumbnails for items that are missing them
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/v1.ActionAmountResult'
|
|
security:
|
|
- Bearer: []
|
|
summary: Create Missing Thumbnails
|
|
tags:
|
|
- Actions
|
|
/v1/actions/ensure-asset-ids:
|
|
post:
|
|
description: Ensures all items in the database have an asset ID
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/v1.ActionAmountResult'
|
|
security:
|
|
- Bearer: []
|
|
summary: Ensure Asset IDs
|
|
tags:
|
|
- Actions
|
|
/v1/actions/ensure-import-refs:
|
|
post:
|
|
description: Ensures all items in the database have an import ref
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/v1.ActionAmountResult'
|
|
security:
|
|
- Bearer: []
|
|
summary: Ensures Import Refs
|
|
tags:
|
|
- Actions
|
|
/v1/actions/set-primary-photos:
|
|
post:
|
|
description: Sets the first photo of each item as the primary photo
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/v1.ActionAmountResult'
|
|
security:
|
|
- Bearer: []
|
|
summary: Set Primary Photos
|
|
tags:
|
|
- Actions
|
|
/v1/actions/zero-item-time-fields:
|
|
post:
|
|
description: Resets all item date fields to the beginning of the day
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/v1.ActionAmountResult'
|
|
security:
|
|
- Bearer: []
|
|
summary: Zero Out Time Fields
|
|
tags:
|
|
- Actions
|
|
/v1/assets/{id}:
|
|
get:
|
|
parameters:
|
|
- description: Asset ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/repo.PaginationResult-repo_ItemSummary'
|
|
security:
|
|
- Bearer: []
|
|
summary: Get Item by Asset ID
|
|
tags:
|
|
- Items
|
|
/v1/currency:
|
|
get:
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/currencies.Currency'
|
|
summary: Currency
|
|
tags:
|
|
- Base
|
|
/v1/groups:
|
|
get:
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/repo.Group'
|
|
security:
|
|
- Bearer: []
|
|
summary: Get Group
|
|
tags:
|
|
- Group
|
|
put:
|
|
parameters:
|
|
- description: User Data
|
|
in: body
|
|
name: payload
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/repo.GroupUpdate'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/repo.Group'
|
|
security:
|
|
- Bearer: []
|
|
summary: Update Group
|
|
tags:
|
|
- Group
|
|
/v1/groups/invitations:
|
|
post:
|
|
parameters:
|
|
- description: User Data
|
|
in: body
|
|
name: payload
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/v1.GroupInvitationCreate'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/v1.GroupInvitation'
|
|
security:
|
|
- Bearer: []
|
|
summary: Create Group Invitation
|
|
tags:
|
|
- Group
|
|
/v1/groups/statistics:
|
|
get:
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/repo.GroupStatistics'
|
|
security:
|
|
- Bearer: []
|
|
summary: Get Group Statistics
|
|
tags:
|
|
- Statistics
|
|
/v1/groups/statistics/labels:
|
|
get:
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/repo.TotalsByOrganizer'
|
|
type: array
|
|
security:
|
|
- Bearer: []
|
|
summary: Get Label Statistics
|
|
tags:
|
|
- Statistics
|
|
/v1/groups/statistics/locations:
|
|
get:
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/repo.TotalsByOrganizer'
|
|
type: array
|
|
security:
|
|
- Bearer: []
|
|
summary: Get Location Statistics
|
|
tags:
|
|
- Statistics
|
|
/v1/groups/statistics/purchase-price:
|
|
get:
|
|
parameters:
|
|
- description: start date
|
|
in: query
|
|
name: start
|
|
type: string
|
|
- description: end date
|
|
in: query
|
|
name: end
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/repo.ValueOverTime'
|
|
security:
|
|
- Bearer: []
|
|
summary: Get Purchase Price Statistics
|
|
tags:
|
|
- Statistics
|
|
/v1/items:
|
|
get:
|
|
parameters:
|
|
- description: search string
|
|
in: query
|
|
name: q
|
|
type: string
|
|
- description: page number
|
|
in: query
|
|
name: page
|
|
type: integer
|
|
- description: items per page
|
|
in: query
|
|
name: pageSize
|
|
type: integer
|
|
- collectionFormat: multi
|
|
description: label Ids
|
|
in: query
|
|
items:
|
|
type: string
|
|
name: labels
|
|
type: array
|
|
- collectionFormat: multi
|
|
description: location Ids
|
|
in: query
|
|
items:
|
|
type: string
|
|
name: locations
|
|
type: array
|
|
- collectionFormat: multi
|
|
description: parent Ids
|
|
in: query
|
|
items:
|
|
type: string
|
|
name: parentIds
|
|
type: array
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/repo.PaginationResult-repo_ItemSummary'
|
|
security:
|
|
- Bearer: []
|
|
summary: Query All Items
|
|
tags:
|
|
- Items
|
|
post:
|
|
parameters:
|
|
- description: Item Data
|
|
in: body
|
|
name: payload
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/repo.ItemCreate'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"201":
|
|
description: Created
|
|
schema:
|
|
$ref: '#/definitions/repo.ItemSummary'
|
|
security:
|
|
- Bearer: []
|
|
summary: Create Item
|
|
tags:
|
|
- Items
|
|
/v1/items/{id}:
|
|
delete:
|
|
parameters:
|
|
- description: Item ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"204":
|
|
description: No Content
|
|
security:
|
|
- Bearer: []
|
|
summary: Delete Item
|
|
tags:
|
|
- Items
|
|
get:
|
|
parameters:
|
|
- description: Item ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/repo.ItemOut'
|
|
security:
|
|
- Bearer: []
|
|
summary: Get Item
|
|
tags:
|
|
- Items
|
|
patch:
|
|
parameters:
|
|
- description: Item ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Item Data
|
|
in: body
|
|
name: payload
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/repo.ItemPatch'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/repo.ItemOut'
|
|
security:
|
|
- Bearer: []
|
|
summary: Update Item
|
|
tags:
|
|
- Items
|
|
put:
|
|
parameters:
|
|
- description: Item ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Item Data
|
|
in: body
|
|
name: payload
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/repo.ItemUpdate'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/repo.ItemOut'
|
|
security:
|
|
- Bearer: []
|
|
summary: Update Item
|
|
tags:
|
|
- Items
|
|
/v1/items/{id}/attachments:
|
|
post:
|
|
consumes:
|
|
- multipart/form-data
|
|
parameters:
|
|
- description: Item ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: File attachment
|
|
in: formData
|
|
name: file
|
|
required: true
|
|
type: file
|
|
- description: Type of file
|
|
in: formData
|
|
name: type
|
|
type: string
|
|
- description: Is this the primary attachment
|
|
in: formData
|
|
name: primary
|
|
type: boolean
|
|
- description: name of the file including extension
|
|
in: formData
|
|
name: name
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/repo.ItemOut'
|
|
"422":
|
|
description: Unprocessable Entity
|
|
schema:
|
|
$ref: '#/definitions/validate.ErrorResponse'
|
|
security:
|
|
- Bearer: []
|
|
summary: Create Item Attachment
|
|
tags:
|
|
- Items Attachments
|
|
/v1/items/{id}/attachments/{attachment_id}:
|
|
delete:
|
|
parameters:
|
|
- description: Item ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Attachment ID
|
|
in: path
|
|
name: attachment_id
|
|
required: true
|
|
type: string
|
|
responses:
|
|
"204":
|
|
description: No Content
|
|
security:
|
|
- Bearer: []
|
|
summary: Delete Item Attachment
|
|
tags:
|
|
- Items Attachments
|
|
get:
|
|
parameters:
|
|
- description: Item ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Attachment ID
|
|
in: path
|
|
name: attachment_id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/octet-stream
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/v1.ItemAttachmentToken'
|
|
security:
|
|
- Bearer: []
|
|
summary: Get Item Attachment
|
|
tags:
|
|
- Items Attachments
|
|
put:
|
|
parameters:
|
|
- description: Item ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Attachment ID
|
|
in: path
|
|
name: attachment_id
|
|
required: true
|
|
type: string
|
|
- description: Attachment Update
|
|
in: body
|
|
name: payload
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/repo.ItemAttachmentUpdate'
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/repo.ItemOut'
|
|
security:
|
|
- Bearer: []
|
|
summary: Update Item Attachment
|
|
tags:
|
|
- Items Attachments
|
|
/v1/items/{id}/duplicate:
|
|
post:
|
|
parameters:
|
|
- description: Item ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Duplicate Options
|
|
in: body
|
|
name: payload
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/repo.DuplicateOptions'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"201":
|
|
description: Created
|
|
schema:
|
|
$ref: '#/definitions/repo.ItemOut'
|
|
security:
|
|
- Bearer: []
|
|
summary: Duplicate Item
|
|
tags:
|
|
- Items
|
|
/v1/items/{id}/maintenance:
|
|
get:
|
|
parameters:
|
|
- description: Item ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- enum:
|
|
- scheduled
|
|
- completed
|
|
- both
|
|
in: query
|
|
name: status
|
|
type: string
|
|
x-enum-varnames:
|
|
- MaintenanceFilterStatusScheduled
|
|
- MaintenanceFilterStatusCompleted
|
|
- MaintenanceFilterStatusBoth
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/repo.MaintenanceEntryWithDetails'
|
|
type: array
|
|
security:
|
|
- Bearer: []
|
|
summary: Get Maintenance Log
|
|
tags:
|
|
- Item Maintenance
|
|
post:
|
|
parameters:
|
|
- description: Item ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Entry Data
|
|
in: body
|
|
name: payload
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/repo.MaintenanceEntryCreate'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"201":
|
|
description: Created
|
|
schema:
|
|
$ref: '#/definitions/repo.MaintenanceEntry'
|
|
security:
|
|
- Bearer: []
|
|
summary: Create Maintenance Entry
|
|
tags:
|
|
- Item Maintenance
|
|
/v1/items/{id}/path:
|
|
get:
|
|
parameters:
|
|
- description: Item ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/repo.ItemPath'
|
|
type: array
|
|
security:
|
|
- Bearer: []
|
|
summary: Get the full path of an item
|
|
tags:
|
|
- Items
|
|
/v1/items/export:
|
|
get:
|
|
responses:
|
|
"200":
|
|
description: text/csv
|
|
schema:
|
|
type: string
|
|
security:
|
|
- Bearer: []
|
|
summary: Export Items
|
|
tags:
|
|
- Items
|
|
/v1/items/fields:
|
|
get:
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
type: string
|
|
type: array
|
|
security:
|
|
- Bearer: []
|
|
summary: Get All Custom Field Names
|
|
tags:
|
|
- Items
|
|
/v1/items/fields/values:
|
|
get:
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
type: string
|
|
type: array
|
|
security:
|
|
- Bearer: []
|
|
summary: Get All Custom Field Values
|
|
tags:
|
|
- Items
|
|
/v1/items/import:
|
|
post:
|
|
consumes:
|
|
- multipart/form-data
|
|
parameters:
|
|
- description: Image to upload
|
|
in: formData
|
|
name: csv
|
|
required: true
|
|
type: file
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"204":
|
|
description: No Content
|
|
security:
|
|
- Bearer: []
|
|
summary: Import Items
|
|
tags:
|
|
- Items
|
|
/v1/labelmaker/assets/{id}:
|
|
get:
|
|
parameters:
|
|
- description: Asset ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Print this label, defaults to false
|
|
in: query
|
|
name: print
|
|
type: boolean
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: image/png
|
|
schema:
|
|
type: string
|
|
security:
|
|
- Bearer: []
|
|
summary: Get Asset label
|
|
tags:
|
|
- Items
|
|
/v1/labelmaker/item/{id}:
|
|
get:
|
|
parameters:
|
|
- description: Item ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Print this label, defaults to false
|
|
in: query
|
|
name: print
|
|
type: boolean
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: image/png
|
|
schema:
|
|
type: string
|
|
security:
|
|
- Bearer: []
|
|
summary: Get Item label
|
|
tags:
|
|
- Items
|
|
/v1/labelmaker/location/{id}:
|
|
get:
|
|
parameters:
|
|
- description: Location ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Print this label, defaults to false
|
|
in: query
|
|
name: print
|
|
type: boolean
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: image/png
|
|
schema:
|
|
type: string
|
|
security:
|
|
- Bearer: []
|
|
summary: Get Location label
|
|
tags:
|
|
- Locations
|
|
/v1/labels:
|
|
get:
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/repo.LabelOut'
|
|
type: array
|
|
security:
|
|
- Bearer: []
|
|
summary: Get All Labels
|
|
tags:
|
|
- Labels
|
|
post:
|
|
parameters:
|
|
- description: Label Data
|
|
in: body
|
|
name: payload
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/repo.LabelCreate'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/repo.LabelSummary'
|
|
security:
|
|
- Bearer: []
|
|
summary: Create Label
|
|
tags:
|
|
- Labels
|
|
/v1/labels/{id}:
|
|
delete:
|
|
parameters:
|
|
- description: Label ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"204":
|
|
description: No Content
|
|
security:
|
|
- Bearer: []
|
|
summary: Delete Label
|
|
tags:
|
|
- Labels
|
|
get:
|
|
parameters:
|
|
- description: Label ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/repo.LabelOut'
|
|
security:
|
|
- Bearer: []
|
|
summary: Get Label
|
|
tags:
|
|
- Labels
|
|
put:
|
|
parameters:
|
|
- description: Label ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/repo.LabelOut'
|
|
security:
|
|
- Bearer: []
|
|
summary: Update Label
|
|
tags:
|
|
- Labels
|
|
/v1/locations:
|
|
get:
|
|
parameters:
|
|
- description: Filter locations with parents
|
|
in: query
|
|
name: filterChildren
|
|
type: boolean
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/repo.LocationOutCount'
|
|
type: array
|
|
security:
|
|
- Bearer: []
|
|
summary: Get All Locations
|
|
tags:
|
|
- Locations
|
|
post:
|
|
parameters:
|
|
- description: Location Data
|
|
in: body
|
|
name: payload
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/repo.LocationCreate'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/repo.LocationSummary'
|
|
security:
|
|
- Bearer: []
|
|
summary: Create Location
|
|
tags:
|
|
- Locations
|
|
/v1/locations/{id}:
|
|
delete:
|
|
parameters:
|
|
- description: Location ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"204":
|
|
description: No Content
|
|
security:
|
|
- Bearer: []
|
|
summary: Delete Location
|
|
tags:
|
|
- Locations
|
|
get:
|
|
parameters:
|
|
- description: Location ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/repo.LocationOut'
|
|
security:
|
|
- Bearer: []
|
|
summary: Get Location
|
|
tags:
|
|
- Locations
|
|
put:
|
|
parameters:
|
|
- description: Location ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Location Data
|
|
in: body
|
|
name: payload
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/repo.LocationUpdate'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/repo.LocationOut'
|
|
security:
|
|
- Bearer: []
|
|
summary: Update Location
|
|
tags:
|
|
- Locations
|
|
/v1/locations/tree:
|
|
get:
|
|
parameters:
|
|
- description: include items in response tree
|
|
in: query
|
|
name: withItems
|
|
type: boolean
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/repo.TreeItem'
|
|
type: array
|
|
security:
|
|
- Bearer: []
|
|
summary: Get Locations Tree
|
|
tags:
|
|
- Locations
|
|
/v1/maintenance:
|
|
get:
|
|
parameters:
|
|
- enum:
|
|
- scheduled
|
|
- completed
|
|
- both
|
|
in: query
|
|
name: status
|
|
type: string
|
|
x-enum-varnames:
|
|
- MaintenanceFilterStatusScheduled
|
|
- MaintenanceFilterStatusCompleted
|
|
- MaintenanceFilterStatusBoth
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/repo.MaintenanceEntryWithDetails'
|
|
type: array
|
|
security:
|
|
- Bearer: []
|
|
summary: Query All Maintenance
|
|
tags:
|
|
- Maintenance
|
|
/v1/maintenance/{id}:
|
|
delete:
|
|
parameters:
|
|
- description: Maintenance ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"204":
|
|
description: No Content
|
|
security:
|
|
- Bearer: []
|
|
summary: Delete Maintenance Entry
|
|
tags:
|
|
- Maintenance
|
|
put:
|
|
parameters:
|
|
- description: Maintenance ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Entry Data
|
|
in: body
|
|
name: payload
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/repo.MaintenanceEntryUpdate'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/repo.MaintenanceEntry'
|
|
security:
|
|
- Bearer: []
|
|
summary: Update Maintenance Entry
|
|
tags:
|
|
- Maintenance
|
|
/v1/notifiers:
|
|
get:
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/repo.NotifierOut'
|
|
type: array
|
|
security:
|
|
- Bearer: []
|
|
summary: Get Notifiers
|
|
tags:
|
|
- Notifiers
|
|
post:
|
|
parameters:
|
|
- description: Notifier Data
|
|
in: body
|
|
name: payload
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/repo.NotifierCreate'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/repo.NotifierOut'
|
|
security:
|
|
- Bearer: []
|
|
summary: Create Notifier
|
|
tags:
|
|
- Notifiers
|
|
/v1/notifiers/{id}:
|
|
delete:
|
|
parameters:
|
|
- description: Notifier ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
responses:
|
|
"204":
|
|
description: No Content
|
|
security:
|
|
- Bearer: []
|
|
summary: Delete a Notifier
|
|
tags:
|
|
- Notifiers
|
|
put:
|
|
parameters:
|
|
- description: Notifier ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Notifier Data
|
|
in: body
|
|
name: payload
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/repo.NotifierUpdate'
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/repo.NotifierOut'
|
|
security:
|
|
- Bearer: []
|
|
summary: Update Notifier
|
|
tags:
|
|
- Notifiers
|
|
/v1/notifiers/test:
|
|
post:
|
|
parameters:
|
|
- description: URL
|
|
in: query
|
|
name: url
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"204":
|
|
description: No Content
|
|
security:
|
|
- Bearer: []
|
|
summary: Test Notifier
|
|
tags:
|
|
- Notifiers
|
|
/v1/products/search-from-barcode:
|
|
get:
|
|
parameters:
|
|
- description: barcode to be searched
|
|
in: query
|
|
name: data
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/repo.BarcodeProduct'
|
|
type: array
|
|
security:
|
|
- Bearer: []
|
|
summary: Search EAN from Barcode
|
|
tags:
|
|
- Items
|
|
/v1/qrcode:
|
|
get:
|
|
parameters:
|
|
- description: data to be encoded into qrcode
|
|
in: query
|
|
name: data
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: image/jpeg
|
|
schema:
|
|
type: string
|
|
security:
|
|
- Bearer: []
|
|
summary: Create QR Code
|
|
tags:
|
|
- Items
|
|
/v1/reporting/bill-of-materials:
|
|
get:
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: text/csv
|
|
schema:
|
|
type: string
|
|
security:
|
|
- Bearer: []
|
|
summary: Export Bill of Materials
|
|
tags:
|
|
- Reporting
|
|
/v1/status:
|
|
get:
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/v1.APISummary'
|
|
summary: Application Info
|
|
tags:
|
|
- Base
|
|
/v1/templates:
|
|
get:
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/repo.ItemTemplateSummary'
|
|
type: array
|
|
security:
|
|
- Bearer: []
|
|
summary: Get All Item Templates
|
|
tags:
|
|
- Item Templates
|
|
post:
|
|
parameters:
|
|
- description: Template Data
|
|
in: body
|
|
name: payload
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/repo.ItemTemplateCreate'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"201":
|
|
description: Created
|
|
schema:
|
|
$ref: '#/definitions/repo.ItemTemplateOut'
|
|
security:
|
|
- Bearer: []
|
|
summary: Create Item Template
|
|
tags:
|
|
- Item Templates
|
|
/v1/templates/{id}:
|
|
delete:
|
|
parameters:
|
|
- description: Template ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"204":
|
|
description: No Content
|
|
security:
|
|
- Bearer: []
|
|
summary: Delete Item Template
|
|
tags:
|
|
- Item Templates
|
|
get:
|
|
parameters:
|
|
- description: Template ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/repo.ItemTemplateOut'
|
|
security:
|
|
- Bearer: []
|
|
summary: Get Item Template
|
|
tags:
|
|
- Item Templates
|
|
put:
|
|
parameters:
|
|
- description: Template ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Template Data
|
|
in: body
|
|
name: payload
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/repo.ItemTemplateUpdate'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/repo.ItemTemplateOut'
|
|
security:
|
|
- Bearer: []
|
|
summary: Update Item Template
|
|
tags:
|
|
- Item Templates
|
|
/v1/templates/{id}/create-item:
|
|
post:
|
|
parameters:
|
|
- description: Template ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Item Data
|
|
in: body
|
|
name: payload
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/v1.ItemTemplateCreateItemRequest'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"201":
|
|
description: Created
|
|
schema:
|
|
$ref: '#/definitions/repo.ItemOut'
|
|
security:
|
|
- Bearer: []
|
|
summary: Create Item from Template
|
|
tags:
|
|
- Item Templates
|
|
/v1/users/change-password:
|
|
put:
|
|
parameters:
|
|
- description: Password Payload
|
|
in: body
|
|
name: payload
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/v1.ChangePassword'
|
|
responses:
|
|
"204":
|
|
description: No Content
|
|
security:
|
|
- Bearer: []
|
|
summary: Change Password
|
|
tags:
|
|
- User
|
|
/v1/users/login:
|
|
post:
|
|
consumes:
|
|
- application/x-www-form-urlencoded
|
|
- application/json
|
|
parameters:
|
|
- description: Login Data
|
|
in: body
|
|
name: payload
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/v1.LoginForm'
|
|
- description: auth provider
|
|
in: query
|
|
name: provider
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/v1.TokenResponse'
|
|
summary: User Login
|
|
tags:
|
|
- Authentication
|
|
/v1/users/login/oidc:
|
|
get:
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"302":
|
|
description: Found
|
|
summary: OIDC Login Initiation
|
|
tags:
|
|
- Authentication
|
|
/v1/users/login/oidc/callback:
|
|
get:
|
|
parameters:
|
|
- description: Authorization code
|
|
in: query
|
|
name: code
|
|
required: true
|
|
type: string
|
|
- description: State parameter
|
|
in: query
|
|
name: state
|
|
required: true
|
|
type: string
|
|
responses:
|
|
"302":
|
|
description: Found
|
|
summary: OIDC Callback Handler
|
|
tags:
|
|
- Authentication
|
|
/v1/users/logout:
|
|
post:
|
|
responses:
|
|
"204":
|
|
description: No Content
|
|
security:
|
|
- Bearer: []
|
|
summary: User Logout
|
|
tags:
|
|
- Authentication
|
|
/v1/users/refresh:
|
|
get:
|
|
description: |-
|
|
handleAuthRefresh returns a handler that will issue a new token from an existing token.
|
|
This does not validate that the user still exists within the database.
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
security:
|
|
- Bearer: []
|
|
summary: User Token Refresh
|
|
tags:
|
|
- Authentication
|
|
/v1/users/register:
|
|
post:
|
|
parameters:
|
|
- description: User Data
|
|
in: body
|
|
name: payload
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/services.UserRegistration'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"204":
|
|
description: No Content
|
|
"403":
|
|
description: Local login is not enabled
|
|
schema:
|
|
type: string
|
|
summary: Register New User
|
|
tags:
|
|
- User
|
|
/v1/users/self:
|
|
delete:
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"204":
|
|
description: No Content
|
|
security:
|
|
- Bearer: []
|
|
summary: Delete Account
|
|
tags:
|
|
- User
|
|
get:
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
allOf:
|
|
- $ref: '#/definitions/v1.Wrapped'
|
|
- properties:
|
|
item:
|
|
$ref: '#/definitions/repo.UserOut'
|
|
type: object
|
|
security:
|
|
- Bearer: []
|
|
summary: Get User Self
|
|
tags:
|
|
- User
|
|
put:
|
|
parameters:
|
|
- description: User Data
|
|
in: body
|
|
name: payload
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/repo.UserUpdate'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
allOf:
|
|
- $ref: '#/definitions/v1.Wrapped'
|
|
- properties:
|
|
item:
|
|
$ref: '#/definitions/repo.UserUpdate'
|
|
type: object
|
|
security:
|
|
- Bearer: []
|
|
summary: Update Account
|
|
tags:
|
|
- User
|
|
schemes:
|
|
- https
|
|
- http
|
|
securityDefinitions:
|
|
Bearer:
|
|
description: '"Type ''Bearer TOKEN'' to correctly set the API Key"'
|
|
in: header
|
|
name: Authorization
|
|
type: apiKey
|
|
swagger: "2.0"
|