Documents in Factify are immutable - you cannot overwrite files. Instead, you create new versions to track changes while preserving the complete history.
Retrieve the complete version history for a document:
for await (const page of await factify.versions.list({ documentId: "doc_01h2xcejqtf2nbrexx3vqjhp41"})) { for (const version of page.listVersionsResponse?.items ?? []) { console.log(`${version.id} - ${version.createdAt}`); }}