I managed to make it work somewhat.
But there are a few major drawbacks.
- I currently rely on SHARED_FURNITURE:GetPlaceableFurnitureCategoryTreeData():GetNumEntriesRecursive() and filter items by name in order to find what I need, but that means that it does not work across languages and it also requires that there is no search text placed in the housing editor (although I probably can clear that from code).
- It looks like some items do not return an itemName from GetPlacedHousingFurnitureInfo which makes it impossible to restore them with this method. (Haven't checked which items are affected yet)
- In order to find out which method I should use to place an item (HousingEditorRequestItemPlacement or HousingEditorRequestCollectiblePlacement) I use GetCollectibleInfo and check if the name is an empty string, but I am not confident that it is always correct. I believe if I get an itemLink it would be easy to determine by comparing the itemType.
- This method is slow and sends a lot of individual requests to the server. Maybe you could add a HousingEditorBeginItemPlacement, HousingEditorCommitItemPlacement and HousingEditorRollbackItemPlacement and in the same fashion a HousingEditorBeginItemRemoval, HousingEditorCommitItemRemoval and HousingEditorRollbackItemRemoval to collect these calls locally and then do a bulk update. For removal you could also just add a HousingEditorClearHouse method which removes everything.