Minecraft wiki entry for Development_versions, associated text: Added player_interacted_with_entity advancement trigger.
item matches the item which was in the player's hand during interaction.
entity matches the entity which was interacted with.