Can Stream API return event with an updated filing document?

Hello,

We’re trying to understand if we need to handle rewrites of filings documents that were already fetched.

So, the question is - can we get events with the document updates from Streaming API? Specifically, when the document was already attached to a filing transaction, and then rewritten. If yes, are there any traces except fields_changed? To avoid downloading and comparing hashes.

Double checking about fields_changed, bc it seem to be not very reliable, according to forum discussions and my usage.
Example - when transaction first appear on stream with a link in document_metadata, there might be sequential event for this transaction with fields_changed: [“document_metadata”], but the file was available before that.

Reposting the answer from support:

Yes, the Stream API can return an event with an updated document. In theory, when a new image is added to a filing history record, a new stream event will be published with “event”: { “fields_changed”: [“links.document_metadata”] }. Please note that the document metadata link itself will remain the same as the originally published value.