Trash hooks

Hand-written shim. CRUD methods are generated; see ./trash.gen. Adds a hand-written `useEmptyTrash` because the trash.empty op is a bulk operation that doesn't fit the generated mutation shape — we want it to invalidate everything (the trash list AND every touched entity's own cache, which we can't enumerate ahead of time, so we settle for invalidating `trashKeys.all()` plus letting consumers attach extra invalidations via options).

Hooks

useEmptyTrash composite

Empty trash — purges every soft-deleted entity in scope.

TypeScript
useEmptyTrash(options?: MutationOpts<EmptyTrashResult, EmptyTrashParams | undefined>)

Types: EmptyTrashResult · EmptyTrashParams

useListTrash query

List soft-deleted entities across the caller's workspaces.

TypeScript
useListTrash(params?: ListTrashParams, options?: QueryOpts<Page<TrashItem>>)

Types: ListTrashParams · Page · TrashItem