diff --git a/website/site/content/docs/addons/writing.md b/website/site/content/docs/addons/writing.md index 5e68969e..2f8b1ef9 100644 --- a/website/site/content/docs/addons/writing.md +++ b/website/site/content/docs/addons/writing.md @@ -162,8 +162,8 @@ You find the complete structure below. It consists of these parts: - `newItems`: declares files relative to `OUTPUT_DIR` that should be processed as new uploads -The `commands` allows to set tags, fields and other things. All parts -are optional, you don't need to return the complete structure. Just +The `commands` allows to set the item date, tags, fields and other things. All +parts are optional, you don't need to return the complete structure. Just returning `commands` or only `files` is ok. **Example** diff --git a/website/src/main/scala/docspell/website/AddonOutputExample.scala b/website/src/main/scala/docspell/website/AddonOutputExample.scala index c7059ea4..7cdf6e67 100644 --- a/website/src/main/scala/docspell/website/AddonOutputExample.scala +++ b/website/src/main/scala/docspell/website/AddonOutputExample.scala @@ -5,6 +5,7 @@ import docspell.addons.out.{AddonOutput, ItemFile, NewFile, NewItem} import docspell.addons.out.NewFile.{Meta => FileMeta} import docspell.addons.out.NewItem.{Meta => ItemMeta} import docspell.common._ +import docspell.common.Timestamp import docspell.common.bc.{AttachmentAction, BackendCommand, ItemAction} import io.circe.syntax._ @@ -15,6 +16,7 @@ object AddonOutputExample extends Helper { BackendCommand.ItemUpdate( itemId = id("XabZ-item-id"), actions = List( + ItemAction.SetDate(Timestamp.ofMillis(1699697471000L)), ItemAction.AddTags(Set("tag1", "tag2")), ItemAction.ReplaceTags(Set("tagX", "tagY")), ItemAction.RemoveTags(Set("tag0", "tag9")),