mirror of
https://github.com/hay-kot/homebox.git
synced 2024-11-22 08:35:43 +00:00
audit and update documentation + improve format
This commit is contained in:
parent
9c6421a9ff
commit
ccd40ffcac
20 changed files with 655 additions and 589 deletions
|
@ -75,17 +75,18 @@ func NewControllerV1(svc *services.AllServices, repos *repo.AllRepos, options ..
|
||||||
}
|
}
|
||||||
|
|
||||||
// HandleBase godoc
|
// HandleBase godoc
|
||||||
// @Summary Retrieves the basic information about the API
|
//
|
||||||
// @Tags Base
|
// @Summary Application Info
|
||||||
// @Produce json
|
// @Tags Base
|
||||||
// @Success 200 {object} ApiSummary
|
// @Produce json
|
||||||
// @Router /v1/status [GET]
|
// @Success 200 {object} ApiSummary
|
||||||
|
// @Router /v1/status [GET]
|
||||||
func (ctrl *V1Controller) HandleBase(ready ReadyFunc, build Build) server.HandlerFunc {
|
func (ctrl *V1Controller) HandleBase(ready ReadyFunc, build Build) server.HandlerFunc {
|
||||||
return func(w http.ResponseWriter, r *http.Request) error {
|
return func(w http.ResponseWriter, r *http.Request) error {
|
||||||
return server.Respond(w, http.StatusOK, ApiSummary{
|
return server.Respond(w, http.StatusOK, ApiSummary{
|
||||||
Healthy: ready(),
|
Healthy: ready(),
|
||||||
Title: "Go API Template",
|
Title: "Homebox",
|
||||||
Message: "Welcome to the Go API Template Application!",
|
Message: "Track, Manage, and Organize your shit",
|
||||||
Build: build,
|
Build: build,
|
||||||
Demo: ctrl.isDemo,
|
Demo: ctrl.isDemo,
|
||||||
AllowRegistration: ctrl.allowRegistration,
|
AllowRegistration: ctrl.allowRegistration,
|
||||||
|
|
|
@ -29,35 +29,41 @@ func actionHandlerFactory(ref string, fn func(context.Context, uuid.UUID) (int,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// HandleGroupInvitationsCreate godoc
|
// HandleEnsureAssetID godoc
|
||||||
// @Summary Ensures all items in the database have an asset id
|
//
|
||||||
// @Tags Group
|
// @Summary Ensure Asset IDs
|
||||||
// @Produce json
|
// @Description Ensures all items in the database have an asset ID
|
||||||
// @Success 200 {object} ActionAmountResult
|
// @Tags Actions
|
||||||
// @Router /v1/actions/ensure-asset-ids [Post]
|
// @Produce json
|
||||||
// @Security Bearer
|
// @Success 200 {object} ActionAmountResult
|
||||||
|
// @Router /v1/actions/ensure-asset-ids [Post]
|
||||||
|
// @Security Bearer
|
||||||
func (ctrl *V1Controller) HandleEnsureAssetID() server.HandlerFunc {
|
func (ctrl *V1Controller) HandleEnsureAssetID() server.HandlerFunc {
|
||||||
return actionHandlerFactory("ensure asset IDs", ctrl.svc.Items.EnsureAssetID)
|
return actionHandlerFactory("ensure asset IDs", ctrl.svc.Items.EnsureAssetID)
|
||||||
}
|
}
|
||||||
|
|
||||||
// HandleEnsureImportRefs godoc
|
// HandleEnsureImportRefs godoc
|
||||||
// @Summary Ensures all items in the database have an import ref
|
//
|
||||||
// @Tags Group
|
// @Summary Ensures Import Refs
|
||||||
// @Produce json
|
// @Description Ensures all items in the database have an import ref
|
||||||
// @Success 200 {object} ActionAmountResult
|
// @Tags Actions
|
||||||
// @Router /v1/actions/ensure-import-refs [Post]
|
// @Produce json
|
||||||
// @Security Bearer
|
// @Success 200 {object} ActionAmountResult
|
||||||
|
// @Router /v1/actions/ensure-import-refs [Post]
|
||||||
|
// @Security Bearer
|
||||||
func (ctrl *V1Controller) HandleEnsureImportRefs() server.HandlerFunc {
|
func (ctrl *V1Controller) HandleEnsureImportRefs() server.HandlerFunc {
|
||||||
return actionHandlerFactory("ensure import refs", ctrl.svc.Items.EnsureImportRef)
|
return actionHandlerFactory("ensure import refs", ctrl.svc.Items.EnsureImportRef)
|
||||||
}
|
}
|
||||||
|
|
||||||
// HandleItemDateZeroOut godoc
|
// HandleItemDateZeroOut godoc
|
||||||
// @Summary Resets all item date fields to the beginning of the day
|
//
|
||||||
// @Tags Group
|
// @Summary Zero Out Time Fields
|
||||||
// @Produce json
|
// @Description Resets all item date fields to the beginning of the day
|
||||||
// @Success 200 {object} ActionAmountResult
|
// @Tags Actions
|
||||||
// @Router /v1/actions/zero-item-time-fields [Post]
|
// @Produce json
|
||||||
// @Security Bearer
|
// @Success 200 {object} ActionAmountResult
|
||||||
|
// @Router /v1/actions/zero-item-time-fields [Post]
|
||||||
|
// @Security Bearer
|
||||||
func (ctrl *V1Controller) HandleItemDateZeroOut() server.HandlerFunc {
|
func (ctrl *V1Controller) HandleItemDateZeroOut() server.HandlerFunc {
|
||||||
return actionHandlerFactory("zero out date time", ctrl.repo.Items.ZeroOutTimeFields)
|
return actionHandlerFactory("zero out date time", ctrl.repo.Items.ZeroOutTimeFields)
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,14 +14,15 @@ import (
|
||||||
"github.com/rs/zerolog/log"
|
"github.com/rs/zerolog/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
// HandleItemGet godocs
|
// HandleAssetGet godocs
|
||||||
// @Summary Gets an item by Asset ID
|
//
|
||||||
// @Tags Assets
|
// @Summary Get Item by Asset ID
|
||||||
// @Produce json
|
// @Tags Items
|
||||||
// @Param id path string true "Asset ID"
|
// @Produce json
|
||||||
// @Success 200 {object} repo.PaginationResult[repo.ItemSummary]{}
|
// @Param id path string true "Asset ID"
|
||||||
// @Router /v1/assets/{id} [GET]
|
// @Success 200 {object} repo.PaginationResult[repo.ItemSummary]{}
|
||||||
// @Security Bearer
|
// @Router /v1/assets/{id} [GET]
|
||||||
|
// @Security Bearer
|
||||||
func (ctrl *V1Controller) HandleAssetGet() server.HandlerFunc {
|
func (ctrl *V1Controller) HandleAssetGet() server.HandlerFunc {
|
||||||
return func(w http.ResponseWriter, r *http.Request) error {
|
return func(w http.ResponseWriter, r *http.Request) error {
|
||||||
ctx := services.NewContext(r.Context())
|
ctx := services.NewContext(r.Context())
|
||||||
|
|
|
@ -26,15 +26,16 @@ type (
|
||||||
)
|
)
|
||||||
|
|
||||||
// HandleAuthLogin godoc
|
// HandleAuthLogin godoc
|
||||||
// @Summary User Login
|
//
|
||||||
// @Tags Authentication
|
// @Summary User Login
|
||||||
// @Accept x-www-form-urlencoded
|
// @Tags Authentication
|
||||||
// @Accept application/json
|
// @Accept x-www-form-urlencoded
|
||||||
// @Param username formData string false "string" example(admin@admin.com)
|
// @Accept application/json
|
||||||
// @Param password formData string false "string" example(admin)
|
// @Param username formData string false "string" example(admin@admin.com)
|
||||||
// @Produce json
|
// @Param password formData string false "string" example(admin)
|
||||||
// @Success 200 {object} TokenResponse
|
// @Produce json
|
||||||
// @Router /v1/users/login [POST]
|
// @Success 200 {object} TokenResponse
|
||||||
|
// @Router /v1/users/login [POST]
|
||||||
func (ctrl *V1Controller) HandleAuthLogin() server.HandlerFunc {
|
func (ctrl *V1Controller) HandleAuthLogin() server.HandlerFunc {
|
||||||
return func(w http.ResponseWriter, r *http.Request) error {
|
return func(w http.ResponseWriter, r *http.Request) error {
|
||||||
loginForm := &LoginForm{}
|
loginForm := &LoginForm{}
|
||||||
|
@ -84,11 +85,12 @@ func (ctrl *V1Controller) HandleAuthLogin() server.HandlerFunc {
|
||||||
}
|
}
|
||||||
|
|
||||||
// HandleAuthLogout godoc
|
// HandleAuthLogout godoc
|
||||||
// @Summary User Logout
|
//
|
||||||
// @Tags Authentication
|
// @Summary User Logout
|
||||||
// @Success 204
|
// @Tags Authentication
|
||||||
// @Router /v1/users/logout [POST]
|
// @Success 204
|
||||||
// @Security Bearer
|
// @Router /v1/users/logout [POST]
|
||||||
|
// @Security Bearer
|
||||||
func (ctrl *V1Controller) HandleAuthLogout() server.HandlerFunc {
|
func (ctrl *V1Controller) HandleAuthLogout() server.HandlerFunc {
|
||||||
return func(w http.ResponseWriter, r *http.Request) error {
|
return func(w http.ResponseWriter, r *http.Request) error {
|
||||||
token := services.UseTokenCtx(r.Context())
|
token := services.UseTokenCtx(r.Context())
|
||||||
|
@ -106,13 +108,14 @@ func (ctrl *V1Controller) HandleAuthLogout() server.HandlerFunc {
|
||||||
}
|
}
|
||||||
|
|
||||||
// HandleAuthLogout godoc
|
// HandleAuthLogout godoc
|
||||||
// @Summary User Token Refresh
|
//
|
||||||
// @Description handleAuthRefresh returns a handler that will issue a new token from an existing token.
|
// @Summary User Token Refresh
|
||||||
// @Description This does not validate that the user still exists within the database.
|
// @Description handleAuthRefresh returns a handler that will issue a new token from an existing token.
|
||||||
// @Tags Authentication
|
// @Description This does not validate that the user still exists within the database.
|
||||||
// @Success 200
|
// @Tags Authentication
|
||||||
// @Router /v1/users/refresh [GET]
|
// @Success 200
|
||||||
// @Security Bearer
|
// @Router /v1/users/refresh [GET]
|
||||||
|
// @Security Bearer
|
||||||
func (ctrl *V1Controller) HandleAuthRefresh() server.HandlerFunc {
|
func (ctrl *V1Controller) HandleAuthRefresh() server.HandlerFunc {
|
||||||
return func(w http.ResponseWriter, r *http.Request) error {
|
return func(w http.ResponseWriter, r *http.Request) error {
|
||||||
requestToken := services.UseTokenCtx(r.Context())
|
requestToken := services.UseTokenCtx(r.Context())
|
||||||
|
|
|
@ -25,24 +25,26 @@ type (
|
||||||
)
|
)
|
||||||
|
|
||||||
// HandleGroupGet godoc
|
// HandleGroupGet godoc
|
||||||
// @Summary Get the current user's group
|
//
|
||||||
// @Tags Group
|
// @Summary Get Group
|
||||||
// @Produce json
|
// @Tags Group
|
||||||
// @Success 200 {object} repo.Group
|
// @Produce json
|
||||||
// @Router /v1/groups [Get]
|
// @Success 200 {object} repo.Group
|
||||||
// @Security Bearer
|
// @Router /v1/groups [Get]
|
||||||
|
// @Security Bearer
|
||||||
func (ctrl *V1Controller) HandleGroupGet() server.HandlerFunc {
|
func (ctrl *V1Controller) HandleGroupGet() server.HandlerFunc {
|
||||||
return ctrl.handleGroupGeneral()
|
return ctrl.handleGroupGeneral()
|
||||||
}
|
}
|
||||||
|
|
||||||
// HandleGroupUpdate godoc
|
// HandleGroupUpdate godoc
|
||||||
// @Summary Updates some fields of the current users group
|
//
|
||||||
// @Tags Group
|
// @Summary Update Group
|
||||||
// @Produce json
|
// @Tags Group
|
||||||
// @Param payload body repo.GroupUpdate true "User Data"
|
// @Produce json
|
||||||
// @Success 200 {object} repo.Group
|
// @Param payload body repo.GroupUpdate true "User Data"
|
||||||
// @Router /v1/groups [Put]
|
// @Success 200 {object} repo.Group
|
||||||
// @Security Bearer
|
// @Router /v1/groups [Put]
|
||||||
|
// @Security Bearer
|
||||||
func (ctrl *V1Controller) HandleGroupUpdate() server.HandlerFunc {
|
func (ctrl *V1Controller) HandleGroupUpdate() server.HandlerFunc {
|
||||||
return ctrl.handleGroupGeneral()
|
return ctrl.handleGroupGeneral()
|
||||||
}
|
}
|
||||||
|
@ -81,13 +83,14 @@ func (ctrl *V1Controller) handleGroupGeneral() server.HandlerFunc {
|
||||||
}
|
}
|
||||||
|
|
||||||
// HandleGroupInvitationsCreate godoc
|
// HandleGroupInvitationsCreate godoc
|
||||||
// @Summary Get the current user
|
//
|
||||||
// @Tags Group
|
// @Summary Create Group Invitation
|
||||||
// @Produce json
|
// @Tags Group
|
||||||
// @Param payload body GroupInvitationCreate true "User Data"
|
// @Produce json
|
||||||
// @Success 200 {object} GroupInvitation
|
// @Param payload body GroupInvitationCreate true "User Data"
|
||||||
// @Router /v1/groups/invitations [Post]
|
// @Success 200 {object} GroupInvitation
|
||||||
// @Security Bearer
|
// @Router /v1/groups/invitations [Post]
|
||||||
|
// @Security Bearer
|
||||||
func (ctrl *V1Controller) HandleGroupInvitationsCreate() server.HandlerFunc {
|
func (ctrl *V1Controller) HandleGroupInvitationsCreate() server.HandlerFunc {
|
||||||
return func(w http.ResponseWriter, r *http.Request) error {
|
return func(w http.ResponseWriter, r *http.Request) error {
|
||||||
data := GroupInvitationCreate{}
|
data := GroupInvitationCreate{}
|
||||||
|
|
|
@ -15,17 +15,18 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
// HandleItemsGetAll godoc
|
// HandleItemsGetAll godoc
|
||||||
// @Summary Get All Items
|
//
|
||||||
// @Tags Items
|
// @Summary Query All Items
|
||||||
// @Produce json
|
// @Tags Items
|
||||||
// @Param q query string false "search string"
|
// @Produce json
|
||||||
// @Param page query int false "page number"
|
// @Param q query string false "search string"
|
||||||
// @Param pageSize query int false "items per page"
|
// @Param page query int false "page number"
|
||||||
// @Param labels query []string false "label Ids" collectionFormat(multi)
|
// @Param pageSize query int false "items per page"
|
||||||
// @Param locations query []string false "location Ids" collectionFormat(multi)
|
// @Param labels query []string false "label Ids" collectionFormat(multi)
|
||||||
// @Success 200 {object} repo.PaginationResult[repo.ItemSummary]{}
|
// @Param locations query []string false "location Ids" collectionFormat(multi)
|
||||||
// @Router /v1/items [GET]
|
// @Success 200 {object} repo.PaginationResult[repo.ItemSummary]{}
|
||||||
// @Security Bearer
|
// @Router /v1/items [GET]
|
||||||
|
// @Security Bearer
|
||||||
func (ctrl *V1Controller) HandleItemsGetAll() server.HandlerFunc {
|
func (ctrl *V1Controller) HandleItemsGetAll() server.HandlerFunc {
|
||||||
extractQuery := func(r *http.Request) repo.ItemQuery {
|
extractQuery := func(r *http.Request) repo.ItemQuery {
|
||||||
params := r.URL.Query()
|
params := r.URL.Query()
|
||||||
|
@ -87,13 +88,14 @@ func (ctrl *V1Controller) HandleItemsGetAll() server.HandlerFunc {
|
||||||
}
|
}
|
||||||
|
|
||||||
// HandleItemsCreate godoc
|
// HandleItemsCreate godoc
|
||||||
// @Summary Create a new item
|
//
|
||||||
// @Tags Items
|
// @Summary Create Item
|
||||||
// @Produce json
|
// @Tags Items
|
||||||
// @Param payload body repo.ItemCreate true "Item Data"
|
// @Produce json
|
||||||
// @Success 200 {object} repo.ItemSummary
|
// @Param payload body repo.ItemCreate true "Item Data"
|
||||||
// @Router /v1/items [POST]
|
// @Success 200 {object} repo.ItemSummary
|
||||||
// @Security Bearer
|
// @Router /v1/items [POST]
|
||||||
|
// @Security Bearer
|
||||||
func (ctrl *V1Controller) HandleItemsCreate() server.HandlerFunc {
|
func (ctrl *V1Controller) HandleItemsCreate() server.HandlerFunc {
|
||||||
return func(w http.ResponseWriter, r *http.Request) error {
|
return func(w http.ResponseWriter, r *http.Request) error {
|
||||||
createData := repo.ItemCreate{}
|
createData := repo.ItemCreate{}
|
||||||
|
@ -114,38 +116,41 @@ func (ctrl *V1Controller) HandleItemsCreate() server.HandlerFunc {
|
||||||
}
|
}
|
||||||
|
|
||||||
// HandleItemGet godocs
|
// HandleItemGet godocs
|
||||||
// @Summary Gets a item and fields
|
//
|
||||||
// @Tags Items
|
// @Summary Get Item
|
||||||
// @Produce json
|
// @Tags Items
|
||||||
// @Param id path string true "Item ID"
|
// @Produce json
|
||||||
// @Success 200 {object} repo.ItemOut
|
// @Param id path string true "Item ID"
|
||||||
// @Router /v1/items/{id} [GET]
|
// @Success 200 {object} repo.ItemOut
|
||||||
// @Security Bearer
|
// @Router /v1/items/{id} [GET]
|
||||||
|
// @Security Bearer
|
||||||
func (ctrl *V1Controller) HandleItemGet() server.HandlerFunc {
|
func (ctrl *V1Controller) HandleItemGet() server.HandlerFunc {
|
||||||
return ctrl.handleItemsGeneral()
|
return ctrl.handleItemsGeneral()
|
||||||
}
|
}
|
||||||
|
|
||||||
// HandleItemDelete godocs
|
// HandleItemDelete godocs
|
||||||
// @Summary deletes a item
|
//
|
||||||
// @Tags Items
|
// @Summary Delete Item
|
||||||
// @Produce json
|
// @Tags Items
|
||||||
// @Param id path string true "Item ID"
|
// @Produce json
|
||||||
// @Success 204
|
// @Param id path string true "Item ID"
|
||||||
// @Router /v1/items/{id} [DELETE]
|
// @Success 204
|
||||||
// @Security Bearer
|
// @Router /v1/items/{id} [DELETE]
|
||||||
|
// @Security Bearer
|
||||||
func (ctrl *V1Controller) HandleItemDelete() server.HandlerFunc {
|
func (ctrl *V1Controller) HandleItemDelete() server.HandlerFunc {
|
||||||
return ctrl.handleItemsGeneral()
|
return ctrl.handleItemsGeneral()
|
||||||
}
|
}
|
||||||
|
|
||||||
// HandleItemUpdate godocs
|
// HandleItemUpdate godocs
|
||||||
// @Summary updates a item
|
//
|
||||||
// @Tags Items
|
// @Summary Update Item
|
||||||
// @Produce json
|
// @Tags Items
|
||||||
// @Param id path string true "Item ID"
|
// @Produce json
|
||||||
// @Param payload body repo.ItemUpdate true "Item Data"
|
// @Param id path string true "Item ID"
|
||||||
// @Success 200 {object} repo.ItemOut
|
// @Param payload body repo.ItemUpdate true "Item Data"
|
||||||
// @Router /v1/items/{id} [PUT]
|
// @Success 200 {object} repo.ItemOut
|
||||||
// @Security Bearer
|
// @Router /v1/items/{id} [PUT]
|
||||||
|
// @Security Bearer
|
||||||
func (ctrl *V1Controller) HandleItemUpdate() server.HandlerFunc {
|
func (ctrl *V1Controller) HandleItemUpdate() server.HandlerFunc {
|
||||||
return ctrl.handleItemsGeneral()
|
return ctrl.handleItemsGeneral()
|
||||||
}
|
}
|
||||||
|
@ -193,13 +198,14 @@ func (ctrl *V1Controller) handleItemsGeneral() server.HandlerFunc {
|
||||||
}
|
}
|
||||||
|
|
||||||
// HandleGetAllCustomFieldNames godocs
|
// HandleGetAllCustomFieldNames godocs
|
||||||
// @Summary imports items into the database
|
//
|
||||||
// @Tags Items
|
// @Summary Get All Custom Field Names
|
||||||
// @Produce json
|
// @Tags Items
|
||||||
// @Success 200
|
// @Produce json
|
||||||
// @Router /v1/items/fields [GET]
|
// @Success 200
|
||||||
// @Success 200 {object} []string
|
// @Router /v1/items/fields [GET]
|
||||||
// @Security Bearer
|
// @Success 200 {object} []string
|
||||||
|
// @Security Bearer
|
||||||
func (ctrl *V1Controller) HandleGetAllCustomFieldNames() server.HandlerFunc {
|
func (ctrl *V1Controller) HandleGetAllCustomFieldNames() server.HandlerFunc {
|
||||||
return func(w http.ResponseWriter, r *http.Request) error {
|
return func(w http.ResponseWriter, r *http.Request) error {
|
||||||
ctx := services.NewContext(r.Context())
|
ctx := services.NewContext(r.Context())
|
||||||
|
@ -214,13 +220,14 @@ func (ctrl *V1Controller) HandleGetAllCustomFieldNames() server.HandlerFunc {
|
||||||
}
|
}
|
||||||
|
|
||||||
// HandleGetAllCustomFieldValues godocs
|
// HandleGetAllCustomFieldValues godocs
|
||||||
// @Summary imports items into the database
|
//
|
||||||
// @Tags Items
|
// @Summary Get All Custom Field Values
|
||||||
// @Produce json
|
// @Tags Items
|
||||||
// @Success 200
|
// @Produce json
|
||||||
// @Router /v1/items/fields/values [GET]
|
// @Success 200
|
||||||
// @Success 200 {object} []string
|
// @Router /v1/items/fields/values [GET]
|
||||||
// @Security Bearer
|
// @Success 200 {object} []string
|
||||||
|
// @Security Bearer
|
||||||
func (ctrl *V1Controller) HandleGetAllCustomFieldValues() server.HandlerFunc {
|
func (ctrl *V1Controller) HandleGetAllCustomFieldValues() server.HandlerFunc {
|
||||||
return func(w http.ResponseWriter, r *http.Request) error {
|
return func(w http.ResponseWriter, r *http.Request) error {
|
||||||
ctx := services.NewContext(r.Context())
|
ctx := services.NewContext(r.Context())
|
||||||
|
@ -235,13 +242,14 @@ func (ctrl *V1Controller) HandleGetAllCustomFieldValues() server.HandlerFunc {
|
||||||
}
|
}
|
||||||
|
|
||||||
// HandleItemsImport godocs
|
// HandleItemsImport godocs
|
||||||
// @Summary imports items into the database
|
//
|
||||||
// @Tags Items
|
// @Summary Import Items
|
||||||
// @Produce json
|
// @Tags Items
|
||||||
// @Success 204
|
// @Produce json
|
||||||
// @Param csv formData file true "Image to upload"
|
// @Success 204
|
||||||
// @Router /v1/items/import [Post]
|
// @Param csv formData file true "Image to upload"
|
||||||
// @Security Bearer
|
// @Router /v1/items/import [Post]
|
||||||
|
// @Security Bearer
|
||||||
func (ctrl *V1Controller) HandleItemsImport() server.HandlerFunc {
|
func (ctrl *V1Controller) HandleItemsImport() server.HandlerFunc {
|
||||||
return func(w http.ResponseWriter, r *http.Request) error {
|
return func(w http.ResponseWriter, r *http.Request) error {
|
||||||
err := r.ParseMultipartForm(ctrl.maxUploadSize << 20)
|
err := r.ParseMultipartForm(ctrl.maxUploadSize << 20)
|
||||||
|
@ -268,12 +276,13 @@ func (ctrl *V1Controller) HandleItemsImport() server.HandlerFunc {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// HandleItemsImport godocs
|
// HandleItemsExport godocs
|
||||||
// @Summary exports items into the database
|
//
|
||||||
// @Tags Items
|
// @Summary Export Items
|
||||||
// @Success 200 {string} string "text/csv"
|
// @Tags Items
|
||||||
// @Router /v1/items/export [GET]
|
// @Success 200 {string} string "text/csv"
|
||||||
// @Security Bearer
|
// @Router /v1/items/export [GET]
|
||||||
|
// @Security Bearer
|
||||||
func (ctrl *V1Controller) HandleItemsExport() server.HandlerFunc {
|
func (ctrl *V1Controller) HandleItemsExport() server.HandlerFunc {
|
||||||
return func(w http.ResponseWriter, r *http.Request) error {
|
return func(w http.ResponseWriter, r *http.Request) error {
|
||||||
ctx := services.NewContext(r.Context())
|
ctx := services.NewContext(r.Context())
|
||||||
|
|
|
@ -18,18 +18,19 @@ type (
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
// HandleItemsImport godocs
|
// HandleItemAttachmentCreate godocs
|
||||||
// @Summary imports items into the database
|
//
|
||||||
// @Tags Items Attachments
|
// @Summary Create Item Attachment
|
||||||
// @Produce json
|
// @Tags Items Attachments
|
||||||
// @Param id path string true "Item ID"
|
// @Produce json
|
||||||
// @Param file formData file true "File attachment"
|
// @Param id path string true "Item ID"
|
||||||
// @Param type formData string true "Type of file"
|
// @Param file formData file true "File attachment"
|
||||||
// @Param name formData string true "name of the file including extension"
|
// @Param type formData string true "Type of file"
|
||||||
// @Success 200 {object} repo.ItemOut
|
// @Param name formData string true "name of the file including extension"
|
||||||
// @Failure 422 {object} server.ErrorResponse
|
// @Success 200 {object} repo.ItemOut
|
||||||
// @Router /v1/items/{id}/attachments [POST]
|
// @Failure 422 {object} server.ErrorResponse
|
||||||
// @Security Bearer
|
// @Router /v1/items/{id}/attachments [POST]
|
||||||
|
// @Security Bearer
|
||||||
func (ctrl *V1Controller) HandleItemAttachmentCreate() server.HandlerFunc {
|
func (ctrl *V1Controller) HandleItemAttachmentCreate() server.HandlerFunc {
|
||||||
return func(w http.ResponseWriter, r *http.Request) error {
|
return func(w http.ResponseWriter, r *http.Request) error {
|
||||||
err := r.ParseMultipartForm(ctrl.maxUploadSize << 20)
|
err := r.ParseMultipartForm(ctrl.maxUploadSize << 20)
|
||||||
|
@ -92,39 +93,42 @@ func (ctrl *V1Controller) HandleItemAttachmentCreate() server.HandlerFunc {
|
||||||
}
|
}
|
||||||
|
|
||||||
// HandleItemAttachmentGet godocs
|
// HandleItemAttachmentGet godocs
|
||||||
// @Summary retrieves an attachment for an item
|
//
|
||||||
// @Tags Items Attachments
|
// @Summary Get Item Attachment
|
||||||
// @Produce application/octet-stream
|
// @Tags Items Attachments
|
||||||
// @Param id path string true "Item ID"
|
// @Produce application/octet-stream
|
||||||
// @Param attachment_id path string true "Attachment ID"
|
// @Param id path string true "Item ID"
|
||||||
// @Success 200 {object} ItemAttachmentToken
|
// @Param attachment_id path string true "Attachment ID"
|
||||||
// @Router /v1/items/{id}/attachments/{attachment_id} [GET]
|
// @Success 200 {object} ItemAttachmentToken
|
||||||
// @Security Bearer
|
// @Router /v1/items/{id}/attachments/{attachment_id} [GET]
|
||||||
|
// @Security Bearer
|
||||||
func (ctrl *V1Controller) HandleItemAttachmentGet() server.HandlerFunc {
|
func (ctrl *V1Controller) HandleItemAttachmentGet() server.HandlerFunc {
|
||||||
return ctrl.handleItemAttachmentsHandler
|
return ctrl.handleItemAttachmentsHandler
|
||||||
}
|
}
|
||||||
|
|
||||||
// HandleItemAttachmentDelete godocs
|
// HandleItemAttachmentDelete godocs
|
||||||
// @Summary retrieves an attachment for an item
|
//
|
||||||
// @Tags Items Attachments
|
// @Summary Delete Item Attachment
|
||||||
// @Param id path string true "Item ID"
|
// @Tags Items Attachments
|
||||||
// @Param attachment_id path string true "Attachment ID"
|
// @Param id path string true "Item ID"
|
||||||
// @Success 204
|
// @Param attachment_id path string true "Attachment ID"
|
||||||
// @Router /v1/items/{id}/attachments/{attachment_id} [DELETE]
|
// @Success 204
|
||||||
// @Security Bearer
|
// @Router /v1/items/{id}/attachments/{attachment_id} [DELETE]
|
||||||
|
// @Security Bearer
|
||||||
func (ctrl *V1Controller) HandleItemAttachmentDelete() server.HandlerFunc {
|
func (ctrl *V1Controller) HandleItemAttachmentDelete() server.HandlerFunc {
|
||||||
return ctrl.handleItemAttachmentsHandler
|
return ctrl.handleItemAttachmentsHandler
|
||||||
}
|
}
|
||||||
|
|
||||||
// HandleItemAttachmentUpdate godocs
|
// HandleItemAttachmentUpdate godocs
|
||||||
// @Summary retrieves an attachment for an item
|
//
|
||||||
// @Tags Items Attachments
|
// @Summary Update Item Attachment
|
||||||
// @Param id path string true "Item ID"
|
// @Tags Items Attachments
|
||||||
// @Param attachment_id path string true "Attachment ID"
|
// @Param id path string true "Item ID"
|
||||||
// @Param payload body repo.ItemAttachmentUpdate true "Attachment Update"
|
// @Param attachment_id path string true "Attachment ID"
|
||||||
// @Success 200 {object} repo.ItemOut
|
// @Param payload body repo.ItemAttachmentUpdate true "Attachment Update"
|
||||||
// @Router /v1/items/{id}/attachments/{attachment_id} [PUT]
|
// @Success 200 {object} repo.ItemOut
|
||||||
// @Security Bearer
|
// @Router /v1/items/{id}/attachments/{attachment_id} [PUT]
|
||||||
|
// @Security Bearer
|
||||||
func (ctrl *V1Controller) HandleItemAttachmentUpdate() server.HandlerFunc {
|
func (ctrl *V1Controller) HandleItemAttachmentUpdate() server.HandlerFunc {
|
||||||
return ctrl.handleItemAttachmentsHandler
|
return ctrl.handleItemAttachmentsHandler
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,12 +12,13 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
// HandleLabelsGetAll godoc
|
// HandleLabelsGetAll godoc
|
||||||
// @Summary Get All Labels
|
//
|
||||||
// @Tags Labels
|
// @Summary Get All Labels
|
||||||
// @Produce json
|
// @Tags Labels
|
||||||
// @Success 200 {object} server.Results{items=[]repo.LabelOut}
|
// @Produce json
|
||||||
// @Router /v1/labels [GET]
|
// @Success 200 {object} server.Results{items=[]repo.LabelOut}
|
||||||
// @Security Bearer
|
// @Router /v1/labels [GET]
|
||||||
|
// @Security Bearer
|
||||||
func (ctrl *V1Controller) HandleLabelsGetAll() server.HandlerFunc {
|
func (ctrl *V1Controller) HandleLabelsGetAll() server.HandlerFunc {
|
||||||
return func(w http.ResponseWriter, r *http.Request) error {
|
return func(w http.ResponseWriter, r *http.Request) error {
|
||||||
user := services.UseUserCtx(r.Context())
|
user := services.UseUserCtx(r.Context())
|
||||||
|
@ -31,13 +32,14 @@ func (ctrl *V1Controller) HandleLabelsGetAll() server.HandlerFunc {
|
||||||
}
|
}
|
||||||
|
|
||||||
// HandleLabelsCreate godoc
|
// HandleLabelsCreate godoc
|
||||||
// @Summary Create a new label
|
//
|
||||||
// @Tags Labels
|
// @Summary Create Label
|
||||||
// @Produce json
|
// @Tags Labels
|
||||||
// @Param payload body repo.LabelCreate true "Label Data"
|
// @Produce json
|
||||||
// @Success 200 {object} repo.LabelSummary
|
// @Param payload body repo.LabelCreate true "Label Data"
|
||||||
// @Router /v1/labels [POST]
|
// @Success 200 {object} repo.LabelSummary
|
||||||
// @Security Bearer
|
// @Router /v1/labels [POST]
|
||||||
|
// @Security Bearer
|
||||||
func (ctrl *V1Controller) HandleLabelsCreate() server.HandlerFunc {
|
func (ctrl *V1Controller) HandleLabelsCreate() server.HandlerFunc {
|
||||||
return func(w http.ResponseWriter, r *http.Request) error {
|
return func(w http.ResponseWriter, r *http.Request) error {
|
||||||
createData := repo.LabelCreate{}
|
createData := repo.LabelCreate{}
|
||||||
|
@ -58,37 +60,40 @@ func (ctrl *V1Controller) HandleLabelsCreate() server.HandlerFunc {
|
||||||
}
|
}
|
||||||
|
|
||||||
// HandleLabelDelete godocs
|
// HandleLabelDelete godocs
|
||||||
// @Summary deletes a label
|
//
|
||||||
// @Tags Labels
|
// @Summary Delete Label
|
||||||
// @Produce json
|
// @Tags Labels
|
||||||
// @Param id path string true "Label ID"
|
// @Produce json
|
||||||
// @Success 204
|
// @Param id path string true "Label ID"
|
||||||
// @Router /v1/labels/{id} [DELETE]
|
// @Success 204
|
||||||
// @Security Bearer
|
// @Router /v1/labels/{id} [DELETE]
|
||||||
|
// @Security Bearer
|
||||||
func (ctrl *V1Controller) HandleLabelDelete() server.HandlerFunc {
|
func (ctrl *V1Controller) HandleLabelDelete() server.HandlerFunc {
|
||||||
return ctrl.handleLabelsGeneral()
|
return ctrl.handleLabelsGeneral()
|
||||||
}
|
}
|
||||||
|
|
||||||
// HandleLabelGet godocs
|
// HandleLabelGet godocs
|
||||||
// @Summary Gets a label and fields
|
//
|
||||||
// @Tags Labels
|
// @Summary Get Label
|
||||||
// @Produce json
|
// @Tags Labels
|
||||||
// @Param id path string true "Label ID"
|
// @Produce json
|
||||||
// @Success 200 {object} repo.LabelOut
|
// @Param id path string true "Label ID"
|
||||||
// @Router /v1/labels/{id} [GET]
|
// @Success 200 {object} repo.LabelOut
|
||||||
// @Security Bearer
|
// @Router /v1/labels/{id} [GET]
|
||||||
|
// @Security Bearer
|
||||||
func (ctrl *V1Controller) HandleLabelGet() server.HandlerFunc {
|
func (ctrl *V1Controller) HandleLabelGet() server.HandlerFunc {
|
||||||
return ctrl.handleLabelsGeneral()
|
return ctrl.handleLabelsGeneral()
|
||||||
}
|
}
|
||||||
|
|
||||||
// HandleLabelUpdate godocs
|
// HandleLabelUpdate godocs
|
||||||
// @Summary updates a label
|
//
|
||||||
// @Tags Labels
|
// @Summary Update Label
|
||||||
// @Produce json
|
// @Tags Labels
|
||||||
// @Param id path string true "Label ID"
|
// @Produce json
|
||||||
// @Success 200 {object} repo.LabelOut
|
// @Param id path string true "Label ID"
|
||||||
// @Router /v1/labels/{id} [PUT]
|
// @Success 200 {object} repo.LabelOut
|
||||||
// @Security Bearer
|
// @Router /v1/labels/{id} [PUT]
|
||||||
|
// @Security Bearer
|
||||||
func (ctrl *V1Controller) HandleLabelUpdate() server.HandlerFunc {
|
func (ctrl *V1Controller) HandleLabelUpdate() server.HandlerFunc {
|
||||||
return ctrl.handleLabelsGeneral()
|
return ctrl.handleLabelsGeneral()
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,13 +12,14 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
// HandleLocationTreeQuery godoc
|
// HandleLocationTreeQuery godoc
|
||||||
// @Summary Get All Locations
|
//
|
||||||
// @Tags Locations
|
// @Summary Get Locations Tree
|
||||||
// @Produce json
|
// @Tags Locations
|
||||||
// @Param withItems query bool false "include items in response tree"
|
// @Produce json
|
||||||
// @Success 200 {object} server.Results{items=[]repo.TreeItem}
|
// @Param withItems query bool false "include items in response tree"
|
||||||
// @Router /v1/locations/tree [GET]
|
// @Success 200 {object} server.Results{items=[]repo.TreeItem}
|
||||||
// @Security Bearer
|
// @Router /v1/locations/tree [GET]
|
||||||
|
// @Security Bearer
|
||||||
func (ctrl *V1Controller) HandleLocationTreeQuery() server.HandlerFunc {
|
func (ctrl *V1Controller) HandleLocationTreeQuery() server.HandlerFunc {
|
||||||
return func(w http.ResponseWriter, r *http.Request) error {
|
return func(w http.ResponseWriter, r *http.Request) error {
|
||||||
user := services.UseUserCtx(r.Context())
|
user := services.UseUserCtx(r.Context())
|
||||||
|
@ -44,13 +45,14 @@ func (ctrl *V1Controller) HandleLocationTreeQuery() server.HandlerFunc {
|
||||||
}
|
}
|
||||||
|
|
||||||
// HandleLocationGetAll godoc
|
// HandleLocationGetAll godoc
|
||||||
// @Summary Get All Locations
|
//
|
||||||
// @Tags Locations
|
// @Summary Get All Locations
|
||||||
// @Produce json
|
// @Tags Locations
|
||||||
// @Param filterChildren query bool false "Filter locations with parents"
|
// @Produce json
|
||||||
// @Success 200 {object} server.Results{items=[]repo.LocationOutCount}
|
// @Param filterChildren query bool false "Filter locations with parents"
|
||||||
// @Router /v1/locations [GET]
|
// @Success 200 {object} server.Results{items=[]repo.LocationOutCount}
|
||||||
// @Security Bearer
|
// @Router /v1/locations [GET]
|
||||||
|
// @Security Bearer
|
||||||
func (ctrl *V1Controller) HandleLocationGetAll() server.HandlerFunc {
|
func (ctrl *V1Controller) HandleLocationGetAll() server.HandlerFunc {
|
||||||
return func(w http.ResponseWriter, r *http.Request) error {
|
return func(w http.ResponseWriter, r *http.Request) error {
|
||||||
user := services.UseUserCtx(r.Context())
|
user := services.UseUserCtx(r.Context())
|
||||||
|
@ -72,13 +74,14 @@ func (ctrl *V1Controller) HandleLocationGetAll() server.HandlerFunc {
|
||||||
}
|
}
|
||||||
|
|
||||||
// HandleLocationCreate godoc
|
// HandleLocationCreate godoc
|
||||||
// @Summary Create a new location
|
//
|
||||||
// @Tags Locations
|
// @Summary Create Location
|
||||||
// @Produce json
|
// @Tags Locations
|
||||||
// @Param payload body repo.LocationCreate true "Location Data"
|
// @Produce json
|
||||||
// @Success 200 {object} repo.LocationSummary
|
// @Param payload body repo.LocationCreate true "Location Data"
|
||||||
// @Router /v1/locations [POST]
|
// @Success 200 {object} repo.LocationSummary
|
||||||
// @Security Bearer
|
// @Router /v1/locations [POST]
|
||||||
|
// @Security Bearer
|
||||||
func (ctrl *V1Controller) HandleLocationCreate() server.HandlerFunc {
|
func (ctrl *V1Controller) HandleLocationCreate() server.HandlerFunc {
|
||||||
return func(w http.ResponseWriter, r *http.Request) error {
|
return func(w http.ResponseWriter, r *http.Request) error {
|
||||||
createData := repo.LocationCreate{}
|
createData := repo.LocationCreate{}
|
||||||
|
@ -99,38 +102,41 @@ func (ctrl *V1Controller) HandleLocationCreate() server.HandlerFunc {
|
||||||
}
|
}
|
||||||
|
|
||||||
// HandleLocationDelete godocs
|
// HandleLocationDelete godocs
|
||||||
// @Summary deletes a location
|
//
|
||||||
// @Tags Locations
|
// @Summary Delete Location
|
||||||
// @Produce json
|
// @Tags Locations
|
||||||
// @Param id path string true "Location ID"
|
// @Produce json
|
||||||
// @Success 204
|
// @Param id path string true "Location ID"
|
||||||
// @Router /v1/locations/{id} [DELETE]
|
// @Success 204
|
||||||
// @Security Bearer
|
// @Router /v1/locations/{id} [DELETE]
|
||||||
|
// @Security Bearer
|
||||||
func (ctrl *V1Controller) HandleLocationDelete() server.HandlerFunc {
|
func (ctrl *V1Controller) HandleLocationDelete() server.HandlerFunc {
|
||||||
return ctrl.handleLocationGeneral()
|
return ctrl.handleLocationGeneral()
|
||||||
}
|
}
|
||||||
|
|
||||||
// HandleLocationGet godocs
|
// HandleLocationGet godocs
|
||||||
// @Summary Gets a location and fields
|
//
|
||||||
// @Tags Locations
|
// @Summary Get Location
|
||||||
// @Produce json
|
// @Tags Locations
|
||||||
// @Param id path string true "Location ID"
|
// @Produce json
|
||||||
// @Success 200 {object} repo.LocationOut
|
// @Param id path string true "Location ID"
|
||||||
// @Router /v1/locations/{id} [GET]
|
// @Success 200 {object} repo.LocationOut
|
||||||
// @Security Bearer
|
// @Router /v1/locations/{id} [GET]
|
||||||
|
// @Security Bearer
|
||||||
func (ctrl *V1Controller) HandleLocationGet() server.HandlerFunc {
|
func (ctrl *V1Controller) HandleLocationGet() server.HandlerFunc {
|
||||||
return ctrl.handleLocationGeneral()
|
return ctrl.handleLocationGeneral()
|
||||||
}
|
}
|
||||||
|
|
||||||
// HandleLocationUpdate godocs
|
// HandleLocationUpdate godocs
|
||||||
// @Summary updates a location
|
//
|
||||||
// @Tags Locations
|
// @Summary Update Location
|
||||||
// @Produce json
|
// @Tags Locations
|
||||||
// @Param id path string true "Location ID"
|
// @Produce json
|
||||||
// @Param payload body repo.LocationUpdate true "Location Data"
|
// @Param id path string true "Location ID"
|
||||||
// @Success 200 {object} repo.LocationOut
|
// @Param payload body repo.LocationUpdate true "Location Data"
|
||||||
// @Router /v1/locations/{id} [PUT]
|
// @Success 200 {object} repo.LocationOut
|
||||||
// @Security Bearer
|
// @Router /v1/locations/{id} [PUT]
|
||||||
|
// @Security Bearer
|
||||||
func (ctrl *V1Controller) HandleLocationUpdate() server.HandlerFunc {
|
func (ctrl *V1Controller) HandleLocationUpdate() server.HandlerFunc {
|
||||||
return ctrl.handleLocationGeneral()
|
return ctrl.handleLocationGeneral()
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,47 +12,51 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
// HandleMaintenanceGetLog godoc
|
// HandleMaintenanceGetLog godoc
|
||||||
// @Summary Get Maintenance Log
|
//
|
||||||
// @Tags Maintenance
|
// @Summary Get Maintenance Log
|
||||||
// @Produce json
|
// @Tags Maintenance
|
||||||
// @Success 200 {object} repo.MaintenanceLog
|
// @Produce json
|
||||||
// @Router /v1/items/{id}/maintenance [GET]
|
// @Success 200 {object} repo.MaintenanceLog
|
||||||
// @Security Bearer
|
// @Router /v1/items/{id}/maintenance [GET]
|
||||||
|
// @Security Bearer
|
||||||
func (ctrl *V1Controller) HandleMaintenanceLogGet() server.HandlerFunc {
|
func (ctrl *V1Controller) HandleMaintenanceLogGet() server.HandlerFunc {
|
||||||
return ctrl.handleMaintenanceLog()
|
return ctrl.handleMaintenanceLog()
|
||||||
}
|
}
|
||||||
|
|
||||||
// HandleMaintenanceEntryCreate godoc
|
// HandleMaintenanceEntryCreate godoc
|
||||||
// @Summary Create Maintenance Entry
|
//
|
||||||
// @Tags Maintenance
|
// @Summary Create Maintenance Entry
|
||||||
// @Produce json
|
// @Tags Maintenance
|
||||||
// @Param payload body repo.MaintenanceEntryCreate true "Entry Data"
|
// @Produce json
|
||||||
// @Success 200 {object} repo.MaintenanceEntry
|
// @Param payload body repo.MaintenanceEntryCreate true "Entry Data"
|
||||||
// @Router /v1/items/{id}/maintenance [POST]
|
// @Success 200 {object} repo.MaintenanceEntry
|
||||||
// @Security Bearer
|
// @Router /v1/items/{id}/maintenance [POST]
|
||||||
|
// @Security Bearer
|
||||||
func (ctrl *V1Controller) HandleMaintenanceEntryCreate() server.HandlerFunc {
|
func (ctrl *V1Controller) HandleMaintenanceEntryCreate() server.HandlerFunc {
|
||||||
return ctrl.handleMaintenanceLog()
|
return ctrl.handleMaintenanceLog()
|
||||||
}
|
}
|
||||||
|
|
||||||
// HandleMaintenanceEntryDelete godoc
|
// HandleMaintenanceEntryDelete godoc
|
||||||
// @Summary Delete Maintenance Entry
|
//
|
||||||
// @Tags Maintenance
|
// @Summary Delete Maintenance Entry
|
||||||
// @Produce json
|
// @Tags Maintenance
|
||||||
// @Success 204
|
// @Produce json
|
||||||
// @Router /v1/items/{id}/maintenance/{entry_id} [DELETE]
|
// @Success 204
|
||||||
// @Security Bearer
|
// @Router /v1/items/{id}/maintenance/{entry_id} [DELETE]
|
||||||
|
// @Security Bearer
|
||||||
func (ctrl *V1Controller) HandleMaintenanceEntryDelete() server.HandlerFunc {
|
func (ctrl *V1Controller) HandleMaintenanceEntryDelete() server.HandlerFunc {
|
||||||
return ctrl.handleMaintenanceLog()
|
return ctrl.handleMaintenanceLog()
|
||||||
}
|
}
|
||||||
|
|
||||||
// HandleMaintenanceEntryUpdate godoc
|
// HandleMaintenanceEntryUpdate godoc
|
||||||
// @Summary Update Maintenance Entry
|
//
|
||||||
// @Tags Maintenance
|
// @Summary Update Maintenance Entry
|
||||||
// @Produce json
|
// @Tags Maintenance
|
||||||
// @Param payload body repo.MaintenanceEntryUpdate true "Entry Data"
|
// @Produce json
|
||||||
// @Success 200 {object} repo.MaintenanceEntry
|
// @Param payload body repo.MaintenanceEntryUpdate true "Entry Data"
|
||||||
// @Router /v1/items/{id}/maintenance/{entry_id} [PUT]
|
// @Success 200 {object} repo.MaintenanceEntry
|
||||||
// @Security Bearer
|
// @Router /v1/items/{id}/maintenance/{entry_id} [PUT]
|
||||||
|
// @Security Bearer
|
||||||
func (ctrl *V1Controller) HandleMaintenanceEntryUpdate() server.HandlerFunc {
|
func (ctrl *V1Controller) HandleMaintenanceEntryUpdate() server.HandlerFunc {
|
||||||
return ctrl.handleMaintenanceLog()
|
return ctrl.handleMaintenanceLog()
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,12 +13,13 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
// HandleGetUserNotifiers godoc
|
// HandleGetUserNotifiers godoc
|
||||||
// @Summary Get All notifier
|
//
|
||||||
// @Tags Notifiers
|
// @Summary Get Notifiers
|
||||||
// @Produce json
|
// @Tags Notifiers
|
||||||
// @Success 200 {object} server.Results{items=[]repo.NotifierOut}
|
// @Produce json
|
||||||
// @Router /v1/notifiers [GET]
|
// @Success 200 {object} server.Results{items=[]repo.NotifierOut}
|
||||||
// @Security Bearer
|
// @Router /v1/notifiers [GET]
|
||||||
|
// @Security Bearer
|
||||||
func (ctrl *V1Controller) HandleGetUserNotifiers() server.HandlerFunc {
|
func (ctrl *V1Controller) HandleGetUserNotifiers() server.HandlerFunc {
|
||||||
fn := func(ctx context.Context, _ struct{}) ([]repo.NotifierOut, error) {
|
fn := func(ctx context.Context, _ struct{}) ([]repo.NotifierOut, error) {
|
||||||
user := services.UseUserCtx(ctx)
|
user := services.UseUserCtx(ctx)
|
||||||
|
@ -29,13 +30,14 @@ func (ctrl *V1Controller) HandleGetUserNotifiers() server.HandlerFunc {
|
||||||
}
|
}
|
||||||
|
|
||||||
// HandleCreateNotifier godoc
|
// HandleCreateNotifier godoc
|
||||||
// @Summary Create a new notifier
|
//
|
||||||
// @Tags Notifiers
|
// @Summary Create Notifier
|
||||||
// @Produce json
|
// @Tags Notifiers
|
||||||
// @Param payload body repo.NotifierCreate true "Notifier Data"
|
// @Produce json
|
||||||
// @Success 200 {object} repo.NotifierOut
|
// @Param payload body repo.NotifierCreate true "Notifier Data"
|
||||||
// @Router /v1/notifiers [POST]
|
// @Success 200 {object} repo.NotifierOut
|
||||||
// @Security Bearer
|
// @Router /v1/notifiers [POST]
|
||||||
|
// @Security Bearer
|
||||||
func (ctrl *V1Controller) HandleCreateNotifier() server.HandlerFunc {
|
func (ctrl *V1Controller) HandleCreateNotifier() server.HandlerFunc {
|
||||||
fn := func(ctx context.Context, in repo.NotifierCreate) (repo.NotifierOut, error) {
|
fn := func(ctx context.Context, in repo.NotifierCreate) (repo.NotifierOut, error) {
|
||||||
auth := services.NewContext(ctx)
|
auth := services.NewContext(ctx)
|
||||||
|
@ -46,12 +48,13 @@ func (ctrl *V1Controller) HandleCreateNotifier() server.HandlerFunc {
|
||||||
}
|
}
|
||||||
|
|
||||||
// HandleDeleteNotifier godocs
|
// HandleDeleteNotifier godocs
|
||||||
// @Summary Delete a notifier
|
//
|
||||||
// @Tags Notifiers
|
// @Summary Delete a Notifier
|
||||||
// @Param id path string true "Notifier ID"
|
// @Tags Notifiers
|
||||||
// @Success 204
|
// @Param id path string true "Notifier ID"
|
||||||
// @Router /v1/notifiers/{id} [DELETE]
|
// @Success 204
|
||||||
// @Security Bearer
|
// @Router /v1/notifiers/{id} [DELETE]
|
||||||
|
// @Security Bearer
|
||||||
func (ctrl *V1Controller) HandleDeleteNotifier() server.HandlerFunc {
|
func (ctrl *V1Controller) HandleDeleteNotifier() server.HandlerFunc {
|
||||||
fn := func(ctx context.Context, ID uuid.UUID) (any, error) {
|
fn := func(ctx context.Context, ID uuid.UUID) (any, error) {
|
||||||
auth := services.NewContext(ctx)
|
auth := services.NewContext(ctx)
|
||||||
|
@ -62,13 +65,14 @@ func (ctrl *V1Controller) HandleDeleteNotifier() server.HandlerFunc {
|
||||||
}
|
}
|
||||||
|
|
||||||
// HandleUpdateNotifier godocs
|
// HandleUpdateNotifier godocs
|
||||||
// @Summary Update a notifier
|
//
|
||||||
// @Tags Notifiers
|
// @Summary Update Notifier
|
||||||
// @Param id path string true "Notifier ID"
|
// @Tags Notifiers
|
||||||
// @Param payload body repo.NotifierUpdate true "Notifier Data"
|
// @Param id path string true "Notifier ID"
|
||||||
// @Success 200 {object} repo.NotifierOut
|
// @Param payload body repo.NotifierUpdate true "Notifier Data"
|
||||||
// @Router /v1/notifiers/{id} [PUT]
|
// @Success 200 {object} repo.NotifierOut
|
||||||
// @Security Bearer
|
// @Router /v1/notifiers/{id} [PUT]
|
||||||
|
// @Security Bearer
|
||||||
func (ctrl *V1Controller) HandleUpdateNotifier() server.HandlerFunc {
|
func (ctrl *V1Controller) HandleUpdateNotifier() server.HandlerFunc {
|
||||||
fn := func(ctx context.Context, ID uuid.UUID, in repo.NotifierUpdate) (repo.NotifierOut, error) {
|
fn := func(ctx context.Context, ID uuid.UUID, in repo.NotifierUpdate) (repo.NotifierOut, error) {
|
||||||
auth := services.NewContext(ctx)
|
auth := services.NewContext(ctx)
|
||||||
|
@ -79,14 +83,15 @@ func (ctrl *V1Controller) HandleUpdateNotifier() server.HandlerFunc {
|
||||||
}
|
}
|
||||||
|
|
||||||
// HandlerNotifierTest godoc
|
// HandlerNotifierTest godoc
|
||||||
// @Summary Test notifier
|
//
|
||||||
// @Tags Notifiers
|
// @Summary Test Notifier
|
||||||
// @Produce json
|
// @Tags Notifiers
|
||||||
// @Param id path string true "Notifier ID"
|
// @Produce json
|
||||||
// @Param url query string true "URL"
|
// @Param id path string true "Notifier ID"
|
||||||
// @Success 204
|
// @Param url query string true "URL"
|
||||||
// @Router /v1/notifiers/test [POST]
|
// @Success 204
|
||||||
// @Security Bearer
|
// @Router /v1/notifiers/test [POST]
|
||||||
|
// @Security Bearer
|
||||||
func (ctrl *V1Controller) HandlerNotifierTest() server.HandlerFunc {
|
func (ctrl *V1Controller) HandlerNotifierTest() server.HandlerFunc {
|
||||||
type body struct {
|
type body struct {
|
||||||
URL string `json:"url" validate:"required"`
|
URL string `json:"url" validate:"required"`
|
||||||
|
|
|
@ -19,7 +19,7 @@ var qrcodeLogo []byte
|
||||||
|
|
||||||
// HandleGenerateQRCode godoc
|
// HandleGenerateQRCode godoc
|
||||||
//
|
//
|
||||||
// @Summary Encode data into QRCode
|
// @Summary Create QR Code
|
||||||
// @Tags Items
|
// @Tags Items
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param data query string false "data to be encoded into qrcode"
|
// @Param data query string false "data to be encoded into qrcode"
|
||||||
|
|
|
@ -9,7 +9,7 @@ import (
|
||||||
|
|
||||||
// HandleBillOfMaterialsExport godoc
|
// HandleBillOfMaterialsExport godoc
|
||||||
//
|
//
|
||||||
// @Summary Generates a Bill of Materials CSV
|
// @Summary Export Bill of Materials
|
||||||
// @Tags Reporting
|
// @Tags Reporting
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Success 200 {string} string "text/csv"
|
// @Success 200 {string} string "text/csv"
|
||||||
|
|
|
@ -10,12 +10,13 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
// HandleGroupGet godoc
|
// HandleGroupGet godoc
|
||||||
// @Summary Get the current user's group statistics
|
//
|
||||||
// @Tags Statistics
|
// @Summary Get Location Statistics
|
||||||
// @Produce json
|
// @Tags Statistics
|
||||||
// @Success 200 {object} []repo.TotalsByOrganizer
|
// @Produce json
|
||||||
// @Router /v1/groups/statistics/locations [GET]
|
// @Success 200 {object} []repo.TotalsByOrganizer
|
||||||
// @Security Bearer
|
// @Router /v1/groups/statistics/locations [GET]
|
||||||
|
// @Security Bearer
|
||||||
func (ctrl *V1Controller) HandleGroupStatisticsLocations() server.HandlerFunc {
|
func (ctrl *V1Controller) HandleGroupStatisticsLocations() server.HandlerFunc {
|
||||||
return func(w http.ResponseWriter, r *http.Request) error {
|
return func(w http.ResponseWriter, r *http.Request) error {
|
||||||
ctx := services.NewContext(r.Context())
|
ctx := services.NewContext(r.Context())
|
||||||
|
@ -29,13 +30,14 @@ func (ctrl *V1Controller) HandleGroupStatisticsLocations() server.HandlerFunc {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// HandleGroupGet godoc
|
// HandleGroupStatisticsLabels godoc
|
||||||
// @Summary Get the current user's group statistics
|
//
|
||||||
// @Tags Statistics
|
// @Summary Get Label Statistics
|
||||||
// @Produce json
|
// @Tags Statistics
|
||||||
// @Success 200 {object} []repo.TotalsByOrganizer
|
// @Produce json
|
||||||
// @Router /v1/groups/statistics/labels [GET]
|
// @Success 200 {object} []repo.TotalsByOrganizer
|
||||||
// @Security Bearer
|
// @Router /v1/groups/statistics/labels [GET]
|
||||||
|
// @Security Bearer
|
||||||
func (ctrl *V1Controller) HandleGroupStatisticsLabels() server.HandlerFunc {
|
func (ctrl *V1Controller) HandleGroupStatisticsLabels() server.HandlerFunc {
|
||||||
return func(w http.ResponseWriter, r *http.Request) error {
|
return func(w http.ResponseWriter, r *http.Request) error {
|
||||||
ctx := services.NewContext(r.Context())
|
ctx := services.NewContext(r.Context())
|
||||||
|
@ -49,13 +51,14 @@ func (ctrl *V1Controller) HandleGroupStatisticsLabels() server.HandlerFunc {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// HandleGroupGet godoc
|
// HandleGroupStatistics godoc
|
||||||
// @Summary Get the current user's group statistics
|
//
|
||||||
// @Tags Statistics
|
// @Summary Get Group Statistics
|
||||||
// @Produce json
|
// @Tags Statistics
|
||||||
// @Success 200 {object} repo.GroupStatistics
|
// @Produce json
|
||||||
// @Router /v1/groups/statistics [GET]
|
// @Success 200 {object} repo.GroupStatistics
|
||||||
// @Security Bearer
|
// @Router /v1/groups/statistics [GET]
|
||||||
|
// @Security Bearer
|
||||||
func (ctrl *V1Controller) HandleGroupStatistics() server.HandlerFunc {
|
func (ctrl *V1Controller) HandleGroupStatistics() server.HandlerFunc {
|
||||||
return func(w http.ResponseWriter, r *http.Request) error {
|
return func(w http.ResponseWriter, r *http.Request) error {
|
||||||
ctx := services.NewContext(r.Context())
|
ctx := services.NewContext(r.Context())
|
||||||
|
@ -69,15 +72,16 @@ func (ctrl *V1Controller) HandleGroupStatistics() server.HandlerFunc {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// HandleGroupGet godoc
|
// HandleGroupStatisticsPriceOverTime godoc
|
||||||
// @Summary Queries the changes overtime of the purchase price over time
|
//
|
||||||
// @Tags Statistics
|
// @Summary Get Purchase Price Statistics
|
||||||
// @Produce json
|
// @Tags Statistics
|
||||||
// @Success 200 {object} repo.ValueOverTime
|
// @Produce json
|
||||||
// @Param start query string false "start date"
|
// @Success 200 {object} repo.ValueOverTime
|
||||||
// @Param end query string false "end date"
|
// @Param start query string false "start date"
|
||||||
// @Router /v1/groups/statistics/purchase-price [GET]
|
// @Param end query string false "end date"
|
||||||
// @Security Bearer
|
// @Router /v1/groups/statistics/purchase-price [GET]
|
||||||
|
// @Security Bearer
|
||||||
func (ctrl *V1Controller) HandleGroupStatisticsPriceOverTime() server.HandlerFunc {
|
func (ctrl *V1Controller) HandleGroupStatisticsPriceOverTime() server.HandlerFunc {
|
||||||
parseDate := func(datestr string, defaultDate time.Time) (time.Time, error) {
|
parseDate := func(datestr string, defaultDate time.Time) (time.Time, error) {
|
||||||
if datestr == "" {
|
if datestr == "" {
|
||||||
|
|
|
@ -12,13 +12,14 @@ import (
|
||||||
"github.com/rs/zerolog/log"
|
"github.com/rs/zerolog/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
// HandleUserSelf godoc
|
// HandleUserRegistration godoc
|
||||||
// @Summary Get the current user
|
//
|
||||||
// @Tags User
|
// @Summary Register New User
|
||||||
// @Produce json
|
// @Tags User
|
||||||
// @Param payload body services.UserRegistration true "User Data"
|
// @Produce json
|
||||||
// @Success 204
|
// @Param payload body services.UserRegistration true "User Data"
|
||||||
// @Router /v1/users/register [Post]
|
// @Success 204
|
||||||
|
// @Router /v1/users/register [Post]
|
||||||
func (ctrl *V1Controller) HandleUserRegistration() server.HandlerFunc {
|
func (ctrl *V1Controller) HandleUserRegistration() server.HandlerFunc {
|
||||||
return func(w http.ResponseWriter, r *http.Request) error {
|
return func(w http.ResponseWriter, r *http.Request) error {
|
||||||
regData := services.UserRegistration{}
|
regData := services.UserRegistration{}
|
||||||
|
@ -43,12 +44,13 @@ func (ctrl *V1Controller) HandleUserRegistration() server.HandlerFunc {
|
||||||
}
|
}
|
||||||
|
|
||||||
// HandleUserSelf godoc
|
// HandleUserSelf godoc
|
||||||
// @Summary Get the current user
|
//
|
||||||
// @Tags User
|
// @Summary Get User Self
|
||||||
// @Produce json
|
// @Tags User
|
||||||
// @Success 200 {object} server.Result{item=repo.UserOut}
|
// @Produce json
|
||||||
// @Router /v1/users/self [GET]
|
// @Success 200 {object} server.Result{item=repo.UserOut}
|
||||||
// @Security Bearer
|
// @Router /v1/users/self [GET]
|
||||||
|
// @Security Bearer
|
||||||
func (ctrl *V1Controller) HandleUserSelf() server.HandlerFunc {
|
func (ctrl *V1Controller) HandleUserSelf() server.HandlerFunc {
|
||||||
return func(w http.ResponseWriter, r *http.Request) error {
|
return func(w http.ResponseWriter, r *http.Request) error {
|
||||||
token := services.UseTokenCtx(r.Context())
|
token := services.UseTokenCtx(r.Context())
|
||||||
|
@ -63,13 +65,14 @@ func (ctrl *V1Controller) HandleUserSelf() server.HandlerFunc {
|
||||||
}
|
}
|
||||||
|
|
||||||
// HandleUserSelfUpdate godoc
|
// HandleUserSelfUpdate godoc
|
||||||
// @Summary Update the current user
|
//
|
||||||
// @Tags User
|
// @Summary Update Account
|
||||||
// @Produce json
|
// @Tags User
|
||||||
// @Param payload body repo.UserUpdate true "User Data"
|
// @Produce json
|
||||||
// @Success 200 {object} server.Result{item=repo.UserUpdate}
|
// @Param payload body repo.UserUpdate true "User Data"
|
||||||
// @Router /v1/users/self [PUT]
|
// @Success 200 {object} server.Result{item=repo.UserUpdate}
|
||||||
// @Security Bearer
|
// @Router /v1/users/self [PUT]
|
||||||
|
// @Security Bearer
|
||||||
func (ctrl *V1Controller) HandleUserSelfUpdate() server.HandlerFunc {
|
func (ctrl *V1Controller) HandleUserSelfUpdate() server.HandlerFunc {
|
||||||
return func(w http.ResponseWriter, r *http.Request) error {
|
return func(w http.ResponseWriter, r *http.Request) error {
|
||||||
updateData := repo.UserUpdate{}
|
updateData := repo.UserUpdate{}
|
||||||
|
@ -89,12 +92,13 @@ func (ctrl *V1Controller) HandleUserSelfUpdate() server.HandlerFunc {
|
||||||
}
|
}
|
||||||
|
|
||||||
// HandleUserSelfDelete godoc
|
// HandleUserSelfDelete godoc
|
||||||
// @Summary Deletes the user account
|
//
|
||||||
// @Tags User
|
// @Summary Delete Account
|
||||||
// @Produce json
|
// @Tags User
|
||||||
// @Success 204
|
// @Produce json
|
||||||
// @Router /v1/users/self [DELETE]
|
// @Success 204
|
||||||
// @Security Bearer
|
// @Router /v1/users/self [DELETE]
|
||||||
|
// @Security Bearer
|
||||||
func (ctrl *V1Controller) HandleUserSelfDelete() server.HandlerFunc {
|
func (ctrl *V1Controller) HandleUserSelfDelete() server.HandlerFunc {
|
||||||
return func(w http.ResponseWriter, r *http.Request) error {
|
return func(w http.ResponseWriter, r *http.Request) error {
|
||||||
if ctrl.isDemo {
|
if ctrl.isDemo {
|
||||||
|
@ -118,12 +122,13 @@ type (
|
||||||
)
|
)
|
||||||
|
|
||||||
// HandleUserSelfChangePassword godoc
|
// HandleUserSelfChangePassword godoc
|
||||||
// @Summary Updates the users password
|
//
|
||||||
// @Tags User
|
// @Summary Change Password
|
||||||
// @Success 204
|
// @Tags User
|
||||||
// @Param payload body ChangePassword true "Password Payload"
|
// @Success 204
|
||||||
// @Router /v1/users/change-password [PUT]
|
// @Param payload body ChangePassword true "Password Payload"
|
||||||
// @Security Bearer
|
// @Router /v1/users/change-password [PUT]
|
||||||
|
// @Security Bearer
|
||||||
func (ctrl *V1Controller) HandleUserSelfChangePassword() server.HandlerFunc {
|
func (ctrl *V1Controller) HandleUserSelfChangePassword() server.HandlerFunc {
|
||||||
return func(w http.ResponseWriter, r *http.Request) error {
|
return func(w http.ResponseWriter, r *http.Request) error {
|
||||||
if ctrl.isDemo {
|
if ctrl.isDemo {
|
||||||
|
|
|
@ -27,9 +27,9 @@ var (
|
||||||
buildTime = "now"
|
buildTime = "now"
|
||||||
)
|
)
|
||||||
|
|
||||||
// @title Go API Templates
|
// @title Homebox API
|
||||||
// @version 1.0
|
// @version 1.0
|
||||||
// @description This is a simple Rest API Server Template that implements some basic User and Authentication patterns to help you get started and bootstrap your next project!.
|
// @description Track, Manage, and Organize your Shit.
|
||||||
// @contact.name Don't
|
// @contact.name Don't
|
||||||
// @license.name MIT
|
// @license.name MIT
|
||||||
// @BasePath /api
|
// @BasePath /api
|
||||||
|
|
|
@ -28,13 +28,14 @@ const docTemplate = `{
|
||||||
"Bearer": []
|
"Bearer": []
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"description": "Ensures all items in the database have an asset ID",
|
||||||
"produces": [
|
"produces": [
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Group"
|
"Actions"
|
||||||
],
|
],
|
||||||
"summary": "Ensures all items in the database have an asset id",
|
"summary": "Ensure Asset IDs",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
|
@ -52,13 +53,14 @@ const docTemplate = `{
|
||||||
"Bearer": []
|
"Bearer": []
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"description": "Ensures all items in the database have an import ref",
|
||||||
"produces": [
|
"produces": [
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Group"
|
"Actions"
|
||||||
],
|
],
|
||||||
"summary": "Ensures all items in the database have an import ref",
|
"summary": "Ensures Import Refs",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
|
@ -76,13 +78,14 @@ const docTemplate = `{
|
||||||
"Bearer": []
|
"Bearer": []
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"description": "Resets all item date fields to the beginning of the day",
|
||||||
"produces": [
|
"produces": [
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Group"
|
"Actions"
|
||||||
],
|
],
|
||||||
"summary": "Resets all item date fields to the beginning of the day",
|
"summary": "Zero Out Time Fields",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
|
@ -104,9 +107,9 @@ const docTemplate = `{
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Assets"
|
"Items"
|
||||||
],
|
],
|
||||||
"summary": "Gets an item by Asset ID",
|
"summary": "Get Item by Asset ID",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -139,7 +142,7 @@ const docTemplate = `{
|
||||||
"tags": [
|
"tags": [
|
||||||
"Group"
|
"Group"
|
||||||
],
|
],
|
||||||
"summary": "Get the current user's group",
|
"summary": "Get Group",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
|
@ -161,7 +164,7 @@ const docTemplate = `{
|
||||||
"tags": [
|
"tags": [
|
||||||
"Group"
|
"Group"
|
||||||
],
|
],
|
||||||
"summary": "Updates some fields of the current users group",
|
"summary": "Update Group",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"description": "User Data",
|
"description": "User Data",
|
||||||
|
@ -196,7 +199,7 @@ const docTemplate = `{
|
||||||
"tags": [
|
"tags": [
|
||||||
"Group"
|
"Group"
|
||||||
],
|
],
|
||||||
"summary": "Get the current user",
|
"summary": "Create Group Invitation",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"description": "User Data",
|
"description": "User Data",
|
||||||
|
@ -231,7 +234,7 @@ const docTemplate = `{
|
||||||
"tags": [
|
"tags": [
|
||||||
"Statistics"
|
"Statistics"
|
||||||
],
|
],
|
||||||
"summary": "Get the current user's group statistics",
|
"summary": "Get Group Statistics",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
|
@ -255,7 +258,7 @@ const docTemplate = `{
|
||||||
"tags": [
|
"tags": [
|
||||||
"Statistics"
|
"Statistics"
|
||||||
],
|
],
|
||||||
"summary": "Get the current user's group statistics",
|
"summary": "Get Label Statistics",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
|
@ -282,7 +285,7 @@ const docTemplate = `{
|
||||||
"tags": [
|
"tags": [
|
||||||
"Statistics"
|
"Statistics"
|
||||||
],
|
],
|
||||||
"summary": "Get the current user's group statistics",
|
"summary": "Get Location Statistics",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
|
@ -309,7 +312,7 @@ const docTemplate = `{
|
||||||
"tags": [
|
"tags": [
|
||||||
"Statistics"
|
"Statistics"
|
||||||
],
|
],
|
||||||
"summary": "Queries the changes overtime of the purchase price over time",
|
"summary": "Get Purchase Price Statistics",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -347,7 +350,7 @@ const docTemplate = `{
|
||||||
"tags": [
|
"tags": [
|
||||||
"Items"
|
"Items"
|
||||||
],
|
],
|
||||||
"summary": "Get All Items",
|
"summary": "Query All Items",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -409,7 +412,7 @@ const docTemplate = `{
|
||||||
"tags": [
|
"tags": [
|
||||||
"Items"
|
"Items"
|
||||||
],
|
],
|
||||||
"summary": "Create a new item",
|
"summary": "Create Item",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"description": "Item Data",
|
"description": "Item Data",
|
||||||
|
@ -441,7 +444,7 @@ const docTemplate = `{
|
||||||
"tags": [
|
"tags": [
|
||||||
"Items"
|
"Items"
|
||||||
],
|
],
|
||||||
"summary": "exports items into the database",
|
"summary": "Export Items",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "text/csv",
|
"description": "text/csv",
|
||||||
|
@ -465,7 +468,7 @@ const docTemplate = `{
|
||||||
"tags": [
|
"tags": [
|
||||||
"Items"
|
"Items"
|
||||||
],
|
],
|
||||||
"summary": "imports items into the database",
|
"summary": "Get All Custom Field Names",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
|
@ -492,7 +495,7 @@ const docTemplate = `{
|
||||||
"tags": [
|
"tags": [
|
||||||
"Items"
|
"Items"
|
||||||
],
|
],
|
||||||
"summary": "imports items into the database",
|
"summary": "Get All Custom Field Values",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
|
@ -519,7 +522,7 @@ const docTemplate = `{
|
||||||
"tags": [
|
"tags": [
|
||||||
"Items"
|
"Items"
|
||||||
],
|
],
|
||||||
"summary": "imports items into the database",
|
"summary": "Import Items",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "file",
|
"type": "file",
|
||||||
|
@ -549,7 +552,7 @@ const docTemplate = `{
|
||||||
"tags": [
|
"tags": [
|
||||||
"Items"
|
"Items"
|
||||||
],
|
],
|
||||||
"summary": "Gets a item and fields",
|
"summary": "Get Item",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -580,7 +583,7 @@ const docTemplate = `{
|
||||||
"tags": [
|
"tags": [
|
||||||
"Items"
|
"Items"
|
||||||
],
|
],
|
||||||
"summary": "updates a item",
|
"summary": "Update Item",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -620,7 +623,7 @@ const docTemplate = `{
|
||||||
"tags": [
|
"tags": [
|
||||||
"Items"
|
"Items"
|
||||||
],
|
],
|
||||||
"summary": "deletes a item",
|
"summary": "Delete Item",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -650,7 +653,7 @@ const docTemplate = `{
|
||||||
"tags": [
|
"tags": [
|
||||||
"Items Attachments"
|
"Items Attachments"
|
||||||
],
|
],
|
||||||
"summary": "imports items into the database",
|
"summary": "Create Item Attachment",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -710,7 +713,7 @@ const docTemplate = `{
|
||||||
"tags": [
|
"tags": [
|
||||||
"Items Attachments"
|
"Items Attachments"
|
||||||
],
|
],
|
||||||
"summary": "retrieves an attachment for an item",
|
"summary": "Get Item Attachment",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -745,7 +748,7 @@ const docTemplate = `{
|
||||||
"tags": [
|
"tags": [
|
||||||
"Items Attachments"
|
"Items Attachments"
|
||||||
],
|
],
|
||||||
"summary": "retrieves an attachment for an item",
|
"summary": "Update Item Attachment",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -789,7 +792,7 @@ const docTemplate = `{
|
||||||
"tags": [
|
"tags": [
|
||||||
"Items Attachments"
|
"Items Attachments"
|
||||||
],
|
],
|
||||||
"summary": "retrieves an attachment for an item",
|
"summary": "Delete Item Attachment",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -974,7 +977,7 @@ const docTemplate = `{
|
||||||
"tags": [
|
"tags": [
|
||||||
"Labels"
|
"Labels"
|
||||||
],
|
],
|
||||||
"summary": "Create a new label",
|
"summary": "Create Label",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"description": "Label Data",
|
"description": "Label Data",
|
||||||
|
@ -1009,7 +1012,7 @@ const docTemplate = `{
|
||||||
"tags": [
|
"tags": [
|
||||||
"Labels"
|
"Labels"
|
||||||
],
|
],
|
||||||
"summary": "Gets a label and fields",
|
"summary": "Get Label",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -1040,7 +1043,7 @@ const docTemplate = `{
|
||||||
"tags": [
|
"tags": [
|
||||||
"Labels"
|
"Labels"
|
||||||
],
|
],
|
||||||
"summary": "updates a label",
|
"summary": "Update Label",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -1071,7 +1074,7 @@ const docTemplate = `{
|
||||||
"tags": [
|
"tags": [
|
||||||
"Labels"
|
"Labels"
|
||||||
],
|
],
|
||||||
"summary": "deletes a label",
|
"summary": "Delete Label",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -1146,7 +1149,7 @@ const docTemplate = `{
|
||||||
"tags": [
|
"tags": [
|
||||||
"Locations"
|
"Locations"
|
||||||
],
|
],
|
||||||
"summary": "Create a new location",
|
"summary": "Create Location",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"description": "Location Data",
|
"description": "Location Data",
|
||||||
|
@ -1181,7 +1184,7 @@ const docTemplate = `{
|
||||||
"tags": [
|
"tags": [
|
||||||
"Locations"
|
"Locations"
|
||||||
],
|
],
|
||||||
"summary": "Get All Locations",
|
"summary": "Get Locations Tree",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
|
@ -1228,7 +1231,7 @@ const docTemplate = `{
|
||||||
"tags": [
|
"tags": [
|
||||||
"Locations"
|
"Locations"
|
||||||
],
|
],
|
||||||
"summary": "Gets a location and fields",
|
"summary": "Get Location",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -1259,7 +1262,7 @@ const docTemplate = `{
|
||||||
"tags": [
|
"tags": [
|
||||||
"Locations"
|
"Locations"
|
||||||
],
|
],
|
||||||
"summary": "updates a location",
|
"summary": "Update Location",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -1299,7 +1302,7 @@ const docTemplate = `{
|
||||||
"tags": [
|
"tags": [
|
||||||
"Locations"
|
"Locations"
|
||||||
],
|
],
|
||||||
"summary": "deletes a location",
|
"summary": "Delete Location",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -1329,7 +1332,7 @@ const docTemplate = `{
|
||||||
"tags": [
|
"tags": [
|
||||||
"Notifiers"
|
"Notifiers"
|
||||||
],
|
],
|
||||||
"summary": "Get All notifier",
|
"summary": "Get Notifiers",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
|
@ -1366,7 +1369,7 @@ const docTemplate = `{
|
||||||
"tags": [
|
"tags": [
|
||||||
"Notifiers"
|
"Notifiers"
|
||||||
],
|
],
|
||||||
"summary": "Create a new notifier",
|
"summary": "Create Notifier",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"description": "Notifier Data",
|
"description": "Notifier Data",
|
||||||
|
@ -1401,7 +1404,7 @@ const docTemplate = `{
|
||||||
"tags": [
|
"tags": [
|
||||||
"Notifiers"
|
"Notifiers"
|
||||||
],
|
],
|
||||||
"summary": "Test notifier",
|
"summary": "Test Notifier",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -1435,7 +1438,7 @@ const docTemplate = `{
|
||||||
"tags": [
|
"tags": [
|
||||||
"Notifiers"
|
"Notifiers"
|
||||||
],
|
],
|
||||||
"summary": "Update a notifier",
|
"summary": "Update Notifier",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -1472,7 +1475,7 @@ const docTemplate = `{
|
||||||
"tags": [
|
"tags": [
|
||||||
"Notifiers"
|
"Notifiers"
|
||||||
],
|
],
|
||||||
"summary": "Delete a notifier",
|
"summary": "Delete a Notifier",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -1502,7 +1505,7 @@ const docTemplate = `{
|
||||||
"tags": [
|
"tags": [
|
||||||
"Items"
|
"Items"
|
||||||
],
|
],
|
||||||
"summary": "Encode data into QRCode",
|
"summary": "Create QR Code",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -1534,7 +1537,7 @@ const docTemplate = `{
|
||||||
"tags": [
|
"tags": [
|
||||||
"Reporting"
|
"Reporting"
|
||||||
],
|
],
|
||||||
"summary": "Generates a Bill of Materials CSV",
|
"summary": "Export Bill of Materials",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "text/csv",
|
"description": "text/csv",
|
||||||
|
@ -1553,7 +1556,7 @@ const docTemplate = `{
|
||||||
"tags": [
|
"tags": [
|
||||||
"Base"
|
"Base"
|
||||||
],
|
],
|
||||||
"summary": "Retrieves the basic information about the API",
|
"summary": "Application Info",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
|
@ -1574,7 +1577,7 @@ const docTemplate = `{
|
||||||
"tags": [
|
"tags": [
|
||||||
"User"
|
"User"
|
||||||
],
|
],
|
||||||
"summary": "Updates the users password",
|
"summary": "Change Password",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"description": "Password Payload",
|
"description": "Password Payload",
|
||||||
|
@ -1677,7 +1680,7 @@ const docTemplate = `{
|
||||||
"tags": [
|
"tags": [
|
||||||
"User"
|
"User"
|
||||||
],
|
],
|
||||||
"summary": "Get the current user",
|
"summary": "Register New User",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"description": "User Data",
|
"description": "User Data",
|
||||||
|
@ -1709,7 +1712,7 @@ const docTemplate = `{
|
||||||
"tags": [
|
"tags": [
|
||||||
"User"
|
"User"
|
||||||
],
|
],
|
||||||
"summary": "Get the current user",
|
"summary": "Get User Self",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
|
@ -1743,7 +1746,7 @@ const docTemplate = `{
|
||||||
"tags": [
|
"tags": [
|
||||||
"User"
|
"User"
|
||||||
],
|
],
|
||||||
"summary": "Update the current user",
|
"summary": "Update Account",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"description": "User Data",
|
"description": "User Data",
|
||||||
|
@ -1788,7 +1791,7 @@ const docTemplate = `{
|
||||||
"tags": [
|
"tags": [
|
||||||
"User"
|
"User"
|
||||||
],
|
],
|
||||||
"summary": "Deletes the user account",
|
"summary": "Delete Account",
|
||||||
"responses": {
|
"responses": {
|
||||||
"204": {
|
"204": {
|
||||||
"description": "No Content"
|
"description": "No Content"
|
||||||
|
@ -2836,8 +2839,8 @@ var SwaggerInfo = &swag.Spec{
|
||||||
Host: "",
|
Host: "",
|
||||||
BasePath: "/api",
|
BasePath: "/api",
|
||||||
Schemes: []string{},
|
Schemes: []string{},
|
||||||
Title: "Go API Templates",
|
Title: "Homebox API",
|
||||||
Description: "This is a simple Rest API Server Template that implements some basic User and Authentication patterns to help you get started and bootstrap your next project!.",
|
Description: "Track, Manage, and Organize your Shit.",
|
||||||
InfoInstanceName: "swagger",
|
InfoInstanceName: "swagger",
|
||||||
SwaggerTemplate: docTemplate,
|
SwaggerTemplate: docTemplate,
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
{
|
{
|
||||||
"swagger": "2.0",
|
"swagger": "2.0",
|
||||||
"info": {
|
"info": {
|
||||||
"description": "This is a simple Rest API Server Template that implements some basic User and Authentication patterns to help you get started and bootstrap your next project!.",
|
"description": "Track, Manage, and Organize your Shit.",
|
||||||
"title": "Go API Templates",
|
"title": "Homebox API",
|
||||||
"contact": {
|
"contact": {
|
||||||
"name": "Don't"
|
"name": "Don't"
|
||||||
},
|
},
|
||||||
|
@ -20,13 +20,14 @@
|
||||||
"Bearer": []
|
"Bearer": []
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"description": "Ensures all items in the database have an asset ID",
|
||||||
"produces": [
|
"produces": [
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Group"
|
"Actions"
|
||||||
],
|
],
|
||||||
"summary": "Ensures all items in the database have an asset id",
|
"summary": "Ensure Asset IDs",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
|
@ -44,13 +45,14 @@
|
||||||
"Bearer": []
|
"Bearer": []
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"description": "Ensures all items in the database have an import ref",
|
||||||
"produces": [
|
"produces": [
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Group"
|
"Actions"
|
||||||
],
|
],
|
||||||
"summary": "Ensures all items in the database have an import ref",
|
"summary": "Ensures Import Refs",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
|
@ -68,13 +70,14 @@
|
||||||
"Bearer": []
|
"Bearer": []
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"description": "Resets all item date fields to the beginning of the day",
|
||||||
"produces": [
|
"produces": [
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Group"
|
"Actions"
|
||||||
],
|
],
|
||||||
"summary": "Resets all item date fields to the beginning of the day",
|
"summary": "Zero Out Time Fields",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
|
@ -96,9 +99,9 @@
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Assets"
|
"Items"
|
||||||
],
|
],
|
||||||
"summary": "Gets an item by Asset ID",
|
"summary": "Get Item by Asset ID",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -131,7 +134,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Group"
|
"Group"
|
||||||
],
|
],
|
||||||
"summary": "Get the current user's group",
|
"summary": "Get Group",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
|
@ -153,7 +156,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Group"
|
"Group"
|
||||||
],
|
],
|
||||||
"summary": "Updates some fields of the current users group",
|
"summary": "Update Group",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"description": "User Data",
|
"description": "User Data",
|
||||||
|
@ -188,7 +191,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Group"
|
"Group"
|
||||||
],
|
],
|
||||||
"summary": "Get the current user",
|
"summary": "Create Group Invitation",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"description": "User Data",
|
"description": "User Data",
|
||||||
|
@ -223,7 +226,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Statistics"
|
"Statistics"
|
||||||
],
|
],
|
||||||
"summary": "Get the current user's group statistics",
|
"summary": "Get Group Statistics",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
|
@ -247,7 +250,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Statistics"
|
"Statistics"
|
||||||
],
|
],
|
||||||
"summary": "Get the current user's group statistics",
|
"summary": "Get Label Statistics",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
|
@ -274,7 +277,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Statistics"
|
"Statistics"
|
||||||
],
|
],
|
||||||
"summary": "Get the current user's group statistics",
|
"summary": "Get Location Statistics",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
|
@ -301,7 +304,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Statistics"
|
"Statistics"
|
||||||
],
|
],
|
||||||
"summary": "Queries the changes overtime of the purchase price over time",
|
"summary": "Get Purchase Price Statistics",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -339,7 +342,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Items"
|
"Items"
|
||||||
],
|
],
|
||||||
"summary": "Get All Items",
|
"summary": "Query All Items",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -401,7 +404,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Items"
|
"Items"
|
||||||
],
|
],
|
||||||
"summary": "Create a new item",
|
"summary": "Create Item",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"description": "Item Data",
|
"description": "Item Data",
|
||||||
|
@ -433,7 +436,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Items"
|
"Items"
|
||||||
],
|
],
|
||||||
"summary": "exports items into the database",
|
"summary": "Export Items",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "text/csv",
|
"description": "text/csv",
|
||||||
|
@ -457,7 +460,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Items"
|
"Items"
|
||||||
],
|
],
|
||||||
"summary": "imports items into the database",
|
"summary": "Get All Custom Field Names",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
|
@ -484,7 +487,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Items"
|
"Items"
|
||||||
],
|
],
|
||||||
"summary": "imports items into the database",
|
"summary": "Get All Custom Field Values",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
|
@ -511,7 +514,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Items"
|
"Items"
|
||||||
],
|
],
|
||||||
"summary": "imports items into the database",
|
"summary": "Import Items",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "file",
|
"type": "file",
|
||||||
|
@ -541,7 +544,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Items"
|
"Items"
|
||||||
],
|
],
|
||||||
"summary": "Gets a item and fields",
|
"summary": "Get Item",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -572,7 +575,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Items"
|
"Items"
|
||||||
],
|
],
|
||||||
"summary": "updates a item",
|
"summary": "Update Item",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -612,7 +615,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Items"
|
"Items"
|
||||||
],
|
],
|
||||||
"summary": "deletes a item",
|
"summary": "Delete Item",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -642,7 +645,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Items Attachments"
|
"Items Attachments"
|
||||||
],
|
],
|
||||||
"summary": "imports items into the database",
|
"summary": "Create Item Attachment",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -702,7 +705,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Items Attachments"
|
"Items Attachments"
|
||||||
],
|
],
|
||||||
"summary": "retrieves an attachment for an item",
|
"summary": "Get Item Attachment",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -737,7 +740,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Items Attachments"
|
"Items Attachments"
|
||||||
],
|
],
|
||||||
"summary": "retrieves an attachment for an item",
|
"summary": "Update Item Attachment",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -781,7 +784,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Items Attachments"
|
"Items Attachments"
|
||||||
],
|
],
|
||||||
"summary": "retrieves an attachment for an item",
|
"summary": "Delete Item Attachment",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -966,7 +969,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Labels"
|
"Labels"
|
||||||
],
|
],
|
||||||
"summary": "Create a new label",
|
"summary": "Create Label",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"description": "Label Data",
|
"description": "Label Data",
|
||||||
|
@ -1001,7 +1004,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Labels"
|
"Labels"
|
||||||
],
|
],
|
||||||
"summary": "Gets a label and fields",
|
"summary": "Get Label",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -1032,7 +1035,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Labels"
|
"Labels"
|
||||||
],
|
],
|
||||||
"summary": "updates a label",
|
"summary": "Update Label",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -1063,7 +1066,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Labels"
|
"Labels"
|
||||||
],
|
],
|
||||||
"summary": "deletes a label",
|
"summary": "Delete Label",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -1138,7 +1141,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Locations"
|
"Locations"
|
||||||
],
|
],
|
||||||
"summary": "Create a new location",
|
"summary": "Create Location",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"description": "Location Data",
|
"description": "Location Data",
|
||||||
|
@ -1173,7 +1176,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Locations"
|
"Locations"
|
||||||
],
|
],
|
||||||
"summary": "Get All Locations",
|
"summary": "Get Locations Tree",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
|
@ -1220,7 +1223,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Locations"
|
"Locations"
|
||||||
],
|
],
|
||||||
"summary": "Gets a location and fields",
|
"summary": "Get Location",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -1251,7 +1254,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Locations"
|
"Locations"
|
||||||
],
|
],
|
||||||
"summary": "updates a location",
|
"summary": "Update Location",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -1291,7 +1294,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Locations"
|
"Locations"
|
||||||
],
|
],
|
||||||
"summary": "deletes a location",
|
"summary": "Delete Location",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -1321,7 +1324,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Notifiers"
|
"Notifiers"
|
||||||
],
|
],
|
||||||
"summary": "Get All notifier",
|
"summary": "Get Notifiers",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
|
@ -1358,7 +1361,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Notifiers"
|
"Notifiers"
|
||||||
],
|
],
|
||||||
"summary": "Create a new notifier",
|
"summary": "Create Notifier",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"description": "Notifier Data",
|
"description": "Notifier Data",
|
||||||
|
@ -1393,7 +1396,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Notifiers"
|
"Notifiers"
|
||||||
],
|
],
|
||||||
"summary": "Test notifier",
|
"summary": "Test Notifier",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -1427,7 +1430,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Notifiers"
|
"Notifiers"
|
||||||
],
|
],
|
||||||
"summary": "Update a notifier",
|
"summary": "Update Notifier",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -1464,7 +1467,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Notifiers"
|
"Notifiers"
|
||||||
],
|
],
|
||||||
"summary": "Delete a notifier",
|
"summary": "Delete a Notifier",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -1494,7 +1497,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Items"
|
"Items"
|
||||||
],
|
],
|
||||||
"summary": "Encode data into QRCode",
|
"summary": "Create QR Code",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -1526,7 +1529,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Reporting"
|
"Reporting"
|
||||||
],
|
],
|
||||||
"summary": "Generates a Bill of Materials CSV",
|
"summary": "Export Bill of Materials",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "text/csv",
|
"description": "text/csv",
|
||||||
|
@ -1545,7 +1548,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Base"
|
"Base"
|
||||||
],
|
],
|
||||||
"summary": "Retrieves the basic information about the API",
|
"summary": "Application Info",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
|
@ -1566,7 +1569,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"User"
|
"User"
|
||||||
],
|
],
|
||||||
"summary": "Updates the users password",
|
"summary": "Change Password",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"description": "Password Payload",
|
"description": "Password Payload",
|
||||||
|
@ -1669,7 +1672,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"User"
|
"User"
|
||||||
],
|
],
|
||||||
"summary": "Get the current user",
|
"summary": "Register New User",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"description": "User Data",
|
"description": "User Data",
|
||||||
|
@ -1701,7 +1704,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"User"
|
"User"
|
||||||
],
|
],
|
||||||
"summary": "Get the current user",
|
"summary": "Get User Self",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
|
@ -1735,7 +1738,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"User"
|
"User"
|
||||||
],
|
],
|
||||||
"summary": "Update the current user",
|
"summary": "Update Account",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"description": "User Data",
|
"description": "User Data",
|
||||||
|
@ -1780,7 +1783,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"User"
|
"User"
|
||||||
],
|
],
|
||||||
"summary": "Deletes the user account",
|
"summary": "Delete Account",
|
||||||
"responses": {
|
"responses": {
|
||||||
"204": {
|
"204": {
|
||||||
"description": "No Content"
|
"description": "No Content"
|
||||||
|
|
|
@ -685,16 +685,15 @@ definitions:
|
||||||
info:
|
info:
|
||||||
contact:
|
contact:
|
||||||
name: Don't
|
name: Don't
|
||||||
description: This is a simple Rest API Server Template that implements some basic
|
description: Track, Manage, and Organize your Shit.
|
||||||
User and Authentication patterns to help you get started and bootstrap your next
|
|
||||||
project!.
|
|
||||||
license:
|
license:
|
||||||
name: MIT
|
name: MIT
|
||||||
title: Go API Templates
|
title: Homebox API
|
||||||
version: "1.0"
|
version: "1.0"
|
||||||
paths:
|
paths:
|
||||||
/v1/actions/ensure-asset-ids:
|
/v1/actions/ensure-asset-ids:
|
||||||
post:
|
post:
|
||||||
|
description: Ensures all items in the database have an asset ID
|
||||||
produces:
|
produces:
|
||||||
- application/json
|
- application/json
|
||||||
responses:
|
responses:
|
||||||
|
@ -704,11 +703,12 @@ paths:
|
||||||
$ref: '#/definitions/v1.ActionAmountResult'
|
$ref: '#/definitions/v1.ActionAmountResult'
|
||||||
security:
|
security:
|
||||||
- Bearer: []
|
- Bearer: []
|
||||||
summary: Ensures all items in the database have an asset id
|
summary: Ensure Asset IDs
|
||||||
tags:
|
tags:
|
||||||
- Group
|
- Actions
|
||||||
/v1/actions/ensure-import-refs:
|
/v1/actions/ensure-import-refs:
|
||||||
post:
|
post:
|
||||||
|
description: Ensures all items in the database have an import ref
|
||||||
produces:
|
produces:
|
||||||
- application/json
|
- application/json
|
||||||
responses:
|
responses:
|
||||||
|
@ -718,11 +718,12 @@ paths:
|
||||||
$ref: '#/definitions/v1.ActionAmountResult'
|
$ref: '#/definitions/v1.ActionAmountResult'
|
||||||
security:
|
security:
|
||||||
- Bearer: []
|
- Bearer: []
|
||||||
summary: Ensures all items in the database have an import ref
|
summary: Ensures Import Refs
|
||||||
tags:
|
tags:
|
||||||
- Group
|
- Actions
|
||||||
/v1/actions/zero-item-time-fields:
|
/v1/actions/zero-item-time-fields:
|
||||||
post:
|
post:
|
||||||
|
description: Resets all item date fields to the beginning of the day
|
||||||
produces:
|
produces:
|
||||||
- application/json
|
- application/json
|
||||||
responses:
|
responses:
|
||||||
|
@ -732,9 +733,9 @@ paths:
|
||||||
$ref: '#/definitions/v1.ActionAmountResult'
|
$ref: '#/definitions/v1.ActionAmountResult'
|
||||||
security:
|
security:
|
||||||
- Bearer: []
|
- Bearer: []
|
||||||
summary: Resets all item date fields to the beginning of the day
|
summary: Zero Out Time Fields
|
||||||
tags:
|
tags:
|
||||||
- Group
|
- Actions
|
||||||
/v1/assets/{id}:
|
/v1/assets/{id}:
|
||||||
get:
|
get:
|
||||||
parameters:
|
parameters:
|
||||||
|
@ -752,9 +753,9 @@ paths:
|
||||||
$ref: '#/definitions/repo.PaginationResult-repo_ItemSummary'
|
$ref: '#/definitions/repo.PaginationResult-repo_ItemSummary'
|
||||||
security:
|
security:
|
||||||
- Bearer: []
|
- Bearer: []
|
||||||
summary: Gets an item by Asset ID
|
summary: Get Item by Asset ID
|
||||||
tags:
|
tags:
|
||||||
- Assets
|
- Items
|
||||||
/v1/groups:
|
/v1/groups:
|
||||||
get:
|
get:
|
||||||
produces:
|
produces:
|
||||||
|
@ -766,7 +767,7 @@ paths:
|
||||||
$ref: '#/definitions/repo.Group'
|
$ref: '#/definitions/repo.Group'
|
||||||
security:
|
security:
|
||||||
- Bearer: []
|
- Bearer: []
|
||||||
summary: Get the current user's group
|
summary: Get Group
|
||||||
tags:
|
tags:
|
||||||
- Group
|
- Group
|
||||||
put:
|
put:
|
||||||
|
@ -786,7 +787,7 @@ paths:
|
||||||
$ref: '#/definitions/repo.Group'
|
$ref: '#/definitions/repo.Group'
|
||||||
security:
|
security:
|
||||||
- Bearer: []
|
- Bearer: []
|
||||||
summary: Updates some fields of the current users group
|
summary: Update Group
|
||||||
tags:
|
tags:
|
||||||
- Group
|
- Group
|
||||||
/v1/groups/invitations:
|
/v1/groups/invitations:
|
||||||
|
@ -807,7 +808,7 @@ paths:
|
||||||
$ref: '#/definitions/v1.GroupInvitation'
|
$ref: '#/definitions/v1.GroupInvitation'
|
||||||
security:
|
security:
|
||||||
- Bearer: []
|
- Bearer: []
|
||||||
summary: Get the current user
|
summary: Create Group Invitation
|
||||||
tags:
|
tags:
|
||||||
- Group
|
- Group
|
||||||
/v1/groups/statistics:
|
/v1/groups/statistics:
|
||||||
|
@ -821,7 +822,7 @@ paths:
|
||||||
$ref: '#/definitions/repo.GroupStatistics'
|
$ref: '#/definitions/repo.GroupStatistics'
|
||||||
security:
|
security:
|
||||||
- Bearer: []
|
- Bearer: []
|
||||||
summary: Get the current user's group statistics
|
summary: Get Group Statistics
|
||||||
tags:
|
tags:
|
||||||
- Statistics
|
- Statistics
|
||||||
/v1/groups/statistics/labels:
|
/v1/groups/statistics/labels:
|
||||||
|
@ -837,7 +838,7 @@ paths:
|
||||||
type: array
|
type: array
|
||||||
security:
|
security:
|
||||||
- Bearer: []
|
- Bearer: []
|
||||||
summary: Get the current user's group statistics
|
summary: Get Label Statistics
|
||||||
tags:
|
tags:
|
||||||
- Statistics
|
- Statistics
|
||||||
/v1/groups/statistics/locations:
|
/v1/groups/statistics/locations:
|
||||||
|
@ -853,7 +854,7 @@ paths:
|
||||||
type: array
|
type: array
|
||||||
security:
|
security:
|
||||||
- Bearer: []
|
- Bearer: []
|
||||||
summary: Get the current user's group statistics
|
summary: Get Location Statistics
|
||||||
tags:
|
tags:
|
||||||
- Statistics
|
- Statistics
|
||||||
/v1/groups/statistics/purchase-price:
|
/v1/groups/statistics/purchase-price:
|
||||||
|
@ -876,7 +877,7 @@ paths:
|
||||||
$ref: '#/definitions/repo.ValueOverTime'
|
$ref: '#/definitions/repo.ValueOverTime'
|
||||||
security:
|
security:
|
||||||
- Bearer: []
|
- Bearer: []
|
||||||
summary: Queries the changes overtime of the purchase price over time
|
summary: Get Purchase Price Statistics
|
||||||
tags:
|
tags:
|
||||||
- Statistics
|
- Statistics
|
||||||
/v1/items:
|
/v1/items:
|
||||||
|
@ -917,7 +918,7 @@ paths:
|
||||||
$ref: '#/definitions/repo.PaginationResult-repo_ItemSummary'
|
$ref: '#/definitions/repo.PaginationResult-repo_ItemSummary'
|
||||||
security:
|
security:
|
||||||
- Bearer: []
|
- Bearer: []
|
||||||
summary: Get All Items
|
summary: Query All Items
|
||||||
tags:
|
tags:
|
||||||
- Items
|
- Items
|
||||||
post:
|
post:
|
||||||
|
@ -937,7 +938,7 @@ paths:
|
||||||
$ref: '#/definitions/repo.ItemSummary'
|
$ref: '#/definitions/repo.ItemSummary'
|
||||||
security:
|
security:
|
||||||
- Bearer: []
|
- Bearer: []
|
||||||
summary: Create a new item
|
summary: Create Item
|
||||||
tags:
|
tags:
|
||||||
- Items
|
- Items
|
||||||
/v1/items/{id}:
|
/v1/items/{id}:
|
||||||
|
@ -955,7 +956,7 @@ paths:
|
||||||
description: No Content
|
description: No Content
|
||||||
security:
|
security:
|
||||||
- Bearer: []
|
- Bearer: []
|
||||||
summary: deletes a item
|
summary: Delete Item
|
||||||
tags:
|
tags:
|
||||||
- Items
|
- Items
|
||||||
get:
|
get:
|
||||||
|
@ -974,7 +975,7 @@ paths:
|
||||||
$ref: '#/definitions/repo.ItemOut'
|
$ref: '#/definitions/repo.ItemOut'
|
||||||
security:
|
security:
|
||||||
- Bearer: []
|
- Bearer: []
|
||||||
summary: Gets a item and fields
|
summary: Get Item
|
||||||
tags:
|
tags:
|
||||||
- Items
|
- Items
|
||||||
put:
|
put:
|
||||||
|
@ -999,7 +1000,7 @@ paths:
|
||||||
$ref: '#/definitions/repo.ItemOut'
|
$ref: '#/definitions/repo.ItemOut'
|
||||||
security:
|
security:
|
||||||
- Bearer: []
|
- Bearer: []
|
||||||
summary: updates a item
|
summary: Update Item
|
||||||
tags:
|
tags:
|
||||||
- Items
|
- Items
|
||||||
/v1/items/{id}/attachments:
|
/v1/items/{id}/attachments:
|
||||||
|
@ -1038,7 +1039,7 @@ paths:
|
||||||
$ref: '#/definitions/server.ErrorResponse'
|
$ref: '#/definitions/server.ErrorResponse'
|
||||||
security:
|
security:
|
||||||
- Bearer: []
|
- Bearer: []
|
||||||
summary: imports items into the database
|
summary: Create Item Attachment
|
||||||
tags:
|
tags:
|
||||||
- Items Attachments
|
- Items Attachments
|
||||||
/v1/items/{id}/attachments/{attachment_id}:
|
/v1/items/{id}/attachments/{attachment_id}:
|
||||||
|
@ -1059,7 +1060,7 @@ paths:
|
||||||
description: No Content
|
description: No Content
|
||||||
security:
|
security:
|
||||||
- Bearer: []
|
- Bearer: []
|
||||||
summary: retrieves an attachment for an item
|
summary: Delete Item Attachment
|
||||||
tags:
|
tags:
|
||||||
- Items Attachments
|
- Items Attachments
|
||||||
get:
|
get:
|
||||||
|
@ -1083,7 +1084,7 @@ paths:
|
||||||
$ref: '#/definitions/v1.ItemAttachmentToken'
|
$ref: '#/definitions/v1.ItemAttachmentToken'
|
||||||
security:
|
security:
|
||||||
- Bearer: []
|
- Bearer: []
|
||||||
summary: retrieves an attachment for an item
|
summary: Get Item Attachment
|
||||||
tags:
|
tags:
|
||||||
- Items Attachments
|
- Items Attachments
|
||||||
put:
|
put:
|
||||||
|
@ -1111,7 +1112,7 @@ paths:
|
||||||
$ref: '#/definitions/repo.ItemOut'
|
$ref: '#/definitions/repo.ItemOut'
|
||||||
security:
|
security:
|
||||||
- Bearer: []
|
- Bearer: []
|
||||||
summary: retrieves an attachment for an item
|
summary: Update Item Attachment
|
||||||
tags:
|
tags:
|
||||||
- Items Attachments
|
- Items Attachments
|
||||||
/v1/items/{id}/maintenance:
|
/v1/items/{id}/maintenance:
|
||||||
|
@ -1189,7 +1190,7 @@ paths:
|
||||||
type: string
|
type: string
|
||||||
security:
|
security:
|
||||||
- Bearer: []
|
- Bearer: []
|
||||||
summary: exports items into the database
|
summary: Export Items
|
||||||
tags:
|
tags:
|
||||||
- Items
|
- Items
|
||||||
/v1/items/fields:
|
/v1/items/fields:
|
||||||
|
@ -1205,7 +1206,7 @@ paths:
|
||||||
type: array
|
type: array
|
||||||
security:
|
security:
|
||||||
- Bearer: []
|
- Bearer: []
|
||||||
summary: imports items into the database
|
summary: Get All Custom Field Names
|
||||||
tags:
|
tags:
|
||||||
- Items
|
- Items
|
||||||
/v1/items/fields/values:
|
/v1/items/fields/values:
|
||||||
|
@ -1221,7 +1222,7 @@ paths:
|
||||||
type: array
|
type: array
|
||||||
security:
|
security:
|
||||||
- Bearer: []
|
- Bearer: []
|
||||||
summary: imports items into the database
|
summary: Get All Custom Field Values
|
||||||
tags:
|
tags:
|
||||||
- Items
|
- Items
|
||||||
/v1/items/import:
|
/v1/items/import:
|
||||||
|
@ -1239,7 +1240,7 @@ paths:
|
||||||
description: No Content
|
description: No Content
|
||||||
security:
|
security:
|
||||||
- Bearer: []
|
- Bearer: []
|
||||||
summary: imports items into the database
|
summary: Import Items
|
||||||
tags:
|
tags:
|
||||||
- Items
|
- Items
|
||||||
/v1/labels:
|
/v1/labels:
|
||||||
|
@ -1280,7 +1281,7 @@ paths:
|
||||||
$ref: '#/definitions/repo.LabelSummary'
|
$ref: '#/definitions/repo.LabelSummary'
|
||||||
security:
|
security:
|
||||||
- Bearer: []
|
- Bearer: []
|
||||||
summary: Create a new label
|
summary: Create Label
|
||||||
tags:
|
tags:
|
||||||
- Labels
|
- Labels
|
||||||
/v1/labels/{id}:
|
/v1/labels/{id}:
|
||||||
|
@ -1298,7 +1299,7 @@ paths:
|
||||||
description: No Content
|
description: No Content
|
||||||
security:
|
security:
|
||||||
- Bearer: []
|
- Bearer: []
|
||||||
summary: deletes a label
|
summary: Delete Label
|
||||||
tags:
|
tags:
|
||||||
- Labels
|
- Labels
|
||||||
get:
|
get:
|
||||||
|
@ -1317,7 +1318,7 @@ paths:
|
||||||
$ref: '#/definitions/repo.LabelOut'
|
$ref: '#/definitions/repo.LabelOut'
|
||||||
security:
|
security:
|
||||||
- Bearer: []
|
- Bearer: []
|
||||||
summary: Gets a label and fields
|
summary: Get Label
|
||||||
tags:
|
tags:
|
||||||
- Labels
|
- Labels
|
||||||
put:
|
put:
|
||||||
|
@ -1336,7 +1337,7 @@ paths:
|
||||||
$ref: '#/definitions/repo.LabelOut'
|
$ref: '#/definitions/repo.LabelOut'
|
||||||
security:
|
security:
|
||||||
- Bearer: []
|
- Bearer: []
|
||||||
summary: updates a label
|
summary: Update Label
|
||||||
tags:
|
tags:
|
||||||
- Labels
|
- Labels
|
||||||
/v1/locations:
|
/v1/locations:
|
||||||
|
@ -1382,7 +1383,7 @@ paths:
|
||||||
$ref: '#/definitions/repo.LocationSummary'
|
$ref: '#/definitions/repo.LocationSummary'
|
||||||
security:
|
security:
|
||||||
- Bearer: []
|
- Bearer: []
|
||||||
summary: Create a new location
|
summary: Create Location
|
||||||
tags:
|
tags:
|
||||||
- Locations
|
- Locations
|
||||||
/v1/locations/{id}:
|
/v1/locations/{id}:
|
||||||
|
@ -1400,7 +1401,7 @@ paths:
|
||||||
description: No Content
|
description: No Content
|
||||||
security:
|
security:
|
||||||
- Bearer: []
|
- Bearer: []
|
||||||
summary: deletes a location
|
summary: Delete Location
|
||||||
tags:
|
tags:
|
||||||
- Locations
|
- Locations
|
||||||
get:
|
get:
|
||||||
|
@ -1419,7 +1420,7 @@ paths:
|
||||||
$ref: '#/definitions/repo.LocationOut'
|
$ref: '#/definitions/repo.LocationOut'
|
||||||
security:
|
security:
|
||||||
- Bearer: []
|
- Bearer: []
|
||||||
summary: Gets a location and fields
|
summary: Get Location
|
||||||
tags:
|
tags:
|
||||||
- Locations
|
- Locations
|
||||||
put:
|
put:
|
||||||
|
@ -1444,7 +1445,7 @@ paths:
|
||||||
$ref: '#/definitions/repo.LocationOut'
|
$ref: '#/definitions/repo.LocationOut'
|
||||||
security:
|
security:
|
||||||
- Bearer: []
|
- Bearer: []
|
||||||
summary: updates a location
|
summary: Update Location
|
||||||
tags:
|
tags:
|
||||||
- Locations
|
- Locations
|
||||||
/v1/locations/tree:
|
/v1/locations/tree:
|
||||||
|
@ -1470,7 +1471,7 @@ paths:
|
||||||
type: object
|
type: object
|
||||||
security:
|
security:
|
||||||
- Bearer: []
|
- Bearer: []
|
||||||
summary: Get All Locations
|
summary: Get Locations Tree
|
||||||
tags:
|
tags:
|
||||||
- Locations
|
- Locations
|
||||||
/v1/notifiers:
|
/v1/notifiers:
|
||||||
|
@ -1491,7 +1492,7 @@ paths:
|
||||||
type: object
|
type: object
|
||||||
security:
|
security:
|
||||||
- Bearer: []
|
- Bearer: []
|
||||||
summary: Get All notifier
|
summary: Get Notifiers
|
||||||
tags:
|
tags:
|
||||||
- Notifiers
|
- Notifiers
|
||||||
post:
|
post:
|
||||||
|
@ -1511,7 +1512,7 @@ paths:
|
||||||
$ref: '#/definitions/repo.NotifierOut'
|
$ref: '#/definitions/repo.NotifierOut'
|
||||||
security:
|
security:
|
||||||
- Bearer: []
|
- Bearer: []
|
||||||
summary: Create a new notifier
|
summary: Create Notifier
|
||||||
tags:
|
tags:
|
||||||
- Notifiers
|
- Notifiers
|
||||||
/v1/notifiers/{id}:
|
/v1/notifiers/{id}:
|
||||||
|
@ -1527,7 +1528,7 @@ paths:
|
||||||
description: No Content
|
description: No Content
|
||||||
security:
|
security:
|
||||||
- Bearer: []
|
- Bearer: []
|
||||||
summary: Delete a notifier
|
summary: Delete a Notifier
|
||||||
tags:
|
tags:
|
||||||
- Notifiers
|
- Notifiers
|
||||||
put:
|
put:
|
||||||
|
@ -1550,7 +1551,7 @@ paths:
|
||||||
$ref: '#/definitions/repo.NotifierOut'
|
$ref: '#/definitions/repo.NotifierOut'
|
||||||
security:
|
security:
|
||||||
- Bearer: []
|
- Bearer: []
|
||||||
summary: Update a notifier
|
summary: Update Notifier
|
||||||
tags:
|
tags:
|
||||||
- Notifiers
|
- Notifiers
|
||||||
/v1/notifiers/test:
|
/v1/notifiers/test:
|
||||||
|
@ -1573,7 +1574,7 @@ paths:
|
||||||
description: No Content
|
description: No Content
|
||||||
security:
|
security:
|
||||||
- Bearer: []
|
- Bearer: []
|
||||||
summary: Test notifier
|
summary: Test Notifier
|
||||||
tags:
|
tags:
|
||||||
- Notifiers
|
- Notifiers
|
||||||
/v1/qrcode:
|
/v1/qrcode:
|
||||||
|
@ -1592,7 +1593,7 @@ paths:
|
||||||
type: string
|
type: string
|
||||||
security:
|
security:
|
||||||
- Bearer: []
|
- Bearer: []
|
||||||
summary: Encode data into QRCode
|
summary: Create QR Code
|
||||||
tags:
|
tags:
|
||||||
- Items
|
- Items
|
||||||
/v1/reporting/bill-of-materials:
|
/v1/reporting/bill-of-materials:
|
||||||
|
@ -1606,7 +1607,7 @@ paths:
|
||||||
type: string
|
type: string
|
||||||
security:
|
security:
|
||||||
- Bearer: []
|
- Bearer: []
|
||||||
summary: Generates a Bill of Materials CSV
|
summary: Export Bill of Materials
|
||||||
tags:
|
tags:
|
||||||
- Reporting
|
- Reporting
|
||||||
/v1/status:
|
/v1/status:
|
||||||
|
@ -1618,7 +1619,7 @@ paths:
|
||||||
description: OK
|
description: OK
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/v1.ApiSummary'
|
$ref: '#/definitions/v1.ApiSummary'
|
||||||
summary: Retrieves the basic information about the API
|
summary: Application Info
|
||||||
tags:
|
tags:
|
||||||
- Base
|
- Base
|
||||||
/v1/users/change-password:
|
/v1/users/change-password:
|
||||||
|
@ -1635,7 +1636,7 @@ paths:
|
||||||
description: No Content
|
description: No Content
|
||||||
security:
|
security:
|
||||||
- Bearer: []
|
- Bearer: []
|
||||||
summary: Updates the users password
|
summary: Change Password
|
||||||
tags:
|
tags:
|
||||||
- User
|
- User
|
||||||
/v1/users/login:
|
/v1/users/login:
|
||||||
|
@ -1701,7 +1702,7 @@ paths:
|
||||||
responses:
|
responses:
|
||||||
"204":
|
"204":
|
||||||
description: No Content
|
description: No Content
|
||||||
summary: Get the current user
|
summary: Register New User
|
||||||
tags:
|
tags:
|
||||||
- User
|
- User
|
||||||
/v1/users/self:
|
/v1/users/self:
|
||||||
|
@ -1713,7 +1714,7 @@ paths:
|
||||||
description: No Content
|
description: No Content
|
||||||
security:
|
security:
|
||||||
- Bearer: []
|
- Bearer: []
|
||||||
summary: Deletes the user account
|
summary: Delete Account
|
||||||
tags:
|
tags:
|
||||||
- User
|
- User
|
||||||
get:
|
get:
|
||||||
|
@ -1731,7 +1732,7 @@ paths:
|
||||||
type: object
|
type: object
|
||||||
security:
|
security:
|
||||||
- Bearer: []
|
- Bearer: []
|
||||||
summary: Get the current user
|
summary: Get User Self
|
||||||
tags:
|
tags:
|
||||||
- User
|
- User
|
||||||
put:
|
put:
|
||||||
|
@ -1756,7 +1757,7 @@ paths:
|
||||||
type: object
|
type: object
|
||||||
security:
|
security:
|
||||||
- Bearer: []
|
- Bearer: []
|
||||||
summary: Update the current user
|
summary: Update Account
|
||||||
tags:
|
tags:
|
||||||
- User
|
- User
|
||||||
securityDefinitions:
|
securityDefinitions:
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
{
|
{
|
||||||
"swagger": "2.0",
|
"swagger": "2.0",
|
||||||
"info": {
|
"info": {
|
||||||
"description": "This is a simple Rest API Server Template that implements some basic User and Authentication patterns to help you get started and bootstrap your next project!.",
|
"description": "Track, Manage, and Organize your Shit.",
|
||||||
"title": "Go API Templates",
|
"title": "Homebox API",
|
||||||
"contact": {
|
"contact": {
|
||||||
"name": "Don't"
|
"name": "Don't"
|
||||||
},
|
},
|
||||||
|
@ -20,13 +20,14 @@
|
||||||
"Bearer": []
|
"Bearer": []
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"description": "Ensures all items in the database have an asset ID",
|
||||||
"produces": [
|
"produces": [
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Group"
|
"Actions"
|
||||||
],
|
],
|
||||||
"summary": "Ensures all items in the database have an asset id",
|
"summary": "Ensure Asset IDs",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
|
@ -44,13 +45,14 @@
|
||||||
"Bearer": []
|
"Bearer": []
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"description": "Ensures all items in the database have an import ref",
|
||||||
"produces": [
|
"produces": [
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Group"
|
"Actions"
|
||||||
],
|
],
|
||||||
"summary": "Ensures all items in the database have an import ref",
|
"summary": "Ensures Import Refs",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
|
@ -68,13 +70,14 @@
|
||||||
"Bearer": []
|
"Bearer": []
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"description": "Resets all item date fields to the beginning of the day",
|
||||||
"produces": [
|
"produces": [
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Group"
|
"Actions"
|
||||||
],
|
],
|
||||||
"summary": "Resets all item date fields to the beginning of the day",
|
"summary": "Zero Out Time Fields",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
|
@ -96,9 +99,9 @@
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"Assets"
|
"Items"
|
||||||
],
|
],
|
||||||
"summary": "Gets an item by Asset ID",
|
"summary": "Get Item by Asset ID",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -131,7 +134,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Group"
|
"Group"
|
||||||
],
|
],
|
||||||
"summary": "Get the current user's group",
|
"summary": "Get Group",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
|
@ -153,7 +156,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Group"
|
"Group"
|
||||||
],
|
],
|
||||||
"summary": "Updates some fields of the current users group",
|
"summary": "Update Group",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"description": "User Data",
|
"description": "User Data",
|
||||||
|
@ -188,7 +191,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Group"
|
"Group"
|
||||||
],
|
],
|
||||||
"summary": "Get the current user",
|
"summary": "Create Group Invitation",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"description": "User Data",
|
"description": "User Data",
|
||||||
|
@ -223,7 +226,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Statistics"
|
"Statistics"
|
||||||
],
|
],
|
||||||
"summary": "Get the current user's group statistics",
|
"summary": "Get Group Statistics",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
|
@ -247,7 +250,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Statistics"
|
"Statistics"
|
||||||
],
|
],
|
||||||
"summary": "Get the current user's group statistics",
|
"summary": "Get Label Statistics",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
|
@ -274,7 +277,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Statistics"
|
"Statistics"
|
||||||
],
|
],
|
||||||
"summary": "Get the current user's group statistics",
|
"summary": "Get Location Statistics",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
|
@ -301,7 +304,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Statistics"
|
"Statistics"
|
||||||
],
|
],
|
||||||
"summary": "Queries the changes overtime of the purchase price over time",
|
"summary": "Get Purchase Price Statistics",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -339,7 +342,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Items"
|
"Items"
|
||||||
],
|
],
|
||||||
"summary": "Get All Items",
|
"summary": "Query All Items",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -401,7 +404,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Items"
|
"Items"
|
||||||
],
|
],
|
||||||
"summary": "Create a new item",
|
"summary": "Create Item",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"description": "Item Data",
|
"description": "Item Data",
|
||||||
|
@ -433,7 +436,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Items"
|
"Items"
|
||||||
],
|
],
|
||||||
"summary": "exports items into the database",
|
"summary": "Export Items",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "text/csv",
|
"description": "text/csv",
|
||||||
|
@ -457,7 +460,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Items"
|
"Items"
|
||||||
],
|
],
|
||||||
"summary": "imports items into the database",
|
"summary": "Get All Custom Field Names",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
|
@ -484,7 +487,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Items"
|
"Items"
|
||||||
],
|
],
|
||||||
"summary": "imports items into the database",
|
"summary": "Get All Custom Field Values",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
|
@ -511,7 +514,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Items"
|
"Items"
|
||||||
],
|
],
|
||||||
"summary": "imports items into the database",
|
"summary": "Import Items",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "file",
|
"type": "file",
|
||||||
|
@ -541,7 +544,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Items"
|
"Items"
|
||||||
],
|
],
|
||||||
"summary": "Gets a item and fields",
|
"summary": "Get Item",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -572,7 +575,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Items"
|
"Items"
|
||||||
],
|
],
|
||||||
"summary": "updates a item",
|
"summary": "Update Item",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -612,7 +615,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Items"
|
"Items"
|
||||||
],
|
],
|
||||||
"summary": "deletes a item",
|
"summary": "Delete Item",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -642,7 +645,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Items Attachments"
|
"Items Attachments"
|
||||||
],
|
],
|
||||||
"summary": "imports items into the database",
|
"summary": "Create Item Attachment",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -702,7 +705,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Items Attachments"
|
"Items Attachments"
|
||||||
],
|
],
|
||||||
"summary": "retrieves an attachment for an item",
|
"summary": "Get Item Attachment",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -737,7 +740,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Items Attachments"
|
"Items Attachments"
|
||||||
],
|
],
|
||||||
"summary": "retrieves an attachment for an item",
|
"summary": "Update Item Attachment",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -781,7 +784,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Items Attachments"
|
"Items Attachments"
|
||||||
],
|
],
|
||||||
"summary": "retrieves an attachment for an item",
|
"summary": "Delete Item Attachment",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -966,7 +969,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Labels"
|
"Labels"
|
||||||
],
|
],
|
||||||
"summary": "Create a new label",
|
"summary": "Create Label",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"description": "Label Data",
|
"description": "Label Data",
|
||||||
|
@ -1001,7 +1004,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Labels"
|
"Labels"
|
||||||
],
|
],
|
||||||
"summary": "Gets a label and fields",
|
"summary": "Get Label",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -1032,7 +1035,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Labels"
|
"Labels"
|
||||||
],
|
],
|
||||||
"summary": "updates a label",
|
"summary": "Update Label",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -1063,7 +1066,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Labels"
|
"Labels"
|
||||||
],
|
],
|
||||||
"summary": "deletes a label",
|
"summary": "Delete Label",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -1138,7 +1141,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Locations"
|
"Locations"
|
||||||
],
|
],
|
||||||
"summary": "Create a new location",
|
"summary": "Create Location",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"description": "Location Data",
|
"description": "Location Data",
|
||||||
|
@ -1173,7 +1176,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Locations"
|
"Locations"
|
||||||
],
|
],
|
||||||
"summary": "Get All Locations",
|
"summary": "Get Locations Tree",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
|
@ -1220,7 +1223,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Locations"
|
"Locations"
|
||||||
],
|
],
|
||||||
"summary": "Gets a location and fields",
|
"summary": "Get Location",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -1251,7 +1254,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Locations"
|
"Locations"
|
||||||
],
|
],
|
||||||
"summary": "updates a location",
|
"summary": "Update Location",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -1291,7 +1294,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Locations"
|
"Locations"
|
||||||
],
|
],
|
||||||
"summary": "deletes a location",
|
"summary": "Delete Location",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -1321,7 +1324,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Notifiers"
|
"Notifiers"
|
||||||
],
|
],
|
||||||
"summary": "Get All notifier",
|
"summary": "Get Notifiers",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
|
@ -1358,7 +1361,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Notifiers"
|
"Notifiers"
|
||||||
],
|
],
|
||||||
"summary": "Create a new notifier",
|
"summary": "Create Notifier",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"description": "Notifier Data",
|
"description": "Notifier Data",
|
||||||
|
@ -1393,7 +1396,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Notifiers"
|
"Notifiers"
|
||||||
],
|
],
|
||||||
"summary": "Test notifier",
|
"summary": "Test Notifier",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -1427,7 +1430,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Notifiers"
|
"Notifiers"
|
||||||
],
|
],
|
||||||
"summary": "Update a notifier",
|
"summary": "Update Notifier",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -1464,7 +1467,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Notifiers"
|
"Notifiers"
|
||||||
],
|
],
|
||||||
"summary": "Delete a notifier",
|
"summary": "Delete a Notifier",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -1494,7 +1497,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Items"
|
"Items"
|
||||||
],
|
],
|
||||||
"summary": "Encode data into QRCode",
|
"summary": "Create QR Code",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -1526,7 +1529,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Reporting"
|
"Reporting"
|
||||||
],
|
],
|
||||||
"summary": "Generates a Bill of Materials CSV",
|
"summary": "Export Bill of Materials",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "text/csv",
|
"description": "text/csv",
|
||||||
|
@ -1545,7 +1548,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Base"
|
"Base"
|
||||||
],
|
],
|
||||||
"summary": "Retrieves the basic information about the API",
|
"summary": "Application Info",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
|
@ -1566,7 +1569,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"User"
|
"User"
|
||||||
],
|
],
|
||||||
"summary": "Updates the users password",
|
"summary": "Change Password",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"description": "Password Payload",
|
"description": "Password Payload",
|
||||||
|
@ -1669,7 +1672,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"User"
|
"User"
|
||||||
],
|
],
|
||||||
"summary": "Get the current user",
|
"summary": "Register New User",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"description": "User Data",
|
"description": "User Data",
|
||||||
|
@ -1701,7 +1704,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"User"
|
"User"
|
||||||
],
|
],
|
||||||
"summary": "Get the current user",
|
"summary": "Get User Self",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
|
@ -1735,7 +1738,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"User"
|
"User"
|
||||||
],
|
],
|
||||||
"summary": "Update the current user",
|
"summary": "Update Account",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"description": "User Data",
|
"description": "User Data",
|
||||||
|
@ -1780,7 +1783,7 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"User"
|
"User"
|
||||||
],
|
],
|
||||||
"summary": "Deletes the user account",
|
"summary": "Delete Account",
|
||||||
"responses": {
|
"responses": {
|
||||||
"204": {
|
"204": {
|
||||||
"description": "No Content"
|
"description": "No Content"
|
||||||
|
|
Loading…
Reference in a new issue