Swedish Livonia, which constituted the southern part of modern Estonia, was fully ceded in what peace treaty between Sweden, the Polish-Lithuanian Commonwealth, the Habsburgs and Brandenburg-Prussia?
Swedish Livonia:  The territory, which constituted the southern part of modern Estonia (including the island of Ösel ceded by Denmark after the Treaty of Brömsebro) and the northern part of modern Latvia (the Vidzeme region), represented the conquest of the major part of the Polish-Lithuanian Duchy of Livonia during the 1600–1629 Polish-Swedish War. Swedish Livonia:  Parts of Livonia and the city of Riga were under Swedish control as early as 1621 and the situation was formalized in Truce of Altmark 1629, but the whole territory was not ceded formally until the Treaty of Oliva in 1660. Treaty of Oliva:  At Oliva (Oliwa, Royal Prussia), peace was made between Sweden, the Polish-Lithuanian Commonwealth, the Habsburgs and Brandenburg-Prussia.
Treaty of Oliva