mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 02:18:26 +00:00
Add a task to re-process files of an item
This commit is contained in:
@ -0,0 +1,24 @@
|
||||
package docspell.common
|
||||
|
||||
import io.circe.generic.semiauto._
|
||||
import io.circe.{Decoder, Encoder}
|
||||
|
||||
/** Arguments when re-processing an item.
|
||||
*
|
||||
* The `itemId` must exist and point to some item. If the attachment
|
||||
* list is non-empty, only those attachments are re-processed. They
|
||||
* must belong to the given item. If the list is empty, then all
|
||||
* attachments are re-processed.
|
||||
*/
|
||||
case class ReProcessItemArgs(itemId: Ident, attachments: List[Ident])
|
||||
|
||||
object ReProcessItemArgs {
|
||||
|
||||
val taskName: Ident = Ident.unsafe("re-process-item")
|
||||
|
||||
implicit val jsonEncoder: Encoder[ReProcessItemArgs] =
|
||||
deriveEncoder[ReProcessItemArgs]
|
||||
|
||||
implicit val jsonDecoder: Decoder[ReProcessItemArgs] =
|
||||
deriveDecoder[ReProcessItemArgs]
|
||||
}
|
Reference in New Issue
Block a user