Restore / Undelete a ComposeRecord from a workflow

Is there any way to, within a workflow, restore a deleted ComposeRecord?

I have built a module where records link to “sub-records” in other modules. I have implemented a rolling delete to delete the sub-records when the main record is deleted, and now I would like to implement the same with Undelete.

So far my best guess was to clear the deletedAt and deletedBy fields on the record, but this fails as both are read-only.

I know that I could creating a new copy of the sub-record and link the main record to that, but I’d like to attempt to retain the revision history of the original sub-record.

I see there is no function to restore/undelete, guessing no one encountered this usecase before.
As far as I’m aware there is no way to do that right now. If you want to create an issue on github be my guest. Shouldn’t be that hard to add aswell (could fit into the next release)