Allow to search in soft-deleted items

A new query/request parameter can be used to apply a search to only
soft-deleted items.

The query expression `Trashed` has been introduced which selects only
items with state `Deleted`. This is another option an analog to
`ValidItemStates` (both cannot be used together as they would select
no items). This new query node is not added to the parser, because
users may not use it in their own queries - it must be part of the
"fixed" query so the application can control in which subset to search
(it would otherwise be possible to select any items).
This commit is contained in:
eikek
2021-08-14 14:53:05 +02:00
parent cb777e30c0
commit a7b74bd5ae
8 changed files with 62 additions and 21 deletions

View File

@ -1478,6 +1478,7 @@ paths:
- $ref: "#/components/parameters/limit"
- $ref: "#/components/parameters/offset"
- $ref: "#/components/parameters/withDetails"
- $ref: "#/components/parameters/deleted"
responses:
200:
description: Ok
@ -1576,6 +1577,7 @@ paths:
- authTokenHeader: []
parameters:
- $ref: "#/components/parameters/q"
- $ref: "#/components/parameters/deleted"
responses:
200:
description: Ok
@ -4112,6 +4114,12 @@ components:
withDetails:
type: boolean
default: false
deleted:
type: boolean
default: false
description: |
If this is true, the search performed only for
soft-deleted items.
query:
type: string
description: |
@ -5838,6 +5846,12 @@ components:
description: Whether to return details to each item.
schema:
type: boolean
deleted:
name: deleted
in: query
description: Whether to search in soft-deleted items only.
schema:
type: boolean
name:
name: name
in: path