diff --git a/pkg/onepassword/model/item.go b/pkg/onepassword/model/item.go index ebf13e4..9f4af44 100644 --- a/pkg/onepassword/model/item.go +++ b/pkg/onepassword/model/item.go @@ -70,6 +70,15 @@ func (i *Item) FromSDKItem(item *sdk.Item) { }) } + // Items of 'Document' category keeps file information in the Document field. + if item.Category == sdk.ItemCategoryDocument { + i.Files = append(i.Files, File{ + ID: item.Document.ID, + Name: item.Document.Name, + Size: int(item.Document.Size), + }) + } + i.CreatedAt = item.CreatedAt }