Only one city in all the land made a peace agreement with Israel. That was the Hivite city of Gibeon. All the other cities were defeated in war.
Joshua fought against those kings many years.
the five rulers of the Philistine people, all of the Canaanite people, the people of Sidon, and the Hivite people that lived in the Lebanon mountains from Mount Baal Hermon to Lebo Hamath.