Add a task to re-process files of an item

This commit is contained in:
Eike Kettner
2020-08-12 22:26:44 +02:00
parent 8e15478e3c
commit 07e9a9767e
13 changed files with 350 additions and 5 deletions

View File

@ -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]
}