The bin
What moving an item to the bin takes with it, how to move only the items you name, and how an item comes back or is deleted for good.
A delete is a soft delete: the item moves to the bin, which the API calls the trash, and waits there until it's restored or purged. It takes the items a cascading edge reaches, and the item's parts. Edges says what each edge type does.
Move only the items you name
To move an item without what hangs from it, such as an app's own settings item, trash only the named items, or run marfa items trash-named:
- Up to 20 items go, all or none. A
versionyou send for an item must still be current, or nothing moves. - Nothing else goes. Their children, parts and edges stay, even a part whose every host you named.
- A
blockedge on a named item refuses the request, even one between two named items. - Each named item goes to the bin by itself, so restoring it brings back only that item.
In a working copy, marfa device items trash-named moves one item locally and queues it. The queue holds and judges it as it does a delete, and sends it only as a trash of that item.
Bring an item back
A restore, or a transition out of the bin, brings the item back with what its trash took. Its restored_at records when, and keeps that time through later edits and trips to the bin. It's null on an item that was never restored. A working copy stamps it when you restore offline.
The feed window never moves a restored item to the bin again. A type's feed window moves a feed item to the bin only while its state is active and its restored_at is null, so an app that shows when a feed item leaves reads both.
Purge
Purging deletes a binned item for good, with its edges and parts. It needs items.purge and write on the type. Housekeeping purges items kept past trash_retention_days.
The rules are in the items and housekeeping chapters of the contract.