I cant stand exes or my partner being friends with exes.

I understand if you share a social circle and dont want to lose all the other friends but you can still avoid the ex. No need to invite them to parties hosted by me/partner or attend parties hosted by the exes. Exes might have shared friends but the friendship is separately between both not a shared one.

What is an appropriate level of contact for exes? (only messages on birthdays, inviting exes out to social circle events...)