Hostages held by Hamas in Gaza are expected to be freed in a ceasefire deal with Israel. Palestinian prisoners held in Israel will also be freed.